[FFmpeg-cvslog] avcodec/huffyuvdsp : reorganize add_int16 asm
Martin Vignali
git at videolan.org
Tue Nov 21 10:43:33 EET 2017
ffmpeg | branch: master | Martin Vignali <martin.vignali at gmail.com> | Tue Nov 21 09:11:36 2017 +0100| [6955e8842e248bec5adebd8527d2802fcc762493] | committer: Martin Vignali
avcodec/huffyuvdsp : reorganize add_int16 asm
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6955e8842e248bec5adebd8527d2802fcc762493
---
libavcodec/x86/huffyuvdsp.asm | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/libavcodec/x86/huffyuvdsp.asm b/libavcodec/x86/huffyuvdsp.asm
index 623183354d..6f038e17da 100644
--- a/libavcodec/x86/huffyuvdsp.asm
+++ b/libavcodec/x86/huffyuvdsp.asm
@@ -26,21 +26,32 @@ SECTION .text
%include "libavcodec/x86/huffyuvdsp_template.asm"
-%if ARCH_X86_32
-INIT_MMX mmx
-cglobal add_int16, 4,4,5, dst, src, mask, w, tmp
- INT16_LOOP a, add
-%endif
+;------------------------------------------------------------------------------
+; void (*add_int16)(uint16_t *dst, const uint16_t *src, unsigned mask, int w);
+;------------------------------------------------------------------------------
-INIT_XMM sse2
+%macro ADD_INT16 0
cglobal add_int16, 4,4,5, dst, src, mask, w, tmp
+%if mmsize > 8
test srcq, mmsize-1
jnz .unaligned
test dstq, mmsize-1
jnz .unaligned
+%endif
INT16_LOOP a, add
+%if mmsize > 8
.unaligned:
INT16_LOOP u, add
+%endif
+%endmacro
+
+%if ARCH_X86_32
+INIT_MMX mmx
+ADD_INT16
+%endif
+
+INIT_XMM sse2
+ADD_INT16
; void add_hfyu_left_pred_bgr32(uint8_t *dst, const uint8_t *src,
; intptr_t w, uint8_t *left)
More information about the ffmpeg-cvslog
mailing list