GET_PLANE_LINE (1, uv), src, width / 2);
}
+#define PACK_NV16 GST_VIDEO_FORMAT_AYUV, unpack_NV16, 1, pack_NV16
+static void
+unpack_NV16 (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)
+{
+ video_orc_unpack_NV16 (dest,
+ GET_PLANE_LINE (0, y), GET_PLANE_LINE (1, y), width);
+}
+
+static void
+pack_NV16 (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)
+{
+ video_orc_pack_NV16 (GET_PLANE_LINE (0, y),
+ GET_PLANE_LINE (1, y), src, width / 2);
+}
+
#define PACK_UYVP GST_VIDEO_FORMAT_AYUV64, unpack_UYVP, 1, pack_UYVP
static void
unpack_UYVP (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
MAKE_RGB_LE_FORMAT (GBR_10LE, "raw video", DPTH10_10_10, PSTR222, PLANE201,
OFFS0, SUB444,
PACK_GBR_10LE),
+
+ MAKE_YUV_FORMAT (NV16, "raw video", GST_MAKE_FOURCC ('N', 'V', '1', '6'),
+ DPTH888, PSTR111, PLANE011, OFFS001, SUB422, PACK_NV16),
};
static GstVideoFormat
return GST_VIDEO_FORMAT_NV12;
case GST_MAKE_FOURCC ('N', 'V', '2', '1'):
return GST_VIDEO_FORMAT_NV21;
+ case GST_MAKE_FOURCC ('N', 'V', '1', '6'):
+ return GST_VIDEO_FORMAT_NV16;
case GST_MAKE_FOURCC ('v', '3', '0', '8'):
return GST_VIDEO_FORMAT_v308;
case GST_MAKE_FOURCC ('Y', '8', '0', '0'):
* @GST_VIDEO_FORMAT_GBR: planar 4:4:4 RGB, 8 bits per channel
* @GST_VIDEO_FORMAT_GBR_10BE: planar 4:4:4 RGB, 10 bits per channel
* @GST_VIDEO_FORMAT_GBR_10LE: planar 4:4:4 RGB, 10 bits per channel
+ * @GST_VIDEO_FORMAT_NV16: planar 4:2:2 YUV with interleaved UV plane
*
* Enum value describing the most common video formats.
*/
GST_VIDEO_FORMAT_GBR,
GST_VIDEO_FORMAT_GBR_10BE,
GST_VIDEO_FORMAT_GBR_10LE,
+ GST_VIDEO_FORMAT_NV16,
} GstVideoFormat;
#define GST_VIDEO_MAX_PLANES 4
#define GST_VIDEO_FORMATS_ALL "{ I420, YV12, YUY2, UYVY, AYUV, RGBx, " \
"BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, " \
- "YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, " \
+ "YVYU, Y444, v210, v216, NV12, NV21, NV16, GRAY8, GRAY16_BE, GRAY16_LE, " \
"v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, " \
"IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, " \
" Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE }"
info->offset[1] = info->stride[0] * GST_ROUND_UP_2 (height);
info->size = info->stride[0] * GST_ROUND_UP_2 (height) * 3 / 2;
break;
+ case GST_VIDEO_FORMAT_NV16:
+ info->stride[0] = GST_ROUND_UP_4 (width);
+ info->stride[1] = info->stride[0];
+ info->offset[0] = 0;
+ info->offset[1] = info->stride[0] * height;
+ info->size = info->stride[0] * height * 2;
+ break;
case GST_VIDEO_FORMAT_A420:
info->stride[0] = GST_ROUND_UP_4 (width);
info->stride[1] = GST_ROUND_UP_4 (GST_ROUND_UP_2 (width) / 2);
swapw vu, uv
+.function video_orc_unpack_NV16
+.dest 4 d guint8
+.source 1 y guint8
+.source 2 uv guint8
+.const 1 c255 255
+.temp 2 ay
+.temp 2 tuv
+
+x2 loadupdb tuv, uv
+mergebw ay, c255, y
+mergewl d, ay, tuv
+
+.function video_orc_pack_NV16
+.dest 2 y guint8
+.dest 2 uv guint8
+.source 8 ayuv guint8
+.temp 4 ay
+.temp 4 tuv
+
+x2 splitlw tuv, ay, ayuv
+x2 select1wb y, ay
+select0lw uv, tuv
+
+
.function video_orc_unpack_A420
.dest 4 d guint8
.source 1 y guint8