[FFmpeg-cvslog] vulkan_filter: don't require the storage flag for the base frames format
Lynne
git at videolan.org
Fri Aug 16 02:22:45 EEST 2024
ffmpeg | branch: master | Lynne <dev at lynne.ee> | Fri Aug 16 01:12:16 2024 +0200| [a797317ab19d12df8c953dab3de548d14c4ba545] | committer: Lynne
vulkan_filter: don't require the storage flag for the base frames format
We check for whether subformats support storage immediately below.
Those are the ones we require storage for, rather than the base format
itself.
This permits better reuse of AVHWFrame contexts.
The patch also removes an always-false check in the subformat check.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a797317ab19d12df8c953dab3de548d14c4ba545
---
libavfilter/vulkan_filter.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/libavfilter/vulkan_filter.c b/libavfilter/vulkan_filter.c
index 6f3df9714b..64e9b8768a 100644
--- a/libavfilter/vulkan_filter.c
+++ b/libavfilter/vulkan_filter.c
@@ -68,8 +68,7 @@ int ff_vk_filter_init_context(AVFilterContext *avctx, FFVulkanContext *s,
vk = &s->vkfn;
/* Usage mismatch */
- usage_req = VK_IMAGE_USAGE_SAMPLED_BIT |
- VK_IMAGE_USAGE_STORAGE_BIT;
+ usage_req = VK_IMAGE_USAGE_SAMPLED_BIT;
/* If format supports hardware encoding, make sure
* the context includes it. */
@@ -100,14 +99,8 @@ int ff_vk_filter_init_context(AVFilterContext *avctx, FFVulkanContext *s,
};
vk->GetPhysicalDeviceFormatProperties2(vk_dev->phys_dev, sub[i],
&prop);
-
- if (vk_frames->tiling == VK_IMAGE_TILING_LINEAR) {
- no_storage |= !(prop.formatProperties.linearTilingFeatures &
- VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT);
- } else {
- no_storage |= !(prop.formatProperties.optimalTilingFeatures &
- VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT);
- }
+ no_storage |= !(prop.formatProperties.optimalTilingFeatures &
+ VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT);
}
/* Check if it's usable */
More information about the ffmpeg-cvslog
mailing list