diff options
author | Anton Khirnov <anton@khirnov.net> | 2015-01-17 22:28:46 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2015-03-21 11:27:14 +0100 |
commit | 0edbe6faa7ef80daf0e84353cbe733389bf1a522 (patch) | |
tree | 95ebe3620f648479a9baf11d15b43a34c6800f23 /libavcodec/h264_cabac.c | |
parent | 07c5ca551b7327d3c4e33738cc0cd2d5ac2779fa (diff) |
h264: move mb_xy into the per-slice context
Diffstat (limited to 'libavcodec/h264_cabac.c')
-rw-r--r-- | libavcodec/h264_cabac.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c index c029fd5df8..fb75ff0df5 100644 --- a/libavcodec/h264_cabac.c +++ b/libavcodec/h264_cabac.c @@ -1284,7 +1284,7 @@ void ff_h264_init_cabac_states(H264Context *h, H264SliceContext *sl) static int decode_cabac_field_decoding_flag(H264Context *h, H264SliceContext *sl) { - const long mbb_xy = h->mb_xy - 2L*h->mb_stride; + const long mbb_xy = sl->mb_xy - 2L*h->mb_stride; unsigned long ctx = 0; @@ -1348,7 +1348,7 @@ static int decode_cabac_mb_skip(H264Context *h, H264SliceContext *sl, }else mbb_xy = mb_x + (mb_y-1)*h->mb_stride; }else{ - int mb_xy = h->mb_xy; + int mb_xy = sl->mb_xy; mba_xy = mb_xy - 1; mbb_xy = mb_xy - (h->mb_stride << FIELD_PICTURE(h)); } @@ -1693,9 +1693,9 @@ decode_cabac_residual_internal(H264Context *h, H264SliceContext *sl, if( is_dc ) { if( cat == 3 ) - h->cbp_table[h->mb_xy] |= 0x40 << (n - CHROMA_DC_BLOCK_INDEX); + h->cbp_table[sl->mb_xy] |= 0x40 << (n - CHROMA_DC_BLOCK_INDEX); else - h->cbp_table[h->mb_xy] |= 0x100 << (n - LUMA_DC_BLOCK_INDEX); + h->cbp_table[sl->mb_xy] |= 0x100 << (n - LUMA_DC_BLOCK_INDEX); sl->non_zero_count_cache[scan8[n]] = coeff_count; } else { if( max_coeff == 64 ) @@ -1914,7 +1914,7 @@ int ff_h264_decode_mb_cabac(H264Context *h, H264SliceContext *sl) int decode_chroma = h->sps.chroma_format_idc == 1 || h->sps.chroma_format_idc == 2; const int pixel_shift = h->pixel_shift; - mb_xy = h->mb_xy = h->mb_x + h->mb_y*h->mb_stride; + mb_xy = sl->mb_xy = h->mb_x + h->mb_y*h->mb_stride; tprintf(h->avctx, "pic:%d mb:%d/%d\n", h->frame_num, h->mb_x, h->mb_y); if (sl->slice_type_nos != AV_PICTURE_TYPE_I) { |