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

Git pushed a commit to branch master
in repository ffmpeg.

commit 9fbb03f4284be528037a98b11ef238e2739bda69
Author:     Ramiro Polla <[email protected]>
AuthorDate: Tue Feb 24 20:16:29 2026 +0100
Commit:     Ramiro Polla <[email protected]>
CommitDate: Tue Feb 24 20:22:12 2026 +0100

    swscale/tests/sws_ops: don't print unused components in the output
    
    Clean up the output by not printing the flags and range values of
    unused components in ff_sws_op_list_print().
    
     rgb24 -> gray16le:
       [ u8 XXXX -> +++X] SWS_OP_READ         : 3 elem(s) packed >> 0
    -    min: {0, 0, 0, nan}, max: {255, 255, 255, nan}
    +    min: {0, 0, 0, _}, max: {255, 255, 255, _}
       [ u8 ...X -> +++X] SWS_OP_CONVERT      : u8 -> f32
    -    min: {0, 0, 0, nan}, max: {255, 255, 255, nan}
    -  [f32 ...X -> .++X] SWS_OP_LINEAR       : dot3 [[76.843000 150.859000 
29.298000 0 0] [0 1 0 0 0] [0 0 1 0 0] [0 0 0 1 0]]
    -    min: {0, 0, 0, nan}, max: {65535, 255, 255, nan}
    -  [f32 .XXX -> +++X] SWS_OP_CONVERT      : f32 -> u16
    -    min: {0, 0, 0, nan}, max: {65535, 255, 255, nan}
    -  [u16 .XXX -> +++X] SWS_OP_WRITE        : 1 elem(s) planar >> 0
    -    min: {0, 0, 0, nan}, max: {65535, 255, 255, nan}
    +    min: {0, 0, 0, _}, max: {255, 255, 255, _}
    +  [f32 ...X -> .XXX] SWS_OP_LINEAR       : dot3 [[76.843000 150.859000 
29.298000 0 0] [0 1 0 0 0] [0 0 1 0 0] [0 0 0 1 0]]
    +    min: {0, _, _, _}, max: {65535, _, _, _}
    +  [f32 .XXX -> +XXX] SWS_OP_CONVERT      : f32 -> u16
    +    min: {0, _, _, _}, max: {65535, _, _, _}
    +  [u16 .XXX -> +XXX] SWS_OP_WRITE        : 1 elem(s) planar >> 0
    +    min: {0, _, _, _}, max: {65535, _, _, _}
         (X = unused, z = byteswapped, + = exact, 0 = zero)
    
    Sponsored-by: Sovereign Tech Fund
    Signed-off-by: Ramiro Polla <[email protected]>
---
 libswscale/ops.c            | 21 +++++++++++++--------
 tests/ref/fate/sws-ops-list |  2 +-
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/libswscale/ops.c b/libswscale/ops.c
index e7dfface03..f6fccd0688 100644
--- a/libswscale/ops.c
+++ b/libswscale/ops.c
@@ -699,6 +699,7 @@ void ff_sws_op_list_print(void *log, int lev, int lev_extra,
 
     for (int i = 0; i < ops->num_ops; i++) {
         const SwsOp *op = &ops->ops[i];
+        const SwsOp *next = i + 1 < ops->num_ops ? &ops->ops[i + 1] : op;
         char buf[32];
 
         av_log(log, lev, "  [%3s %c%c%c%c -> %c%c%c%c] ",
@@ -707,10 +708,10 @@ void ff_sws_op_list_print(void *log, int lev, int 
lev_extra,
                op->comps.unused[1] ? 'X' : '.',
                op->comps.unused[2] ? 'X' : '.',
                op->comps.unused[3] ? 'X' : '.',
-               describe_comp_flags(op->comps.flags[0]),
-               describe_comp_flags(op->comps.flags[1]),
-               describe_comp_flags(op->comps.flags[2]),
-               describe_comp_flags(op->comps.flags[3]));
+               next->comps.unused[0] ? 'X' : 
describe_comp_flags(op->comps.flags[0]),
+               next->comps.unused[1] ? 'X' : 
describe_comp_flags(op->comps.flags[1]),
+               next->comps.unused[2] ? 'X' : 
describe_comp_flags(op->comps.flags[2]),
+               next->comps.unused[3] ? 'X' : 
describe_comp_flags(op->comps.flags[3]));
 
         switch (op->op) {
         case SWS_OP_INVALID:
@@ -806,10 +807,14 @@ void ff_sws_op_list_print(void *log, int lev, int 
lev_extra,
             op->comps.max[2].den || op->comps.max[3].den)
         {
             av_log(log, lev_extra, "    min: {%s, %s, %s, %s}, max: {%s, %s, 
%s, %s}\n",
-                PRINTQ(op->comps.min[0]), PRINTQ(op->comps.min[1]),
-                PRINTQ(op->comps.min[2]), PRINTQ(op->comps.min[3]),
-                PRINTQ(op->comps.max[0]), PRINTQ(op->comps.max[1]),
-                PRINTQ(op->comps.max[2]), PRINTQ(op->comps.max[3]));
+                   next->comps.unused[0] ? "_" : PRINTQ(op->comps.min[0]),
+                   next->comps.unused[1] ? "_" : PRINTQ(op->comps.min[1]),
+                   next->comps.unused[2] ? "_" : PRINTQ(op->comps.min[2]),
+                   next->comps.unused[3] ? "_" : PRINTQ(op->comps.min[3]),
+                   next->comps.unused[0] ? "_" : PRINTQ(op->comps.max[0]),
+                   next->comps.unused[1] ? "_" : PRINTQ(op->comps.max[1]),
+                   next->comps.unused[2] ? "_" : PRINTQ(op->comps.max[2]),
+                   next->comps.unused[3] ? "_" : PRINTQ(op->comps.max[3]));
         }
 
     }
diff --git a/tests/ref/fate/sws-ops-list b/tests/ref/fate/sws-ops-list
index aa97811bbe..5233a822e9 100644
--- a/tests/ref/fate/sws-ops-list
+++ b/tests/ref/fate/sws-ops-list
@@ -1 +1 @@
-2cf9d8a755726bc80f60ca9f4dc31380
+7feeffb2210933bab6f7dcd6641014cf

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

Reply via email to