Lines Matching refs:yuv
154 RGBtoYUV(Uint8 * rgb, int *yuv, int monochrome, int luminance)
158 yuv[0] = (int)(0.299 * rgb[0] + 0.587 * rgb[1] + 0.114 * rgb[2]);
159 yuv[1] = 128;
160 yuv[2] = 128;
162 yuv[0] = (int)(0.257 * rgb[0]) + (0.504 * rgb[1]) + (0.098 * rgb[2]) + 16;
163 yuv[1] = 128;
164 yuv[2] = 128;
168 yuv[0] = (int)(0.299 * rgb[0] + 0.587 * rgb[1] + 0.114 * rgb[2]);
169 yuv[1] = (int)((rgb[2] - yuv[0]) * 0.565 + 128);
170 yuv[2] = (int)((rgb[0] - yuv[0]) * 0.713 + 128);
172 yuv[0] = (0.257 * rgb[0]) + (0.504 * rgb[1]) + (0.098 * rgb[2]) + 16;
173 yuv[1] = 128 - (0.148 * rgb[0]) - (0.291 * rgb[1]) + (0.439 * rgb[2]);
174 yuv[2] = 128 + (0.439 * rgb[0]) - (0.368 * rgb[1]) - (0.071 * rgb[2]);
179 yuv[0] = yuv[0] * luminance / 100;
180 if (yuv[0] > 255)
181 yuv[0] = 255;
190 int yuv[3];
198 RGBtoYUV(rgb, yuv, monochrome, luminance);
199 *(op[0]++) = yuv[0];
201 *(op[1]++) = yuv[2];
202 *(op[2]++) = yuv[1];
358 /* Uncomment this to check vertex color with a YUV texture */