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

Git pushed a commit to branch master
in repository ffmpeg.

commit c7c8c313025157c1123adac6762b28f3ccd5c96b
Author:     Ramiro Polla <[email protected]>
AuthorDate: Thu Feb 19 22:54:32 2026 +0100
Commit:     Ramiro Polla <[email protected]>
CommitDate: Tue Feb 24 19:27:51 2026 +0100

    swscale/tests/sws_ops: print range values in the output
    
    This gives more information about each operation and helps catch issues
    earlier on.
    
    Sponsored-by: Sovereign Tech Fund
    Signed-off-by: Ramiro Polla <[email protected]>
---
 libswscale/graph.c          | 4 ++--
 libswscale/ops.c            | 9 +++++----
 libswscale/ops.h            | 3 ++-
 libswscale/tests/sws_ops.c  | 2 +-
 tests/ref/fate/sws-ops-list | 2 +-
 5 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/libswscale/graph.c b/libswscale/graph.c
index 0829022bc4..e6843a7752 100644
--- a/libswscale/graph.c
+++ b/libswscale/graph.c
@@ -575,10 +575,10 @@ static int add_convert_pass(SwsGraph *graph, SwsFormat 
src, SwsFormat dst,
            av_get_pix_fmt_name(src.format), av_get_pix_fmt_name(dst.format));
 
     av_log(ctx, AV_LOG_DEBUG, "Unoptimized operation list:\n");
-    ff_sws_op_list_print(ctx, AV_LOG_DEBUG, ops);
+    ff_sws_op_list_print(ctx, AV_LOG_DEBUG, AV_LOG_TRACE, ops);
     av_log(ctx, AV_LOG_DEBUG, "Optimized operation list:\n");
     ff_sws_op_list_optimize(ops);
-    ff_sws_op_list_print(ctx, AV_LOG_VERBOSE, ops);
+    ff_sws_op_list_print(ctx, AV_LOG_VERBOSE, AV_LOG_TRACE, ops);
 
     ret = ff_sws_compile_pass(graph, ops, 0, dst, input, output);
     if (ret < 0)
diff --git a/libswscale/ops.c b/libswscale/ops.c
index 900077584a..e7dfface03 100644
--- a/libswscale/ops.c
+++ b/libswscale/ops.c
@@ -689,7 +689,8 @@ static const char *print_q(const AVRational q, char buf[], 
int buf_len)
 
 #define PRINTQ(q) print_q(q, (char[32]){0}, sizeof(char[32]))
 
-void ff_sws_op_list_print(void *log, int lev, const SwsOpList *ops)
+void ff_sws_op_list_print(void *log, int lev, int lev_extra,
+                          const SwsOpList *ops)
 {
     if (!ops->num_ops) {
         av_log(log, lev, "  (empty)\n");
@@ -804,7 +805,7 @@ void ff_sws_op_list_print(void *log, int lev, const 
SwsOpList *ops)
             op->comps.max[0].den || op->comps.max[1].den ||
             op->comps.max[2].den || op->comps.max[3].den)
         {
-            av_log(log, AV_LOG_TRACE, "    min: {%s, %s, %s, %s}, max: {%s, 
%s, %s, %s}\n",
+            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]),
@@ -841,7 +842,7 @@ int ff_sws_ops_compile_backend(SwsContext *ctx, const 
SwsOpBackend *backend,
                backend->name, av_err2str(ret));
         if (rest.num_ops != ops->num_ops) {
             av_log(ctx, msg_lev, "Uncompiled remainder:\n");
-            ff_sws_op_list_print(ctx, msg_lev, &rest);
+            ff_sws_op_list_print(ctx, msg_lev, AV_LOG_TRACE, &rest);
         }
     } else {
         *out = compiled;
@@ -866,7 +867,7 @@ int ff_sws_ops_compile(SwsContext *ctx, const SwsOpList 
*ops, SwsCompiledOp *out
     }
 
     av_log(ctx, AV_LOG_WARNING, "No backend found for operations:\n");
-    ff_sws_op_list_print(ctx, AV_LOG_WARNING, ops);
+    ff_sws_op_list_print(ctx, AV_LOG_WARNING, AV_LOG_TRACE, ops);
     return AVERROR(ENOTSUP);
 }
 
diff --git a/libswscale/ops.h b/libswscale/ops.h
index 9f93c12fa8..7b79fdc69d 100644
--- a/libswscale/ops.h
+++ b/libswscale/ops.h
@@ -271,7 +271,8 @@ void ff_sws_op_list_remove_at(SwsOpList *ops, int index, 
int count);
 /**
  * Print out the contents of an operation list.
  */
-void ff_sws_op_list_print(void *log_ctx, int log_level, const SwsOpList *ops);
+void ff_sws_op_list_print(void *log_ctx, int log_level, int log_level_extra,
+                          const SwsOpList *ops);
 
 /**
  * Infer + propagate known information about components. Called automatically
diff --git a/libswscale/tests/sws_ops.c b/libswscale/tests/sws_ops.c
index bf84128291..a558c07119 100644
--- a/libswscale/tests/sws_ops.c
+++ b/libswscale/tests/sws_ops.c
@@ -60,7 +60,7 @@ static int run_test(SwsContext *const ctx, AVFrame *frame,
     if (ff_sws_op_list_is_noop(ops))
         av_log(NULL, AV_LOG_INFO, "  (no-op)\n");
     else
-        ff_sws_op_list_print(NULL, AV_LOG_INFO, ops);
+        ff_sws_op_list_print(NULL, AV_LOG_INFO, AV_LOG_INFO, ops);
 
 fail:
     /* silently skip unsupported formats */
diff --git a/tests/ref/fate/sws-ops-list b/tests/ref/fate/sws-ops-list
index af3cf2f4e9..aa97811bbe 100644
--- a/tests/ref/fate/sws-ops-list
+++ b/tests/ref/fate/sws-ops-list
@@ -1 +1 @@
-3505d38dc669faf6f14036516b6caf61
+2cf9d8a755726bc80f60ca9f4dc31380

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

Reply via email to