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

Git pushed a commit to branch master
in repository ffmpeg.

commit 07e6ee54e7225694853a5a02c71fbcaed36be574
Author:     Niklas Haas <[email protected]>
AuthorDate: Thu Jun 18 13:06:24 2026 +0200
Commit:     Niklas Haas <[email protected]>
CommitDate: Tue Jun 23 11:48:13 2026 +0000

    swscale/ops_dispatch: move no-op check after optimization pass
    
    Otherwise, this will false negative if the redundant operations haven't
    been optimized away yet, resulting in unnecessary memcpy operations.
    
    Fixes: a5341560839ad9d5432978e0a760d6771142c712
    Sponsored-by: Sovereign Tech Fund
    Signed-off-by: Niklas Haas <[email protected]>
---
 libswscale/ops_dispatch.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/libswscale/ops_dispatch.c b/libswscale/ops_dispatch.c
index c8f4dcbbcc..5dcbcaaaac 100644
--- a/libswscale/ops_dispatch.c
+++ b/libswscale/ops_dispatch.c
@@ -664,13 +664,6 @@ int ff_sws_compile_pass(SwsGraph *graph, const 
SwsOpBackend *backend,
     SwsOpList *ops = *pops;
     int ret = 0;
 
-    /* Check if the whole operation graph is an end-to-end no-op */
-    if (ff_sws_op_list_is_noop(ops)) {
-        if (output)
-            *output = input;
-        goto out;
-    }
-
     const SwsOp *write = ff_sws_op_list_output(ops);
     if (!write) {
         av_log(ctx, AV_LOG_ERROR, "Last operation must be SWS_OP_WRITE.\n");
@@ -686,6 +679,13 @@ int ff_sws_compile_pass(SwsGraph *graph, const 
SwsOpBackend *backend,
         ff_sws_op_list_print(ctx, AV_LOG_DEBUG, AV_LOG_TRACE, ops);
     }
 
+    /* Check if the whole operation graph is an end-to-end no-op */
+    if (ff_sws_op_list_is_noop(ops)) {
+        if (output)
+            *output = input;
+        goto out;
+    }
+
     ret = compile(graph, backend, ops, input, output);
     if (ret != AVERROR(ENOTSUP))
         goto out;

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

Reply via email to