Merge commit '1f8eb69079880ef1f394c498dfdf471f91222a06'
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 6 Dec 2013 01:12:11 +0000 (02:12 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 6 Dec 2013 01:12:59 +0000 (02:12 +0100)
* commit '1f8eb69079880ef1f394c498dfdf471f91222a06':
  mpegvideo: move encoding-only initialization from common_init() to encode_init()

Conflicts:
libavcodec/mpegvideo.c
libavcodec/mpegvideo_enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/mpegvideo.c
libavcodec/mpegvideo_enc.c

Simple merge
@@@ -837,7 -713,40 +837,32 @@@ av_cold int ff_MPV_encode_init(AVCodecC
      if (ff_MPV_common_init(s) < 0)
          return -1;
  
 -    if (ARCH_X86)
 -        ff_MPV_encode_init_x86(s);
 -
+     s->avctx->coded_frame = &s->current_picture.f;
+     if (s->msmpeg4_version) {
+         FF_ALLOCZ_OR_GOTO(s->avctx, s->ac_stats,
+                           2 * 2 * (MAX_LEVEL + 1) *
+                           (MAX_RUN + 1) * 2 * sizeof(int), fail);
+     }
+     FF_ALLOCZ_OR_GOTO(s->avctx, s->avctx->stats_out, 256, fail);
+     FF_ALLOCZ_OR_GOTO(s->avctx, s->q_intra_matrix,   64 * 32 * sizeof(int), fail);
++    FF_ALLOCZ_OR_GOTO(s->avctx, s->q_chroma_intra_matrix, 64 * 32 * sizeof(int), fail);
+     FF_ALLOCZ_OR_GOTO(s->avctx, s->q_inter_matrix,   64 * 32 * sizeof(int), fail);
+     FF_ALLOCZ_OR_GOTO(s->avctx, s->q_intra_matrix16, 64 * 32 * 2 * sizeof(uint16_t), fail);
++    FF_ALLOCZ_OR_GOTO(s->avctx, s->q_chroma_intra_matrix16, 64 * 32 * 2 * sizeof(uint16_t), fail);
+     FF_ALLOCZ_OR_GOTO(s->avctx, s->q_inter_matrix16, 64 * 32 * 2 * sizeof(uint16_t), fail);
+     FF_ALLOCZ_OR_GOTO(s->avctx, s->input_picture,
+                       MAX_PICTURE_COUNT * sizeof(Picture *), fail);
+     FF_ALLOCZ_OR_GOTO(s->avctx, s->reordered_input_picture,
+                       MAX_PICTURE_COUNT * sizeof(Picture *), fail);
+     if (s->avctx->noise_reduction) {
+         FF_ALLOCZ_OR_GOTO(s->avctx, s->dct_offset,
+                           2 * 64 * sizeof(uint16_t), fail);
+     }
 -    ff_h263dsp_init(&s->h263dsp);
 -    if (!s->dct_quantize)
 -        s->dct_quantize = ff_dct_quantize_c;
 -    if (!s->denoise_dct)
 -        s->denoise_dct  = denoise_dct_c;
 -    s->fast_dct_quantize = s->dct_quantize;
 -    if (avctx->trellis)
 -        s->dct_quantize  = dct_quantize_trellis_c;
 +    ff_dct_encode_init(s);
  
      if ((CONFIG_H263P_ENCODER || CONFIG_RV20_ENCODER) && s->modified_quant)
          s->chroma_qscale_table = ff_h263_chroma_qscale_table;