diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c index 4e339370a4..131580433d 100644 --- a/gst-libs/gst/gl/gstglcolorconvert.c +++ b/gst-libs/gst/gl/gstglcolorconvert.c @@ -945,8 +945,14 @@ _init_supported_formats (GstGLContext * context, gboolean output, #endif } - if (!context || (gst_gl_format_is_supported (context, GST_GL_RG16))) + if (!context || (gst_gl_format_is_supported (context, GST_GL_RG16))) { _append_value_string_list (supported_formats, "Y210", NULL); +#if G_BYTE_ORDER == G_LITTLE_ENDIAN + _append_value_string_list (supported_formats, "Y212_LE", NULL); +#else + _append_value_string_list (supported_formats, "Y212_BE", NULL); +#endif + } } /* copies the given caps */ @@ -1537,6 +1543,8 @@ _get_n_textures (GstVideoFormat v_format) case GST_VIDEO_FORMAT_RGB10A2_LE: case GST_VIDEO_FORMAT_Y410: case GST_VIDEO_FORMAT_Y210: + case GST_VIDEO_FORMAT_Y212_LE: + case GST_VIDEO_FORMAT_Y212_BE: return 1; case GST_VIDEO_FORMAT_NV12: case GST_VIDEO_FORMAT_NV21: @@ -1691,6 +1699,8 @@ _YUV_to_RGB (GstGLColorConvert * convert) break; } case GST_VIDEO_FORMAT_Y210: + case GST_VIDEO_FORMAT_Y212_LE: + case GST_VIDEO_FORMAT_Y212_BE: { info->templ = &templ_YUY2_UYVY_to_RGB; info->frag_body = @@ -1821,6 +1831,8 @@ _RGB_to_YUV (GstGLColorConvert * convert) break; case GST_VIDEO_FORMAT_YUY2: case GST_VIDEO_FORMAT_Y210: + case GST_VIDEO_FORMAT_Y212_LE: + case GST_VIDEO_FORMAT_Y212_BE: info->templ = &templ_RGB_to_YUY2_UYVY; info->frag_body = g_strdup_printf (templ_RGB_to_YUY2_UYVY_BODY, pixel_order[0], pixel_order[1], pixel_order[2], pixel_order[3], diff --git a/gst-libs/gst/gl/gstglcolorconvert.h b/gst-libs/gst/gl/gstglcolorconvert.h index 7563db6532..0bad54168c 100644 --- a/gst-libs/gst/gl/gstglcolorconvert.h +++ b/gst-libs/gst/gl/gstglcolorconvert.h @@ -88,9 +88,10 @@ struct _GstGLColorConvertClass * The currently supported formats that can be converted */ #if G_BYTE_ORDER == G_LITTLE_ENDIAN -#define COLOR_CONVERT_EXT_FORMATS ", BGR10A2_LE, RGB10A2_LE, P010_10LE, P012_LE, P016_LE" +#define COLOR_CONVERT_EXT_FORMATS \ + ", BGR10A2_LE, RGB10A2_LE, P010_10LE, P012_LE, P016_LE, Y212_LE" #else -#define COLOR_CONVERT_EXT_FORMATS ", P010_10BE, P012_BE, P016_BE" +#define COLOR_CONVERT_EXT_FORMATS ", P010_10BE, P012_BE, P016_BE, Y212_BE" #endif #define GST_GL_COLOR_CONVERT_FORMATS "{ RGBA, RGB, RGBx, BGR, BGRx, BGRA, xRGB, " \ diff --git a/gst-libs/gst/gl/gstglformat.c b/gst-libs/gst/gl/gstglformat.c index af8eb4ca6e..04ec26c937 100644 --- a/gst-libs/gst/gl/gstglformat.c +++ b/gst-libs/gst/gl/gstglformat.c @@ -214,6 +214,8 @@ gst_gl_format_from_video_info (GstGLContext * context, GstVideoInfo * vinfo, case GST_VIDEO_FORMAT_P016_BE: return plane == 0 ? GST_GL_R16 : GST_GL_RG16; case GST_VIDEO_FORMAT_Y210: + case GST_VIDEO_FORMAT_Y212_LE: + case GST_VIDEO_FORMAT_Y212_BE: return GST_GL_RG16; default: n_plane_components = 4; diff --git a/gst-libs/gst/gl/gstglmemory.h b/gst-libs/gst/gl/gstglmemory.h index 3c84ccede2..cab6271dd0 100644 --- a/gst-libs/gst/gl/gstglmemory.h +++ b/gst-libs/gst/gl/gstglmemory.h @@ -51,9 +51,10 @@ GType gst_gl_memory_allocator_get_type(void); * List of video formats that are supported by #GstGLMemory */ #if G_BYTE_ORDER == G_LITTLE_ENDIAN -#define MEMORY_VIDEO_EXT_FORMATS ", BGR10A2_LE, RGB10A2_LE, P010_10LE, P012_LE, P016_LE" +#define MEMORY_VIDEO_EXT_FORMATS \ + ", BGR10A2_LE, RGB10A2_LE, P010_10LE, P012_LE, P016_LE, Y212_LE" #else -#define MEMORY_VIDEO_EXT_FORMATS ", P010_10BE, P012_BE, P016_BE" +#define MEMORY_VIDEO_EXT_FORMATS ", P010_10BE, P012_BE, P016_BE, Y212_BE" #endif #define GST_GL_MEMORY_VIDEO_FORMATS_STR \