Closed kaksmet closed 7 years ago
Would this be something I could work on/help with? I'm quite new to Rust, though.
Absolutely, it should be easy enough for you.
You can start by adding a UpsamplerGeneric(u8, u8)
struct to upsampler.rs
. It's fields should be used to store the horizontal and vertical scaling factors. Then in choose_upsampler
, return UpsamplerGeneric
where UnsupportedFeature::SubsamplingRatio
is currently returned.
The last step is to implement the Upsample
trait. Nearest neighbour sampling will be good enough here.
Feel free to ask for help if you need it.
(I enjoyed your presentation btw)
Ok great :) Currently working on this, might come back with some questions. And thanks, glad you liked it :)
Where do you reckon is a good start point for implementing the nearest neighbour sampling? Could you give me a few pointers? :)
Nearest neighbour sampling means that the nearest pixel is chosen, no blending between pixels is performed. In practice this means that when you are implementing upsample_row
you will basically just write each input pixel n
times to output, where n
is the horizontal scaling factor. Then do the same thing again, but in the vertical direction.
I would like to work on this.
@iamrohit7 that would be great. It doesn't seem like @samuknet is still working on this.
@iamrohit7 go for it! I'll be following along :)
Implementing a generic integer upsampler will allow us to support most chroma subsampling ratios.