Colorspace Conversion: RGB to YUY2
-
I need to code up a converter to process RGB encoded images to YUY2 encoded images. I have good algorithms for the first step that maps between the RGB colorspace to the YUV colorspace (also known as YCbCr) thanks to FourCC.org[^]. What I've not been able to track down is how best to combine two YUV pixels into a YUY2 macropixel. Google pointed me to some code that uses a naive algorithm which is good enough to get the project done but probably not good enough for the final product. Anybody know of an online publication that might discuss this second step (YUV to YUY2) and sketch out an algorithm that is considered 'good.' Real-time performance is not required. Thanks, Dan
Be clear about the difference between your role as a programmer and as a tester. The tester in you must be suspicious, uncompromising, hostile, and compulsively obsessed with destroying, utterly destroying, the programmer's software. ----- Boris Beizer