Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Vignali <martin.vignali@gmail.com>2017-11-21 11:11:36 +0300
committerMartin Vignali <martin.vignali@gmail.com>2017-11-21 11:41:52 +0300
commit6955e8842e248bec5adebd8527d2802fcc762493 (patch)
tree088459f5596662599f892c469fdfdf6d78b478c2 /libavcodec/x86
parent7f9b67bcb61d4ca012c67908d4f47cf28e5e22ae (diff)
avcodec/huffyuvdsp : reorganize add_int16 asm
Diffstat (limited to 'libavcodec/x86')
-rw-r--r--libavcodec/x86/huffyuvdsp.asm23
1 files 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)