6.5.3.3.3 YUV-to-RGB Conversion

YUV data can be converted into 8-bit-per-component RGB format at the output of the cache only. Once converted, it is not possible to convert back to YUV format. The GPU2DC supports BT.601 and user-programmable coefficient YUV-to-RGB color conversion standards.

In BT.601, the YUV-to-RGB conversion is done using the following approximation:

16 <= Y <= 235
16 <= U <= 240
16 <= V <= 240
A = Y – 16
B = U – 128
C = V – 128
R = clip((298*A + 410*C + 128) >> 8)
G = clip((298*A – 101*B – 209*C + 128) >> 8)
B = clip((298*A + 519*B + 128) >> 8)

The Y, U and V components are clamped prior to the conversion.

Y is clamped between 16 and 235, included.

U and V are clamped between 16 and 240, included.

For user-programmable coefficients, the conversion coefficient is defined by the user. YUV clamp is also selected by user.

16 <= Y <= 235
16 <= U <= 240
16 <= V <= 240
Or
0 <= Y <= 255
0 <=U <= 255
0 <= V <= 255
RGB =m00m01m02m03m10m11m12m13m20m21m22m23 ×YUV