diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-03-09 20:37:11 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-03-21 10:20:35 +0100 |
commit | da6be8fcec16a94d8084bda8bb8a0a411a96bcf7 (patch) | |
tree | 2033e189dae6e172d9609b4cfb6723813c1b3c53 /libavcodec/h264_cabac.c | |
parent | 82313eaa34b02cf1a4b6f55c1b73549ec8d056f0 (diff) | |
download | ffmpeg-da6be8fcec16a94d8084bda8bb8a0a411a96bcf7.tar.gz |
h264: add a parameter to the MB_FIELD macro.
This way it does not look like a constant.
Diffstat (limited to 'libavcodec/h264_cabac.c')
-rw-r--r-- | libavcodec/h264_cabac.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c index 5d793ad2b2..2d3717bec2 100644 --- a/libavcodec/h264_cabac.c +++ b/libavcodec/h264_cabac.c @@ -1328,9 +1328,9 @@ static int decode_cabac_mb_skip( H264Context *h, int mb_x, int mb_y ) { mba_xy = mb_xy - 1; if( (mb_y&1) && h->slice_table[mba_xy] == h->slice_num - && MB_FIELD == !!IS_INTERLACED( h->cur_pic.mb_type[mba_xy] ) ) + && MB_FIELD(h) == !!IS_INTERLACED( h->cur_pic.mb_type[mba_xy] ) ) mba_xy += h->mb_stride; - if( MB_FIELD ){ + if (MB_FIELD(h)) { mbb_xy = mb_xy - h->mb_stride; if( !(mb_y&1) && h->slice_table[mbb_xy] == h->slice_num @@ -1625,9 +1625,9 @@ decode_cabac_residual_internal(H264Context *h, int16_t *block, #endif significant_coeff_ctx_base = h->cabac_state - + significant_coeff_flag_offset[MB_FIELD][cat]; + + significant_coeff_flag_offset[MB_FIELD(h)][cat]; last_coeff_ctx_base = h->cabac_state - + last_coeff_flag_offset[MB_FIELD][cat]; + + last_coeff_flag_offset[MB_FIELD(h)][cat]; abs_level_m1_ctx_base = h->cabac_state + coeff_abs_level_m1_offset[cat]; @@ -1647,7 +1647,7 @@ decode_cabac_residual_internal(H264Context *h, int16_t *block, if( last == max_coeff -1 ) {\ index[coeff_count++] = last;\ } - const uint8_t *sig_off = significant_coeff_flag_offset_8x8[MB_FIELD]; + const uint8_t *sig_off = significant_coeff_flag_offset_8x8[MB_FIELD(h)]; #ifdef decode_significance coeff_count = decode_significance_8x8(CC, significant_coeff_ctx_base, index, last_coeff_ctx_base, sig_off); @@ -1917,7 +1917,7 @@ int ff_h264_decode_mb_cabac(H264Context *h) { h->prev_mb_skipped = 0; - fill_decode_neighbors(h, -(MB_FIELD)); + fill_decode_neighbors(h, -(MB_FIELD(h))); if( h->slice_type_nos == AV_PICTURE_TYPE_B ) { int ctx = 0; @@ -1981,7 +1981,7 @@ decode_intra_mb: h->intra16x16_pred_mode= i_mb_type_info[mb_type].pred_mode; mb_type= i_mb_type_info[mb_type].type; } - if(MB_FIELD) + if(MB_FIELD(h)) mb_type |= MB_TYPE_INTERLACED; h->slice_table[ mb_xy ]= h->slice_num; |