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

Git pushed a commit to branch master
in repository ffmpeg.

commit fe3e67556b9dcd3cbff5ee69f79aa6a2e54d9b11
Author:     Niklas Haas <[email protected]>
AuthorDate: Tue Apr 28 12:51:01 2026 +0200
Commit:     Niklas Haas <[email protected]>
CommitDate: Thu Jun 25 01:20:48 2026 +0200

    swscale/ops_optimizer: remove unneeded 32-bit overflow check
    
    No longer needed with AVRational64. Now we can just apply_op_q(), on
    everything except floating point types (which are still not representable
    in AVRational64 and likely never will be, though this is mostly a moot
    point as the uops layer can still optimize this further).
    
    Sponsored-by: Sovereign Tech Fund
    Signed-off-by: Niklas Haas <[email protected]>
---
 libswscale/ops_optimizer.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/libswscale/ops_optimizer.c b/libswscale/ops_optimizer.c
index c38d4b278f..34af638226 100644
--- a/libswscale/ops_optimizer.c
+++ b/libswscale/ops_optimizer.c
@@ -40,8 +40,6 @@
  */
 static bool op_commute_clear(SwsOp *op, SwsOp *next)
 {
-    SwsClearOp tmp = {0};
-
     av_assert1(op->op == SWS_OP_CLEAR);
     switch (next->op) {
     case SWS_OP_CONVERT:
@@ -67,18 +65,8 @@ static bool op_commute_clear(SwsOp *op, SwsOp *next)
     case SWS_OP_SWAP_BYTES:
         switch (next->type) {
         case SWS_PIXEL_U16:
-            ff_sws_apply_op_q(next, op->clear.value); /* always works */
-            return true;
         case SWS_PIXEL_U32:
-            for (int i = 0; i < 4; i++) {
-                if (!SWS_COMP_TEST(op->clear.mask, i))
-                    continue;
-                uint32_t v = av_bswap32(op->clear.value[i].num);
-                if (v > INT_MAX)
-                    return false; /* can't represent as AVRational anymore */
-                tmp.value[i] = Q(v);
-            }
-            op->clear = tmp;
+            ff_sws_apply_op_q(next, op->clear.value); /* always representable 
*/
             return true;
         default:
             return false;

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

Reply via email to