Lance Hanlen has put some work into this, and I believe he has a
workable solution.  IIRC, his coefficients are fixed, but the format
is flexible.  I was planning to embed this function near the tail end
of the rendering engine, right about where the blend/planemask/rop
logic is.  This way, you can send Y in one pass and then, say, UV in
another, and various other combinations and formats.  In the end, you
just have to get the fields in the right order to translate them from
YUV into RGB on the way out, and the texture unit should help us take
care of all of the various scaling, ordering, and packing issues.

Also, we see no reason to have an RGB->YUV conversion.  No one felt it
had any practical use.  So, basically, you give the GPU YUV numbers
and have it work on that, and then at one point, just convert it over
to RGB.  The GPU doesn't know or care about the difference, because
all it ever does is fiddle with triples of "meaningless" numbers
anyhow.

Also, I expect that in some cases, the GPU may do the conversion
slower than the CPU could (multiple passes and memory references), but
what really matters is that we get it done in the time much less than
one video output frame.  We can eliminate the CPU overhead, and use
DMA to transport the YUV data, and just let the GPU take its time to
do the job.


On 1/19/07, Nicolas Boulay <[EMAIL PROTECTED]> wrote:
I don't know the status of Yuv texture inside ogp, that could be used
to reduice bandwith and/or produice a good quality output for video.

I play a bit with pwc the linux drivers for phillips webcam. They clam
to deliver yuv 4:2:0 planar.  But it's quite hard to find the good
matrix parameter. the fourcc website give some of them.

mpeg2 YCrCb is yuv with y € [0;1] with value between [16;235] (value
came from my memory but you got the idea) and u&v € [-0.5;0.5] with
value between [16;239]. But when i look at pwc output Y value goes
from 0 to 244. Not even full scale ! So i must change the matrix
coordinate to avoid to lose too much quality.

I don't know if the mess is the same for all different video capture
format. But yuv conversion seems not standard at all.

In the fourcc website, a guy speak about using 2.14 fixe format to
avoid losing quality.

What is provided for OGP ? A fixed function transfer ? I think that a
multiplexing manager for 4:4:4 4:2:0 ... should be used followed by a
matrix multiply in 2.14 precision at least. The value of the 3x3
matrix should be provided by the drivers.

If we choose arbitrary value, it will never be the good one (mpeg 4
avc, does not use the same value than mpeg2, if i remember correctly)

Nicolas Boulay
_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)



--
Timothy Miller
http://www.cse.ohio-state.edu/~millerti
_______________________________________________
Open-graphics mailing list
[email protected]
http://lists.duskglow.com/mailman/listinfo/open-graphics
List service provided by Duskglow Consulting, LLC (www.duskglow.com)

Reply via email to