På Sun, 04 Mar 2012 11:34:05 +0100, skrev Herman Robak <[email protected]>:

However, conversion in FLOAT looks pretty smooth.  It can't be
technically lossless, but it seems perceptually lossless, which is
our main concern here.  Doesn't blur work with floats in the
inner loops anyway?  And it works on a temporary buffer, since it
needs two passes, to you don't have to stick to the same component
size as the input and output.

No, not that easy.  The processing macro uses a _cast_ to float:
http://cinelerra.org/devcorner/doxy/svn_2.1_r1056/html/blur_8C-source.html#l00383

... but the buffer is in the "native" format.


What I'm suggesting is: Don't do the YUV<->RGB conversions in 8bit.
Always do them in FLOAT.  Cinelerra has functions for that; they are
called in the YUV effect plugin.  You probably have to move the
conversions closer to the inner loop to do this.

I still think it's worth pursuing, though it may not be as low hanging
fruit as I thought.


Linked below is the YUV effect's processing macro.  If the colour format
is YUV, then "use_yuv" is true, and the short block is run.  Otherwise,
the longer block with a conversion from RGB to YUV first, and a
conversion back to YUV at the end:

http://cinelerra.org/devcorner/doxy/svn_2.1_r1056/html/yuv_8C-source.html#l00289

--
Herman Robak

_______________________________________________
Cinelerra mailing list
[email protected]
https://init.linpro.no/mailman/skolelinux.no/listinfo/cinelerra

Reply via email to