summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorHe Junyan <junyan.he@intel.com>2020-07-12 19:42:40 +0800
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2020-07-29 16:17:35 +0000
commit7acc3c4db87bab6677f96df4d73eb7abce17264b (patch)
tree6a170f3a97e4517445c3e953c25bd8929e9efe6f /gst-libs
parent35c3de234cec95db9ef620aa72e2587a764ba451 (diff)
downloadgstreamer-vaapi-7acc3c4db87bab6677f96df4d73eb7abce17264b.tar.gz
libs: profile: h265: Fix return value of from_codec_data_h265.
profile_from_codec_data_h265() returns wrong GstVaapiProfile for h265. The codec data of caps contain the profile IDC, but the mapping between profile IDC and GstVaapiProfile is wrong. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/358>
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/vaapi/gstvaapiprofile.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiprofile.c b/gst-libs/gst/vaapi/gstvaapiprofile.c
index e1980e01..05480dff 100644
--- a/gst-libs/gst/vaapi/gstvaapiprofile.c
+++ b/gst-libs/gst/vaapi/gstvaapiprofile.c
@@ -341,6 +341,9 @@ gst_vaapi_profile_from_codec_data_h265 (GstBuffer * buffer)
if (buf[1] & 0xc0) /* general_profile_space = 0 */
return 0;
+ /* We may not recognize the exactly correct profile, which needs more
+ info such as depth, chroma and constraint_flag. We just return the
+ first one that belongs to that profile IDC. */
switch (buf[1] & 0x1f) { /* HEVCProfileIndication */
case 1:
return GST_VAAPI_PROFILE_H265_MAIN;
@@ -350,10 +353,8 @@ gst_vaapi_profile_from_codec_data_h265 (GstBuffer * buffer)
return GST_VAAPI_PROFILE_H265_MAIN_STILL_PICTURE;
case 4:
return GST_VAAPI_PROFILE_H265_MAIN_422_10;
- case 5:
- return GST_VAAPI_PROFILE_H265_MAIN_444;
- case 6:
- return GST_VAAPI_PROFILE_H265_MAIN_444_10;
+ case 9:
+ return GST_VAAPI_PROFILE_H265_SCREEN_EXTENDED_MAIN;
}
return 0;
}