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

Git pushed a commit to branch master
in repository ffmpeg.

commit 10a26974cd3159771cddbdc2898982c47c68a79b
Author:     Lynne <[email protected]>
AuthorDate: Wed Feb 11 14:51:52 2026 +0100
Commit:     Lynne <[email protected]>
CommitDate: Thu Feb 19 19:42:33 2026 +0100

    vulkan/ffv1: finalize and initialize slices only in invocation == 0
---
 libavcodec/vulkan/ffv1_dec.comp.glsl | 17 +++++++++--------
 libavcodec/vulkan/ffv1_enc.comp.glsl |  9 +++++++--
 2 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/libavcodec/vulkan/ffv1_dec.comp.glsl 
b/libavcodec/vulkan/ffv1_dec.comp.glsl
index a08c067433..36bf7a18b3 100644
--- a/libavcodec/vulkan/ffv1_dec.comp.glsl
+++ b/libavcodec/vulkan/ffv1_dec.comp.glsl
@@ -344,15 +344,16 @@ void main(void)
     uint slice_idx = gl_WorkGroupID.y*gl_NumWorkGroups.x + gl_WorkGroupID.x;
     slice_start = uint64_t(slice_data) + slice_offsets[slice_idx].x;
 
-    rc = slice_ctx[slice_idx].c;
+    if (gl_LocalInvocationID.x == 0)
+        rc = slice_ctx[slice_idx].c;
+    barrier();
 
     decode_slice(slice_ctx[slice_idx], slice_idx);
 
-    if (gl_LocalInvocationID.x > 0)
-        return;
-
-    uint overread = 0;
-    if (rc.bytestream >= (rc.bytestream_end + MAX_OVERREAD))
-        overread = uint(rc.bytestream - rc.bytestream_end);
-    slice_status[2*slice_idx + 1] = overread;
+    if (gl_LocalInvocationID.x == 0) {
+        uint overread = 0;
+        if (rc.bytestream >= (rc.bytestream_end + MAX_OVERREAD))
+            overread = uint(rc.bytestream - rc.bytestream_end);
+        slice_status[2*slice_idx + 1] = overread;
+    }
 }
diff --git a/libavcodec/vulkan/ffv1_enc.comp.glsl 
b/libavcodec/vulkan/ffv1_enc.comp.glsl
index 31ce832b52..67fee09b2d 100644
--- a/libavcodec/vulkan/ffv1_enc.comp.glsl
+++ b/libavcodec/vulkan/ffv1_enc.comp.glsl
@@ -376,7 +376,12 @@ void main(void)
     const uint slice_idx = gl_WorkGroupID.y*gl_NumWorkGroups.x + 
gl_WorkGroupID.x;
     slice_start = uint64_t(slice_data) + slice_idx*slice_size_max;
 
-    rc = slice_ctx[slice_idx].c;
+    if (gl_LocalInvocationID.x == 0)
+        rc = slice_ctx[slice_idx].c;
+    barrier();
+
     encode_slice(slice_ctx[slice_idx], slice_idx);
-    finalize_slice(slice_idx);
+
+    if (gl_LocalInvocationID.x == 0)
+        finalize_slice(slice_idx);
 }

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to