summaryrefslogtreecommitdiff
path: root/gst-libs/gst
diff options
context:
space:
mode:
authorHe Junyan <junyan.he@hotmail.com>2019-06-22 00:44:25 +0800
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2020-01-17 11:02:44 +0000
commit25422b6766ceb18778067f34e6d6b19da74bed8d (patch)
tree8cd8eb922dab03117a67a3e3342b80b68079b818 /gst-libs/gst
parent633ec9834910c848883f0aae97a0580005936b88 (diff)
plugin: encode: Add H265 main-444 profile.
Expose the main-444 profile to h265enc caps, when the upstream chooses to use VUYA as input, we choose main 4:4:4 profile to encode the frames.
Diffstat (limited to 'gst-libs/gst')
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder.c3
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder_h265.c2
-rw-r--r--gst-libs/gst/vaapi/gstvaapiutils_h265.c1
3 files changed, 5 insertions, 1 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder.c b/gst-libs/gst/vaapi/gstvaapiencoder.c
index 690caf77..771a82b7 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder.c
+++ b/gst-libs/gst/vaapi/gstvaapiencoder.c
@@ -677,7 +677,8 @@ is_chroma_type_supported (GstVaapiEncoder * encoder)
if (cip->chroma_type != GST_VAAPI_CHROMA_TYPE_YUV420 &&
cip->chroma_type != GST_VAAPI_CHROMA_TYPE_YUV422 &&
- cip->chroma_type != GST_VAAPI_CHROMA_TYPE_YUV420_10BPP)
+ cip->chroma_type != GST_VAAPI_CHROMA_TYPE_YUV420_10BPP &&
+ cip->chroma_type != GST_VAAPI_CHROMA_TYPE_YUV444)
goto unsupported;
if (!get_config_attribute (encoder, VAConfigAttribRTFormat, &format))
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h265.c b/gst-libs/gst/vaapi/gstvaapiencoder_h265.c
index 99142372..8f5cd91d 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_h265.c
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_h265.c
@@ -1082,6 +1082,8 @@ ensure_profile (GstVaapiEncoderH265 * encoder)
if (format == GST_VIDEO_FORMAT_P010_10LE)
profile = GST_VAAPI_PROFILE_H265_MAIN10;
+ else if (format == GST_VIDEO_FORMAT_VUYA)
+ profile = GST_VAAPI_PROFILE_H265_MAIN_444;
encoder->profile = profile;
encoder->profile_idc = gst_vaapi_utils_h265_get_profile_idc (profile);
diff --git a/gst-libs/gst/vaapi/gstvaapiutils_h265.c b/gst-libs/gst/vaapi/gstvaapiutils_h265.c
index 5b3bef10..2c078e82 100644
--- a/gst-libs/gst/vaapi/gstvaapiutils_h265.c
+++ b/gst-libs/gst/vaapi/gstvaapiutils_h265.c
@@ -40,6 +40,7 @@ static const struct map gst_vaapi_h265_profile_map[] = {
{ GST_VAAPI_PROFILE_H265_MAIN, "main" },
{ GST_VAAPI_PROFILE_H265_MAIN10, "main-10" },
{ GST_VAAPI_PROFILE_H265_MAIN_STILL_PICTURE, "main-still-picture" },
+ { GST_VAAPI_PROFILE_H265_MAIN_444, "main-444" },
{ 0, NULL }
/* *INDENT-ON* */
};