This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit e7976dd12f4907c7b020425a193fd88ab5a914f9
Author:     Philip Langdale <[email protected]>
AuthorDate: Sat Jun 20 21:06:48 2026 -0700
Commit:     Philip Langdale <[email protected]>
CommitDate: Sat Aug 29 17:07:53 2026 -0700

    avutil/hwcontext_vulkan: enable VK_NV_optical_flow
    
    Enable VK_NV_optical_flow if it is present, as an optional extension. The
    extension was added in 1.3.230 which is older than the minimum required
    header release, so we don't need #ifdef guards.
---
 libavutil/hwcontext_vulkan.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index d58cebb23d..4f2acdc929 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -132,6 +132,7 @@ typedef struct VulkanDeviceFeatures {
 #ifdef VK_KHR_internally_synchronized_queues
     VkPhysicalDeviceInternallySynchronizedQueuesFeaturesKHR 
internal_queue_sync;
 #endif
+    VkPhysicalDeviceOpticalFlowFeaturesNV optical_flow;
 } VulkanDeviceFeatures;
 
 typedef struct VulkanDevicePriv {
@@ -323,6 +324,9 @@ static void device_features_init(AVHWDeviceContext *ctx, 
VulkanDeviceFeatures *f
     FF_VK_STRUCT_EXT(s, &feats->device, &feats->internal_queue_sync, 
FF_VK_EXT_INTERNAL_QUEUE_SYNC,
                      
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INTERNALLY_SYNCHRONIZED_QUEUES_FEATURES_KHR);
 #endif
+
+    FF_VK_STRUCT_EXT(s, &feats->device, &feats->optical_flow, 
FF_VK_EXT_OPTICAL_FLOW,
+                     
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_OPTICAL_FLOW_FEATURES_NV);
 }
 
 /* Copy all needed device features */
@@ -444,6 +448,8 @@ static void 
device_features_copy_needed(VulkanDeviceFeatures *dst, VulkanDeviceF
     COPY_VAL(internal_queue_sync.internallySynchronizedQueues);
 #endif
 
+    COPY_VAL(optical_flow.opticalFlow);
+
 #undef COPY_VAL
 }
 
@@ -776,6 +782,7 @@ static const VulkanOptExtension optional_device_exts[] = {
 #ifdef VK_KHR_internally_synchronized_queues
     { VK_KHR_INTERNALLY_SYNCHRONIZED_QUEUES_EXTENSION_NAME,   
FF_VK_EXT_INTERNAL_QUEUE_SYNC    },
 #endif
+    { VK_NV_OPTICAL_FLOW_EXTENSION_NAME,                      
FF_VK_EXT_OPTICAL_FLOW           },
 
     /* Imports/exports */
     { VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME,               
FF_VK_EXT_EXTERNAL_FD_MEMORY     },
@@ -1743,6 +1750,9 @@ static int setup_queue_families(AVHWDeviceContext *ctx, 
VkDeviceCreateInfo *cd)
 #endif
     PICK_QF(VK_QUEUE_VIDEO_DECODE_BIT_KHR, 
VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR);
 
+    if (p->vkctx.extensions & FF_VK_EXT_OPTICAL_FLOW)
+        PICK_QF(VK_QUEUE_OPTICAL_FLOW_BIT_NV, 
VK_VIDEO_CODEC_OPERATION_NONE_KHR);
+
     av_free(qf);
     av_free(qf_vid);
 

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to