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

Git pushed a commit to branch master
in repository ffmpeg.

commit 66f3a62b46cf77c3542777e832cda6021d759314
Author:     Niklas Haas <[email protected]>
AuthorDate: Wed Mar 4 16:25:07 2026 +0100
Commit:     Niklas Haas <[email protected]>
CommitDate: Thu Mar 12 21:02:48 2026 +0000

    swscale/ops_backend: use in/out_bump[] in process()
    
    Instead of recomputing the input/output address on each iteration, we
    can use the in_bump/out_bump arrays the way the x86 backend does.
    
    I initially avoided this in order to ensure the reference backend always 
does
    the correct thing, even if some future bug causes the bump values to be
    computed incorrectly, but doing it this way makes an upcoming change easier.
    
    (And besides, it would be easier to just add an av_assert2() to catch those
    cases)
    
    Sponsored-by: Sovereign Tech Fund
    Signed-off-by: Niklas Haas <[email protected]>
---
 libswscale/ops_tmpl_common.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/libswscale/ops_tmpl_common.c b/libswscale/ops_tmpl_common.c
index c0e0d9f3fb..1f3eb6aa67 100644
--- a/libswscale/ops_tmpl_common.c
+++ b/libswscale/ops_tmpl_common.c
@@ -186,16 +186,20 @@ static void fn(process)(const SwsOpExec *exec, const void 
*priv,
 
     SwsOpIter iterdata;
     SwsOpIter *iter = &iterdata; /* for CONTINUE() macro to work */
+    for (int i = 0; i < 4; i++) {
+        iter->in[i]  = exec->in[i];
+        iter->out[i] = exec->out[i];
+    }
 
     for (iter->y = y_start; iter->y < y_end; iter->y++) {
-        for (int i = 0; i < 4; i++) {
-            iter->in[i]  = exec->in[i]  + (iter->y - y_start) * 
exec->in_stride[i];
-            iter->out[i] = exec->out[i] + (iter->y - y_start) * 
exec->out_stride[i];
-        }
-
         for (int block = bx_start; block < bx_end; block++) {
             iter->x = block * SWS_BLOCK_SIZE;
             CONTINUE(block_t, (void *) x, (void *) y, (void *) z, (void *) w);
         }
+
+        for (int i = 0; i < 4; i++) {
+            iter->in[i]  += exec->in_bump[i];
+            iter->out[i] += exec->out_bump[i];
+        }
     }
 }

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

Reply via email to