
Fernando Cacciola wrote:
Matt Gruenke wrote:
Fernando Cacciola wrote:
Now, off the pixel/color topic. rom the Quicktime format disccusion: is it possible to supersample (rather than subsample) an image? That is, to take two or more consequtive pixels in a row and pretend is just one pixel?
You're talking about a subsampling (or decimating) iterator,
No, but I can see how the way I expressed it looked like that.
instead- of an interpolating iterator?
Exactly. The idea was not to skip even or odd pixels (which subsampling does) but to combine them.
You mean like a 4:2:2 iterator, which contains two consecutive luma samples and a chroma sample (pair)? Perhaps you could generalize this into a multisample iterator, and provided a means of getting the image dimensions in terms of multisample steps. However, I'm not sure how useful any of that would be.
However, for most purposes where this is desirable, it is probably more efficient to write a routine that resamples entire rows and columns at a time.
Which is what Ulrich said. It would be interesting the benchmark it though.
It would probably be slower, because it would involve redundant channel unpacking (certainly, if you're using a large reconstruction kernel) and probably redundant loads of reconstruction kernel coefficients. Matt