Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenGL Colorspace Conversion

Does anyone know how to create a texture with a YUV colorspace so that we can get hardware based YUV to RGB colorspace conversion without having to use a fragment shader? I'm using an NVidia 9400 and I don't see an obvious GL extension that seems to do the trick. I've found examples how to use a fragment shader, but the project I'm working on currently only supports OpenGL 1.1 and I don't have time to convert it to 2.0 and perform all the regression testing necessary. This is also targeting Linux. On other platforms I've been using a MESA extension but it doesn't function on the Nvidia card.

like image 916
Steven Behnke Avatar asked Dec 05 '25 14:12

Steven Behnke


1 Answers

Since you're okay with using extensions, but you're worried about going all-out with OpenGL 2.0, consider providing a simple fragment shader with the old-school ARB_fragment_program extension.

Alternatively, you could use a library like DevIL, ImageMagick, or FreeImage to perform the conversion for you.

like image 60
prideout Avatar answered Dec 10 '25 11:12

prideout



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!