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

Git pushed a commit to branch master
in repository ffmpeg.

commit 6c123e217ba990732be960c99e0571528e6201c6
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Thu Jul 30 16:19:56 2026 +0200
Commit:     Andreas Rheinhardt <[email protected]>
CommitDate: Sun Aug 2 18:36:52 2026 +0200

    avcodec/x86/lossless_videodsp: Hoist calculation out of loop
    
    Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavcodec/x86/lossless_videodsp.asm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/libavcodec/x86/lossless_videodsp.asm 
b/libavcodec/x86/lossless_videodsp.asm
index 53adc67977..833b581744 100644
--- a/libavcodec/x86/lossless_videodsp.asm
+++ b/libavcodec/x86/lossless_videodsp.asm
@@ -276,7 +276,7 @@ cglobal add_left_pred_int16_unaligned, 4,4,7, dst, src, 
mask, w, left
 ; void add_gradient_pred(uint8_t *src, const ptrdiff_t stride, const ptrdiff_t 
width)
 
;---------------------------------------------------------------------------------------------
 %macro ADD_GRADIENT_PRED 0
-cglobal add_gradient_pred, 3,4,4, src, stride, width, tmp
+cglobal add_gradient_pred, 3,3,4, src, stride, width
     mova         xm0, [pb_15]
 
 ;load src - 1 in xm1
@@ -291,12 +291,13 @@ cglobal add_gradient_pred, 3,4,4, src, stride, width, tmp
     add    srcq, widthq
     neg  widthq
     neg strideq
+    add strideq, srcq
+    DEFINE_ARGS src, top, width
 
 .loop:
-    lea    tmpq, [srcq + strideq]
     mova     m2, [srcq + widthq]     ; current val (src[x])
-    paddb    m2, [tmpq + widthq]     ; add A = src[x-stride]
-    movu     m3, [tmpq + widthq - 1] ; B = src[x - (stride + 1)]
+    paddb    m2, [topq + widthq]     ; add A = src[x-stride]
+    movu     m3, [topq + widthq - 1] ; B = src[x - (stride + 1)]
 
     psubb    m2, m3                  ; cur + A - B
 

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

Reply via email to