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

Git pushed a commit to branch master
in repository ffmpeg.

commit a23e094488f139522c0e175e9766212a1213e486
Author:     Niklas Haas <[email protected]>
AuthorDate: Thu Oct 22 00:36:02 2026 +0200
Commit:     Niklas Haas <[email protected]>
CommitDate: Tue Oct 27 18:53:16 2026 +0000

    swscale/vulkan/ops: implement SWS_UOP_ADD
    
    This replaces 1x1 dither matrices by a constant addition.
    
    Signed-off-by: Niklas Haas <[email protected]>
---
 libswscale/vulkan/ops.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/libswscale/vulkan/ops.c b/libswscale/vulkan/ops.c
index f6a373a50c..1dc940c4c5 100644
--- a/libswscale/vulkan/ops.c
+++ b/libswscale/vulkan/ops.c
@@ -1185,6 +1185,19 @@ static int emit_shader(SwsContext *sws, VulkanPriv *p, 
FFVulkanOpsCtx *s,
             data = emit_mul(spi, uop->type, type_v, data,
                             const_splat(spi, id, uop->type, uop->data.scalar));
             break;
+        case SWS_UOP_ADD: {
+            const int zero = const_zero(id, uop->type);
+            int arg[4] = { zero, zero, zero, zero };
+            for (int i = 0; i < 4; i++) {
+                if (!SWS_COMP_TEST(uop->mask, i))
+                    continue;
+                arg[i] = const_pixel(spi, id, uop->type, uop->data.vec4[i]);
+            }
+
+            int arg_v = spi_OpConstantComposite(spi, type_v, arg[0], arg[1], 
arg[2], arg[3]);
+            data = emit_add(spi, uop->type, type_v, data, arg_v);
+            break;
+        }
         case SWS_UOP_MIN:
         case SWS_UOP_MAX:
             err = emit_clamp(spi, id, uop, &data);
@@ -1278,7 +1291,7 @@ static int compile_spirv(SwsContext *sws, const SwsOpList 
*ops,
         goto fail;
     }
 
-    err = ff_sws_ops_translate(sws, ops, 0, uops);
+    err = ff_sws_ops_translate(sws, ops, SWS_UOP_FLAG_ADD, uops);
     if (err < 0)
         goto fail;
 

-- 
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