aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLynne <dev@lynne.ee>2024-09-18 05:53:41 +0200
committerLynne <dev@lynne.ee>2024-09-18 05:59:46 +0200
commit8875da347a5492f8905443b6839510e502e2cbd1 (patch)
tree5c53f2ebdf0b439abe3627557b56be3459f35faf
parent32d47166c84dc2c636ec6830b07dc0ff3b566d25 (diff)
downloadffmpeg-8875da347a5492f8905443b6839510e502e2cbd1.tar.gz
hwcontext_vulkan: consider encode DBPs as always independent
-rw-r--r--libavutil/hwcontext_vulkan.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 8d050b823c..d6899df159 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -2672,8 +2672,9 @@ static int vulkan_frames_init(AVHWFramesContext *hwfc)
* Only fill them in automatically if the image is not going to be used as
* a DPB-only image, and we have SAMPLED/STORAGE bits set. */
if (!hwctx->img_flags) {
- int is_lone_dpb = (hwctx->usage & VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR) &&
- !(hwctx->usage & VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR);
+ int is_lone_dpb = ((hwctx->usage & VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR) ||
+ ((hwctx->usage & VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR) &&
+ !(hwctx->usage & VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR)));
int sampleable = hwctx->usage & (VK_IMAGE_USAGE_SAMPLED_BIT |
VK_IMAGE_USAGE_STORAGE_BIT);
if (sampleable && !is_lone_dpb) {