[Bf-committers] Sequencer filter stack patch
Peter Schlaile
peter at schlaile.de
Sun Jan 17 10:04:23 CET 2010
Hi Xavier,
> For now I have just 2 types of filters:
> - filters that changes the ImBuf direclty : color balance, makefloat,
> premul, flip
> - filters that change the Iamge trough affine marix : transform (with
> translate rotation around a center point and scalling), flip should be
> changed to use this
just had a look at the patch. First: looks great!
But (small but :) ): you should change some things:
The input_prefilter function was called prefilter, since it did some
things, you can only do on the raw input data.
That includes:
* deinterlacing (that has to be done *before* the conversion from
YUV -> RGB takes place and was therefore handled by the imbuf-reader.
That is a must, since IMB_filtery just throws away one
field instead of doing correct field interpolation. Which is actually
impossible, since the underlying YUV-data is gone at that moment... )
* color conversion could be done a lot more efficient and correctly
if done directly on input data. (read: YUV!)
* flip-Y could be done very efficiently within the input reader, too as
part of the color conversion step YUV -> RGB.
So: you may want to
a) take deinterlacing out of your filter stack (leave that to the image
reader like it was implemented before)
b) fold all color changing "point functions" (operate one pixel at a time)
into a single function like you did with the transformation matrix.
(maybe using lookup tables for byte input?)
After that, we could take a look, how that can be folded into
the image reader. (optional, but definitely worth the change for
better quality)
To clarify:
now we do: YUV -> RGB -> color change
We *should* do: YUV -> color change -> RGB
Cheers,
Peter
----
Peter Schlaile
More information about the Bf-committers
mailing list