summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorHe Junyan <junyan.he@intel.com>2020-07-30 23:13:10 +0800
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2020-11-27 14:29:01 +0000
commit92b30ffa1a2f3b6559d834fcfb96314a05a173d6 (patch)
treed2050a4b7824cbc4b2a420c18f4a344e678e3a73 /gst-libs
parented9a70839787dfbaf252d43804805c3f06d93ae4 (diff)
video-format: Add Y412_LE format.
It can be used as HEVC YUV_4:4:4 12bits stream's decoder output, and also can be used as the input format for encoding HEVC YUV_4:4:4 12bits stream. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/390>
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/vaapi/gstvaapiimage.c3
-rw-r--r--gst-libs/gst/vaapi/video-format.c1
-rw-r--r--gst-libs/gst/vaapi/video-format.h2
3 files changed, 5 insertions, 1 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiimage.c b/gst-libs/gst/vaapi/gstvaapiimage.c
index 34baf403..ef35a0b2 100644
--- a/gst-libs/gst/vaapi/gstvaapiimage.c
+++ b/gst-libs/gst/vaapi/gstvaapiimage.c
@@ -104,6 +104,9 @@ vaapi_image_is_linear (const VAImage * va_image)
case VA_FOURCC ('4', '4', '4', 'P'):
data_size = 3 * width * height;
break;
+ case VA_FOURCC ('Y', '4', '1', '2'):
+ data_size = 8 * width * height;
+ break;
default:
GST_ERROR ("FIXME: incomplete formats %" GST_FOURCC_FORMAT,
GST_FOURCC_ARGS (va_image->format.fourcc));
diff --git a/gst-libs/gst/vaapi/video-format.c b/gst-libs/gst/vaapi/video-format.c
index 310cbeff..d189b6fd 100644
--- a/gst-libs/gst/vaapi/video-format.c
+++ b/gst-libs/gst/vaapi/video-format.c
@@ -112,6 +112,7 @@ static const GstVideoFormatMap gst_vaapi_video_default_formats[] = {
DEF_YUV (VA_BYTE_ORDER_NOT_CARE, Y210, Y210, ('Y', '2', '1', '0'), 32, 422_10BPP),
DEF_YUV (VA_BYTE_ORDER_NOT_CARE, Y410, Y410, ('Y', '4', '1', '0'), 32, 444_10BPP),
+ DEF_YUV (VA_BYTE_ORDER_NOT_CARE, Y412_LE, Y412, ('Y', '4', '1', '2'), 32, 444_12BPP),
/* RGB formats */
DEF_RGB (VA_LSB_FIRST, ARGB, BGRA8888, ('A', 'R', 'G', 'B'), 32, 32, 0x0000ff00,
diff --git a/gst-libs/gst/vaapi/video-format.h b/gst-libs/gst/vaapi/video-format.h
index 9f23959b..1882164b 100644
--- a/gst-libs/gst/vaapi/video-format.h
+++ b/gst-libs/gst/vaapi/video-format.h
@@ -30,7 +30,7 @@
G_BEGIN_DECLS
#define GST_VAAPI_FORMATS_ALL "{ ENCODED, " \
- "NV12, YV12, I420, YUY2, UYVY, Y444, GRAY8, P010_10LE, P012_LE, VUYA, Y210, Y410, " \
+ "NV12, YV12, I420, YUY2, UYVY, Y444, GRAY8, P010_10LE, P012_LE, VUYA, Y210, Y410, Y412_LE, " \
"ARGB, xRGB, RGBA, RGBx, ABGR, xBGR, BGRA, BGRx, RGB16, RGB, BGR10A2_LE " \
"}"