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_init.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_init.c')
-rw-r--r-- | libavcodec/x86/huffyuvdsp_init.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libavcodec/x86/huffyuvdsp_init.c b/libavcodec/x86/huffyuvdsp_init.c index 1efb34dbbe..8a755e65b0 100644 --- a/libavcodec/x86/huffyuvdsp_init.c +++ b/libavcodec/x86/huffyuvdsp_init.c @@ -23,7 +23,8 @@ #include "libavutil/x86/cpu.h" #include "libavcodec/huffyuvdsp.h" -void ff_add_bytes_mmx(uint8_t *dst, uint8_t *src, int w); +void ff_add_bytes_mmx(uint8_t *dst, uint8_t *src, intptr_t w); +void ff_add_bytes_sse2(uint8_t *dst, uint8_t *src, intptr_t w); void ff_add_hfyu_median_pred_cmov(uint8_t *dst, const uint8_t *top, const uint8_t *diff, int w, @@ -46,7 +47,7 @@ av_cold void ff_huffyuvdsp_init_x86(HuffYUVDSPContext *c) c->add_hfyu_median_pred = ff_add_hfyu_median_pred_cmov; #endif - if (INLINE_MMX(cpu_flags)) + if (EXTERNAL_MMX(cpu_flags)) c->add_bytes = ff_add_bytes_mmx; if (EXTERNAL_MMXEXT(cpu_flags)) { @@ -55,6 +56,10 @@ av_cold void ff_huffyuvdsp_init_x86(HuffYUVDSPContext *c) c->add_hfyu_median_pred = ff_add_hfyu_median_pred_mmxext; } + if (EXTERNAL_SSE2(cpu_flags)) { + c->add_bytes = ff_add_bytes_sse2; + } + if (EXTERNAL_SSSE3(cpu_flags)) { c->add_hfyu_left_pred = ff_add_hfyu_left_pred_ssse3; if (cpu_flags & AV_CPU_FLAG_SSE4) // not really SSE4, just slow on Conroe |