3.1.8.1.3 Color Conversion (RGB to YCbCr)

Each input tile is converted from the RGB color space to the YCbCr color space. The transform used takes an RGB input value with each component in the range [0-255] and transforms it into Y, Cb, and Cr, in the ranges [0.0, 255.0], [-128.0, 127.0], and [-128.0, 127.0], respectively. The Y-component is level-shifted down by 128, so that it also falls into the [-128.0, 127.0] range. The input tile in this level-shifted symmetric YCbCr color space is used as the input for the next stage of DWT. The matrix equation for this conversion is shown in the following figure.

The RGB to YCbCr conversion matrix

Figure 5: The RGB to YCbCr conversion matrix