From 19b93566801a56e7b043a670b7edcf8f2da06619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 11 Feb 2015 15:57:54 +0200 Subject: [PATCH] codec-utils: Handle the two rext profiles for h265 These values are for now taken from x265 and need to be checked against the spec. Especially we need to check if information from other fields need to be taken into consideration too, e.g. the bit depth and chroma index from the SPS. This however makes 4:4:4 output of x265enc actually work. --- gst-libs/gst/pbutils/codec-utils.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gst-libs/gst/pbutils/codec-utils.c b/gst-libs/gst/pbutils/codec-utils.c index 5964975861..5d30957a54 100644 --- a/gst-libs/gst/pbutils/codec-utils.c +++ b/gst-libs/gst/pbutils/codec-utils.c @@ -704,9 +704,18 @@ gst_codec_utils_h265_get_profile (const guint8 * profile_tier_level, guint len) profile = "main-10"; else if (profile_idc == 3 || gpcf3) profile = "main-still-picture"; + else if (profile_idc == 4) + profile = "main-rext"; + else if (profile_idc == 5) + profile = "high-throughput-rext"; else profile = NULL; + /* FIXME: Check against the spec, especially for the rext formats. These + * values are from x265, but x265 also checks the chroma and bit depth + * fields of the SPS to decide on the profile. + */ + return profile; }