From a786c8259dafeca9744252230b5d78f67810770c Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Mon, 21 Jul 2014 13:13:21 -0700 Subject: idct: Split off Xvid IDCT The Xvid IDCT is only required to decode some Xvid-encoded MPEG-4 files, so there is no point in having it as an unconditional part of idctdsp. --- libavcodec/mpeg4videodec.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'libavcodec/mpeg4videodec.c') diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index 199e3b341b..cb88f7716f 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -28,6 +28,7 @@ #include "mpeg4video.h" #include "h263.h" #include "thread.h" +#include "xvididct.h" /* The defines below define the number of bits that are read at once for * reading vlc values. Changing these may improve speed and data cache needs @@ -2066,14 +2067,8 @@ static int decode_user_data(Mpeg4DecContext *ctx, GetBitContext *gb) ctx->divx_build = -1; } -#if HAVE_MMX - if (ctx->xvid_build >= 0 && - s->avctx->idct_algo == FF_IDCT_AUTO && - (av_get_cpu_flags() & AV_CPU_FLAG_MMX)) { - s->avctx->idct_algo = FF_IDCT_XVIDMMX; - ff_dct_common_init(s); - } -#endif + if (CONFIG_MPEG4_DECODER && ctx->xvid_build >= 0) + ff_xvididct_init(&s->idsp, s->avctx); return 0; } -- cgit v1.2.3