Description: The application converts a RGB bitmap into YUV format. Both conversion and deconversions are illustrated.
The YUV (also know as YCbCr) colorspace is just another method of representing pixel information.
Instead of using Red, Green and Blue percentages, YUV uses a Y (luminance, luma) plane that transmits the light information and two chrominance planes U,V (Cb,Cr) that transmit the color information.
This is useful when compressing images and videos, because the human eye is more sensitive to the Y (luminance) information and less sensitive to the U,V (Cb, Cr) chroma information.
For example, some video codecs take two pixels and store them in the following format : Y1 U Y2 V , which means instead of using 48 bits , only 32 bits are used. Y1 and Y2 are the Y of each pixel and U and V are the chroma information (average for both pixels). It's a little bit more complex than this but I will show how it's done in another source code.
This file came from Planet-Source-Code.com...the home millions of lines of source code
You can view comments on this code/and or vote on it at: http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=66076&lngWId=1
The author may have retained certain copyrights to this code...please observe their request and the law by reviewing all copyright conditions at the above URL.