iOS/buildlibs/armv7/allegro-4.4.2/addons/jpgalleg/src/decode.c
/* plot_444:
 *  Plots an 8x8 MCU block for 444 mode. Also used to plot greyscale MCUs.
 */
Plots an 8x8 MCU block for 444 mode. Also used to plot greyscale MCUs.
Plots an 8x8 MCU block for 444 mode . Also used to plot greyscale MCUs .
static void
plot_444(intptr_t addr, int pitch, short *y1, short *y2, short *y3, short *y4, short *cb, short *cr)
{
	int x, y;
	short *y1_ptr = y1, *cb_ptr = cb, *cr_ptr = cr, v;
	(void)y2;
	(void)y3;
	(void)y4;
	if (jpeg_components == 1) {
		for (y = 0; y < 8; y++) {
			for (x = 0; x < 8; x++) {
				v = *y1_ptr++;
				*(unsigned char *)addr = MID(0, v, 255);
				addr++;
			}
			addr += (pitch - 8);
		}
	}
	else {
		for (y = 0; y < 8; y++) {
			for (x = 0; x < 8; x += 4) {
				ycbcr2rgb(addr, *y1_ptr, *cb_ptr, *cr_ptr, *(y1_ptr + 1), *(cb_ptr + 1), *(cr_ptr + 1), *(y1_ptr + 2), *(cb_ptr + 2), *(cr_ptr + 2), *(y1_ptr + 3), *(cb_ptr + 3), *(cr_ptr + 3));
				y1_ptr += 4;
				cb_ptr += 4;
				cr_ptr += 4;
				addr += 12;
			}
			addr += (pitch - 24);
		}
	}
}
static void plot_444 ( intptr_t addr , int pitch , short * y1 , short * y2 , short * y3 , short * y4 , short * cb , short * cr ) { int x , y ; short * y1_ptr = y1 , * cb_ptr = cb , * cr_ptr = cr , v ; ( void ) y2 ; ( void ) y3 ; ( void ) y4 ; if ( jpeg_components == 1 ) { for ( y = 0 ; y < 8 ; y ++ ) { for ( x = 0 ; x < 8 ; x ++ ) { v = * y1_ptr ++ ; * ( unsigned char * ) addr = MID ( 0 , v , 255 ) ; addr ++ ; } addr += ( pitch - 8 ) ; } } else { for ( y = 0 ; y < 8 ; y ++ ) { for ( x = 0 ; x < 8 ; x += 4 ) { ycbcr2rgb ( addr , * y1_ptr , * cb_ptr , * cr_ptr , * ( y1_ptr + 1 ) , * ( cb_ptr + 1 ) , * ( cr_ptr + 1 ) , * ( y1_ptr + 2 ) , * ( cb_ptr + 2 ) , * ( cr_ptr + 2 ) , * ( y1_ptr + 3 ) , * ( cb_ptr + 3 ) , * ( cr_ptr + 3 ) ) ; y1_ptr += 4 ; cb_ptr += 4 ; cr_ptr += 4 ; addr += 12 ; } addr += ( pitch - 24 ) ; } } }
plot_444:
  Plots an 8x8 MCU block for 444 mode.
plot_444 : Plots an 8x8 MCU block for 444 mode .