diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-21 15:46:28 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-21 15:48:13 +0100 |
commit | 4c5c913dd8d946022ba160ec480694222aab061d (patch) | |
tree | 9a334723d85f05425e9d43bad3f18d1435d96f36 /libavcodec/h264_cabac.c | |
parent | f5d4d618242f412626f65e5f9b5a069448bf219b (diff) | |
parent | e7226984ac13aacb84eae77a372df8ff7685848f (diff) | |
download | ffmpeg-4c5c913dd8d946022ba160ec480694222aab061d.tar.gz |
Merge commit 'e7226984ac13aacb84eae77a372df8ff7685848f'
* commit 'e7226984ac13aacb84eae77a372df8ff7685848f':
h264: move [{top,left}_]cbp into the per-slice context
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_cabac.c')
-rw-r--r-- | libavcodec/h264_cabac.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c index fea08af49e..c6b0cb09ca 100644 --- a/libavcodec/h264_cabac.c +++ b/libavcodec/h264_cabac.c @@ -1406,8 +1406,8 @@ static int decode_cabac_mb_cbp_luma(H264Context *h, H264SliceContext *sl) { int cbp_b, cbp_a, ctx, cbp = 0; - cbp_a = h->left_cbp; - cbp_b = h->top_cbp; + cbp_a = sl->left_cbp; + cbp_b = sl->top_cbp; ctx = !(cbp_a & 0x02) + 2 * !(cbp_b & 0x04); cbp += get_cabac_noinline(&sl->cabac, &sl->cabac_state[73 + ctx]); @@ -1424,8 +1424,8 @@ static int decode_cabac_mb_cbp_chroma(H264Context *h, H264SliceContext *sl) int ctx; int cbp_a, cbp_b; - cbp_a = (h->left_cbp>>4)&0x03; - cbp_b = (h-> top_cbp>>4)&0x03; + cbp_a = (sl->left_cbp>>4)&0x03; + cbp_b = (sl-> top_cbp>>4)&0x03; ctx = 0; if( cbp_a > 0 ) ctx++; @@ -1555,12 +1555,12 @@ static av_always_inline int get_cabac_cbf_ctx(H264Context *h, H264SliceContext * if( is_dc ) { if( cat == 3 ) { idx -= CHROMA_DC_BLOCK_INDEX; - nza = (h->left_cbp>>(6+idx))&0x01; - nzb = (h-> top_cbp>>(6+idx))&0x01; + nza = (sl->left_cbp>>(6+idx))&0x01; + nzb = (sl-> top_cbp>>(6+idx))&0x01; } else { idx -= LUMA_DC_BLOCK_INDEX; - nza = h->left_cbp&(0x100<<idx); - nzb = h-> top_cbp&(0x100<<idx); + nza = sl->left_cbp&(0x100<<idx); + nzb = sl-> top_cbp&(0x100<<idx); } } else { nza = sl->non_zero_count_cache[scan8[idx] - 1]; @@ -2325,7 +2325,7 @@ decode_intra_mb: } } - h->cbp_table[mb_xy] = h->cbp = cbp; + h->cbp_table[mb_xy] = sl->cbp = cbp; if( dct8x8_allowed && (cbp&15) && !IS_INTRA( mb_type ) ) { mb_type |= MB_TYPE_8x8DCT * get_cabac_noinline(&sl->cabac, &sl->cabac_state[399 + sl->neighbor_transform_size]); |