6.7 DitheringThe dither units adds random noise to a number of low order bits of each colourvalue of each RGB(888) pixel colour.The random noise is generated by a pseudo random number generator RNG. Thenoise is evenly distributed.The extent to which noise is added can be configured byVInCONTROL.DITHEN[3:0]. VInCONTROL.DITHEN[3:0] determines the numberof low order bits of each colour value, which are replaced by bits, generated bythe pseudo random number generator.In the end the RGB(888) colour data is truncated to RGB(565) format for storagein the framebuffer finally.The dithering performs and addition of k bits, specified byVInCONTROL.DITHEN[3:0], to the k (for R and B) respectively k-1 (for G) lowerbits of of the colour values. Finally the 24-bit R(888) values are cropped to 16-bitRGB(565) values to be stored in the framebuffer.The number of manipulated bits of the green colour value is always one less thanfor red and blue.The data manipulation of the dithering unit can be represented as follows:• R5[4:0] = [ (R8[7:0] + RNG[k:0]) and 0xF8 ] >> 3• G6[5:0] = [ (G8[7:0] + RNG[k-1:0]) and 0xFC ] >> 2• B5[4:0] = [ (B8[7:0] + RNG[k:0]) and 0xF8 ] >> 36.8 Video Data FIFO and Framebuffer addressingThis section describes the function of the video data FIFO and the way how theFIFO data is transferred to the memory.6.8.1 Video data FIFOThe 32 x 32-bit FIFO gathers the RGB(565) data of 64 pixels. If the data of 64pixels is collected, the entire FIFO content is written to the framebuffer via theAHB bus by using a burst transfer.The data format of each pixel after dithering is 16 bit wide. Hence two consecutiveRGB(565) values are combined to a single 32-bit data word, stored in the 32-bitwide FIFO - and later on in the framebuffer.At the beginning of each new scanline the read and write addresses of the FIFOare cleared - which actually means a FIFO reset. The first 16-bit RGB(565) valueis stored in the lower 16-bit of the first 32-bit FIFO entry, the next RGB(565) goesto the higher 16 bit.Video Input (Ravin-M only) Chapter 6Preliminary User's Manual S19203EE1V3UM00 167