Home | History | Annotate | Download | only in jpeg

Lines Matching refs:cr

24   int * Cr_r_tab;		/* => table for Cr to R conversion */
26 INT32 * Cr_g_tab; /* => table for Cr to G conversion */
56 * YCbCr is defined per CCIR 601-1, except that Cb and Cr are
59 * R = Y + 1.40200 * Cr
60 * G = Y - 0.34414 * Cb - 0.71414 * Cr
62 * where Cb and Cr represent the incoming values less CENTERJSAMPLE.
72 * by precalculating the constants times Cb and Cr for all possible values.
77 * The Cr=>R and Cb=>B values can be rounded to integers in advance; the
114 /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */
115 /* Cr=>R value is nearest int to 1.40200 * x */
121 /* Cr=>G value is scaled-up -0.71414 * x */
146 register int y, cb, cr;
168 cr = GETJSAMPLE(inptr2[col]);
170 outptr[RGB_RED] = range_limit[y + Crrtab[cr]];
172 ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
187 register int y, cb, cr;
209 cr = GETJSAMPLE(inptr2[col]);
211 outptr[RGB_RED] = range_limit[y + Crrtab[cr]];
213 ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],
228 register int y, cb, cr;
253 cr = GETJSAMPLE(*inptr2++);
254 r = range_limit[y + Crrtab[cr]];
255 g = range_limit[y + ((int)RIGHT_SHIFT(Cbgtab[cb]+Crgtab[cr], SCALEBITS))];
265 cr = GETJSAMPLE(*inptr2++);
266 r = range_limit[y + Crrtab[cr]];
267 g = range_limit[y + ((int)RIGHT_SHIFT(Cbgtab[cb]+Crgtab[cr], SCALEBITS))];
273 cr = GETJSAMPLE(*inptr2++);
274 r = range_limit[y + Crrtab[cr]];
275 g = range_limit[y + ((int)RIGHT_SHIFT(Cbgtab[cb]+Crgtab[cr], SCALEBITS))];
284 cr = GETJSAMPLE(*inptr2);
285 r = range_limit[y + Crrtab[cr]];
286 g = range_limit[y + ((int)RIGHT_SHIFT(Cbgtab[cb]+Crgtab[cr], SCALEBITS))];
300 register int y, cb, cr;
325 cr = GETJSAMPLE(*inptr2++);
326 r = range_limit[DITHER_565_R(y + Crrtab[cr], d0)];
327 g = range_limit[DITHER_565_G(y + ((int)RIGHT_SHIFT(Cbgtab[cb]+Crgtab[cr], SCALEBITS)), d0)];
337 cr = GETJSAMPLE(*inptr2++);
338 r = range_limit[DITHER_565_R(y + Crrtab[cr], d0)];
339 g = range_limit[DITHER_565_G(y + ((int)RIGHT_SHIFT(Cbgtab[cb]+Crgtab[cr], SCALEBITS)), d0)];
345 cr = GETJSAMPLE(*inptr2++);
346 r = range_limit[DITHER_565_R(y + Crrtab[cr], d0)];
347 g = range_limit[DITHER_565_G(y + ((int)RIGHT_SHIFT(Cbgtab[cb]+Crgtab[cr], SCALEBITS)), d0)];
357 cr = GETJSAMPLE(*inptr2);
358 r = range_limit[DITHER_565_R(y + Crrtab[cr], d0)];
359 g = range_limit[DITHER_565_G(y + ((int)RIGHT_SHIFT(Cbgtab[cb]+Crgtab[cr], SCALEBITS)), d0)];
696 register int y, cb, cr;
719 cr = GETJSAMPLE(inptr2[col]);
721 outptr[0] = range_limit[MAXJSAMPLE - (y + Crrtab[cr])]; /* red */
723 ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr],