unsigned char ISI_BytesForOnePixel(unsigned char bmpRgb) { unsigned char nbByte_Pixel; if (bmpRgb == RGB) { if ((AT91C_BASE_ISI->ISI_CR2 & AT91C_ISI_RGB_MODE) == AT91C_ISI_RGB_MODE_RGB_565){ // RGB: 5:6:5 16bits/pixels nbByte_Pixel = 2; } else { // RGB: 8:8:8 24bits/pixels nbByte_Pixel = 3; } } else { // YUV: 2 pixels for 4 bytes nbByte_Pixel = 2; } return nbByte_Pixel; }