COLOR_DARK_GREY
};
-static const struct vts_color_struct_rgb vts_colors_rgb[] = {
- {255, 255, 255, 255},
- {255, 255, 0, 255},
- {0, 255, 255, 255},
- {0, 255, 0, 255},
- {255, 0, 255, 255},
- {255, 0, 0, 255},
- {0, 0, 255, 255},
- {0, 0, 0, 255},
- {0, 0, 128, 255}, /* -I ? */
- {0, 128, 255, 255}, /* +Q ? */
- {0, 0, 0, 255},
- {19, 19, 19, 255},
+static const struct vts_color_struct vts_colors_bt709_ycbcr_100[] = {
+ {235, 128, 128, 255, 255, 255, 255, (235 << 8)},
+ {219, 16, 138, 255, 255, 255, 0, (219 << 8)},
+ {188, 154, 16, 255, 0, 255, 255, (188 < 8)},
+ {173, 42, 26, 255, 0, 255, 0, (173 << 8)},
+ {78, 214, 230, 255, 255, 0, 255, (78 << 8)},
+ {63, 102, 240, 255, 255, 0, 0, (64 << 8)},
+ {32, 240, 118, 255, 0, 0, 255, (32 << 8)},
+ {16, 128, 128, 255, 0, 0, 0, (16 << 8)},
+ {16, 198, 21, 255, 0, 0, 128, (16 << 8)}, /* -I ? */
+ {16, 235, 198, 255, 0, 128, 255, (16 << 8)}, /* +Q ? */
+ {0, 128, 128, 255, 0, 0, 0, 0},
+ {32, 128, 128, 255, 19, 19, 19, (32 << 8)},
};
-static const struct vts_color_struct_rgb vts_colors_rgb_75[] = {
- {191, 191, 191, 255},
- {191, 191, 0, 255},
- {0, 191, 191, 255},
- {0, 191, 0, 255},
- {191, 0, 191, 255},
- {191, 0, 0, 255},
- {0, 0, 191, 255},
- {0, 0, 0, 255},
- {0, 0, 128, 255}, /* -I ? */
- {0, 128, 255, 255}, /* +Q ? */
- {0, 0, 0, 255},
- {19, 19, 19, 255},
+static const struct vts_color_struct vts_colors_bt709_ycbcr_75[] = {
+ {180, 128, 128, 255, 191, 191, 191, (180 << 8)},
+ {168, 44, 136, 255, 191, 191, 0, (168 << 8)},
+ {145, 147, 44, 255, 0, 191, 191, (145 << 8)},
+ {133, 63, 52, 255, 0, 191, 0, (133 << 8)},
+ {63, 193, 204, 255, 191, 0, 191, (63 << 8)},
+ {51, 109, 212, 255, 191, 0, 0, (51 << 8)},
+ {28, 212, 120, 255, 0, 0, 191, (28 << 8)},
+ {16, 128, 128, 255, 0, 0, 0, (16 << 8)},
+ {16, 198, 21, 255, 0, 0, 128, (16 << 8)}, /* -I ? */
+ {16, 235, 198, 255, 0, 128, 255, (16 << 8)}, /* +Q ? */
+ {0, 128, 128, 255, 0, 0, 0, 0},
+ {32, 128, 128, 255, 19, 19, 19, (32 << 8)},
};
-static const struct vts_color_struct_yuv vts_colors_bt709_ycbcr_100[] = {
- {235, 128, 128, 255},
- {219, 16, 138, 255},
- {188, 154, 16, 255},
- {173, 42, 26, 255},
- {78, 214, 230, 255},
- {63, 102, 240, 255},
- {32, 240, 118, 255},
- {16, 128, 128, 255},
- {16, 198, 21, 255}, /* -I ? */
- {16, 235, 198, 255}, /* +Q ? */
- {0, 128, 128, 255},
- {32, 128, 128, 255},
+static const struct vts_color_struct vts_colors_bt601_ycbcr_100[] = {
+ {235, 128, 128, 255, 255, 255, 255, (235 << 8)},
+ {210, 16, 146, 255, 255, 255, 0, (219 << 8)},
+ {170, 166, 16, 255, 0, 255, 255, (188 < 8)},
+ {145, 54, 34, 255, 0, 255, 0, (173 << 8)},
+ {106, 202, 222, 255, 255, 0, 255, (78 << 8)},
+ {81, 90, 240, 255, 255, 0, 0, (64 << 8)},
+ {41, 240, 110, 255, 0, 0, 255, (32 << 8)},
+ {16, 128, 128, 255, 0, 0, 0, (16 << 8)},
+ {16, 198, 21, 255, 0, 0, 128, (16 << 8)}, /* -I ? */
+ {16, 235, 198, 255, 0, 128, 255, (16 << 8)}, /* +Q ? */
+ {-0, 128, 128, 255, 0, 0, 0, 0},
+ {32, 128, 128, 255, 19, 19, 19, (32 << 8)},
};
-static const struct vts_color_struct_yuv vts_colors_bt709_ycbcr_75[] = {
- {180, 128, 128, 255},
- {168, 44, 136, 255},
- {145, 147, 44, 255},
- {133, 63, 52, 255},
- {63, 193, 204, 255},
- {51, 109, 212, 255},
- {28, 212, 120, 255},
- {16, 128, 128, 255},
- {16, 198, 21, 255}, /* -I ? */
- {16, 235, 198, 255}, /* +Q ? */
- {0, 128, 128, 255},
- {32, 128, 128, 255},
+static const struct vts_color_struct vts_colors_bt601_ycbcr_75[] = {
+ {180, 128, 128, 255, 191, 191, 191, (180 << 8)},
+ {162, 44, 142, 255, 191, 191, 0, (168 << 8)},
+ {131, 156, 44, 255, 0, 191, 191, (145 << 8)},
+ {112, 72, 58, 255, 0, 191, 0, (133 << 8)},
+ {84, 184, 198, 255, 191, 0, 191, (63 << 8)},
+ {65, 100, 212, 255, 191, 0, 0, (51 << 8)},
+ {35, 212, 114, 255, 0, 0, 191, (28 << 8)},
+ {16, 128, 128, 255, 0, 0, 0, (16 << 8)},
+ {16, 198, 21, 255, 0, 0, 128, (16 << 8)}, /* -I ? */
+ {16, 235, 198, 255, 0, 128, 255, (16 << 8)}, /* +Q ? */
+ {-0, 128, 128, 255, 0, 0, 0, 0},
+ {32, 128, 128, 255, 19, 19, 19, (32 << 8)},
};
-static const struct vts_color_struct_yuv vts_colors_bt601_ycbcr_100[] = {
- {235, 128, 128, 255},
- {210, 16, 146, 255},
- {170, 166, 16, 255},
- {145, 54, 34, 255},
- {106, 202, 222, 255},
- {81, 90, 240, 255},
- {41, 240, 110, 255},
- {16, 128, 128, 255},
- {16, 198, 21, 255}, /* -I ? */
- {16, 235, 198, 255}, /* +Q ? */
- {-0, 128, 128, 255},
- {32, 128, 128, 255},
-};
-
-static const struct vts_color_struct_yuv vts_colors_bt601_ycbcr_75[] = {
- {180, 128, 128, 255},
- {162, 44, 142, 255},
- {131, 156, 44, 255},
- {112, 72, 58, 255},
- {84, 184, 198, 255},
- {65, 100, 212, 255},
- {35, 212, 114, 255},
- {16, 128, 128, 255},
- {16, 198, 21, 255}, /* -I ? */
- {16, 235, 198, 255}, /* +Q ? */
- {-0, 128, 128, 255},
- {32, 128, 128, 255},
-};
-
-static const struct vts_color_struct_gray vts_colors_gray_100[] = {
- {235 << 8},
- {210 << 8},
- {170 << 8},
- {145 << 8},
- {106 << 8},
- {81 << 8},
- {41 << 8},
- {16 << 8},
- {16 << 8},
- {16 << 8},
- {-0 << 8},
- {32 << 8},
-};
-
-static const struct vts_color_struct_gray vts_colors_gray_75[] = {
- {180 << 8},
- {162 << 8},
- {131 << 8},
- {112 << 8},
- {84 << 8},
- {65 << 8},
- {35 << 8},
- {16 << 8},
- {16 << 8},
- {16 << 8},
- {-0 << 8},
- {32 << 8},
-};
static void paint_setup_I420 (paintinfo * p, unsigned char *dest);
static void paint_setup_YV12 (paintinfo * p, unsigned char *dest);
paintinfo *p = π
struct fourcc_list_struct *fourcc;
- p->rgb_colors = vts_colors_rgb;
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
- p->yuv_colors = vts_colors_bt601_ycbcr_100;
+ p->colors = vts_colors_bt601_ycbcr_100;
} else {
- p->yuv_colors = vts_colors_bt709_ycbcr_100;
+ p->colors = vts_colors_bt709_ycbcr_100;
}
- p->gray_colors = vts_colors_gray_100;
p->width = w;
p->height = h;
fourcc = v->fourcc;
int x1 = i * w / 7;
int x2 = (i + 1) * w / 7;
- p->yuv_color = p->yuv_colors + i;
- p->rgb_color = p->rgb_colors + i;
- p->gray_color = p->gray_colors + i;
+ p->color = p->colors + i;
for (j = 0; j < y1; j++) {
p->paint_hline (p, x1, j, (x2 - x1));
}
} else {
k = 6 - i;
}
- p->yuv_color = p->yuv_colors + k;
- p->rgb_color = p->rgb_colors + k;
- p->gray_color = p->gray_colors + k;
+ p->color = p->colors + k;
for (j = y1; j < y2; j++) {
p->paint_hline (p, x1, j, (x2 - x1));
}
} else
k = 9;
- p->yuv_color = p->yuv_colors + k;
- p->rgb_color = p->rgb_colors + k;
- p->gray_color = p->gray_colors + k;
+ p->color = p->colors + k;
for (j = y2; j < h; j++) {
p->paint_hline (p, x1, j, (x2 - x1));
}
} else
k = COLOR_DARK_GREY;
- p->yuv_color = p->yuv_colors + k;
- p->rgb_color = p->rgb_colors + k;
- p->gray_color = p->gray_colors + k;
+ p->color = p->colors + k;
for (j = y2; j < h; j++) {
p->paint_hline (p, x1, j, (x2 - x1));
}
{
int x1 = w * 3 / 4;
- struct vts_color_struct_rgb rgb_color;
- struct vts_color_struct_yuv yuv_color;
- struct vts_color_struct_gray gray_color;
+ struct vts_color_struct color;
- rgb_color = p->rgb_colors[COLOR_BLACK];
- yuv_color = p->yuv_colors[COLOR_BLACK];
- gray_color = p->gray_colors[COLOR_BLACK];
- p->rgb_color = &rgb_color;
- p->yuv_color = &yuv_color;
- p->gray_color = &gray_color;
+ color = p->colors[COLOR_BLACK];
+ p->color = &color;
for (i = x1; i < w; i++) {
for (j = y2; j < h; j++) {
/* FIXME not strictly correct */
int y = random_char ();
- yuv_color.Y = y;
- rgb_color.R = y;
- rgb_color.G = y;
- rgb_color.B = y;
- gray_color.G = (y << 8) | random_char ();
+ color.Y = y;
+ color.R = y;
+ color.G = y;
+ color.B = y;
+ color.gray = (y << 8) | random_char ();
p->paint_hline (p, i, j, 1);
}
}
paintinfo *p = π
struct fourcc_list_struct *fourcc;
- p->rgb_colors = vts_colors_rgb_75;
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
- p->yuv_colors = vts_colors_bt601_ycbcr_75;
+ p->colors = vts_colors_bt601_ycbcr_75;
} else {
- p->yuv_colors = vts_colors_bt709_ycbcr_75;
+ p->colors = vts_colors_bt709_ycbcr_75;
}
- p->gray_colors = vts_colors_gray_75;
p->width = w;
p->height = h;
fourcc = v->fourcc;
int x1 = i * w / 7;
int x2 = (i + 1) * w / 7;
- p->yuv_color = p->yuv_colors + i;
- p->rgb_color = p->rgb_colors + i;
- p->gray_color = p->gray_colors + i;
+ p->color = p->colors + i;
for (j = 0; j < h; j++) {
p->paint_hline (p, x1, j, (x2 - x1));
}
paintinfo pi = { NULL, };
paintinfo *p = π
struct fourcc_list_struct *fourcc;
- struct vts_color_struct_rgb rgb_color;
- struct vts_color_struct_yuv yuv_color;
- struct vts_color_struct_gray gray_color;
+ struct vts_color_struct color;
- p->rgb_colors = vts_colors_rgb;
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
- p->yuv_colors = vts_colors_bt601_ycbcr_100;
+ p->colors = vts_colors_bt601_ycbcr_100;
} else {
- p->yuv_colors = vts_colors_bt709_ycbcr_100;
+ p->colors = vts_colors_bt709_ycbcr_100;
}
- p->gray_colors = vts_colors_gray_100;
p->width = w;
p->height = h;
fourcc = v->fourcc;
fourcc->paint_setup (p, dest);
p->paint_hline = fourcc->paint_hline;
- rgb_color = p->rgb_colors[COLOR_BLACK];
- yuv_color = p->yuv_colors[COLOR_BLACK];
- gray_color = p->gray_colors[COLOR_BLACK];
- p->rgb_color = &rgb_color;
- p->yuv_color = &yuv_color;
- p->gray_color = &gray_color;
+ color = p->colors[COLOR_BLACK];
+ p->color = &color;
for (i = 0; i < w; i++) {
for (j = 0; j < h; j++) {
/* FIXME not strictly correct */
int y = random_char ();
- yuv_color.Y = y;
- rgb_color.R = y;
- rgb_color.G = y;
- rgb_color.B = y;
- gray_color.G = (y << 8) | random_char ();
+ color.Y = y;
+ color.R = y;
+ color.G = y;
+ color.B = y;
+ color.gray = (y << 8) | random_char ();
p->paint_hline (p, i, j, 1);
}
}
paintinfo *p = π
struct fourcc_list_struct *fourcc;
- p->rgb_colors = vts_colors_rgb;
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
- p->yuv_colors = vts_colors_bt601_ycbcr_100;
+ p->colors = vts_colors_bt601_ycbcr_100;
} else {
- p->yuv_colors = vts_colors_bt709_ycbcr_100;
+ p->colors = vts_colors_bt709_ycbcr_100;
}
- p->gray_colors = vts_colors_gray_100;
p->width = w;
p->height = h;
fourcc = v->fourcc;
fourcc->paint_setup (p, dest);
p->paint_hline = fourcc->paint_hline;
- p->rgb_color = p->rgb_colors + color_index;
- p->yuv_color = p->yuv_colors + color_index;
- p->gray_color = p->gray_colors + color_index;
+ p->color = p->colors + color_index;
for (i = 0; i < h; i++) {
p->paint_hline (p, 0, i, w);
paintinfo pi = { NULL, };
paintinfo *p = π
struct fourcc_list_struct *fourcc;
- struct vts_color_struct_rgb rgb;
- struct vts_color_struct_yuv yuv;
- struct vts_color_struct_gray gray;
+ struct vts_color_struct yuv;
guint8 a, r, g, b;
- p->rgb_colors = vts_colors_rgb;
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
- p->yuv_colors = vts_colors_bt601_ycbcr_100;
+ p->colors = vts_colors_bt601_ycbcr_100;
} else {
- p->yuv_colors = vts_colors_bt709_ycbcr_100;
+ p->colors = vts_colors_bt709_ycbcr_100;
}
- p->gray_colors = vts_colors_gray_100;
p->width = w;
p->height = h;
fourcc = v->fourcc;
g = (v->solid_color >> 8) & 0xff;
b = (v->solid_color >> 0) & 0xff;
- rgb.A = a;
- rgb.R = r;
- rgb.G = g;
- rgb.B = b;
+ yuv.A = a;
+ yuv.R = r;
+ yuv.G = g;
+ yuv.B = b;
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
yuv.Y = RGB_TO_Y_CCIR (r, g, b);
yuv.U = RGB_TO_U_CCIR (r, g, b, 0);
yuv.U = RGB_TO_U_CCIR_709 (r, g, b, 0);
yuv.V = RGB_TO_V_CCIR_709 (r, g, b, 0);
}
- gray.G = RGB_TO_Y (r, g, b);
+ yuv.gray = RGB_TO_Y (r, g, b);
- p->rgb_color = &rgb;
- p->yuv_color = &yuv;
- p->gray_color = &gray;
+ p->color = &yuv;
for (i = 0; i < h; i++) {
p->paint_hline (p, 0, i, w);
paintinfo *p = π
struct fourcc_list_struct *fourcc;
- p->rgb_colors = vts_colors_rgb;
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
- p->yuv_colors = vts_colors_bt601_ycbcr_100;
+ p->colors = vts_colors_bt601_ycbcr_100;
} else {
- p->yuv_colors = vts_colors_bt709_ycbcr_100;
+ p->colors = vts_colors_bt709_ycbcr_100;
}
- p->gray_colors = vts_colors_gray_100;
p->width = w;
p->height = h;
fourcc = v->fourcc;
p->paint_hline = fourcc->paint_hline;
for (y = 0; y < h; y++) {
- p->rgb_color = p->rgb_colors + COLOR_GREEN;
- p->yuv_color = p->yuv_colors + COLOR_GREEN;
- p->gray_color = p->gray_colors + COLOR_GREEN;
+ p->color = p->colors + COLOR_GREEN;
p->paint_hline (p, 0, y, w);
for (x = (y % 2); x < w; x += 2) {
- p->rgb_color = p->rgb_colors + COLOR_RED;
- p->yuv_color = p->yuv_colors + COLOR_RED;
- p->gray_color = p->gray_colors + COLOR_RED;
+ p->color = p->colors + COLOR_RED;
p->paint_hline (p, x, y, 1);
}
}
paintinfo *p = π
struct fourcc_list_struct *fourcc;
- p->rgb_colors = vts_colors_rgb;
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
- p->yuv_colors = vts_colors_bt601_ycbcr_100;
+ p->colors = vts_colors_bt601_ycbcr_100;
} else {
- p->yuv_colors = vts_colors_bt709_ycbcr_100;
+ p->colors = vts_colors_bt709_ycbcr_100;
}
- p->gray_colors = vts_colors_gray_100;
p->width = w;
p->height = h;
fourcc = v->fourcc;
fourcc->paint_setup (p, dest);
p->paint_hline = fourcc->paint_hline;
- p->rgb_color = p->rgb_colors + COLOR_GREEN;
- p->yuv_color = p->yuv_colors + COLOR_GREEN;
- p->gray_color = p->gray_colors + COLOR_GREEN;
+ p->color = p->colors + COLOR_GREEN;
for (y = 0; y < h; y++) {
p->paint_hline (p, 0, y, w);
}
for (x = ((y % 4) == 0) ? 0 : 2; x < w; x += 4) {
guint len = (x < (w - 1)) ? 2 : (w - x);
- p->rgb_color = p->rgb_colors + COLOR_RED;
- p->yuv_color = p->yuv_colors + COLOR_RED;
- p->gray_color = p->gray_colors + COLOR_RED;
+ p->color = p->colors + COLOR_RED;
p->paint_hline (p, x, y + 0, len);
if (G_LIKELY ((y + 1) < h)) {
p->paint_hline (p, x, y + 1, len);
paintinfo *p = π
struct fourcc_list_struct *fourcc;
- p->rgb_colors = vts_colors_rgb;
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
- p->yuv_colors = vts_colors_bt601_ycbcr_100;
+ p->colors = vts_colors_bt601_ycbcr_100;
} else {
- p->yuv_colors = vts_colors_bt709_ycbcr_100;
+ p->colors = vts_colors_bt709_ycbcr_100;
}
- p->gray_colors = vts_colors_gray_100;
p->width = w;
p->height = h;
fourcc = v->fourcc;
fourcc->paint_setup (p, dest);
p->paint_hline = fourcc->paint_hline;
- p->rgb_color = p->rgb_colors + COLOR_GREEN;
- p->yuv_color = p->yuv_colors + COLOR_GREEN;
- p->gray_color = p->gray_colors + COLOR_GREEN;
+ p->color = p->colors + COLOR_GREEN;
for (y = 0; y < h; y++) {
p->paint_hline (p, 0, y, w);
}
for (x = ((y % 8) == 0) ? 0 : 4; x < w; x += 8) {
guint len = (x < (w - 3)) ? 4 : (w - x);
- p->rgb_color = p->rgb_colors + COLOR_RED;
- p->yuv_color = p->yuv_colors + COLOR_RED;
- p->gray_color = p->gray_colors + COLOR_RED;
+ p->color = p->colors + COLOR_RED;
p->paint_hline (p, x, y + 0, len);
if (G_LIKELY ((y + 1) < h)) {
p->paint_hline (p, x, y + 1, len);
paintinfo *p = π
struct fourcc_list_struct *fourcc;
- p->rgb_colors = vts_colors_rgb;
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
- p->yuv_colors = vts_colors_bt601_ycbcr_100;
+ p->colors = vts_colors_bt601_ycbcr_100;
} else {
- p->yuv_colors = vts_colors_bt709_ycbcr_100;
+ p->colors = vts_colors_bt709_ycbcr_100;
}
- p->gray_colors = vts_colors_gray_100;
p->width = w;
p->height = h;
fourcc = v->fourcc;
fourcc->paint_setup (p, dest);
p->paint_hline = fourcc->paint_hline;
- p->rgb_color = p->rgb_colors + COLOR_GREEN;
- p->yuv_color = p->yuv_colors + COLOR_GREEN;
- p->gray_color = p->gray_colors + COLOR_GREEN;
+ p->color = p->colors + COLOR_GREEN;
for (y = 0; y < h; y++) {
for (x = 0; x < w; x += 8) {
int len = MIN (8, w - x);
if ((x ^ y) & (1 << 3)) {
- p->rgb_color = p->rgb_colors + COLOR_GREEN;
- p->yuv_color = p->yuv_colors + COLOR_GREEN;
- p->gray_color = p->gray_colors + COLOR_GREEN;
+ p->color = p->colors + COLOR_GREEN;
} else {
- p->rgb_color = p->rgb_colors + COLOR_RED;
- p->yuv_color = p->yuv_colors + COLOR_RED;
- p->gray_color = p->gray_colors + COLOR_RED;
+ p->color = p->colors + COLOR_RED;
}
p->paint_hline (p, x, y, len);
}
paintinfo pi = { NULL, };
paintinfo *p = π
struct fourcc_list_struct *fourcc;
- struct vts_color_struct_rgb rgb_color;
- struct vts_color_struct_yuv yuv_color;
- struct vts_color_struct_gray gray_color;
+ struct vts_color_struct color;
static guint8 sine_array[256];
static int sine_array_inited = FALSE;
sine_array_inited = TRUE;
}
- p->rgb_colors = vts_colors_rgb;
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
- p->yuv_colors = vts_colors_bt601_ycbcr_100;
+ p->colors = vts_colors_bt601_ycbcr_100;
} else {
- p->yuv_colors = vts_colors_bt709_ycbcr_100;
+ p->colors = vts_colors_bt709_ycbcr_100;
}
- p->gray_colors = vts_colors_gray_100;
p->width = w;
p->height = h;
fourcc = v->fourcc;
fourcc->paint_setup (p, dest);
p->paint_hline = fourcc->paint_hline;
- rgb_color = p->rgb_colors[COLOR_BLACK];
- yuv_color = p->yuv_colors[COLOR_BLACK];
- gray_color = p->gray_colors[COLOR_BLACK];
- p->rgb_color = &rgb_color;
- p->yuv_color = &yuv_color;
- p->gray_color = &gray_color;
+ color = p->colors[COLOR_BLACK];
+ p->color = &color;
/* Zoneplate equation:
*
/*phase = phase + ((v->kx2 * x * x)/w) + ((v->ky2 * y * y)/h) + ((v->kt2 * t * t)>>1); */
phase = phase + ((v->kx2 * x * x * scale_kx2) >> 16) + ky2 + (kt2 >> 1);
- yuv_color.Y = sine_array[phase & 0xff];
+ color.Y = sine_array[phase & 0xff];
- rgb_color.R = yuv_color.Y;
- rgb_color.G = yuv_color.Y;
- rgb_color.B = yuv_color.Y;
+ color.R = color.Y;
+ color.G = color.Y;
+ color.B = color.Y;
- gray_color.G = yuv_color.Y << 8;
+ color.gray = color.Y << 8;
p->paint_hline (p, i, j, 1);
}
}
paintinfo pi = { NULL, };
paintinfo *p = π
struct fourcc_list_struct *fourcc;
- struct vts_color_struct_rgb rgb_color;
- struct vts_color_struct_yuv yuv_color;
- struct vts_color_struct_gray gray_color;
+ struct vts_color_struct color;
static guint8 sine_array[256];
static int sine_array_inited = FALSE;
sine_array_inited = TRUE;
}
- p->rgb_colors = vts_colors_rgb;
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
- p->yuv_colors = vts_colors_bt601_ycbcr_100;
+ p->colors = vts_colors_bt601_ycbcr_100;
} else {
- p->yuv_colors = vts_colors_bt709_ycbcr_100;
+ p->colors = vts_colors_bt709_ycbcr_100;
}
- p->gray_colors = vts_colors_gray_100;
p->width = w;
p->height = h;
fourcc = v->fourcc;
fourcc->paint_setup (p, dest);
p->paint_hline = fourcc->paint_hline;
- rgb_color = p->rgb_colors[COLOR_BLACK];
- yuv_color = p->yuv_colors[COLOR_BLACK];
- gray_color = p->gray_colors[COLOR_BLACK];
- p->rgb_color = &rgb_color;
- p->yuv_color = &yuv_color;
- p->gray_color = &gray_color;
+ color = p->colors[COLOR_BLACK];
+ p->color = &color;
/* Zoneplate equation:
*
/*phase = phase + ((v->kx2 * x * x)/w) + ((v->ky2 * y * y)/h) + ((v->kt2 * t * t)>>1); */
phase = phase + ((v->kx2 * x * x * scale_kx2) >> 16) + ky2 + (kt2 >> 1);
- yuv_color.Y = 128;
- yuv_color.U = sine_array[phase & 0xff];
- yuv_color.V = sine_array[phase & 0xff];
+ color.Y = 128;
+ color.U = sine_array[phase & 0xff];
+ color.V = sine_array[phase & 0xff];
- rgb_color.R = 128;
- rgb_color.G = 128;
- rgb_color.B = yuv_color.V;
+ color.R = 128;
+ color.G = 128;
+ color.B = color.V;
- gray_color.G = yuv_color.Y << 8;
+ color.gray = color.Y << 8;
p->paint_hline (p, i, j, 1);
}
}
paintinfo pi = { NULL, };
paintinfo *p = π
struct fourcc_list_struct *fourcc;
- struct vts_color_struct_rgb rgb_color;
- struct vts_color_struct_yuv yuv_color;
- struct vts_color_struct_gray gray_color;
+ struct vts_color_struct color;
static guint8 sine_array[256];
static int sine_array_inited = FALSE;
double freq[8];
sine_array_inited = TRUE;
}
- p->rgb_colors = vts_colors_rgb;
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
- p->yuv_colors = vts_colors_bt601_ycbcr_100;
+ p->colors = vts_colors_bt601_ycbcr_100;
} else {
- p->yuv_colors = vts_colors_bt709_ycbcr_100;
+ p->colors = vts_colors_bt709_ycbcr_100;
}
- p->gray_colors = vts_colors_gray_100;
p->width = w;
p->height = h;
fourcc = v->fourcc;
fourcc->paint_setup (p, dest);
p->paint_hline = fourcc->paint_hline;
- rgb_color = p->rgb_colors[COLOR_BLACK];
- yuv_color = p->yuv_colors[COLOR_BLACK];
- gray_color = p->gray_colors[COLOR_BLACK];
- p->rgb_color = &rgb_color;
- p->yuv_color = &yuv_color;
- p->gray_color = &gray_color;
+ color = p->colors[COLOR_BLACK];
+ p->color = &color;
for (i = 1; i < 8; i++) {
freq[i] = 200 * pow (2.0, -(i - 1) / 4.0);
h)) / (2 * w);
seg = floor (dist * 16);
if (seg == 0 || seg >= 8) {
- yuv_color.Y = 255;
- gray_color.G = 65535;
+ color.Y = 255;
+ color.gray = 65535;
} else {
#ifdef SCALE_AMPLITUDE
double a;
a = ampl[seg];
if (a < 0)
a = 0;
- yuv_color.Y = 128 + a * (sine_array[d & 0xff] - 128);
- gray_color.G = 128 + a * (sine_array[d & 0xff] - 128);
+ color.Y = 128 + a * (sine_array[d & 0xff] - 128);
+ color.gray = 128 + a * (sine_array[d & 0xff] - 128);
#else
- yuv_color.Y = sine_array[d & 0xff];
- gray_color.G = sine_array[d & 0xff];
+ color.Y = sine_array[d & 0xff];
+ color.gray = sine_array[d & 0xff];
#endif
}
- rgb_color.R = yuv_color.Y;
- rgb_color.G = yuv_color.Y;
- rgb_color.B = yuv_color.Y;
+ color.R = color.Y;
+ color.G = color.Y;
+ color.B = color.Y;
p->paint_hline (p, i, j, 1);
}
}
paintinfo pi = { NULL, };
paintinfo *p = π
struct fourcc_list_struct *fourcc;
- struct vts_color_struct_yuv yuv_primary;
- struct vts_color_struct_yuv yuv_secondary;
- struct vts_color_struct_rgb rgb_primary = { 0 };
- struct vts_color_struct_rgb rgb_secondary = { 0 };
- struct vts_color_struct_gray gray_primary = { 0 };
- struct vts_color_struct_gray gray_secondary = { 0 };
-
- p->rgb_colors = vts_colors_rgb;
+ struct vts_color_struct yuv_primary;
+ struct vts_color_struct yuv_secondary;
+
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
- p->yuv_colors = vts_colors_bt601_ycbcr_100;
+ p->colors = vts_colors_bt601_ycbcr_100;
} else {
- p->yuv_colors = vts_colors_bt709_ycbcr_100;
+ p->colors = vts_colors_bt709_ycbcr_100;
}
- p->gray_colors = vts_colors_gray_100;
p->width = w;
p->height = h;
fourcc = v->fourcc;
switch (region) {
case 0: /* black */
- yuv_primary = p->yuv_colors[COLOR_BLACK];
- yuv_secondary = p->yuv_colors[COLOR_BLACK];
+ yuv_primary = p->colors[COLOR_BLACK];
+ yuv_secondary = p->colors[COLOR_BLACK];
yuv_secondary.Y = 0;
- rgb_primary = p->rgb_colors[COLOR_BLACK];
- rgb_secondary = p->rgb_colors[COLOR_BLACK];
- gray_primary = p->gray_colors[COLOR_BLACK];
- gray_secondary = p->gray_colors[COLOR_BLACK];
break;
case 1:
- yuv_primary = p->yuv_colors[COLOR_WHITE];
- yuv_secondary = p->yuv_colors[COLOR_WHITE];
+ yuv_primary = p->colors[COLOR_WHITE];
+ yuv_secondary = p->colors[COLOR_WHITE];
yuv_secondary.Y = 255;
- rgb_primary = p->rgb_colors[COLOR_WHITE];
- rgb_secondary = p->rgb_colors[COLOR_WHITE];
- gray_primary = p->gray_colors[COLOR_WHITE];
- gray_secondary = p->gray_colors[COLOR_WHITE];
break;
case 2:
- yuv_primary = p->yuv_colors[COLOR_RED];
- yuv_secondary = p->yuv_colors[COLOR_RED];
+ yuv_primary = p->colors[COLOR_RED];
+ yuv_secondary = p->colors[COLOR_RED];
yuv_secondary.V = 255;
- rgb_primary = p->rgb_colors[COLOR_RED];
- rgb_secondary = p->rgb_colors[COLOR_RED];
- gray_primary = p->gray_colors[COLOR_RED];
- gray_secondary = p->gray_colors[COLOR_RED];
break;
case 3:
- yuv_primary = p->yuv_colors[COLOR_BLUE];
- yuv_secondary = p->yuv_colors[COLOR_BLUE];
+ yuv_primary = p->colors[COLOR_BLUE];
+ yuv_secondary = p->colors[COLOR_BLUE];
yuv_secondary.U = 255;
- rgb_primary = p->rgb_colors[COLOR_BLUE];
- rgb_secondary = p->rgb_colors[COLOR_BLUE];
- gray_primary = p->gray_colors[COLOR_BLUE];
- gray_secondary = p->gray_colors[COLOR_BLUE];
break;
}
int len = MIN (8, w - x);
if ((x ^ y) & (1 << 4)) {
- p->rgb_color = &rgb_primary;
- p->yuv_color = &yuv_primary;
- p->gray_color = &gray_primary;
+ p->color = &yuv_primary;
} else {
- p->rgb_color = &rgb_secondary;
- p->yuv_color = &yuv_secondary;
- p->gray_color = &gray_secondary;
+ p->color = &yuv_secondary;
}
p->paint_hline (p, x, y, len);
}
paintinfo pi = { NULL, };
paintinfo *p = π
struct fourcc_list_struct *fourcc;
- struct vts_color_struct_yuv yuv_primary = { 0 };
- struct vts_color_struct_yuv yuv_secondary = { 0 };
- struct vts_color_struct_rgb rgb_primary = { 0 };
- struct vts_color_struct_rgb rgb_secondary = { 0 };
- struct vts_color_struct_gray gray_primary = { 0 };
- struct vts_color_struct_gray gray_secondary = { 0 };
+ struct vts_color_struct yuv_primary;
+ struct vts_color_struct yuv_secondary;
static int t = 0;
double x, y;
int radius = 20;
- p->rgb_colors = vts_colors_rgb;
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
- p->yuv_colors = vts_colors_bt601_ycbcr_100;
+ p->colors = vts_colors_bt601_ycbcr_100;
} else {
- p->yuv_colors = vts_colors_bt709_ycbcr_100;
+ p->colors = vts_colors_bt709_ycbcr_100;
}
- p->gray_colors = vts_colors_gray_100;
p->width = w;
p->height = h;
fourcc = v->fourcc;
if (fourcc == NULL)
return;
+ yuv_primary = p->colors[COLOR_WHITE];
+ yuv_secondary = p->colors[COLOR_BLACK];
+
fourcc->paint_setup (p, dest);
p->paint_hline = fourcc->paint_hline;
- rgb_primary = p->rgb_colors[COLOR_WHITE];
- gray_primary = p->gray_colors[COLOR_WHITE];
- yuv_primary = p->yuv_colors[COLOR_WHITE];
-
- rgb_secondary = p->rgb_colors[COLOR_RED];
- gray_secondary = p->gray_colors[COLOR_RED];
- yuv_secondary = p->yuv_colors[COLOR_RED];
-
-
x = radius + (0.5 + 0.5 * sin (2 * M_PI * t / 200)) * (w - 2 * radius);
y = radius + (0.5 + 0.5 * sin (2 * M_PI * sqrt (2) * t / 200)) * (h -
2 * radius);
for (i = 0; i < h; i++) {
if (i < y - radius || i > y + radius) {
- p->rgb_color = &rgb_primary;
- p->yuv_color = &yuv_primary;
- p->gray_color = &gray_primary;
+ p->color = &yuv_primary;
p->paint_hline (p, 0, i, w);
} else {
int r = rint (sqrt (radius * radius - (i - y) * (i - y)));
int x1, x2;
int j;
- p->rgb_color = &rgb_primary;
- p->yuv_color = &yuv_primary;
- p->gray_color = &gray_primary;
+ p->color = &yuv_primary;
x1 = 0;
x2 = MAX (0, x - r);
p->paint_hline (p, x1, i, x2 - x1);
x2 = MIN (w, x + r + 1);
for (j = x1; j < x2; j++) {
double rr = radius - sqrt ((j - x) * (j - x) + (i - y) * (i - y));
- struct vts_color_struct_yuv yuv;
- struct vts_color_struct_rgb rgb;
- struct vts_color_struct_gray gray;
+ struct vts_color_struct yuv;
rr *= 0.5;
if (rr < 0) {
- p->rgb_color = &rgb_primary;
- p->yuv_color = &yuv_primary;
- p->gray_color = &gray_primary;
+ p->color = &yuv_primary;
} else if (rr > 1) {
- p->rgb_color = &rgb_secondary;
- p->yuv_color = &yuv_secondary;
- p->gray_color = &gray_secondary;
+ p->color = &yuv_secondary;
} else {
#define BLEND(a,b,x) (rint((a)*(1-x) + (b)*(x)))
yuv.Y = BLEND (yuv_primary.Y, yuv_secondary.Y, rr);
yuv.U = BLEND (yuv_primary.U, yuv_secondary.U, rr);
yuv.V = BLEND (yuv_primary.V, yuv_secondary.V, rr);
- rgb.R = BLEND (rgb_primary.R, rgb_secondary.R, rr);
- rgb.G = BLEND (rgb_primary.G, rgb_secondary.G, rr);
- rgb.B = BLEND (rgb_primary.B, rgb_secondary.B, rr);
- gray.G = BLEND (gray_primary.G, gray_secondary.G, rr);
- p->yuv_color = &yuv;
- p->rgb_color = &rgb;
- p->gray_color = &gray;
+ yuv.R = BLEND (yuv_primary.R, yuv_secondary.R, rr);
+ yuv.G = BLEND (yuv_primary.G, yuv_secondary.G, rr);
+ yuv.B = BLEND (yuv_primary.B, yuv_secondary.B, rr);
+ yuv.gray = BLEND (yuv_primary.gray, yuv_secondary.gray, rr);
+ p->color = &yuv;
}
p->paint_hline (p, j, i, 1);
}
- p->rgb_color = &rgb_primary;
- p->yuv_color = &yuv_primary;
- p->gray_color = &gray_primary;
+ p->color = &yuv_primary;
x1 = MIN (w, x + r + 1);
x2 = w;
p->paint_hline (p, x1, i, x2 - x1);
if (x + w == p->width && p->width % 2 != 0)
w1++;
- gst_orc_splat_u8 (p->yp + offset + x, p->yuv_color->Y, w);
- gst_orc_splat_u8 (p->up + offset1 + x1, p->yuv_color->U, w1);
- gst_orc_splat_u8 (p->vp + offset1 + x1, p->yuv_color->V, w1);
+ gst_orc_splat_u8 (p->yp + offset + x, p->color->Y, w);
+ gst_orc_splat_u8 (p->up + offset1 + x1, p->color->U, w1);
+ gst_orc_splat_u8 (p->vp + offset1 + x1, p->color->V, w1);
}
static void
int uvlength = x2 - x1 + 1;
guint16 value;
- gst_orc_splat_u8 (p->yp + offset + x, p->yuv_color->Y, w);
+ gst_orc_splat_u8 (p->yp + offset + x, p->color->Y, w);
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
- value = (p->yuv_color->U << 0) | (p->yuv_color->V << 8);
+ value = (p->color->U << 0) | (p->color->V << 8);
#else
- value = (p->yuv_color->U << 8) | (p->yuv_color->V << 0);
+ value = (p->color->U << 8) | (p->color->V << 0);
#endif
if (uvlength) {
int uvlength = x2 - x1 + 1;
guint16 value;
- gst_orc_splat_u8 (p->yp + offset + x, p->yuv_color->Y, w);
+ gst_orc_splat_u8 (p->yp + offset + x, p->color->Y, w);
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
- value = (p->yuv_color->U << 8) | (p->yuv_color->V << 0);
+ value = (p->color->U << 8) | (p->color->V << 0);
#else
- value = (p->yuv_color->U << 0) | (p->yuv_color->V << 8);
+ value = (p->color->U << 0) | (p->color->V << 8);
#endif
if (uvlength) {
offset = (y * p->ystride) + (x * 3);
for (i = 0; i < w; i++) {
- p->yp[offset + 3 * i] = p->yuv_color->Y;
- p->up[offset + 3 * i] = p->yuv_color->U;
- p->vp[offset + 3 * i] = p->yuv_color->V;
+ p->yp[offset + 3 * i] = p->color->Y;
+ p->up[offset + 3 * i] = p->color->U;
+ p->vp[offset + 3 * i] = p->color->V;
}
}
guint32 value;
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
- value = (p->yuv_color->A << 0) | (p->yuv_color->Y << 8) |
- (p->yuv_color->U << 16) | (p->yuv_color->V << 24);
+ value = (p->color->A << 0) | (p->color->Y << 8) |
+ (p->color->U << 16) | (p->color->V << 24);
#else
- value = (p->yuv_color->A << 24) | (p->yuv_color->Y << 16) |
- (p->yuv_color->U << 8) | (p->yuv_color->V << 0);
+ value = (p->color->A << 24) | (p->color->Y << 16) |
+ (p->color->U << 8) | (p->color->V << 0);
#endif
offset = (y * p->ystride) + (x * 4);
int offset;
offset = y * p->ystride;
- Y = TO_16 (p->yuv_color->Y);
- U = TO_16 (p->yuv_color->U);
- V = TO_16 (p->yuv_color->V);
+ Y = TO_16 (p->color->Y);
+ U = TO_16 (p->color->U);
+ V = TO_16 (p->color->V);
for (i = x; i < x + w; i++) {
GST_WRITE_UINT16_LE (p->yp + offset + i * 4, Y);
}
guint8 *data;
int i;
- a = (TO_10 (p->yuv_color->U) << 22) |
- (TO_10 (p->yuv_color->Y) << 12) | (TO_10 (p->yuv_color->V) << 2);
+ a = (TO_10 (p->color->U) << 22) |
+ (TO_10 (p->color->Y) << 12) | (TO_10 (p->color->V) << 2);
data = p->yp + y * p->ystride + x * 4;
for (i = 0; i < w; i++) {
/* FIXME this is kinda gross. it only handles x values in
multiples of 6 */
- a0 = TO_10 (p->yuv_color->U) | (TO_10 (p->yuv_color->Y) << 10)
- | (TO_10 (p->yuv_color->V) << 20);
- a1 = TO_10 (p->yuv_color->Y) | (TO_10 (p->yuv_color->U) << 10)
- | (TO_10 (p->yuv_color->Y) << 20);
- a2 = TO_10 (p->yuv_color->V) | (TO_10 (p->yuv_color->Y) << 10)
- | (TO_10 (p->yuv_color->U) << 20);
- a3 = TO_10 (p->yuv_color->Y) | (TO_10 (p->yuv_color->V) << 10)
- | (TO_10 (p->yuv_color->Y) << 20);
+ a0 = TO_10 (p->color->U) | (TO_10 (p->color->Y) << 10)
+ | (TO_10 (p->color->V) << 20);
+ a1 = TO_10 (p->color->Y) | (TO_10 (p->color->U) << 10)
+ | (TO_10 (p->color->Y) << 20);
+ a2 = TO_10 (p->color->V) | (TO_10 (p->color->Y) << 10)
+ | (TO_10 (p->color->U) << 20);
+ a3 = TO_10 (p->color->Y) | (TO_10 (p->color->V) << 10)
+ | (TO_10 (p->color->Y) << 20);
data = p->yp + y * p->ystride;
for (i = x / 6; i < (x + w) / 6; i++) {
if (x + w == p->width && p->width % 2 != 0)
w1++;
- oil_splat_u8 (p->yp + offset + x * 2, 2, &p->yuv_color->Y, w);
- oil_splat_u8 (p->up + offset + x1 * 4, 4, &p->yuv_color->U, w1);
- oil_splat_u8 (p->vp + offset + x1 * 4, 4, &p->yuv_color->V, w1);
+ oil_splat_u8 (p->yp + offset + x * 2, 2, &p->color->Y, w);
+ oil_splat_u8 (p->up + offset + x1 * 4, 4, &p->color->U, w1);
+ oil_splat_u8 (p->vp + offset + x1 * 4, 4, &p->color->V, w1);
}
static void
int offset;
offset = y * p->ystride;
- oil_splat_u8 (p->yp + offset + x * 3, 3, &p->yuv_color->Y, w);
- oil_splat_u8 (p->up + offset + x * 3, 3, &p->yuv_color->U, w);
- oil_splat_u8 (p->vp + offset + x * 3, 3, &p->yuv_color->V, w);
+ oil_splat_u8 (p->yp + offset + x * 3, 3, &p->color->Y, w);
+ oil_splat_u8 (p->up + offset + x * 3, 3, &p->color->U, w);
+ oil_splat_u8 (p->vp + offset + x * 3, 3, &p->color->V, w);
}
static void
if (x + w == p->width && p->width % 4 != 0)
w1++;
- gst_orc_splat_u8 (p->yp + offset + x, p->yuv_color->Y, w);
- gst_orc_splat_u8 (p->up + offset1 + x1, p->yuv_color->U, w1);
- gst_orc_splat_u8 (p->vp + offset1 + x1, p->yuv_color->V, w1);
+ gst_orc_splat_u8 (p->yp + offset + x, p->color->Y, w);
+ gst_orc_splat_u8 (p->up + offset1 + x1, p->color->U, w1);
+ gst_orc_splat_u8 (p->vp + offset1 + x1, p->color->V, w1);
}
static void
if (x + w == p->width && p->width % 2 != 0)
w1++;
- gst_orc_splat_u8 (p->yp + offset + x, p->yuv_color->Y, w);
- gst_orc_splat_u8 (p->up + offset1 + x1, p->yuv_color->U, w1);
- gst_orc_splat_u8 (p->vp + offset1 + x1, p->yuv_color->V, w1);
+ gst_orc_splat_u8 (p->yp + offset + x, p->color->Y, w);
+ gst_orc_splat_u8 (p->up + offset1 + x1, p->color->U, w1);
+ gst_orc_splat_u8 (p->vp + offset1 + x1, p->color->V, w1);
}
static void
{
int offset = y * p->ystride;
- gst_orc_splat_u8 (p->yp + offset + x, p->yuv_color->Y, w);
- gst_orc_splat_u8 (p->up + offset + x, p->yuv_color->U, w);
- gst_orc_splat_u8 (p->vp + offset + x, p->yuv_color->V, w);
+ gst_orc_splat_u8 (p->yp + offset + x, p->color->Y, w);
+ gst_orc_splat_u8 (p->up + offset + x, p->color->U, w);
+ gst_orc_splat_u8 (p->vp + offset + x, p->color->V, w);
}
static void
{
int offset = y * p->ystride;
- gst_orc_splat_u8 (p->yp + offset + x, p->yuv_color->Y, w);
+ gst_orc_splat_u8 (p->yp + offset + x, p->color->Y, w);
}
#if 0
int offset = y * p->width;
int offset1 = (y / 2) * p->width;
- gst_orc_splat_u8 (p->yp + offset + x, p->yuv_color->Y, w);
- gst_orc_splat_u8 (p->up + offset1 + x1, p->yuv_color->U, x2 - x1);
- gst_orc_splat_u8 (p->vp + offset1 + x1, p->yuv_color->V, x2 - x1);
+ gst_orc_splat_u8 (p->yp + offset + x, p->color->Y, w);
+ gst_orc_splat_u8 (p->up + offset1 + x1, p->color->U, x2 - x1);
+ gst_orc_splat_u8 (p->vp + offset1 + x1, p->color->V, x2 - x1);
}
#endif
if (x + w == p->width && p->width % 4 != 0)
w1++;
- gst_orc_splat_u8 (p->yp + offset + x, p->yuv_color->Y, w);
- gst_orc_splat_u8 (p->up + offset1 + x1, p->yuv_color->U, w1);
- gst_orc_splat_u8 (p->vp + offset1 + x1, p->yuv_color->V, w1);
+ gst_orc_splat_u8 (p->yp + offset + x, p->color->Y, w);
+ gst_orc_splat_u8 (p->up + offset1 + x1, p->color->U, w1);
+ gst_orc_splat_u8 (p->vp + offset1 + x1, p->color->V, w1);
}
static void
{
int offset = y * p->ystride;
- oil_splat_u8 (p->yp + offset + x * 4, 4, &p->rgb_color->R, w);
- oil_splat_u8 (p->up + offset + x * 4, 4, &p->rgb_color->G, w);
- oil_splat_u8 (p->vp + offset + x * 4, 4, &p->rgb_color->B, w);
+ oil_splat_u8 (p->yp + offset + x * 4, 4, &p->color->R, w);
+ oil_splat_u8 (p->up + offset + x * 4, 4, &p->color->G, w);
+ oil_splat_u8 (p->vp + offset + x * 4, 4, &p->color->B, w);
if (p->ap != NULL) {
- oil_splat_u8 (p->ap + offset + (x * 4), 4, &p->rgb_color->A, w);
+ oil_splat_u8 (p->ap + offset + (x * 4), 4, &p->color->A, w);
}
}
{
int offset = y * p->ystride;
- oil_splat_u8 (p->yp + offset + x * 3, 3, &p->rgb_color->R, w);
- oil_splat_u8 (p->up + offset + x * 3, 3, &p->rgb_color->G, w);
- oil_splat_u8 (p->vp + offset + x * 3, 3, &p->rgb_color->B, w);
+ oil_splat_u8 (p->yp + offset + x * 3, 3, &p->color->R, w);
+ oil_splat_u8 (p->up + offset + x * 3, 3, &p->color->G, w);
+ oil_splat_u8 (p->vp + offset + x * 3, 3, &p->color->B, w);
}
static void
int offset = y * p->ystride;
guint16 value;
- value = ((p->rgb_color->R & 0xf8) << 8) |
- ((p->rgb_color->G & 0xfc) << 3) | ((p->rgb_color->B & 0xf8) >> 3);
+ value = ((p->color->R & 0xf8) << 8) |
+ ((p->color->G & 0xfc) << 3) | ((p->color->B & 0xf8) >> 3);
gst_orc_splat_u16 (p->yp + offset + x * 2 + 0, value, w);
}
int offset = y * p->ystride;
guint8 a, b;
- a = ((p->rgb_color->R >> 1) & 0x7c) | (p->rgb_color->G >> 6);
- b = ((p->rgb_color->G << 2) & 0xe0) | (p->rgb_color->B >> 3);
+ a = ((p->color->R >> 1) & 0x7c) | (p->color->G >> 6);
+ b = ((p->color->G << 2) & 0xe0) | (p->color->B >> 3);
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
oil_splat_u8 (p->yp + offset + x * 2 + 0, 2, &b, w);
if (y & 1) {
for (i = x; i < x + w; i++) {
if (i & 1) {
- dest[i] = p->rgb_color->G;
+ dest[i] = p->color->G;
} else {
- dest[i] = p->rgb_color->B;
+ dest[i] = p->color->B;
}
}
} else {
for (i = x; i < x + w; i++) {
if (i & 1) {
- dest[i] = p->rgb_color->R;
+ dest[i] = p->color->R;
} else {
- dest[i] = p->rgb_color->G;
+ dest[i] = p->color->G;
}
}
}
paint_hline_GRAY8 (paintinfo * p, int x, int y, int w)
{
int offset = y * p->ystride;
- guint8 color = p->gray_color->G >> 8;
+ guint8 color = p->color->gray >> 8;
gst_orc_splat_u8 (p->yp + offset + x, color, w);
}
{
int offset = y * p->ystride;
- gst_orc_splat_u16 (p->yp + offset + 2 * x, p->gray_color->G, w);
+ gst_orc_splat_u16 (p->yp + offset + 2 * x, p->color->gray, w);
}