mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-09-02 02:03:54 +00:00
glcolorconvert: support RGB16/BGR16 video format upload
https://bugzilla.gnome.org/show_bug.cgi?id=738842
This commit is contained in:
parent
81c5fd3c1e
commit
5eb538f9e2
3 changed files with 10 additions and 1 deletions
|
@ -650,6 +650,12 @@ _RGB_pixel_order (const gchar * expected, const gchar * wanted)
|
||||||
expect = g_ascii_strdown (expected, -1);
|
expect = g_ascii_strdown (expected, -1);
|
||||||
want = g_ascii_strdown (wanted, -1);
|
want = g_ascii_strdown (wanted, -1);
|
||||||
|
|
||||||
|
if (strcmp (expect, "rgb16") == 0 || strcmp (expect, "bgr16") == 0) {
|
||||||
|
gchar *temp = expect;
|
||||||
|
expect = g_strndup (temp, 3);
|
||||||
|
g_free (temp);
|
||||||
|
}
|
||||||
|
|
||||||
/* pad want with 'a's */
|
/* pad want with 'a's */
|
||||||
if ((len = strlen (want)) < 4) {
|
if ((len = strlen (want)) < 4) {
|
||||||
gchar *new_want = g_strndup (want, 4);
|
gchar *new_want = g_strndup (want, 4);
|
||||||
|
|
|
@ -88,7 +88,7 @@ struct _GstGLColorConvertClass
|
||||||
#define GST_GL_COLOR_CONVERT_FORMATS "{ RGB, RGBx, RGBA, BGR, BGRx, BGRA, xRGB, " \
|
#define GST_GL_COLOR_CONVERT_FORMATS "{ RGB, RGBx, RGBA, BGR, BGRx, BGRA, xRGB, " \
|
||||||
"xBGR, ARGB, ABGR, Y444, I420, YV12, Y42B, " \
|
"xBGR, ARGB, ABGR, Y444, I420, YV12, Y42B, " \
|
||||||
"Y41B, NV12, NV21, YUY2, UYVY, AYUV, " \
|
"Y41B, NV12, NV21, YUY2, UYVY, AYUV, " \
|
||||||
"GRAY8, GRAY16_LE, GRAY16_BE }"
|
"GRAY8, GRAY16_LE, GRAY16_BE, RGB16, BGR16 }"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GST_GL_COLOR_CONVERT_VIDEO_CAPS:
|
* GST_GL_COLOR_CONVERT_VIDEO_CAPS:
|
||||||
|
|
|
@ -222,6 +222,9 @@ gst_gl_texture_type_from_format (GstGLContext * context,
|
||||||
case GST_VIDEO_FORMAT_BGR:
|
case GST_VIDEO_FORMAT_BGR:
|
||||||
n_plane_components = 3;
|
n_plane_components = 3;
|
||||||
break;
|
break;
|
||||||
|
case GST_VIDEO_FORMAT_RGB16:
|
||||||
|
case GST_VIDEO_FORMAT_BGR16:
|
||||||
|
return GST_VIDEO_GL_TEXTURE_TYPE_RGB16;
|
||||||
case GST_VIDEO_FORMAT_GRAY16_BE:
|
case GST_VIDEO_FORMAT_GRAY16_BE:
|
||||||
case GST_VIDEO_FORMAT_GRAY16_LE:
|
case GST_VIDEO_FORMAT_GRAY16_LE:
|
||||||
case GST_VIDEO_FORMAT_YUY2:
|
case GST_VIDEO_FORMAT_YUY2:
|
||||||
|
|
Loading…
Reference in a new issue