#define MAKE_YUV_FORMAT(name, desc, fourcc, depth, pstride, plane, offs, sub ) \
{ fourcc, {GST_VIDEO_FORMAT_ ##name, G_STRINGIFY(name), desc, GST_VIDEO_FORMAT_FLAG_YUV, depth, pstride, plane, offs, sub } }
+#define MAKE_YUV_LE_FORMAT(name, desc, fourcc, depth, pstride, plane, offs, sub ) \
+ { fourcc, {GST_VIDEO_FORMAT_ ##name, G_STRINGIFY(name), desc, GST_VIDEO_FORMAT_FLAG_YUV | GST_VIDEO_FORMAT_FLAG_LE, depth, pstride, plane, offs, sub } }
#define MAKE_YUVA_FORMAT(name, desc, fourcc, depth, pstride, plane, offs, sub) \
{ fourcc, {GST_VIDEO_FORMAT_ ##name, G_STRINGIFY(name), desc, GST_VIDEO_FORMAT_FLAG_YUV | GST_VIDEO_FORMAT_FLAG_ALPHA, depth, pstride, plane, offs, sub } }
{0x00000000, {GST_VIDEO_FORMAT_UNKNOWN, "UNKNOWN", "unknown video", 0, DPTH0,
PSTR0, PLANE_NA,
OFFS0}},
+ {0x00000000, {GST_VIDEO_FORMAT_ENCODED, "ENCODED", "encoded video",
+ GST_VIDEO_FORMAT_FLAG_COMPLEX, DPTH0, PSTR0, PLANE_NA, OFFS0}},
MAKE_YUV_FORMAT (I420, "raw video", GST_MAKE_FOURCC ('I', '4', '2', '0'),
DPTH888, PSTR111,
PLANE012, OFFS0, SUB420),
MAKE_YUV_FORMAT (r210, "raw video", GST_MAKE_FOURCC ('r', '2', '1', '0'),
DPTH10_10_10,
PSTR444, PLANE0, OFFS0, SUB444),
- {0x00000000, {GST_VIDEO_FORMAT_ENCODED, "ENCODED", "encoded video",
- GST_VIDEO_FORMAT_FLAG_COMPLEX, DPTH0, PSTR0, PLANE_NA, OFFS0}},
+ MAKE_YUV_FORMAT (I420_10BE, "raw video", 0x00000000, DPTH10_10_10,
+ PSTR222, PLANE012, OFFS0, SUB420),
+ MAKE_YUV_LE_FORMAT (I420_10LE, "raw video", 0x00000000, DPTH10_10_10,
+ PSTR222, PLANE012, OFFS0, SUB420),
};
/**
info->size = info->offset[2] +
info->stride[2] * (GST_ROUND_UP_4 (height) / 4);
break;
+ case GST_VIDEO_FORMAT_I420_10LE:
+ case GST_VIDEO_FORMAT_I420_10BE:
+ info->stride[0] = GST_ROUND_UP_4 (width * 2);
+ info->stride[1] = GST_ROUND_UP_4 (width);
+ info->stride[2] = info->stride[1];
+ info->offset[0] = 0;
+ info->offset[1] = info->stride[0] * GST_ROUND_UP_2 (height);
+ info->offset[2] = info->offset[1] +
+ info->stride[1] * (GST_ROUND_UP_2 (height) / 2);
+ info->size = info->offset[2] +
+ info->stride[2] * (GST_ROUND_UP_2 (height) / 2);
+ break;
case GST_VIDEO_FORMAT_ENCODED:
break;
case GST_VIDEO_FORMAT_UNKNOWN:
* @GST_VIDEO_FORMAT_ARGB64: rgb with alpha channel first, 16 bits per channel (Since: 0.10.33)
* @GST_VIDEO_FORMAT_AYUV64: packed 4:4:4 YUV with alpha channel, 16 bits per channel (A0-Y0-U0-V0 ...) (Since: 0.10.33)
* @GST_VIDEO_FORMAT_r210: packed 4:4:4 RGB, 10 bits per channel (Since: 0.10.33)
+ * @GST_VIDEO_FORMAT_I420_10BE: planar 4:2:0 YUV, 10 bits per channel
+ * @GST_VIDEO_FORMAT_I420_10LE: planar 4:2:0 YUV, 10 bits per channel
*
* Enum value describing the most common video formats.
*/
typedef enum {
GST_VIDEO_FORMAT_UNKNOWN,
+ GST_VIDEO_FORMAT_ENCODED,
GST_VIDEO_FORMAT_I420,
GST_VIDEO_FORMAT_YV12,
GST_VIDEO_FORMAT_YUY2,
GST_VIDEO_FORMAT_ARGB64,
GST_VIDEO_FORMAT_AYUV64,
GST_VIDEO_FORMAT_r210,
- GST_VIDEO_FORMAT_ENCODED
+ GST_VIDEO_FORMAT_I420_10BE,
+ GST_VIDEO_FORMAT_I420_10LE
} GstVideoFormat;
#define GST_VIDEO_MAX_PLANES 4
"BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, " \
"YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, " \
"v308, Y800, Y16, RGB16, BGR16, RGB15, BGR15, UYVP, A420, " \
- "RGB8_PALETTED, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210 }"
+ "RGB8_PALETTED, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE," \
+ "I420_10BE }"
/**
* GST_VIDEO_CAPS_MAKE: