summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg4videodec.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2014-07-21 13:13:21 -0700
committerDiego Biurrun <diego@biurrun.de>2014-08-01 01:25:18 -0700
commita786c8259dafeca9744252230b5d78f67810770c (patch)
treeaade39c2a8bc84ea95306d7a8117d4e05c908139 /libavcodec/mpeg4videodec.c
parent03c9f357a4c2307a7913cea2cbf0ba817e80beb6 (diff)
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.
Diffstat (limited to 'libavcodec/mpeg4videodec.c')
-rw-r--r--libavcodec/mpeg4videodec.c11
1 files changed, 3 insertions, 8 deletions
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;
}