Merge commit '07c5ca551b7327d3c4e33738cc0cd2d5ac2779fa'
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 21 Mar 2015 15:10:31 +0000 (16:10 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 21 Mar 2015 15:10:31 +0000 (16:10 +0100)
* commit '07c5ca551b7327d3c4e33738cc0cd2d5ac2779fa':
  h264: move is_complex into the per-slice context

Conflicts:
libavcodec/h264_slice.c
libavcodec/svq3.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/h264.h
libavcodec/h264_mb.c
libavcodec/h264_slice.c
libavcodec/svq3.c

Simple merge
Simple merge
@@@ -2402,22 -2185,10 +2402,22 @@@ static int decode_slice(struct AVCodecC
  
      sl->mb_skip_run = -1;
  
-     h->is_complex = FRAME_MBAFF(h) || h->picture_structure != PICT_FRAME ||
-                     avctx->codec_id != AV_CODEC_ID_H264 ||
-                     (CONFIG_GRAY && (h->flags & CODEC_FLAG_GRAY));
 +    av_assert0(h->block_offset[15] == (4 * ((scan8[15] - scan8[0]) & 7) << h->pixel_shift) + 4 * h->linesize * ((scan8[15] - scan8[0]) >> 3));
 +
+     sl->is_complex = FRAME_MBAFF(h) || h->picture_structure != PICT_FRAME ||
+                      avctx->codec_id != AV_CODEC_ID_H264 ||
+                      (CONFIG_GRAY && (h->flags & CODEC_FLAG_GRAY));
  
 +    if (!(h->avctx->active_thread_type & FF_THREAD_SLICE) && h->picture_structure == PICT_FRAME && h->er.error_status_table) {
 +        const int start_i  = av_clip(h->resync_mb_x + h->resync_mb_y * h->mb_width, 0, h->mb_num - 1);
 +        if (start_i) {
 +            int prev_status = h->er.error_status_table[h->er.mb_index2xy[start_i - 1]];
 +            prev_status &= ~ VP_START;
 +            if (prev_status != (ER_MV_END | ER_DC_END | ER_AC_END))
 +                h->er.error_occurred = 1;
 +        }
 +    }
 +
      if (h->pps.cabac) {
          /* realign */
          align_get_bits(&h->gb);
@@@ -894,9 -889,10 +895,11 @@@ static av_cold int svq3_decode_init(AVC
      ff_hpeldsp_init(&s->hdsp, avctx->flags);
      ff_tpeldsp_init(&s->tdsp);
  
+     sl = h->slice_ctx;
      h->flags           = avctx->flags;
-     h->is_complex      = 1;
+     sl->is_complex     = 1;
 +    h->sps.chroma_format_idc = 1;
      h->picture_structure = PICT_FRAME;
      avctx->pix_fmt     = AV_PIX_FMT_YUVJ420P;
      avctx->color_range = AVCOL_RANGE_JPEG;