Home | History | Annotate | Download | only in simd

Lines Matching refs:rgb

12 // Reference code that converts RGB pixels to YUV pixels.
13 int ConvertRGBToY(const uint8* rgb) {
14 int y = 25 * rgb[0] + 129 * rgb[1] + 66 * rgb[2];
19 int ConvertRGBToU(const uint8* rgb, int size) {
20 int u = 112 * rgb[0] - 74 * rgb[1] - 38 * rgb[2];
25 int ConvertRGBToV(const uint8* rgb, int size) {
26 int v = -18 * rgb[0] - 94 * rgb[1] + 112 * rgb[2];
40 // A side-by-side test that verifies our ASM functions that convert RGB pixels
41 // to YUV pixels can output the expected results. This test converts RGB pixels
52 // This test checks a subset of all RGB values so this test does not take so
59 scoped_ptr<uint8[]> rgb(new uint8[kWidth * size]);
64 // Choose the function that converts from RGB pixels to YUV ones.
78 rgb[b * size + 0] = b * kStep;
79 rgb[b * size + 1] = g * kStep;
80 rgb[b * size + 2] = r * kStep;
82 rgb[b * size + 3] = 255;
85 // Convert the input RGB pixels to YUV ones.
86 convert(rgb.get(), y.get(), u.get(), v.get(), kWidth, 1, kWidth * size,
91 const uint8* p = &rgb[i * size];
98 const uint8* p = &rgb[i * 2 * size];
105 const uint8* p = &rgb[i * 2 * size];