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

Git pushed a commit to branch release/9.1
in repository ffmpeg.

commit e28816345949e0702a864ab4203bd05f0e558e85
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Fri Nov 13 02:09:38 2026 +0100
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Thu Nov 19 14:55:53 2026 +0100

    swscale/x86/swscale_template: factor the loop end of the packed writers out
    
    (cherry picked from commit 416a381f25ec4361f4f2c7f5daa369aa5e58d757)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libswscale/x86/swscale_template.c | 26 +++++++++++---------------
 1 file changed, 11 insertions(+), 15 deletions(-)

diff --git a/libswscale/x86/swscale_template.c 
b/libswscale/x86/swscale_template.c
index 85ac7b1689..d8bf06d828 100644
--- a/libswscale/x86/swscale_template.c
+++ b/libswscale/x86/swscale_template.c
@@ -30,6 +30,12 @@
 #define REAL_MOVNTQ(a,b) "movntq " #a ", " #b " \n\t"
 #define MOVNTQ(a,b)  REAL_MOVNTQ(a,b)
 
+#define REAL_NEXT_PIXEL_BLOCK(dstw, index) \
+    "add       $8, "#index"     \n\t"\
+    "cmp   "dstw", "#index"     \n\t"\
+    " jb       1b               \n\t"
+#define NEXT_PIXEL_BLOCK(dstw, index)  REAL_NEXT_PIXEL_BLOCK(dstw, index)
+
 #define YSCALEYUV2PACKEDX_UV \
     __asm__ volatile(\
         "xor                %%"FF_REG_a", %%"FF_REG_a"  \n\t"\
@@ -242,9 +248,7 @@
     MOVNTQ(   q2, 16(dst, index, 4))\
     MOVNTQ(   q3, 24(dst, index, 4))\
 \
-    "add      $8, "#index"      \n\t"\
-    "cmp  "dstw", "#index"      \n\t"\
-    " jb      1b                \n\t"
+    NEXT_PIXEL_BLOCK(dstw, index)
 #define WRITEBGR32(dst, dstw, index, b, g, r, a, q0, q2, q3, t)  
REAL_WRITEBGR32(dst, dstw, index, b, g, r, a, q0, q2, q3, t)
 
 static void RENAME(yuv2rgb32_X_ar)(SwsInternal *c, const int16_t *lumFilter,
@@ -361,9 +365,7 @@ static void RENAME(yuv2bgr32_X)(SwsInternal *c, const 
int16_t *lumFilter,
     MOVNTQ(%%mm2,  (dst, index, 2))\
     MOVNTQ(%%mm1, 8(dst, index, 2))\
 \
-    "add             $8, "#index"   \n\t"\
-    "cmp         "dstw", "#index"   \n\t"\
-    " jb             1b             \n\t"
+    NEXT_PIXEL_BLOCK(dstw, index)
 #define WRITERGB16(dst, dstw, index)  REAL_WRITERGB16(dst, dstw, index)
 
 static void RENAME(yuv2rgb565_X_ar)(SwsInternal *c, const int16_t *lumFilter,
@@ -434,9 +436,7 @@ static void RENAME(yuv2rgb565_X)(SwsInternal *c, const 
int16_t *lumFilter,
     MOVNTQ(%%mm2,  (dst, index, 2))\
     MOVNTQ(%%mm1, 8(dst, index, 2))\
 \
-    "add             $8, "#index"   \n\t"\
-    "cmp         "dstw", "#index"   \n\t"\
-    " jb             1b             \n\t"
+    NEXT_PIXEL_BLOCK(dstw, index)
 #define WRITERGB15(dst, dstw, index)  REAL_WRITERGB15(dst, dstw, index)
 
 static void RENAME(yuv2rgb555_X_ar)(SwsInternal *c, const int16_t *lumFilter,
@@ -527,9 +527,7 @@ static void RENAME(yuv2rgb555_X)(SwsInternal *c, const 
int16_t *lumFilter,
 \
     "add      $24, "#dst"       \n\t"\
 \
-    "add       $8, "#index"     \n\t"\
-    "cmp   "dstw", "#index"     \n\t"\
-    " jb       1b               \n\t"
+    NEXT_PIXEL_BLOCK(dstw, index)
 
 #undef WRITEBGR24
 #define WRITEBGR24(dst, dstw, index)  WRITEBGR24MMXEXT(dst, dstw, index)
@@ -598,9 +596,7 @@ static void RENAME(yuv2bgr24_X)(SwsInternal *c, const 
int16_t *lumFilter,
     MOVNTQ(%%mm1, (dst, index, 2))\
     MOVNTQ(%%mm7, 8(dst, index, 2))\
 \
-    "add          $8, "#index"  \n\t"\
-    "cmp      "dstw", "#index"  \n\t"\
-    " jb          1b            \n\t"
+    NEXT_PIXEL_BLOCK(dstw, index)
 #define WRITEYUY2(dst, dstw, index)  REAL_WRITEYUY2(dst, dstw, index)
 
 static void RENAME(yuv2yuyv422_X_ar)(SwsInternal *c, const int16_t *lumFilter,

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to