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.
This commit is contained in:
He Junyan 2019-06-22 00:44:25 +08:00 committed by Víctor Manuel Jáquez Leal
parent 633ec98349
commit 25422b6766
4 changed files with 6 additions and 2 deletions

View file

@ -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))

View file

@ -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);

View file

@ -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* */
};

View file

@ -65,7 +65,7 @@ static const char gst_vaapiencode_h265_sink_caps_str[] =
/* *INDENT-OFF* */
static const char gst_vaapiencode_h265_src_caps_str[] =
GST_CODEC_CAPS ", "
"profile = (string) { main, main-10 }";
"profile = (string) { main, main-10, main-444 }";
/* *INDENT-ON* */
/* *INDENT-OFF* */