aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2023-06-14 05:28:03 +0200
committerLynne <dev@lynne.ee>2023-06-15 22:00:42 +0200
commitca818ab51c437063b2559038aa5ab73dcffb4ff5 (patch)
treef1377ecc188c444767cf80c602e261b77a08e9f6
parent6964a97f91f723eb114e6015dc65035226c2661d (diff)
downloadffmpeg-ca818ab51c437063b2559038aa5ab73dcffb4ff5.tar.gz
vulkan_h264: filter out constrained/inter flags from the profile index
As the comment says, Vulkan signals all the constrant_set flags, and does not want them OR'd onto the profile IDC. So just unset them.
-rw-r--r--libavcodec/vulkan_decode.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/vulkan_decode.c b/libavcodec/vulkan_decode.c
index 35e265a5b1..6ba939da46 100644
--- a/libavcodec/vulkan_decode.c
+++ b/libavcodec/vulkan_decode.c
@@ -660,7 +660,12 @@ static VkResult vulkan_setup_profile(AVCodecContext *avctx,
dec_caps->pNext = h264_caps;
usage->pNext = h264_profile;
h264_profile->sType = VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PROFILE_INFO_KHR;
- h264_profile->stdProfileIdc = cur_profile;
+
+ /* Vulkan transmits all the constrant_set flags, rather than wanting them
+ * merged in the profile IDC */
+ h264_profile->stdProfileIdc = cur_profile & ~(FF_PROFILE_H264_CONSTRAINED |
+ FF_PROFILE_H264_INTRA);
+
h264_profile->pictureLayout = avctx->field_order == AV_FIELD_UNKNOWN ||
avctx->field_order == AV_FIELD_PROGRESSIVE ?
VK_VIDEO_DECODE_H264_PICTURE_LAYOUT_PROGRESSIVE_KHR :