Merge commit '1d0feb5d1ac04d187b335f0e8d411c9f40b3a885'
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 16 Feb 2013 18:00:39 +0000 (19:00 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 16 Feb 2013 18:00:39 +0000 (19:00 +0100)
* commit '1d0feb5d1ac04d187b335f0e8d411c9f40b3a885':
  mpegvideo: split ff_draw_horiz_band().

Conflicts:
libavcodec/vc1dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
12 files changed:
1  2 
libavcodec/dxva2.c
libavcodec/h263dec.c
libavcodec/h264.c
libavcodec/intrax8.c
libavcodec/mpeg12.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo.h
libavcodec/mpegvideo_xvmc.c
libavcodec/svq3.c
libavcodec/vaapi.c
libavcodec/vc1dec.c
libavcodec/vdpau.c

Simple merge
Simple merge
Simple merge
Simple merge
@@@ -1807,9 -1760,9 +1807,9 @@@ static int mpeg_decode_slice(MpegEncCon
          ff_MPV_decode_mb(s, s->block);
  
          if (++s->mb_x >= s->mb_width) {
 -            const int mb_size = 16;
 +            const int mb_size = 16 >> s->avctx->lowres;
  
-             ff_draw_horiz_band(s, mb_size*(s->mb_y >> field_pic), mb_size);
+             ff_mpeg_draw_horiz_band(s, mb_size*(s->mb_y >> field_pic), mb_size);
              ff_MPV_report_decode_progress(s);
  
              s->mb_x = 0;
Simple merge
Simple merge
Simple merge
@@@ -1144,21 -1126,9 +1144,21 @@@ static int svq3_decode_frame(AVCodecCon
                      (s->pict_type == AV_PICTURE_TYPE_P && mb_type < 8) ? (mb_type - 1) : -1;
          }
  
-         ff_draw_horiz_band(s, 16 * s->mb_y, 16);
+         ff_mpeg_draw_horiz_band(s, 16 * s->mb_y, 16);
      }
  
 +    left = buf_size*8 - get_bits_count(&s->gb);
 +
 +    if (s->mb_y != s->mb_height || s->mb_x != s->mb_width) {
 +        av_log(avctx, AV_LOG_INFO, "frame num %d incomplete pic x %d y %d left %d\n", avctx->frame_number, s->mb_y, s->mb_x, left);
 +        //av_hex_dump(stderr, buf+buf_size-8, 8);
 +    }
 +
 +    if (left < 0) {
 +        av_log(avctx, AV_LOG_ERROR, "frame num %d left %d\n", avctx->frame_number, left);
 +        return -1;
 +    }
 +
      ff_MPV_frame_end(s);
  
      if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay)
Simple merge
@@@ -4662,12 -4648,12 +4662,12 @@@ static void vc1_decode_p_blocks(VC1Cont
          memmove(v->ttblk_base,    v->ttblk,    sizeof(v->ttblk_base[0])    * s->mb_stride);
          memmove(v->is_intra_base, v->is_intra, sizeof(v->is_intra_base[0]) * s->mb_stride);
          memmove(v->luma_mv_base,  v->luma_mv,  sizeof(v->luma_mv_base[0])  * s->mb_stride);
-         if (s->mb_y != s->start_mb_y) ff_draw_horiz_band(s, (s->mb_y - 1) * 16, 16);
+         if (s->mb_y != s->start_mb_y) ff_mpeg_draw_horiz_band(s, (s->mb_y - 1) * 16, 16);
          s->first_slice_line = 0;
      }
 -    if (apply_loop_filter) {
 +    if (apply_loop_filter && v->fcm == PROGRESSIVE) {
          s->mb_x = 0;
 -        ff_init_block_index(s);
 +        init_block_index(v);
          for (; s->mb_x < s->mb_width; s->mb_x++) {
              ff_update_block_index(s);
              vc1_apply_p_loop_filter(v);
@@@ -4748,14 -4734,12 +4748,14 @@@ static void vc1_decode_skip_blocks(VC1C
      s->first_slice_line = 1;
      for (s->mb_y = s->start_mb_y; s->mb_y < s->end_mb_y; s->mb_y++) {
          s->mb_x = 0;
 -        ff_init_block_index(s);
 +        init_block_index(v);
          ff_update_block_index(s);
 -        memcpy(s->dest[0], s->last_picture.f.data[0] + s->mb_y * 16 * s->linesize,   s->linesize   * 16);
 -        memcpy(s->dest[1], s->last_picture.f.data[1] + s->mb_y *  8 * s->uvlinesize, s->uvlinesize *  8);
 -        memcpy(s->dest[2], s->last_picture.f.data[2] + s->mb_y *  8 * s->uvlinesize, s->uvlinesize *  8);
 +        if (s->last_picture.f.data[0]) {
 +            memcpy(s->dest[0], s->last_picture.f.data[0] + s->mb_y * 16 * s->linesize,   s->linesize   * 16);
 +            memcpy(s->dest[1], s->last_picture.f.data[1] + s->mb_y *  8 * s->uvlinesize, s->uvlinesize *  8);
 +            memcpy(s->dest[2], s->last_picture.f.data[2] + s->mb_y *  8 * s->uvlinesize, s->uvlinesize *  8);
 +        }
-         ff_draw_horiz_band(s, s->mb_y * 16, 16);
+         ff_mpeg_draw_horiz_band(s, s->mb_y * 16, 16);
          s->first_slice_line = 0;
      }
      s->pict_type = AV_PICTURE_TYPE_P;
Simple merge