}
}
+#define PACK_INVZ16_LE GST_VIDEO_FORMAT_AYUV64, unpack_INVZ16_LE, 1, pack_INVZ16_LE
+static void
+unpack_INVZ16_LE (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
+ gpointer dest, const gpointer data[GST_VIDEO_MAX_PLANES],
+ const gint stride[GST_VIDEO_MAX_PLANES], gint x, gint y, gint width)
+{
+ int i;
+ const guint16 *restrict s = GET_LINE (y);
+ guint16 *restrict d = dest;
+
+ s += x;
+
+ for (i = 0; i < width; i++) {
+ d[i * 4 + 0] = 0xffff;
+ d[i * 4 + 1] = GST_READ_UINT16_LE (s + i);
+ d[i * 4 + 2] = 0x8000;
+ d[i * 4 + 3] = 0x8000;
+ }
+}
+
+static void
+pack_INVZ16_LE (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
+ const gpointer src, gint sstride, gpointer data[GST_VIDEO_MAX_PLANES],
+ const gint stride[GST_VIDEO_MAX_PLANES], GstVideoChromaSite chroma_site,
+ gint y, gint width)
+{
+ int i;
+ guint16 *restrict d = GET_LINE (y);
+ const guint16 *restrict s = src;
+
+ for (i = 0; i < width; i++) {
+ GST_WRITE_UINT16_LE (d + i, s[i * 4 + 1]);
+ }
+}
+
typedef struct
{
guint32 fourcc;
#define MAKE_GRAY_LE_FORMAT(name, desc, depth, pstride, plane, offs, sub, pack) \
{ 0x00000000, {GST_VIDEO_FORMAT_ ##name, G_STRINGIFY(name), desc, GST_VIDEO_FORMAT_FLAG_GRAY | GST_VIDEO_FORMAT_FLAG_LE, depth, pstride, plane, offs, sub, pack } }
+#define MAKE_DEPTH_FORMAT(name, desc, fourcc, depth, pstride, plane, offs, sub, pack) \
+ { fourcc, {GST_VIDEO_FORMAT_ ##name, G_STRINGIFY(name), desc, GST_VIDEO_FORMAT_FLAG_GRAY | GST_VIDEO_FORMAT_FLAG_LE, depth, pstride, plane, offs, sub, pack } }
+
static const VideoFormat formats[] = {
{0x00000000, {GST_VIDEO_FORMAT_UNKNOWN, "UNKNOWN", "unknown video", 0, DPTH0,
PSTR0, PLANE_NA, OFFS0}},
PSTR222, PLANE012, OFFS0, SUB444, PACK_Y444_12BE),
MAKE_YUV_LE_FORMAT (Y444_12LE, "raw video", 0x00000000, DPTH12_12_12,
PSTR222, PLANE012, OFFS0, SUB444, PACK_Y444_12LE),
+ MAKE_DEPTH_FORMAT (INVZ, "raw video", GST_MAKE_FOURCC ('I', 'N', 'V', 'Z'),
+ DPTH16, PSTR2, PLANE0, OFFS0, SUB4, PACK_INVZ16_LE),
#ifdef TIZEN_PROFILE_TV
MAKE_YUV_FORMAT (STV0, "raw video", GST_MAKE_FOURCC ('S', 'T', 'V', '0'),
DPTH888, PSTR111, PLANE012, OFFS0, SUB420, PACK_420),
return GST_VIDEO_FORMAT_IYU1;
case GST_MAKE_FOURCC ('A', 'Y', '6', '4'):
return GST_VIDEO_FORMAT_AYUV64;
+ case GST_MAKE_FOURCC ('I', 'N', 'V', 'Z'):
+ return GST_VIDEO_FORMAT_INVZ;
default:
return GST_VIDEO_FORMAT_UNKNOWN;
}
* @GST_VIDEO_FORMAT_I422_12LE: planar 4:2:2 YUV, 12 bits per channel (Since: 1.12)
* @GST_VIDEO_FORMAT_Y444_12BE: planar 4:4:4 YUV, 12 bits per channel (Since: 1.12)
* @GST_VIDEO_FORMAT_Y444_12LE: planar 4:4:4 YUV, 12 bits per channel (Since: 1.12)
+ * @GST_VIDEO_FORMAT_INVZ: 16-bit depth data with distance values at each pixel (Since: 1.16)
*
* Enum value describing the most common video formats.
*/
GST_VIDEO_FORMAT_I422_12LE,
GST_VIDEO_FORMAT_Y444_12BE,
GST_VIDEO_FORMAT_Y444_12LE,
+ GST_VIDEO_FORMAT_INVZ,
GST_VIDEO_FORMAT_STV0, /* TIZEN_PROFILE_TV */
GST_VIDEO_FORMAT_STV1, /* TIZEN_PROFILE_TV */
} GstVideoFormat;
"A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, " \
"P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, " \
"GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, " \
- "Y444_12BE, Y444_12LE }"
+ "Y444_12BE, Y444_12LE, INVZ }"
/**
* GST_VIDEO_CAPS_MAKE: