6.5.3 YUV(4:4:4) to RGB(888) conversionThe YUV(4:4:4) to RGB(888) conversion is done with following formulas:• R = 1.164 • (Y-16) + 1.596 • (V-128)• G = 1.164 • (Y-16) – 0.813 • (V-128) – 0.391 • (U-128)• B = 1.164 • (Y-16) + 2.018 • (U-128)6.6 YUV AdjustmentThe YUV adjustment unit provides two different modes, selected byVInADJUSTLEVEL.ADLMODE:• VInADJUSTLEVEL.ADJMODE = 0: YUV amplification mode• VInADJUSTLEVEL.ADJMODE = 1: YUV replacement modeBrightness andcontrastIn both modes the brightness and contrast can be enhanced by adjusting the Ychannel of the YUV(4:4:4) encoded data. This is achieved by applying an offsetand amplifying the value.The offset is set by VInADJUSTLEVEL.OY[7:0] value, the amplification factor isset by VInADJUSTLEVEL.AY[4:0].The output Yout is calculated as follows:• Yout = (Yin – 128) • AY[4:0] / 16 + OY[7:0]Yout is clamped to its maximum (235) and minimum (16) value.Amplification mode In amplification mode (VInADJUSTLEVEL.ADJMODE = 0) the colour saturationcan be changed by amplifying the U and V values.The amplification factors are set by VInADJUSTLEVEL.AU[4:0] andVInADJUSTLEVEL.AV[4:0]. The output values Uout and Vout are calculated asfollows:• Uout = (Uin – 128) • AU[4:0] / 16 + 128• Vout = (Vin – 128) • AV[4:0] / 16 + 128Uout and Vout are clamped to their maximum (235) and minimum (16) values.Replacement mode The replacement mode (VInADJUSTLEVEL.ADJMODE = 1) performs arecolouring of monochrome images by replacing the original U and V values byVInADJUSTLEVEL.AUREP[7:0] respectively VInADJUSTLEVEL.REP[7:0]:• Uout = AUREP[7:0]• Vout = AVREP[7:0]Coefficient format The 5-bit coefficients AY[4:0], AU[4:0], AV[4:0] are used in fixed point notation, i.e.10000B corresponds to 1.Therefore the size of each of the 32 steps calculates to 2-4 = 0.0625 and thecoefficients range from 00000B = 0 to 11111B = 1.9375.Chapter 6 Video Input (Ravin-M only)166 Preliminary User's Manual S19203EE1V3UM00