mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
gst/videotestsrc/videotestsrc.c: Added two more colorspaces.
Original commit message from CVS: * gst/videotestsrc/videotestsrc.c: (paint_setup_Y41B), (paint_hline_Y41B), (paint_setup_Y42B), (paint_hline_Y42B): Added two more colorspaces.
This commit is contained in:
parent
e40a51fa08
commit
7585e3b9fb
2 changed files with 62 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-11-05 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/videotestsrc/videotestsrc.c: (paint_setup_Y41B),
|
||||
(paint_hline_Y41B), (paint_setup_Y42B), (paint_hline_Y42B):
|
||||
Added two more colorspaces.
|
||||
|
||||
2004-11-05 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/ffmpegcolorspace/gstffmpegcodecmap.c:
|
||||
|
|
|
@ -255,6 +255,8 @@ static void paint_setup_YUY2 (paintinfo * p, char *dest);
|
|||
static void paint_setup_UYVY (paintinfo * p, char *dest);
|
||||
static void paint_setup_YVYU (paintinfo * p, char *dest);
|
||||
static void paint_setup_IYU2 (paintinfo * p, char *dest);
|
||||
static void paint_setup_Y41B (paintinfo * p, char *dest);
|
||||
static void paint_setup_Y42B (paintinfo * p, char *dest);
|
||||
static void paint_setup_Y800 (paintinfo * p, char *dest);
|
||||
|
||||
#if 0
|
||||
|
@ -277,6 +279,8 @@ static void paint_setup_xRGB1555 (paintinfo * p, char *dest);
|
|||
static void paint_hline_I420 (paintinfo * p, int x, int y, int w);
|
||||
static void paint_hline_YUY2 (paintinfo * p, int x, int y, int w);
|
||||
static void paint_hline_IYU2 (paintinfo * p, int x, int y, int w);
|
||||
static void paint_hline_Y41B (paintinfo * p, int x, int y, int w);
|
||||
static void paint_hline_Y42B (paintinfo * p, int x, int y, int w);
|
||||
static void paint_hline_Y800 (paintinfo * p, int x, int y, int w);
|
||||
|
||||
#if 0
|
||||
|
@ -339,7 +343,9 @@ struct fourcc_list_struct fourcc_list[] = {
|
|||
#endif
|
||||
/* CLPL */
|
||||
/* Y41B */
|
||||
{"Y41B", "Y41B", 12, paint_setup_Y41B, paint_hline_Y41B},
|
||||
/* Y42B */
|
||||
{"Y42B", "Y42B", 16, paint_setup_Y42B, paint_hline_Y42B},
|
||||
/* Y800 grayscale */
|
||||
{"Y800", "Y800", 8, paint_setup_Y800, paint_hline_Y800},
|
||||
|
||||
|
@ -793,6 +799,56 @@ paint_hline_IYU2 (paintinfo * p, int x, int y, int w)
|
|||
oil_splat_u8 (p->vp + offset + x * 3, 3, p->color->V, w);
|
||||
}
|
||||
|
||||
static void
|
||||
paint_setup_Y41B (paintinfo * p, char *dest)
|
||||
{
|
||||
p->yp = dest;
|
||||
p->ystride = ROUND_UP_4 (p->width);
|
||||
p->up = p->yp + p->ystride * p->height;
|
||||
p->ustride = ROUND_UP_8 (p->width) / 4;
|
||||
p->vp = p->up + p->ustride * p->height;
|
||||
p->vstride = ROUND_UP_8 (p->width) / 4;
|
||||
p->endptr = p->vp + p->vstride * p->height;
|
||||
}
|
||||
|
||||
static void
|
||||
paint_hline_Y41B (paintinfo * p, int x, int y, int w)
|
||||
{
|
||||
int x1 = x / 4;
|
||||
int x2 = (x + w) / 4;
|
||||
int offset = y * p->ystride;
|
||||
int offset1 = y * p->ustride;
|
||||
|
||||
memset (p->yp + offset + x, p->color->Y, w);
|
||||
memset (p->up + offset1 + x1, p->color->U, x2 - x1);
|
||||
memset (p->vp + offset1 + x1, p->color->V, x2 - x1);
|
||||
}
|
||||
|
||||
static void
|
||||
paint_setup_Y42B (paintinfo * p, char *dest)
|
||||
{
|
||||
p->yp = dest;
|
||||
p->ystride = ROUND_UP_4 (p->width);
|
||||
p->up = p->yp + p->ystride * p->height;
|
||||
p->ustride = ROUND_UP_8 (p->width) / 2;
|
||||
p->vp = p->up + p->ustride * p->height;
|
||||
p->vstride = ROUND_UP_8 (p->width) / 2;
|
||||
p->endptr = p->vp + p->vstride * p->height;
|
||||
}
|
||||
|
||||
static void
|
||||
paint_hline_Y42B (paintinfo * p, int x, int y, int w)
|
||||
{
|
||||
int x1 = x / 2;
|
||||
int x2 = (x + w) / 2;
|
||||
int offset = y * p->ystride;
|
||||
int offset1 = y * p->ustride;
|
||||
|
||||
memset (p->yp + offset + x, p->color->Y, w);
|
||||
memset (p->up + offset1 + x1, p->color->U, x2 - x1);
|
||||
memset (p->vp + offset1 + x1, p->color->V, x2 - x1);
|
||||
}
|
||||
|
||||
static void
|
||||
paint_setup_Y800 (paintinfo * p, char *dest)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue