mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 05:31:15 +00:00
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>
This commit is contained in:
parent
35c3de234c
commit
7acc3c4db8
1 changed files with 5 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue