Commit ec7c501e authored by Mans Rullgard's avatar Mans Rullgard

x86: remove libmpeg2 mmx(ext) idct functions

These functions are not faster than other mmx implementations on
any hardware I have been able to test on, and they are horribly
inaccurate.  There is thus no reason to ever use them.
Signed-off-by: 's avatarMans Rullgard <mans@mansr.com>
parent a675d73d
...@@ -13,8 +13,6 @@ configure to activate them. In this case, Libav's license changes to GPL v2+. ...@@ -13,8 +13,6 @@ configure to activate them. In this case, Libav's license changes to GPL v2+.
Specifically, the GPL parts of Libav are Specifically, the GPL parts of Libav are
- optional x86 optimizations in the files
libavcodec/x86/idct_mmx.c
- the X11 grabber in libavdevice/x11grab.c - the X11 grabber in libavdevice/x11grab.c
There are a handful of files under other licensing terms, namely: There are a handful of files under other licensing terms, namely:
......
...@@ -109,10 +109,6 @@ static const struct algo idct_tab[] = { ...@@ -109,10 +109,6 @@ static const struct algo idct_tab[] = {
{ "SIMPLE-C", ff_simple_idct_8, NO_PERM }, { "SIMPLE-C", ff_simple_idct_8, NO_PERM },
#if HAVE_MMX && HAVE_INLINE_ASM #if HAVE_MMX && HAVE_INLINE_ASM
#if CONFIG_GPL
{ "LIBMPEG2-MMX", ff_mmx_idct, MMX_PERM, AV_CPU_FLAG_MMX, 1 },
{ "LIBMPEG2-MMX2", ff_mmxext_idct, MMX_PERM, AV_CPU_FLAG_MMX2, 1 },
#endif
{ "SIMPLE-MMX", ff_simple_idct_mmx, MMX_SIMPLE_PERM, AV_CPU_FLAG_MMX }, { "SIMPLE-MMX", ff_simple_idct_mmx, MMX_SIMPLE_PERM, AV_CPU_FLAG_MMX },
{ "XVID-MMX", ff_idct_xvid_mmx, NO_PERM, AV_CPU_FLAG_MMX, 1 }, { "XVID-MMX", ff_idct_xvid_mmx, NO_PERM, AV_CPU_FLAG_MMX, 1 },
{ "XVID-MMX2", ff_idct_xvid_mmx2, NO_PERM, AV_CPU_FLAG_MMX2, 1 }, { "XVID-MMX2", ff_idct_xvid_mmx2, NO_PERM, AV_CPU_FLAG_MMX2, 1 },
......
...@@ -193,7 +193,6 @@ static const AVOption options[]={ ...@@ -193,7 +193,6 @@ static const AVOption options[]={
{"int", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_INT }, INT_MIN, INT_MAX, V|E|D, "idct"}, {"int", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_INT }, INT_MIN, INT_MAX, V|E|D, "idct"},
{"simple", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_SIMPLE }, INT_MIN, INT_MAX, V|E|D, "idct"}, {"simple", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_SIMPLE }, INT_MIN, INT_MAX, V|E|D, "idct"},
{"simplemmx", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_SIMPLEMMX }, INT_MIN, INT_MAX, V|E|D, "idct"}, {"simplemmx", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_SIMPLEMMX }, INT_MIN, INT_MAX, V|E|D, "idct"},
{"libmpeg2mmx", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_LIBMPEG2MMX }, INT_MIN, INT_MAX, V|E|D, "idct"},
{"mmi", NULL, 0, AV_OPT_TYPE_CONST, { .dbl = FF_IDCT_MMI }, INT_MIN, INT_MAX, V|E|D, "idct"}, {"mmi", NULL, 0, AV_OPT_TYPE_CONST, { .dbl = FF_IDCT_MMI }, INT_MIN, INT_MAX, V|E|D, "idct"},
{"arm", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_ARM }, INT_MIN, INT_MAX, V|E|D, "idct"}, {"arm", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_ARM }, INT_MIN, INT_MAX, V|E|D, "idct"},
{"altivec", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_ALTIVEC }, INT_MIN, INT_MAX, V|E|D, "idct"}, {"altivec", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_IDCT_ALTIVEC }, INT_MIN, INT_MAX, V|E|D, "idct"},
......
...@@ -19,7 +19,6 @@ MMX-OBJS-$(CONFIG_DNXHD_ENCODER) += x86/dnxhd_mmx.o ...@@ -19,7 +19,6 @@ MMX-OBJS-$(CONFIG_DNXHD_ENCODER) += x86/dnxhd_mmx.o
MMX-OBJS-$(CONFIG_DWT) += x86/snowdsp_mmx.o MMX-OBJS-$(CONFIG_DWT) += x86/snowdsp_mmx.o
MMX-OBJS-$(CONFIG_ENCODERS) += x86/dsputilenc_mmx.o MMX-OBJS-$(CONFIG_ENCODERS) += x86/dsputilenc_mmx.o
MMX-OBJS-$(CONFIG_FFT) += x86/fft.o MMX-OBJS-$(CONFIG_FFT) += x86/fft.o
MMX-OBJS-$(CONFIG_GPL) += x86/idct_mmx.o
MMX-OBJS-$(CONFIG_H264DSP) += x86/h264dsp_mmx.o MMX-OBJS-$(CONFIG_H264DSP) += x86/h264dsp_mmx.o
MMX-OBJS-$(CONFIG_H264PRED) += x86/h264_intrapred_init.o MMX-OBJS-$(CONFIG_H264PRED) += x86/h264_intrapred_init.o
MMX-OBJS-$(CONFIG_LPC) += x86/lpc_mmx.o MMX-OBJS-$(CONFIG_LPC) += x86/lpc_mmx.o
......
...@@ -2164,35 +2164,6 @@ void ff_avg_vc1_mspel_mc00_mmx2(uint8_t *dst, const uint8_t *src, ...@@ -2164,35 +2164,6 @@ void ff_avg_vc1_mspel_mc00_mmx2(uint8_t *dst, const uint8_t *src,
/* XXX: Those functions should be suppressed ASAP when all IDCTs are /* XXX: Those functions should be suppressed ASAP when all IDCTs are
* converted. */ * converted. */
#if CONFIG_GPL
static void ff_libmpeg2mmx_idct_put(uint8_t *dest, int line_size,
DCTELEM *block)
{
ff_mmx_idct(block);
ff_put_pixels_clamped_mmx(block, dest, line_size);
}
static void ff_libmpeg2mmx_idct_add(uint8_t *dest, int line_size,
DCTELEM *block)
{
ff_mmx_idct(block);
ff_add_pixels_clamped_mmx(block, dest, line_size);
}
static void ff_libmpeg2mmx2_idct_put(uint8_t *dest, int line_size,
DCTELEM *block)
{
ff_mmxext_idct(block);
ff_put_pixels_clamped_mmx(block, dest, line_size);
}
static void ff_libmpeg2mmx2_idct_add(uint8_t *dest, int line_size,
DCTELEM *block)
{
ff_mmxext_idct(block);
ff_add_pixels_clamped_mmx(block, dest, line_size);
}
#endif
static void ff_idct_xvid_mmx_put(uint8_t *dest, int line_size, DCTELEM *block) static void ff_idct_xvid_mmx_put(uint8_t *dest, int line_size, DCTELEM *block)
{ {
...@@ -3049,19 +3020,6 @@ void ff_dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx) ...@@ -3049,19 +3020,6 @@ void ff_dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx)
c->idct_add = ff_simple_idct_add_mmx; c->idct_add = ff_simple_idct_add_mmx;
c->idct = ff_simple_idct_mmx; c->idct = ff_simple_idct_mmx;
c->idct_permutation_type = FF_SIMPLE_IDCT_PERM; c->idct_permutation_type = FF_SIMPLE_IDCT_PERM;
#if CONFIG_GPL
} else if (idct_algo == FF_IDCT_LIBMPEG2MMX) {
if (mm_flags & AV_CPU_FLAG_MMX2) {
c->idct_put = ff_libmpeg2mmx2_idct_put;
c->idct_add = ff_libmpeg2mmx2_idct_add;
c->idct = ff_mmxext_idct;
} else {
c->idct_put = ff_libmpeg2mmx_idct_put;
c->idct_add = ff_libmpeg2mmx_idct_add;
c->idct = ff_mmx_idct;
}
c->idct_permutation_type = FF_LIBMPEG2_IDCT_PERM;
#endif
} else if (idct_algo == FF_IDCT_CAVS) { } else if (idct_algo == FF_IDCT_CAVS) {
c->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM; c->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM;
} else if (idct_algo == FF_IDCT_XVIDMMX) { } else if (idct_algo == FF_IDCT_XVIDMMX) {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment