- p->qstride= a->mb_width;
- p->qscale_table= av_mallocz( p->qstride * a->mb_height);
- avctx->pix_fmt= PIX_FMT_YUV420P;
+ if( avctx->idct_algo == FF_IDCT_AUTO )
+ avctx->idct_algo = FF_IDCT_SIMPLE;
+ p->qstride= 0;
+ p->qscale_table= av_mallocz(a->mb_width);
+ avctx->pix_fmt= PIX_FMT_YUVJ420P;
+
+ return 0;
+}
+
+static av_cold int decode_init_thread_copy(AVCodecContext *avctx){
+ MDECContext * const a = avctx->priv_data;
+ AVFrame *p = (AVFrame*)&a->picture;
+
+ avctx->coded_frame = p;
+ a->avctx= avctx;
+
+ p->qscale_table = av_mallocz( a->mb_width);