[FFmpeg-cvslog] swscale/x86/yuv2yuvX: use the SPLATW helper macro

James Almer git at videolan.org
Thu Feb 18 23:52:35 EET 2021


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Feb 18 12:07:45 2021 -0300| [d512ebbaedefc977d7628da4dc3ecfe4e52a066a] | committer: James Almer

swscale/x86/yuv2yuvX: use the SPLATW helper macro

Simplifies code

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d512ebbaedefc977d7628da4dc3ecfe4e52a066a
---

 libswscale/x86/yuv2yuvX.asm | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/libswscale/x86/yuv2yuvX.asm b/libswscale/x86/yuv2yuvX.asm
index 6d3ba96204..a6b70d5247 100644
--- a/libswscale/x86/yuv2yuvX.asm
+++ b/libswscale/x86/yuv2yuvX.asm
@@ -62,18 +62,8 @@ cglobal yuv2yuvX, 7, 7, 8, filter, filterSize, src, dest, dstW, dither, offset
 
 .offset:
     add offsetq, srcq
-%if cpuflag(avx2)
-    movd                 xmm1, filterSized
-    vpbroadcastw         m1, xmm1
-%elif cpuflag(sse3)
-    movd                 xmm1, filterSized
-    pshuflw              m1, m1, q0000
-    punpcklqdq           m1, m1
-%else
-    movd m1, filterSized
-    punpcklwd m1, m1
-    punpckldq m1, m1
-%endif ; avx2
+    movd                 xm1, filterSized
+    SPLATW               m1, xm1, 0
     pxor                 m0, m0, m0
     mov                  filterSizeq, filterq
     mov                  srcq, [filterSizeq]



More information about the ffmpeg-cvslog mailing list