mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
gst/videotestsrc/videotestsrc.*: Add alpha to the color struct.
Original commit message from CVS: * gst/videotestsrc/videotestsrc.c: (paint_hline_AYUV), (paint_hline_str4): * gst/videotestsrc/videotestsrc.h: Add alpha to the color struct. Use a default alpha value of 255 instead of 128.
This commit is contained in:
parent
c03d6a8757
commit
3bac564cc0
3 changed files with 23 additions and 19 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2007-07-12 Wim Taymans <wim.taymans@gmail.com>
|
||||||
|
|
||||||
|
* gst/videotestsrc/videotestsrc.c: (paint_hline_AYUV),
|
||||||
|
(paint_hline_str4):
|
||||||
|
* gst/videotestsrc/videotestsrc.h:
|
||||||
|
Add alpha to the color struct.
|
||||||
|
Use a default alpha value of 255 instead of 128.
|
||||||
|
|
||||||
2007-07-12 Wim Taymans <wim.taymans@gmail.com>
|
2007-07-12 Wim Taymans <wim.taymans@gmail.com>
|
||||||
|
|
||||||
* gst/playback/gstplaybasebin.c: (no_more_pads_full),
|
* gst/playback/gstplaybasebin.c: (no_more_pads_full),
|
||||||
|
|
|
@ -211,29 +211,29 @@ enum
|
||||||
|
|
||||||
static const struct vts_color_struct vts_colors[] = {
|
static const struct vts_color_struct vts_colors[] = {
|
||||||
/* 100% white */
|
/* 100% white */
|
||||||
{255, 128, 128, 255, 255, 255},
|
{255, 128, 128, 255, 255, 255, 255},
|
||||||
/* yellow */
|
/* yellow */
|
||||||
{226, 0, 155, 255, 255, 0},
|
{226, 0, 155, 255, 255, 0, 255},
|
||||||
/* cyan */
|
/* cyan */
|
||||||
{179, 170, 0, 0, 255, 255},
|
{179, 170, 0, 0, 255, 255, 255},
|
||||||
/* green */
|
/* green */
|
||||||
{150, 46, 21, 0, 255, 0},
|
{150, 46, 21, 0, 255, 0, 255},
|
||||||
/* magenta */
|
/* magenta */
|
||||||
{105, 212, 235, 255, 0, 255},
|
{105, 212, 235, 255, 0, 255, 255},
|
||||||
/* red */
|
/* red */
|
||||||
{76, 85, 255, 255, 0, 0},
|
{76, 85, 255, 255, 0, 0, 255},
|
||||||
/* blue */
|
/* blue */
|
||||||
{29, 255, 107, 0, 0, 255},
|
{29, 255, 107, 0, 0, 255, 255},
|
||||||
/* black */
|
/* black */
|
||||||
{16, 128, 128, 0, 0, 0},
|
{16, 128, 128, 0, 0, 0, 255},
|
||||||
/* -I */
|
/* -I */
|
||||||
{16, 198, 21, 0, 0, 128},
|
{16, 198, 21, 0, 0, 128, 255},
|
||||||
/* +Q */
|
/* +Q */
|
||||||
{16, 235, 198, 0, 128, 255},
|
{16, 235, 198, 0, 128, 255, 255},
|
||||||
/* superblack */
|
/* superblack */
|
||||||
{0, 128, 128, 0, 0, 0},
|
{0, 128, 128, 0, 0, 0, 255},
|
||||||
/* 5% grey */
|
/* 5% grey */
|
||||||
{32, 128, 128, 32, 32, 32},
|
{32, 128, 128, 32, 32, 32, 255},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1094,15 +1094,13 @@ paint_setup_YVYU (paintinfo * p, unsigned char *dest)
|
||||||
static void
|
static void
|
||||||
paint_hline_AYUV (paintinfo * p, int x, int y, int w)
|
paint_hline_AYUV (paintinfo * p, int x, int y, int w)
|
||||||
{
|
{
|
||||||
/* TODO: put into colour struct or take value from property maybe */
|
|
||||||
const uint8_t alpha_color = 128;
|
|
||||||
int offset;
|
int offset;
|
||||||
|
|
||||||
offset = (y * p->ystride) + (x * 4);
|
offset = (y * p->ystride) + (x * 4);
|
||||||
oil_splat_u8 (p->yp + offset, 4, &p->color->Y, w);
|
oil_splat_u8 (p->yp + offset, 4, &p->color->Y, w);
|
||||||
oil_splat_u8 (p->up + offset, 4, &p->color->U, w);
|
oil_splat_u8 (p->up + offset, 4, &p->color->U, w);
|
||||||
oil_splat_u8 (p->vp + offset, 4, &p->color->V, w);
|
oil_splat_u8 (p->vp + offset, 4, &p->color->V, w);
|
||||||
oil_splat_u8 (p->ap + offset, 4, &alpha_color, w);
|
oil_splat_u8 (p->ap + offset, 4, &p->color->A, w);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1394,10 +1392,7 @@ paint_hline_str4 (paintinfo * p, int x, int y, int w)
|
||||||
oil_splat_u8 (p->vp + offset + x * 4, 4, &p->color->B, w);
|
oil_splat_u8 (p->vp + offset + x * 4, 4, &p->color->B, w);
|
||||||
|
|
||||||
if (p->ap != NULL) {
|
if (p->ap != NULL) {
|
||||||
/* TODO: put into colour struct or take value from property maybe */
|
oil_splat_u8 (p->ap + offset + (x * 4), 4, &p->color->A, w);
|
||||||
const uint8_t alpha_color = 128;
|
|
||||||
|
|
||||||
oil_splat_u8 (p->ap + offset + (x * 4), 4, &alpha_color, w);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ enum {
|
||||||
struct vts_color_struct {
|
struct vts_color_struct {
|
||||||
guint8 Y, U, V;
|
guint8 Y, U, V;
|
||||||
guint8 R, G, B;
|
guint8 R, G, B;
|
||||||
|
guint8 A;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct paintinfo_struct paintinfo;
|
typedef struct paintinfo_struct paintinfo;
|
||||||
|
|
Loading…
Reference in a new issue