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

Git pushed a commit to branch master
in repository ffmpeg.

commit 176493e4c4475e7358d3f486160da92857b48d34
Author:     Ramiro Polla <[email protected]>
AuthorDate: Thu Jun 18 20:23:05 2026 +0200
Commit:     Ramiro Polla <[email protected]>
CommitDate: Fri Jun 19 14:32:44 2026 +0000

    swscale/ops: pass SwsLinearOp by pointer instead of value in 
ff_sws_linear_mask()
---
 libswscale/format.c        | 6 +++---
 libswscale/ops.c           | 4 ++--
 libswscale/ops.h           | 2 +-
 libswscale/ops_optimizer.c | 4 ++--
 tests/checkasm/sw_ops.c    | 2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/libswscale/format.c b/libswscale/format.c
index d34e9d7be4..3f8e10d07b 100644
--- a/libswscale/format.c
+++ b/libswscale/format.c
@@ -1203,7 +1203,7 @@ static SwsLinearOp fmt_encode_range(const SwsFormat *fmt, 
bool *incomplete)
         c.m[0][0] = av_neg_q(c.m[0][0]);
     }
 
-    c.mask = ff_sws_linear_mask(c);
+    c.mask = ff_sws_linear_mask(&c);
     return c;
 }
 
@@ -1222,7 +1222,7 @@ static SwsLinearOp fmt_decode_range(const SwsFormat *fmt, 
bool *incomplete)
     if (!(fmt->desc->flags & AV_PIX_FMT_FLAG_ALPHA))
         c.m[3][4] = Q1;
 
-    c.mask = ff_sws_linear_mask(c);
+    c.mask = ff_sws_linear_mask(&c);
     return c;
 }
 
@@ -1388,7 +1388,7 @@ linear_mat3(const AVRational m00, const AVRational m01, 
const AVRational m02,
         {  Q0,  Q0,  Q0, Q1, Q0 },
     }};
 
-    c.mask = ff_sws_linear_mask(c);
+    c.mask = ff_sws_linear_mask(&c);
     return c;
 }
 
diff --git a/libswscale/ops.c b/libswscale/ops.c
index 4afeaabf54..04568811d3 100644
--- a/libswscale/ops.c
+++ b/libswscale/ops.c
@@ -773,12 +773,12 @@ int ff_sws_op_list_max_size(const SwsOpList *ops)
     return max_size;
 }
 
-uint32_t ff_sws_linear_mask(const SwsLinearOp c)
+uint32_t ff_sws_linear_mask(const SwsLinearOp *c)
 {
     uint32_t mask = 0;
     for (int i = 0; i < 4; i++) {
         for (int j = 0; j < 5; j++) {
-            if (av_cmp_q(c.m[i][j], Q(i == j)))
+            if (av_cmp_q(c->m[i][j], Q(i == j)))
                 mask |= SWS_MASK(i, j);
         }
     }
diff --git a/libswscale/ops.h b/libswscale/ops.h
index 65d9d49e60..8002eca8c1 100644
--- a/libswscale/ops.h
+++ b/libswscale/ops.h
@@ -216,7 +216,7 @@ enum {
 };
 
 /* Helper function to compute the correct mask */
-uint32_t ff_sws_linear_mask(SwsLinearOp);
+uint32_t ff_sws_linear_mask(const SwsLinearOp *c);
 
 typedef struct SwsFilterOp {
     SwsFilterWeights *kernel; /* filter kernel (refstruct) */
diff --git a/libswscale/ops_optimizer.c b/libswscale/ops_optimizer.c
index 08fef00c63..f500515c11 100644
--- a/libswscale/ops_optimizer.c
+++ b/libswscale/ops_optimizer.c
@@ -331,7 +331,7 @@ static bool extract_swizzle(SwsLinearOp *op, SwsComps prev, 
SwsSwizzleOp *out_sw
     if (swiz.mask == SWS_SWIZZLE(0, 1, 2, 3).mask)
         return false; /* no swizzle was identified */
 
-    c.mask = ff_sws_linear_mask(c);
+    c.mask = ff_sws_linear_mask(&c);
     *out_swiz = swiz;
     *op = c;
     return true;
@@ -658,7 +658,7 @@ retry:
                         op->lin.m[i][j] = sum;
                     }
                 }
-                op->lin.mask = ff_sws_linear_mask(op->lin);
+                op->lin.mask = ff_sws_linear_mask(&op->lin);
                 ff_sws_op_list_remove_at(ops, n + 1, 1);
                 goto retry;
             }
diff --git a/tests/checkasm/sw_ops.c b/tests/checkasm/sw_ops.c
index 7e30b70ca7..49fb0fd6f5 100644
--- a/tests/checkasm/sw_ops.c
+++ b/tests/checkasm/sw_ops.c
@@ -697,7 +697,7 @@ static void check_linear(const char *name, const SwsUOp 
*uop)
         }
     }
 
-    lin.mask = ff_sws_linear_mask(lin);
+    lin.mask = ff_sws_linear_mask(&lin);
     CHECK(name, 4, 4, type, type, {
         .op   = SWS_OP_LINEAR,
         .type = type,

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

Reply via email to