}
}
+#define PACK_Y444_10LE GST_VIDEO_FORMAT_AYUV64, unpack_Y444_10LE, 1, pack_Y444_10LE
+static void
+unpack_Y444_10LE (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;
+ guint16 *srcY = GET_Y_LINE (y);
+ guint16 *srcU = GET_U_LINE (y);
+ guint16 *srcV = GET_V_LINE (y);
+ guint16 *d = dest, Y, U, V;
+
+ for (i = 0; i < width; i++) {
+ Y = GST_READ_UINT16_LE (srcY + i) << 6;
+ U = GST_READ_UINT16_LE (srcU + i) << 6;
+ V = GST_READ_UINT16_LE (srcV + i) << 6;
+
+ if (!(flags & GST_VIDEO_PACK_FLAG_TRUNCATE_RANGE)) {
+ Y |= (Y >> 10);
+ U |= (U >> 10);
+ V |= (V >> 10);
+ }
+
+ d[i * 4 + 0] = 0xffff;
+ d[i * 4 + 1] = Y;
+ d[i * 4 + 2] = U;
+ d[i * 4 + 3] = V;
+ }
+}
+
+static void
+pack_Y444_10LE (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 *destY = GET_Y_LINE (y);
+ guint16 *destU = GET_U_LINE (y);
+ guint16 *destV = GET_V_LINE (y);
+ guint16 Y, U, V;
+ const guint16 *s = src;
+
+ for (i = 0; i < width; i++) {
+ Y = (s[i * 4 + 1]) >> 6;
+ U = (s[i * 4 + 2]) >> 6;
+ V = (s[i * 4 + 3]) >> 6;
+
+ GST_WRITE_UINT16_LE (destY + i, Y);
+ GST_WRITE_UINT16_LE (destU + i, U);
+ GST_WRITE_UINT16_LE (destV + i, V);
+ }
+}
+
+#define PACK_Y444_10BE GST_VIDEO_FORMAT_AYUV64, unpack_Y444_10BE, 1, pack_Y444_10BE
+static void
+unpack_Y444_10BE (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;
+ guint16 *srcY = GET_Y_LINE (y);
+ guint16 *srcU = GET_U_LINE (y);
+ guint16 *srcV = GET_V_LINE (y);
+ guint16 *d = dest, Y, U, V;
+
+ for (i = 0; i < width; i++) {
+ Y = GST_READ_UINT16_BE (srcY + i) << 6;
+ U = GST_READ_UINT16_BE (srcU + i) << 6;
+ V = GST_READ_UINT16_BE (srcV + i) << 6;
+
+ if (!(flags & GST_VIDEO_PACK_FLAG_TRUNCATE_RANGE)) {
+ Y |= (Y >> 10);
+ U |= (U >> 10);
+ V |= (V >> 10);
+ }
+
+ d[i * 4 + 0] = 0xffff;
+ d[i * 4 + 1] = Y;
+ d[i * 4 + 2] = U;
+ d[i * 4 + 3] = V;
+ }
+}
+
+static void
+pack_Y444_10BE (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 *destY = GET_Y_LINE (y);
+ guint16 *destU = GET_U_LINE (y);
+ guint16 *destV = GET_V_LINE (y);
+ guint16 Y, U, V;
+ const guint16 *s = src;
+
+ for (i = 0; i < width; i++) {
+ Y = s[i * 4 + 1] >> 6;
+ U = s[i * 4 + 2] >> 6;
+ V = s[i * 4 + 3] >> 6;
+
+ GST_WRITE_UINT16_BE (destY + i, Y);
+ GST_WRITE_UINT16_BE (destU + i, U);
+ GST_WRITE_UINT16_BE (destV + i, V);
+ }
+}
+
#define PACK_I420_10LE GST_VIDEO_FORMAT_AYUV64, unpack_I420_10LE, 1, pack_I420_10LE
static void
unpack_I420_10LE (const GstVideoFormatInfo * info, GstVideoPackFlags flags,
PSTR222, PLANE012, OFFS0, SUB422, PACK_I422_10BE),
MAKE_YUV_LE_FORMAT (I422_10LE, "raw video", 0x00000000, DPTH10_10_10,
PSTR222, PLANE012, OFFS0, SUB422, PACK_I422_10LE),
+ MAKE_YUV_FORMAT (Y444_10BE, "raw video", 0x00000000, DPTH10_10_10,
+ PSTR222, PLANE012, OFFS0, SUB444, PACK_Y444_10BE),
+ MAKE_YUV_LE_FORMAT (Y444_10LE, "raw video", 0x00000000, DPTH10_10_10,
+ PSTR222, PLANE012, OFFS0, SUB444, PACK_Y444_10LE),
};
static GstVideoFormat
* @GST_VIDEO_FORMAT_I420_10LE: planar 4:2:0 YUV, 10 bits per channel
* @GST_VIDEO_FORMAT_I422_10BE: planar 4:2:2 YUV, 10 bits per channel
* @GST_VIDEO_FORMAT_I422_10LE: planar 4:2:2 YUV, 10 bits per channel
+ * @GST_VIDEO_FORMAT_Y444_10BE: planar 4:4:4 YUV, 10 bits per channel
+ * @GST_VIDEO_FORMAT_Y444_10LE: planar 4:4:4 YUV, 10 bits per channel
*
* Enum value describing the most common video formats.
*/
GST_VIDEO_FORMAT_I420_10LE,
GST_VIDEO_FORMAT_I422_10BE,
GST_VIDEO_FORMAT_I422_10LE,
+ GST_VIDEO_FORMAT_Y444_10BE,
+ GST_VIDEO_FORMAT_Y444_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, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, " \
- "IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE }"
+ "IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE, I422_10LE, I422_10BE, " \
+ " Y444_10LE, Y444_10BE }"
/**
* GST_VIDEO_CAPS_MAKE: