OSDN Git Service

Merge commit 'da6be8fcec16a94d8084bda8bb8a0a411a96bcf7'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 21 Mar 2013 11:43:32 +0000 (12:43 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 21 Mar 2013 11:43:32 +0000 (12:43 +0100)
* commit 'da6be8fcec16a94d8084bda8bb8a0a411a96bcf7':
  h264: add a parameter to the MB_FIELD macro.
  h264: add a parameter to the MB_MBAFF macro.

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

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

@@@ -3905,7 -3759,7 +3905,7 @@@ static av_always_inline void fill_filte
          if (USES_LIST(top_type, list)) {
              const int b_xy  = h->mb2b_xy[top_xy] + 3 * b_stride;
              const int b8_xy = 4 * top_xy + 2;
-             int (*ref2frm)[64] = (void*)(h->ref2frm[h->slice_table[top_xy] & (MAX_SLICES - 1)][0] + (MB_MBAFF ? 20 : 2));
 -            int (*ref2frm)[64] = h->ref2frm[h->slice_table[top_xy] & (MAX_SLICES - 1)][0] + (MB_MBAFF(h) ? 20 : 2);
++            int (*ref2frm)[64] = (void*)(h->ref2frm[h->slice_table[top_xy] & (MAX_SLICES - 1)][0] + (MB_MBAFF(h) ? 20 : 2));
              AV_COPY128(mv_dst - 1 * 8, h->cur_pic.motion_val[list][b_xy + 0]);
              ref_cache[0 - 1 * 8] =
              ref_cache[1 - 1 * 8] = ref2frm[list][h->cur_pic.ref_index[list][b8_xy + 0]];
              if (USES_LIST(left_type[LTOP], list)) {
                  const int b_xy  = h->mb2b_xy[left_xy[LTOP]] + 3;
                  const int b8_xy = 4 * left_xy[LTOP] + 1;
-                 int (*ref2frm)[64] =(void*)( h->ref2frm[h->slice_table[left_xy[LTOP]] & (MAX_SLICES - 1)][0] + (MB_MBAFF ? 20 : 2));
 -                int (*ref2frm)[64] = h->ref2frm[h->slice_table[left_xy[LTOP]] & (MAX_SLICES - 1)][0] + (MB_MBAFF(h) ? 20 : 2);
++                int (*ref2frm)[64] =(void*)( h->ref2frm[h->slice_table[left_xy[LTOP]] & (MAX_SLICES - 1)][0] + (MB_MBAFF(h) ? 20 : 2));
                  AV_COPY32(mv_dst - 1 +  0, h->cur_pic.motion_val[list][b_xy + b_stride * 0]);
                  AV_COPY32(mv_dst - 1 +  8, h->cur_pic.motion_val[list][b_xy + b_stride * 1]);
                  AV_COPY32(mv_dst - 1 + 16, h->cur_pic.motion_val[list][b_xy + b_stride * 2]);
  
      {
          int8_t *ref = &h->cur_pic.ref_index[list][4 * mb_xy];
-         int (*ref2frm)[64] = (void*)(h->ref2frm[h->slice_num & (MAX_SLICES - 1)][0] + (MB_MBAFF ? 20 : 2));
 -        int (*ref2frm)[64] = h->ref2frm[h->slice_num & (MAX_SLICES - 1)][0] + (MB_MBAFF(h) ? 20 : 2);
++        int (*ref2frm)[64] = (void*)(h->ref2frm[h->slice_num & (MAX_SLICES - 1)][0] + (MB_MBAFF(h) ? 20 : 2));
          uint32_t ref01 = (pack16to32(ref2frm[list][ref[0]], ref2frm[list][ref[1]]) & 0x00FF00FF) * 0x0101;
          uint32_t ref23 = (pack16to32(ref2frm[list][ref[2]], ref2frm[list][ref[3]]) & 0x00FF00FF) * 0x0101;
          AV_WN32A(&ref_cache[0 * 8], ref01);
Simple merge
@@@ -2020,9 -2020,6 +2020,9 @@@ decode_intra_mb
          return 0;
      }
  
-     local_ref_count[0] = h->ref_count[0] << MB_MBAFF;
-     local_ref_count[1] = h->ref_count[1] << MB_MBAFF;
++    local_ref_count[0] = h->ref_count[0] << MB_MBAFF(h);
++    local_ref_count[1] = h->ref_count[1] << MB_MBAFF(h);
 +
      fill_decode_caches(h, mb_type);
  
      if( IS_INTRA( mb_type ) ) {
@@@ -778,9 -777,6 +778,9 @@@ decode_intra_mb
          return 0;
      }
  
-     local_ref_count[0] = h->ref_count[0] << MB_MBAFF;
-     local_ref_count[1] = h->ref_count[1] << MB_MBAFF;
++    local_ref_count[0] = h->ref_count[0] << MB_MBAFF(h);
++    local_ref_count[1] = h->ref_count[1] << MB_MBAFF(h);
 +
      fill_decode_neighbors(h, mb_type);
      fill_decode_caches(h, mb_type);
  
Simple merge
Simple merge
Simple merge