From 998c9f15d1ca8c7489775ebcca51623b915988f1 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Fri, 8 Aug 2014 08:11:20 -0700 Subject: 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. --- libavcodec/mpeg12dec.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libavcodec/mpeg12dec.c') 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; -- cgit v1.2.3