summaryrefslogtreecommitdiff
path: root/libavcodec/mpeg12dec.c
diff options
context:
space:
mode:
authorJohn Stebbins <stebbins@jetheaddev.com>2014-08-08 08:11:20 -0700
committerJohn Stebbins <stebbins@jetheaddev.com>2014-08-14 07:58:49 -0700
commit998c9f15d1ca8c7489775ebcca51623b915988f1 (patch)
treedac8b4d6a607d44422c0ac6179b8507ae13a807e /libavcodec/mpeg12dec.c
parent93f29948e4b06acfb96e7f82d373ef86d6dc55f7 (diff)
idct: remove call to ff_idctdsp_init from ff_MPV_common_init
One step in untangling the mpegvideo code and fixing some problems in the order that initialization is being done in h263dec and h261dec.
Diffstat (limited to 'libavcodec/mpeg12dec.c')
-rw-r--r--libavcodec/mpeg12dec.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index a181fcccb9..29f8980913 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -1097,18 +1097,16 @@ static av_cold int mpeg_decode_init(AVCodecContext *avctx)
{
Mpeg1Context *s = avctx->priv_data;
MpegEncContext *s2 = &s->mpeg_enc_ctx;
- int i;
-
- /* we need some permutation to store matrices,
- * until MPV_common_init() sets the real permutation. */
- for (i = 0; i < 64; i++)
- s2->idsp.idct_permutation[i] = i;
ff_MPV_decode_defaults(s2);
s->mpeg_enc_ctx.avctx = avctx;
s->mpeg_enc_ctx.flags = avctx->flags;
s->mpeg_enc_ctx.flags2 = avctx->flags2;
+
+ /* we need some permutation to store matrices,
+ * until the decoder sets the real permutation. */
+ ff_mpv_idct_init(s2);
ff_mpeg12_common_init(&s->mpeg_enc_ctx);
ff_mpeg12_init_vlcs();
@@ -1313,6 +1311,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx)
* if DCT permutation is changed. */
memcpy(old_permutation, s->idsp.idct_permutation, 64 * sizeof(uint8_t));
+ ff_mpv_idct_init(s);
if (ff_MPV_common_init(s) < 0)
return -2;
@@ -2151,6 +2150,7 @@ static int vcr2_init_sequence(AVCodecContext *avctx)
#endif /* FF_API_XVMC */
avctx->idct_algo = FF_IDCT_SIMPLE;
+ ff_mpv_idct_init(s);
if (ff_MPV_common_init(s) < 0)
return -1;
s1->mpeg_enc_ctx_allocated = 1;