OSDN Git Service

Merge commit '6d2b6f21eb45ffbda1103c772060303648714832'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 21 Mar 2013 11:58:00 +0000 (12:58 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 21 Mar 2013 11:58:00 +0000 (12:58 +0100)
* commit '6d2b6f21eb45ffbda1103c772060303648714832':
  h264: add a parameter to the CABAC macro.
  h264: add a parameter to the FIELD_OR_MBAFF_PICTURE macro.

Conflicts:
libavcodec/h264.c
libavcodec/h264_cabac.c
libavcodec/h264_cavlc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/dxva2_h264.c
libavcodec/h264.c
libavcodec/h264.h
libavcodec/h264_cabac.c
libavcodec/h264_cavlc.c
libavcodec/h264_loopfilter.c
libavcodec/h264_mvpred.h
libavcodec/vaapi_h264.c

Simple merge
@@@ -3575,28 -3445,19 +3575,28 @@@ static int decode_slice_header(H264Cont
      if (h != h0 && (ret = clone_slice(h, h0)) < 0)
          return ret;
  
 +    /* can't be in alloc_tables because linesize isn't known there.
 +     * FIXME: redo bipred weight to not require extra buffer? */
 +    for (i = 0; i < h->slice_context_count; i++)
 +        if (h->thread_context[i]) {
 +            ret = alloc_scratch_buffers(h->thread_context[i], h->linesize);
 +            if (ret < 0)
 +                return ret;
 +        }
 +
      h->cur_pic_ptr->frame_num = h->frame_num; // FIXME frame_num cleanup
  
 -    assert(h->mb_num == h->mb_width * h->mb_height);
 +    av_assert1(h->mb_num == h->mb_width * h->mb_height);
-     if (first_mb_in_slice << FIELD_OR_MBAFF_PICTURE >= h->mb_num ||
+     if (first_mb_in_slice << FIELD_OR_MBAFF_PICTURE(h) >= h->mb_num ||
          first_mb_in_slice >= h->mb_num) {
          av_log(h->avctx, AV_LOG_ERROR, "first_mb_in_slice overflow\n");
          return -1;
      }
      h->resync_mb_x = h->mb_x =  first_mb_in_slice % h->mb_width;
-     h->resync_mb_y = h->mb_y = (first_mb_in_slice / h->mb_width) << FIELD_OR_MBAFF_PICTURE;
+     h->resync_mb_y = h->mb_y = (first_mb_in_slice / h->mb_width) << FIELD_OR_MBAFF_PICTURE(h);
      if (h->picture_structure == PICT_BOTTOM_FIELD)
          h->resync_mb_y = h->mb_y = h->mb_y + 1;
 -    assert(h->mb_y < h->mb_height);
 +    av_assert1(h->mb_y < h->mb_height);
  
      if (h->picture_structure == PICT_FRAME) {
          h->curr_pic_num = h->frame_num;
  #define LBOT     0
  #define LEFT(i)  0
  #endif
- #define FIELD_OR_MBAFF_PICTURE (FRAME_MBAFF(h) || FIELD_PICTURE(h))
+ #define FIELD_OR_MBAFF_PICTURE(h) (FRAME_MBAFF(h) || FIELD_PICTURE(h))
  
  #ifndef CABAC
- #define CABAC h->pps.cabac
+ #define CABAC(h) h->pps.cabac
  #endif
  
 +#define CHROMA    (h->sps.chroma_format_idc)
  #define CHROMA422 (h->sps.chroma_format_idc == 2)
  #define CHROMA444 (h->sps.chroma_format_idc == 3)
  
@@@ -25,8 -25,7 +25,8 @@@
   * @author Michael Niedermayer <michaelni@gmx.at>
   */
  
- #define CABAC 1
+ #define CABAC(h) 1
 +#define UNCHECKED_BITSTREAM_READER 1
  
  #include "config.h"
  #include "cabac.h"
@@@ -25,8 -25,7 +25,8 @@@
   * @author Michael Niedermayer <michaelni@gmx.at>
   */
  
- #define CABAC 0
+ #define CABAC(h) 0
 +#define UNCHECKED_BITSTREAM_READER 1
  
  #include "internal.h"
  #include "avcodec.h"
Simple merge
Simple merge
Simple merge