summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2007-07-12 15:02:43 +0000
committerWim Taymans <wim.taymans@gmail.com>2007-07-12 15:02:43 +0000
commit3bac564cc0fb912e1b426f2774f6ff86edb76dac (patch)
treea29414c766dcddb28c96fd7855b53aae362283ca
parentc03d6a8757ef14a0fbf324650fec0a2af416a557 (diff)
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.
-rw-r--r--ChangeLog8
-rw-r--r--gst/videotestsrc/videotestsrc.c33
-rw-r--r--gst/videotestsrc/videotestsrc.h1
3 files changed, 23 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index 78e40a60..9e3cb293 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
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>
+
* gst/playback/gstplaybasebin.c: (no_more_pads_full),
(setup_source):
Clear the dynamic pads counter when starting a new uri. This makes
diff --git a/gst/videotestsrc/videotestsrc.c b/gst/videotestsrc/videotestsrc.c
index b77cfb40..4a9f33ce 100644
--- a/gst/videotestsrc/videotestsrc.c
+++ b/gst/videotestsrc/videotestsrc.c
@@ -211,29 +211,29 @@ enum
static const struct vts_color_struct vts_colors[] = {
/* 100% white */
- {255, 128, 128, 255, 255, 255},
+ {255, 128, 128, 255, 255, 255, 255},
/* yellow */
- {226, 0, 155, 255, 255, 0},
+ {226, 0, 155, 255, 255, 0, 255},
/* cyan */
- {179, 170, 0, 0, 255, 255},
+ {179, 170, 0, 0, 255, 255, 255},
/* green */
- {150, 46, 21, 0, 255, 0},
+ {150, 46, 21, 0, 255, 0, 255},
/* magenta */
- {105, 212, 235, 255, 0, 255},
+ {105, 212, 235, 255, 0, 255, 255},
/* red */
- {76, 85, 255, 255, 0, 0},
+ {76, 85, 255, 255, 0, 0, 255},
/* blue */
- {29, 255, 107, 0, 0, 255},
+ {29, 255, 107, 0, 0, 255, 255},
/* black */
- {16, 128, 128, 0, 0, 0},
+ {16, 128, 128, 0, 0, 0, 255},
/* -I */
- {16, 198, 21, 0, 0, 128},
+ {16, 198, 21, 0, 0, 128, 255},
/* +Q */
- {16, 235, 198, 0, 128, 255},
+ {16, 235, 198, 0, 128, 255, 255},
/* superblack */
- {0, 128, 128, 0, 0, 0},
+ {0, 128, 128, 0, 0, 0, 255},
/* 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
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;
offset = (y * p->ystride) + (x * 4);
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->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
@@ -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);
if (p->ap != NULL) {
- /* TODO: put into colour struct or take value from property maybe */
- const uint8_t alpha_color = 128;
-
- oil_splat_u8 (p->ap + offset + (x * 4), 4, &alpha_color, w);
+ oil_splat_u8 (p->ap + offset + (x * 4), 4, &p->color->A, w);
}
}
diff --git a/gst/videotestsrc/videotestsrc.h b/gst/videotestsrc/videotestsrc.h
index e5fd3b71..5061c3d7 100644
--- a/gst/videotestsrc/videotestsrc.h
+++ b/gst/videotestsrc/videotestsrc.h
@@ -31,6 +31,7 @@ enum {
struct vts_color_struct {
guint8 Y, U, V;
guint8 R, G, B;
+ guint8 A;
};
typedef struct paintinfo_struct paintinfo;