[FFmpeg-cvslog] swscale: make rgb24 function macros slightly smaller.

Ronald S. Bultje git at videolan.org
Thu Feb 2 02:46:27 CET 2012


ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Wed Feb  1 07:38:54 2012 -0800| [212f161caada76b083ebaca21449c58162e5419d] | committer: Ronald S. Bultje

swscale: make rgb24 function macros slightly smaller.

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

 libswscale/x86/input.asm |   29 +++++++++++++----------------
 1 files changed, 13 insertions(+), 16 deletions(-)

diff --git a/libswscale/x86/input.asm b/libswscale/x86/input.asm
index 7404b19..d52a35a 100644
--- a/libswscale/x86/input.asm
+++ b/libswscale/x86/input.asm
@@ -273,31 +273,28 @@ cglobal %2 %+ 24ToUV, 3, 4, %1, dstU, dstV, src, w
 %endif ; ARCH_X86_64 && %0 == 3
 %endmacro
 
+; %1 = nr. of XMM registers for rgb-to-Y func
+; %2 = nr. of XMM registers for rgb-to-UV func
+%macro RGB24_FUNCS 2
+RGB24_TO_Y_FN %1, rgb
+RGB24_TO_Y_FN %1, bgr, rgb
+RGB24_TO_UV_FN %2, rgb
+RGB24_TO_UV_FN %2, bgr, rgb
+%endmacro
+
 %if ARCH_X86_32
 INIT_MMX mmx
-RGB24_TO_Y_FN 0, rgb
-RGB24_TO_Y_FN 0, bgr, rgb
-RGB24_TO_UV_FN 0, rgb
-RGB24_TO_UV_FN 0, bgr, rgb
+RGB24_FUNCS 0, 0
 %endif
 
 INIT_XMM sse2
-RGB24_TO_Y_FN 10, rgb
-RGB24_TO_Y_FN 10, bgr, rgb
-RGB24_TO_UV_FN 12, rgb
-RGB24_TO_UV_FN 12, bgr, rgb
+RGB24_FUNCS 10, 12
 
 INIT_XMM ssse3
-RGB24_TO_Y_FN 11, rgb
-RGB24_TO_Y_FN 11, bgr, rgb
-RGB24_TO_UV_FN 13, rgb
-RGB24_TO_UV_FN 13, bgr, rgb
+RGB24_FUNCS 11, 13
 
 INIT_XMM avx
-RGB24_TO_Y_FN 11, rgb
-RGB24_TO_Y_FN 11, bgr, rgb
-RGB24_TO_UV_FN 13, rgb
-RGB24_TO_UV_FN 13, bgr, rgb
+RGB24_FUNCS 11, 13
 
 ;-----------------------------------------------------------------------------
 ; YUYV/UYVY/NV12/NV21 packed pixel shuffling.



More information about the ffmpeg-cvslog mailing list