diff options
author | James Almer <jamrial@gmail.com> | 2014-06-22 20:34:14 -0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-23 02:15:06 +0200 |
commit | c172683bf46a715baac867a49cdf621604592846 (patch) | |
tree | 3ed85dacefdd2a791efc8c3ba61e29011d6fbc0d /libavcodec | |
parent | 42e6fc147b5a375fe811c64dc5f1cb66d5b0ac49 (diff) | |
download | ffmpeg-c172683bf46a715baac867a49cdf621604592846.tar.gz |
x86/dsputil: remove redundant global motion compensation code
The SSE version has been no different than the mmx one since commit a41bf09d
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/x86/dsputil_init.c | 15 | ||||
-rw-r--r-- | libavcodec/x86/dsputil_mmx.c | 49 | ||||
-rw-r--r-- | libavcodec/x86/dsputil_x86.h | 5 |
3 files changed, 7 insertions, 62 deletions
diff --git a/libavcodec/x86/dsputil_init.c b/libavcodec/x86/dsputil_init.c index ed58598810..89f26e6e7f 100644 --- a/libavcodec/x86/dsputil_init.c +++ b/libavcodec/x86/dsputil_init.c @@ -61,7 +61,7 @@ static av_cold void dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx, } } -#if CONFIG_VIDEODSP && (ARCH_X86_32 || !HAVE_YASM) +#if CONFIG_VIDEODSP c->gmc = ff_gmc_mmx; #endif #endif /* HAVE_MMX_INLINE */ @@ -83,16 +83,6 @@ static av_cold void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx, #endif /* HAVE_MMXEXT_INLINE */ } -static av_cold void dsputil_init_sse(DSPContext *c, AVCodecContext *avctx, - int cpu_flags, unsigned high_bit_depth) -{ -#if HAVE_YASM -#if HAVE_INLINE_ASM && CONFIG_VIDEODSP - c->gmc = ff_gmc_sse; -#endif -#endif /* HAVE_YASM */ -} - static av_cold void dsputil_init_sse2(DSPContext *c, AVCodecContext *avctx, int cpu_flags, unsigned high_bit_depth) { @@ -130,9 +120,6 @@ av_cold void ff_dsputil_init_x86(DSPContext *c, AVCodecContext *avctx, if (X86_MMXEXT(cpu_flags)) dsputil_init_mmxext(c, avctx, cpu_flags, high_bit_depth); - if (X86_SSE(cpu_flags)) - dsputil_init_sse(c, avctx, cpu_flags, high_bit_depth); - if (X86_SSE2(cpu_flags)) dsputil_init_sse2(c, avctx, cpu_flags, high_bit_depth); diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c index 54aba38b53..310039957f 100644 --- a/libavcodec/x86/dsputil_mmx.c +++ b/libavcodec/x86/dsputil_mmx.c @@ -247,17 +247,11 @@ void ff_draw_edges_mmx(uint8_t *buf, int wrap, int width, int height, } } -typedef void emulated_edge_mc_func(uint8_t *dst, const uint8_t *src, - ptrdiff_t dst_stride, - ptrdiff_t src_linesize, - int block_w, int block_h, - int src_x, int src_y, int w, int h); - -static av_always_inline void gmc(uint8_t *dst, uint8_t *src, - int stride, int h, int ox, int oy, - int dxx, int dxy, int dyx, int dyy, - int shift, int r, int width, int height, - emulated_edge_mc_func *emu_edge_fn) +#if CONFIG_VIDEODSP +void ff_gmc_mmx(uint8_t *dst, uint8_t *src, + int stride, int h, int ox, int oy, + int dxx, int dxy, int dyx, int dyy, + int shift, int r, int width, int height) { const int w = 8; const int ix = ox >> (16 + shift); @@ -298,7 +292,7 @@ static av_always_inline void gmc(uint8_t *dst, uint8_t *src, src += ix + iy * stride; if (need_emu) { - emu_edge_fn(edge_buf, src, stride, stride, w + 1, h + 1, ix, iy, width, height); + ff_emulated_edge_mc_8(edge_buf, src, stride, stride, w + 1, h + 1, ix, iy, width, height); src = edge_buf; } @@ -375,36 +369,5 @@ static av_always_inline void gmc(uint8_t *dst, uint8_t *src, src += 4 - h * stride; } } - -#if CONFIG_VIDEODSP -#if HAVE_YASM -#if ARCH_X86_32 -void ff_gmc_mmx(uint8_t *dst, uint8_t *src, - int stride, int h, int ox, int oy, - int dxx, int dxy, int dyx, int dyy, - int shift, int r, int width, int height) -{ - gmc(dst, src, stride, h, ox, oy, dxx, dxy, dyx, dyy, shift, r, - width, height, &ff_emulated_edge_mc_8); -} -#endif -void ff_gmc_sse(uint8_t *dst, uint8_t *src, - int stride, int h, int ox, int oy, - int dxx, int dxy, int dyx, int dyy, - int shift, int r, int width, int height) -{ - gmc(dst, src, stride, h, ox, oy, dxx, dxy, dyx, dyy, shift, r, - width, height, &ff_emulated_edge_mc_8); -} -#else -void ff_gmc_mmx(uint8_t *dst, uint8_t *src, - int stride, int h, int ox, int oy, - int dxx, int dxy, int dyx, int dyy, - int shift, int r, int width, int height) -{ - gmc(dst, src, stride, h, ox, oy, dxx, dxy, dyx, dyy, shift, r, - width, height, &ff_emulated_edge_mc_8); -} -#endif #endif #endif /* HAVE_INLINE_ASM */ diff --git a/libavcodec/x86/dsputil_x86.h b/libavcodec/x86/dsputil_x86.h index b5d7291f28..14b7482cb9 100644 --- a/libavcodec/x86/dsputil_x86.h +++ b/libavcodec/x86/dsputil_x86.h @@ -48,11 +48,6 @@ void ff_gmc_mmx(uint8_t *dst, uint8_t *src, int dxx, int dxy, int dyx, int dyy, int shift, int r, int width, int height); -void ff_gmc_sse(uint8_t *dst, uint8_t *src, - int stride, int h, int ox, int oy, - int dxx, int dxy, int dyx, int dyy, - int shift, int r, int width, int height); - void ff_mmx_idct(int16_t *block); void ff_mmxext_idct(int16_t *block); |