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

Git pushed a commit to branch master
in repository ffmpeg.

commit c9404f5b9c85cea772bc155b518291cfe4cb31fa
Author:     Niklas Haas <[email protected]>
AuthorDate: Wed Jan 14 12:25:49 2026 +0100
Commit:     Niklas Haas <[email protected]>
CommitDate: Thu Feb 19 19:44:46 2026 +0000

    swscale/optimizer: eliminate completely unused operations
    
    e.g. empty read when all components are eventually cleared
    
    Sponsored-by: Sovereign Tech Fund
    Signed-off-by: Niklas Haas <[email protected]>
---
 libswscale/ops_optimizer.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libswscale/ops_optimizer.c b/libswscale/ops_optimizer.c
index d0f763f989..c8713352a1 100644
--- a/libswscale/ops_optimizer.c
+++ b/libswscale/ops_optimizer.c
@@ -297,6 +297,14 @@ retry:
         /* common helper variable */
         bool noop = true;
 
+        if (next->comps.unused[0] && next->comps.unused[1] &&
+            next->comps.unused[2] && next->comps.unused[3])
+        {
+            /* Remove completely unused operations */
+            ff_sws_op_list_remove_at(ops, n, 1);
+            goto retry;
+        }
+
         switch (op->op) {
         case SWS_OP_READ:
             /* "Compress" planar reads where not all components are needed */

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

Reply via email to