6.4.3 StoringThe scaled 16-bit pixel data in RGB(565) colour format are collected in a FIFObefore they are written to the framebuffer. The FIFO is 32-bit wide, thus two RGB(565) values are combined to a single 32-bit word.The framebuffer target addresses are defined in the registers VInSTARTADDR1and VInSTARTADDR2.The value VInSTRIDEX.LSTRIDEX[12:0] defines the offset between the startaddresses of consecutive lines in the framebuffer.Progressive mode In progressive capture mode the framebuffer start address is defined byVInSTARTADDR2.Interlaced mode In interlaced capture mode data of the first field is stored VInSTARTADDR1, whileVInSTARTADDR2 defines the start address of the second field.Example In the above example the scaled image with the size of (600 x 225) pixels is to bestored in the framebuffer.As the width is 600 pixels and VInSTRIDEX must be aligned to 32 pixels,VInSTRIDEX = 0000 0260H is the correct setting. 8 pixels (16 bytes) are leftunused.The start address of the first captured pixel is set to VInSTARTADDR2 =0010 0000H. The entire captured field occupies the address range 0010 0000H to001B 4800H.6.5 Colour Format Conversions6.5.1 RGB(666)/(565) to RGB(888) conversionThe RGB(888) converter generates 24-bit RGB(888) data out of either 16-bit RGB(565) or 18-bit RGB(666) from the Video Input interface. The format of the VideoInput interface data is selected by the control bit VInCONTROL.RGBSEL:• VInCONTROL.RGBSEL = 0: RGB(565) Video Input formatRGB(565) is first converted to RGB(666), and then RGB(666) toRGB(888).• VInCONTROL.RGBSEL = 1: RGB(666) Video Input formatRGB(666) is converted to RGB(888).RGB(565) to RGB(888)RGB(565) is converted to RGB(666) by appending the MSBs R5[4] respectivelyB5[4] as the low order bit, while G6[5:0] remains untouched:• R6[5:0] = (R5[4:0] << 1) + (R5[4] >> 5)• B6[5:0] = (B5[4:0] << 1) + (B5[4] >> 5)Below figure shows illustrates the RGB(565) to RGB(666) conversion.Chapter 6 Video Input (Ravin-M only)164 Preliminary User's Manual S19203EE1V3UM00