mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 02:15:31 +00:00
make colorspace handle the original RGB format, too, since it handles both. Add the template caps for the reverse for...
Original commit message from CVS: make colorspace handle the original RGB format, too, since it handles both. Add the template caps for the reverse format to video.h
This commit is contained in:
parent
983e8d120e
commit
425a3fef25
2 changed files with 66 additions and 0 deletions
|
@ -443,6 +443,10 @@ gst_colorspace_base_init (gpointer g_class)
|
||||||
GST_PROPS_FOURCC (GST_STR_FOURCC ("I420")),
|
GST_PROPS_FOURCC (GST_STR_FOURCC ("I420")),
|
||||||
GST_PROPS_FOURCC (GST_STR_FOURCC ("YV12")),
|
GST_PROPS_FOURCC (GST_STR_FOURCC ("YV12")),
|
||||||
GST_PROPS_FOURCC (GST_STR_FOURCC ("YUY2")))));
|
GST_PROPS_FOURCC (GST_STR_FOURCC ("YUY2")))));
|
||||||
|
caps = gst_caps_append (caps,
|
||||||
|
gst_caps_new ("csp_templ_rgb24_32",
|
||||||
|
"video/x-raw-rgb",
|
||||||
|
GST_VIDEO_RGB_PAD_TEMPLATE_PROPS_24_32_REVERSE));
|
||||||
caps = gst_caps_append (caps,
|
caps = gst_caps_append (caps,
|
||||||
gst_caps_new ("csp_templ_rgb24_32",
|
gst_caps_new ("csp_templ_rgb24_32",
|
||||||
"video/x-raw-rgb",
|
"video/x-raw-rgb",
|
||||||
|
|
|
@ -27,10 +27,18 @@
|
||||||
#define G_MASK_32 0x00ff0000
|
#define G_MASK_32 0x00ff0000
|
||||||
#define B_MASK_32 0x0000ff00
|
#define B_MASK_32 0x0000ff00
|
||||||
|
|
||||||
|
#define R_MASK_32_REVERSE 0x000000ff
|
||||||
|
#define G_MASK_32_REVERSE 0x0000ff00
|
||||||
|
#define B_MASK_32_REVERSE 0x00ff0000
|
||||||
|
|
||||||
#define R_MASK_24 0xff0000
|
#define R_MASK_24 0xff0000
|
||||||
#define G_MASK_24 0x00ff00
|
#define G_MASK_24 0x00ff00
|
||||||
#define B_MASK_24 0x0000ff
|
#define B_MASK_24 0x0000ff
|
||||||
|
|
||||||
|
#define R_MASK_24_REVERSE 0x0000ff
|
||||||
|
#define G_MASK_24_REVERSE 0x00ff00
|
||||||
|
#define B_MASK_24_REVERSE 0xff0000
|
||||||
|
|
||||||
#define R_MASK_16 0xf800
|
#define R_MASK_16 0xf800
|
||||||
#define G_MASK_16 0x07e0
|
#define G_MASK_16 0x07e0
|
||||||
#define B_MASK_16 0x001f
|
#define B_MASK_16 0x001f
|
||||||
|
@ -71,6 +79,34 @@
|
||||||
"framerate", FPS_RANGE, \
|
"framerate", FPS_RANGE, \
|
||||||
NULL)
|
NULL)
|
||||||
|
|
||||||
|
#define GST_VIDEO_RGB_PAD_TEMPLATE_PROPS_24_32_REVERSE \
|
||||||
|
gst_props_new ( \
|
||||||
|
"bpp", GST_PROPS_LIST ( \
|
||||||
|
GST_PROPS_INT (24), \
|
||||||
|
GST_PROPS_INT (32) \
|
||||||
|
), \
|
||||||
|
"depth", GST_PROPS_LIST ( \
|
||||||
|
GST_PROPS_INT (24), \
|
||||||
|
GST_PROPS_INT (32) \
|
||||||
|
), \
|
||||||
|
"endianness", GST_PROPS_INT (G_BIG_ENDIAN), \
|
||||||
|
"red_mask", GST_PROPS_LIST ( \
|
||||||
|
GST_PROPS_INT (R_MASK_32_REVERSE), \
|
||||||
|
GST_PROPS_INT (R_MASK_24_REVERSE) \
|
||||||
|
), \
|
||||||
|
"green_mask", GST_PROPS_LIST ( \
|
||||||
|
GST_PROPS_INT (G_MASK_32_REVERSE), \
|
||||||
|
GST_PROPS_INT (G_MASK_24_REVERSE) \
|
||||||
|
), \
|
||||||
|
"blue_mask", GST_PROPS_LIST ( \
|
||||||
|
GST_PROPS_INT (B_MASK_32_REVERSE), \
|
||||||
|
GST_PROPS_INT (B_MASK_24_REVERSE) \
|
||||||
|
), \
|
||||||
|
"width", SIZE_RANGE, \
|
||||||
|
"height", SIZE_RANGE, \
|
||||||
|
"framerate", FPS_RANGE, \
|
||||||
|
NULL)
|
||||||
|
|
||||||
#define GST_VIDEO_RGB_PAD_TEMPLATE_PROPS_32 \
|
#define GST_VIDEO_RGB_PAD_TEMPLATE_PROPS_32 \
|
||||||
gst_props_new ( \
|
gst_props_new ( \
|
||||||
"bpp", GST_PROPS_INT (32), \
|
"bpp", GST_PROPS_INT (32), \
|
||||||
|
@ -97,6 +133,32 @@
|
||||||
"framerate", FPS_RANGE, \
|
"framerate", FPS_RANGE, \
|
||||||
NULL)
|
NULL)
|
||||||
|
|
||||||
|
#define GST_VIDEO_RGB_PAD_TEMPLATE_PROPS_32_REVERSE \
|
||||||
|
gst_props_new ( \
|
||||||
|
"bpp", GST_PROPS_INT (32), \
|
||||||
|
"depth", GST_PROPS_INT (32), \
|
||||||
|
"endianness", GST_PROPS_INT (G_BIG_ENDIAN), \
|
||||||
|
"red_mask", GST_PROPS_INT (R_MASK_32_REVERSE), \
|
||||||
|
"green_mask", GST_PROPS_INT (G_MASK_32_REVERSE), \
|
||||||
|
"blue_mask", GST_PROPS_INT (B_MASK_32_REVERSE), \
|
||||||
|
"width", SIZE_RANGE, \
|
||||||
|
"height", SIZE_RANGE, \
|
||||||
|
"framerate", FPS_RANGE, \
|
||||||
|
NULL)
|
||||||
|
|
||||||
|
#define GST_VIDEO_RGB_PAD_TEMPLATE_PROPS_24_REVERSE \
|
||||||
|
gst_props_new ( \
|
||||||
|
"bpp", GST_PROPS_INT (24), \
|
||||||
|
"depth", GST_PROPS_INT (24), \
|
||||||
|
"endianness", GST_PROPS_INT (G_BIG_ENDIAN), \
|
||||||
|
"red_mask", GST_PROPS_INT (R_MASK_24_REVERSE), \
|
||||||
|
"green_mask", GST_PROPS_INT (G_MASK_24_REVERSE), \
|
||||||
|
"blue_mask", GST_PROPS_INT (B_MASK_24_REVERSE), \
|
||||||
|
"width", SIZE_RANGE, \
|
||||||
|
"height", SIZE_RANGE, \
|
||||||
|
"framerate", FPS_RANGE, \
|
||||||
|
NULL)
|
||||||
|
|
||||||
#define GST_VIDEO_RGB_PAD_TEMPLATE_PROPS_15_16 \
|
#define GST_VIDEO_RGB_PAD_TEMPLATE_PROPS_15_16 \
|
||||||
gst_props_new ( \
|
gst_props_new ( \
|
||||||
"bpp", GST_PROPS_INT (16), \
|
"bpp", GST_PROPS_INT (16), \
|
||||||
|
|
Loading…
Reference in a new issue