diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-21 19:30:59 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-21 20:03:54 +0300 |
commit | d511dc653062502ac7a86d9ef47ffeabd6f77364 (patch) | |
tree | de08d37ef2724816769b0143d3e1866129b965d6 /libavcodec/h264_cabac.c | |
parent | a0b39747b7213b5b76c0ce5984c1dac63933737f (diff) | |
parent | bc98e8c0e0a8babfea35c98855e366b29cbe1191 (diff) |
Merge commit 'bc98e8c0e0a8babfea35c98855e366b29cbe1191'
* commit 'bc98e8c0e0a8babfea35c98855e366b29cbe1191':
h264: move mb_field_decoding_flag into the per-slice context
Conflicts:
libavcodec/h264_slice.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_cabac.c')
-rw-r--r-- | libavcodec/h264_cabac.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c index 85fcf7f2a8..90dd9f9641 100644 --- a/libavcodec/h264_cabac.c +++ b/libavcodec/h264_cabac.c @@ -1288,7 +1288,7 @@ static int decode_cabac_field_decoding_flag(H264Context *h, H264SliceContext *sl unsigned long ctx = 0; - ctx += h->mb_field_decoding_flag & !!sl->mb_x; //for FMO:(s->current_picture.mb_type[mba_xy] >> 7) & (h->slice_table[mba_xy] == h->slice_num); + ctx += sl->mb_field_decoding_flag & !!sl->mb_x; //for FMO:(s->current_picture.mb_type[mba_xy] >> 7) & (h->slice_table[mba_xy] == h->slice_num); ctx += (h->cur_pic.mb_type[mbb_xy] >> 7) & (h->slice_table[mbb_xy] == sl->slice_num); return get_cabac_noinline( &sl->cabac, &(sl->cabac_state+70)[ctx] ); @@ -1337,9 +1337,9 @@ static int decode_cabac_mb_skip(H264Context *h, H264SliceContext *sl, mba_xy = mb_xy - 1; if( (mb_y&1) && h->slice_table[mba_xy] == sl->slice_num - && MB_FIELD(h) == !!IS_INTERLACED( h->cur_pic.mb_type[mba_xy] ) ) + && MB_FIELD(sl) == !!IS_INTERLACED( h->cur_pic.mb_type[mba_xy] ) ) mba_xy += h->mb_stride; - if (MB_FIELD(h)) { + if (MB_FIELD(sl)) { mbb_xy = mb_xy - h->mb_stride; if( !(mb_y&1) && h->slice_table[mbb_xy] == sl->slice_num @@ -1648,9 +1648,9 @@ decode_cabac_residual_internal(H264Context *h, H264SliceContext *sl, #endif significant_coeff_ctx_base = sl->cabac_state - + significant_coeff_flag_offset[MB_FIELD(h)][cat]; + + significant_coeff_flag_offset[MB_FIELD(sl)][cat]; last_coeff_ctx_base = sl->cabac_state - + last_coeff_flag_offset[MB_FIELD(h)][cat]; + + last_coeff_flag_offset[MB_FIELD(sl)][cat]; abs_level_m1_ctx_base = sl->cabac_state + coeff_abs_level_m1_offset[cat]; @@ -1670,7 +1670,7 @@ decode_cabac_residual_internal(H264Context *h, H264SliceContext *sl, if( last == max_coeff -1 ) {\ index[coeff_count++] = last;\ } - const uint8_t *sig_off = significant_coeff_flag_offset_8x8[MB_FIELD(h)]; + const uint8_t *sig_off = significant_coeff_flag_offset_8x8[MB_FIELD(sl)]; #ifdef decode_significance coeff_count = decode_significance_8x8(CC, significant_coeff_ctx_base, index, last_coeff_ctx_base, sig_off); @@ -1933,7 +1933,7 @@ int ff_h264_decode_mb_cabac(H264Context *h, H264SliceContext *sl) h->cur_pic.mb_type[mb_xy] = MB_TYPE_SKIP; sl->next_mb_skipped = decode_cabac_mb_skip(h, sl, sl->mb_x, sl->mb_y+1 ); if(!sl->next_mb_skipped) - h->mb_mbaff = h->mb_field_decoding_flag = decode_cabac_field_decoding_flag(h, sl); + h->mb_mbaff = sl->mb_field_decoding_flag = decode_cabac_field_decoding_flag(h, sl); } decode_mb_skip(h, sl); @@ -1949,12 +1949,12 @@ int ff_h264_decode_mb_cabac(H264Context *h, H264SliceContext *sl) if (FRAME_MBAFF(h)) { if ((sl->mb_y & 1) == 0) h->mb_mbaff = - h->mb_field_decoding_flag = decode_cabac_field_decoding_flag(h, sl); + sl->mb_field_decoding_flag = decode_cabac_field_decoding_flag(h, sl); } sl->prev_mb_skipped = 0; - fill_decode_neighbors(h, sl, -(MB_FIELD(h))); + fill_decode_neighbors(h, sl, -(MB_FIELD(sl))); if (sl->slice_type_nos == AV_PICTURE_TYPE_B) { int ctx = 0; @@ -2018,7 +2018,7 @@ decode_intra_mb: sl->intra16x16_pred_mode = i_mb_type_info[mb_type].pred_mode; mb_type= i_mb_type_info[mb_type].type; } - if(MB_FIELD(h)) + if (MB_FIELD(sl)) mb_type |= MB_TYPE_INTERLACED; h->slice_table[mb_xy] = sl->slice_num; |