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

Git pushed a commit to branch master
in repository ffmpeg.

commit cc334a223e81ee3c5d58cfe38757a5e3e10da663
Author:     Niklas Haas <[email protected]>
AuthorDate: Thu Mar 5 17:53:37 2026 +0100
Commit:     Niklas Haas <[email protected]>
CommitDate: Thu Mar 5 23:34:56 2026 +0000

    swscale/ops_backend: move static table out of function body
    
    Ditto for x86.
    
    Signed-off-by: Niklas Haas <[email protected]>
---
 libswscale/ops_backend.c | 14 +++++++-------
 libswscale/x86/ops.c     | 20 ++++++++++----------
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/libswscale/ops_backend.c b/libswscale/ops_backend.c
index da16cb40f3..7be2b941d8 100644
--- a/libswscale/ops_backend.c
+++ b/libswscale/ops_backend.c
@@ -48,6 +48,13 @@ typedef    float f32block_t[SWS_BLOCK_SIZE];
 # include "ops_tmpl_float.c"
 #undef BIT_DEPTH
 
+static const SwsOpTable *const tables[] = {
+    &bitfn(op_table_int,    u8),
+    &bitfn(op_table_int,   u16),
+    &bitfn(op_table_int,   u32),
+    &bitfn(op_table_float, f32),
+};
+
 static int compile(SwsContext *ctx, SwsOpList *ops, SwsCompiledOp *out)
 {
     int ret;
@@ -59,13 +66,6 @@ static int compile(SwsContext *ctx, SwsOpList *ops, 
SwsCompiledOp *out)
     av_assert0(ops->num_ops > 0);
     const SwsPixelType read_type = ops->ops[0].type;
 
-    static const SwsOpTable *const tables[] = {
-        &bitfn(op_table_int,    u8),
-        &bitfn(op_table_int,   u16),
-        &bitfn(op_table_int,   u32),
-        &bitfn(op_table_float, f32),
-    };
-
     do {
         ret = ff_sws_op_compile_tables(tables, FF_ARRAY_ELEMS(tables), ops,
                                        SWS_BLOCK_SIZE, chain);
diff --git a/libswscale/x86/ops.c b/libswscale/x86/ops.c
index b44f880b4e..45e2b10bff 100644
--- a/libswscale/x86/ops.c
+++ b/libswscale/x86/ops.c
@@ -542,6 +542,16 @@ DECL_FUNCS_16(32, _m2_avx2, AVX2)
 
 DECL_FUNCS_32(16, _avx2, AVX2)
 
+static const SwsOpTable *const tables[] = {
+    &ops8_m1_sse4,
+    &ops8_m1_avx2,
+    &ops8_m2_sse4,
+    &ops8_m2_avx2,
+    &ops16_m1_avx2,
+    &ops16_m2_avx2,
+    &ops32_avx2,
+};
+
 static av_const int get_mmsize(const int cpu_flags)
 {
     if (cpu_flags & AV_CPU_FLAG_AVX512)
@@ -698,16 +708,6 @@ static int compile(SwsContext *ctx, SwsOpList *ops, 
SwsCompiledOp *out)
     if (write->rw.packed && write->rw.elems == 3)
         out->over_write = sizeof(uint32_t);
 
-    static const SwsOpTable *const tables[] = {
-        &ops8_m1_sse4,
-        &ops8_m1_avx2,
-        &ops8_m2_sse4,
-        &ops8_m2_avx2,
-        &ops16_m1_avx2,
-        &ops16_m2_avx2,
-        &ops32_avx2,
-    };
-
     do {
         int op_block_size = out->block_size;
         SwsOp *op = &ops->ops[0];

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

Reply via email to