mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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>
This commit is contained in:
parent
42e6fc147b
commit
c172683bf4
@ -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);
|
||||
|
||||
|
@ -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,
|
||||
#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,
|
||||
emulated_edge_mc_func *emu_edge_fn)
|
||||
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 */
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user