[theora] converting YUV to RGB
mihai at hates.ms
Sat May 5 08:45:10 PDT 2007
We're doing software yuv to rgb conversion in our project
(iaxclient). Here's a link to the code, scroll down for the
I'm not saying this is the definitive way of doing it, it just work
pretty well for us. You can reuse the code if LGPL license works for
I've seen some examples of doing the conversion in a fragment shader.
If you know your code will run on a hardware that has fragment
shaders, then by all means, do that. It will free up the cpu for
other things. GL_LUMINANCE8 textures will give you monochrome
images, so it's not a good choice if you want full color video.
On May 3, 2007, at 6:25 AM, Kostas Kostiadis wrote:
> Hello all,
> I'd like to convert the theora yuv_buffer to RGB that I can render
> onto a texture.
> Googling around, there are a tone of different formulae to do so.
> There is this (with lots of corrections and amendments further down
> the page):
> and there is the MSDN stuff that says you need to convert 4:2:0 and
> 4:2:2 to 4:4:4 first, before you do anything,
> and then it has it's own set of formulae here:
> I was wondering if anyone has a definitive answer on this ;-)
> Also, performance wise, is it better to do the conversion to RGB in
> a shader, or is it better to use GL_LUMINANCE8 textures?
> kostas kostiadis | lead programmer | climax action
> work: kos at climaxgroup.com | www.climaxgroup.com
> home: kos at kostiadis.com | www.kostiadis.com
> theora mailing list
> theora at xiph.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the theora