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

Git pushed a commit to branch master
in repository ffmpeg.

commit aff6d64ecdc77fa8a69bd5b4c8096b54b302c6c9
Author:     Niklas Haas <[email protected]>
AuthorDate: Tue Apr 28 12:06:26 2026 +0200
Commit:     Niklas Haas <[email protected]>
CommitDate: Thu Jun 25 01:20:15 2026 +0200

    swscale/ops_optimizer: omit overflow check on SWS_OP_SCALE
    
    1. This is currently impossible to trigger
    2. We're about to switch to AVRational64, eliminating this concern
    3. The AVRational64 API intentionally doesn't expose av_reduce64()
    
    Sponsored-by: Sovereign Tech Fund
    Signed-off-by: Niklas Haas <[email protected]>
---
 libswscale/ops_optimizer.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/libswscale/ops_optimizer.c b/libswscale/ops_optimizer.c
index 34d2c9eccc..8bf7f89e33 100644
--- a/libswscale/ops_optimizer.c
+++ b/libswscale/ops_optimizer.c
@@ -724,15 +724,11 @@ retry:
                 goto retry;
             }
 
-            /* Merge consecutive scaling operations (that don't overflow) */
+            /* Merge consecutive scaling operations */
             if (next->op == SWS_OP_SCALE) {
-                int64_t p = op->scale.factor.num * (int64_t) 
next->scale.factor.num;
-                int64_t q = op->scale.factor.den * (int64_t) 
next->scale.factor.den;
-                if (FFABS(p) <= INT_MAX && FFABS(q) <= INT_MAX) {
-                    av_reduce(&op->scale.factor.num, &op->scale.factor.den, p, 
q, INT_MAX);
-                    ff_sws_op_list_remove_at(ops, n + 1, 1);
-                    goto retry;
-                }
+                op->scale.factor = av_mul_q(op->scale.factor, 
next->scale.factor);
+                ff_sws_op_list_remove_at(ops, n + 1, 1);
+                goto retry;
             }
 
             /* Scaling by exact power of two */

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

Reply via email to