diff options
author | Christophe Gisquet <christophe.gisquet@gmail.com> | 2014-05-28 15:52:24 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-29 21:56:00 +0200 |
commit | 99a319c4e7538670847ac4633ef8b0f0629deb22 (patch) | |
tree | 5896b2cac40b1e50d28d115c2cd821cc391e78a7 /libavcodec/x86/huffyuvdsp_mmx.c | |
parent | 226700398105075d27d07b652a0b67705aa06a1e (diff) | |
download | ffmpeg-99a319c4e7538670847ac4633ef8b0f0629deb22.tar.gz |
x86: huffyuvdsp: port add_bytes to yasm
C MMX SSE2
Cycles: 2972 587 302
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/x86/huffyuvdsp_mmx.c')
-rw-r--r-- | libavcodec/x86/huffyuvdsp_mmx.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/libavcodec/x86/huffyuvdsp_mmx.c b/libavcodec/x86/huffyuvdsp_mmx.c index 59422107d3..ee6ec91287 100644 --- a/libavcodec/x86/huffyuvdsp_mmx.c +++ b/libavcodec/x86/huffyuvdsp_mmx.c @@ -22,9 +22,7 @@ #include "libavutil/x86/asm.h" #include "huffyuvdsp.h" -#if HAVE_INLINE_ASM - -#if HAVE_7REGS +#if HAVE_INLINE_ASM && HAVE_7REGS void ff_add_hfyu_median_pred_cmov(uint8_t *dst, const uint8_t *top, const uint8_t *diff, int w, int *left, int *left_top) @@ -61,31 +59,3 @@ void ff_add_hfyu_median_pred_cmov(uint8_t *dst, const uint8_t *top, *left_top = tl; } #endif - -void ff_add_bytes_mmx(uint8_t *dst, uint8_t *src, int w) -{ - x86_reg i = 0; - - __asm__ volatile ( - "jmp 2f \n\t" - "1: \n\t" - "movq (%1, %0), %%mm0 \n\t" - "movq (%2, %0), %%mm1 \n\t" - "paddb %%mm0, %%mm1 \n\t" - "movq %%mm1, (%2, %0) \n\t" - "movq 8(%1, %0), %%mm0 \n\t" - "movq 8(%2, %0), %%mm1 \n\t" - "paddb %%mm0, %%mm1 \n\t" - "movq %%mm1, 8(%2, %0) \n\t" - "add $16, %0 \n\t" - "2: \n\t" - "cmp %3, %0 \n\t" - "js 1b \n\t" - : "+r" (i) - : "r" (src), "r" (dst), "r" ((x86_reg) w - 15)); - - for (; i < w; i++) - dst[i + 0] += src[i + 0]; -} - -#endif /* HAVE_INLINE_ASM */ |