36.5.2 Data Ordering

The RGB color space format is required for viewing images on a display screen preview, and the YCbCr color space format is required for encoding.

All the sensors do not output the YCbCr or RGB components in the same order. The ISI allows the user to program the same component order as the sensor, reducing software treatments to restore the right format.

Table 36-2. Data Ordering in YCbCr Mode
ModeByte 0Byte 1Byte 2Byte 3
DefaultCb(i)Y(i)Cr(i)Y(i+1)
Mode 1Cr(i)Y(i)Cb(i)Y(i+1)
Mode 2Y(i)Cb(i)Y(i+1)Cr(i)
Mode 3Y(i)Cr(i)Y(i+1)Cb(i)
Table 36-3. RGB Format in Default Mode, RGB_CFG = 00, No Swap
ModeByteD7D6D5D4D3D2D1D0
RGB 8:8:8Byte 0R7(i)R6(i)R5(i)R4(i)R3(i)R2(i)R1(i)R0(i)
Byte 1G7(i)G6(i)G5(i)G4(i)G3(i)G2(i)G1(i)G0(i)
Byte 2B7(i)B6(i)B5(i)B4(i)B3(i)B2(i)B1(i)B0(i)
Byte 3R7(i+1)R6(i+1)R5(i+1)R4(i+1)R3(i+1)R2(i+1)R1(i+1)R0(i+1)
RGB 5:6:5Byte 0R4(i)R3(i)R2(i)R1(i)R0(i)G5(i)G4(i)G3(i)
Byte 1G2(i)G1(i)G0(i)B4(i)B3(i)B2(i)B1(i)B0(i)
Byte 2R4(i+1)R3(i+1)R2(i+1)R1(i+1)R0(i+1)G5(i+1)G4(i+1)G3(i+1)
Byte 3G2(i+1)G1(i+1)G0(i+1)B4(i+1)B3(i+1)B2(i+1)B1(i+1)B0(i+1)
Table 36-4. RGB Format, RGB_CFG = 10 (Mode 2), No Swap
ModeByteD7D6D5D4D3D2D1D0
RGB 5:6:5Byte 0G2(i)G1(i)G0(i)R4(i)R3(i)R2(i)R1(i)R0(i)
Byte 1B4(i)B3(i)B2(i)B1(i)B0(i)G5(i)G4(i)G3(i)
Byte 2G2(i+1)G1(i+1)G0(i+1)R4(i+1)R3(i+1)R2(i+1)R1(i+1)R0(i+1)
Byte 3B4(i+1)B3(i+1)B2(i+1)B1(i+1)B0(i+1)G5(i+1)G4(i+1)G3(i+1)
Table 36-5. RGB Format in Default Mode, RGB_CFG = 00, Swap Activated
ModeByteD7D6D5D4D3D2D1D0
RGB 8:8:8Byte 0R0(i)R1(i)R2(i)R3(i)R4(i)R5(i)R6(i)R7(i)
Byte 1G0(i)G1(i)G2(i)G3(i)G4(i)G5(i)G6(i)G7(i)
Byte 2B0(i)B1(i)B2(i)B3(i)B4(i)B5(i)B6(i)B7(i)
Byte 3R0(i+1)R1(i+1)R2(i+1)R3(i+1)R4(i+1)R5(i+1)R6(i+1)R7(i+1)
RGB 5:6:5Byte 0G3(i)G4(i)G5(i)R0(i)R1(i)R2(i)R3(i)R4(i)
Byte 1B0(i)B1(i)B2(i)B3(i)B4(i)G0(i)G1(i)G2(i)
Byte 2G3(i+1)G4(i+1)G5(i+1)R0(i+1)R1(i+1)R2(i+1)R3(i+1)R4(i+1)
Byte 3B0(i+1)B1(i+1)B2(i+1)B3(i+1)B4(i+1)G0(i+1)G1(i+1)G2(i+1)

The RGB 5:6:5 input format is processed to be displayed as RGB 5:6:5 format, compliant with the 16-bit mode of the LCD controller.