1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-23 21:54:53 +02:00

avutil/hwcontext_vulkan: use correct bitmask types

Vulkan headers define *FlagBits enum with individual bit values, and
coresponding *Flags typedef to be used to store the bitmask of
coresponding bits.

In practice those two types map to the same type, but for consistency
*Flags should be used.

Fixes MSVC warnings about type mismatch.

Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
This commit is contained in:
Kacper Michajłow
2025-11-05 18:58:42 +01:00
parent f478964226
commit 3eb0cb3b0b

View File

@@ -1439,14 +1439,14 @@ static inline int pick_queue_family(VkQueueFamilyProperties2 *qf, uint32_t num_q
static inline int pick_video_queue_family(VkQueueFamilyProperties2 *qf,
VkQueueFamilyVideoPropertiesKHR *qf_vid, uint32_t num_qf,
VkVideoCodecOperationFlagBitsKHR flags)
VkVideoCodecOperationFlagsKHR flags)
{
int index = -1;
uint32_t min_score = UINT32_MAX;
for (int i = 0; i < num_qf; i++) {
const VkQueueFlagBits qflags = qf[i].queueFamilyProperties.queueFlags;
const VkQueueFlagBits vflags = qf_vid[i].videoCodecOperations;
const VkQueueFlags qflags = qf[i].queueFamilyProperties.queueFlags;
const VkVideoCodecOperationFlagsKHR vflags = qf_vid[i].videoCodecOperations;
if (!(qflags & (VK_QUEUE_VIDEO_ENCODE_BIT_KHR | VK_QUEUE_VIDEO_DECODE_BIT_KHR)))
continue;
@@ -2675,7 +2675,7 @@ fail:
/* Checks if an export flag is enabled, and if it is ORs it with *iexp */
static void try_export_flags(AVHWFramesContext *hwfc,
VkExternalMemoryHandleTypeFlags *comp_handle_types,
VkExternalMemoryHandleTypeFlagBits *iexp,
VkExternalMemoryHandleTypeFlags *iexp,
VkExternalMemoryHandleTypeFlagBits exp)
{
VkResult ret;
@@ -2846,7 +2846,7 @@ static int vulkan_frames_init(AVHWFramesContext *hwfc)
AVVulkanFramesContext *hwctx = &fp->p;
VulkanDevicePriv *p = hwfc->device_ctx->hwctx;
AVVulkanDeviceContext *dev_hwctx = &p->p;
VkImageUsageFlagBits supported_usage;
VkImageUsageFlags supported_usage;
FFVulkanFunctions *vk = &p->vkctx.vkfn;
const struct FFVkFormatEntry *fmt;
int disable_multiplane = p->disable_multiplane ||