aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264_cabac.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2015-01-17 22:28:46 +0100
committerAnton Khirnov <anton@khirnov.net>2015-03-21 11:27:13 +0100
commit5c8280c3075dd54f26752c3a1185647578421703 (patch)
tree9a68c2ad77851433b8b438b2e582290a0bb5e00f /libavcodec/h264_cabac.c
parente7226984ac13aacb84eae77a372df8ff7685848f (diff)
downloadffmpeg-5c8280c3075dd54f26752c3a1185647578421703.tar.gz
h264: move last_qscale_diff into the per-slice context
Diffstat (limited to 'libavcodec/h264_cabac.c')
-rw-r--r--libavcodec/h264_cabac.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c
index df6baee9fc..24ce093499 100644
--- a/libavcodec/h264_cabac.c
+++ b/libavcodec/h264_cabac.c
@@ -1937,7 +1937,7 @@ int ff_h264_decode_mb_cabac(H264Context *h, H264SliceContext *sl)
h->cbp_table[mb_xy] = 0;
h->chroma_pred_mode_table[mb_xy] = 0;
- h->last_qscale_diff = 0;
+ sl->last_qscale_diff = 0;
return 0;
@@ -2050,7 +2050,7 @@ decode_intra_mb:
// All coeffs are present
memset(h->non_zero_count[mb_xy], 16, 48);
h->cur_pic.mb_type[mb_xy] = mb_type;
- h->last_qscale_diff = 0;
+ sl->last_qscale_diff = 0;
return 0;
}
@@ -2358,7 +2358,7 @@ decode_intra_mb:
}
// decode_cabac_mb_dqp
- if(get_cabac_noinline( &sl->cabac, &sl->cabac_state[60 + (h->last_qscale_diff != 0)])){
+ if(get_cabac_noinline( &sl->cabac, &sl->cabac_state[60 + (sl->last_qscale_diff != 0)])){
int val = 1;
int ctx= 2;
const int max_qp = 51 + 6*(h->sps.bit_depth_luma-8);
@@ -2376,7 +2376,7 @@ decode_intra_mb:
val= (val + 1)>>1 ;
else
val= -((val + 1)>>1);
- h->last_qscale_diff = val;
+ sl->last_qscale_diff = val;
sl->qscale += val;
if (((unsigned)sl->qscale) > max_qp){
if (sl->qscale < 0) sl->qscale += max_qp + 1;
@@ -2385,7 +2385,7 @@ decode_intra_mb:
sl->chroma_qp[0] = get_chroma_qp(h, 0, sl->qscale);
sl->chroma_qp[1] = get_chroma_qp(h, 1, sl->qscale);
}else
- h->last_qscale_diff=0;
+ sl->last_qscale_diff=0;
decode_cabac_luma_residual(h, sl, scan, scan8x8, pixel_shift, mb_type, cbp, 0);
if (CHROMA444(h)) {
@@ -2442,7 +2442,7 @@ decode_intra_mb:
fill_rectangle(&sl->non_zero_count_cache[scan8[ 0]], 4, 4, 8, 0, 1);
fill_rectangle(&sl->non_zero_count_cache[scan8[16]], 4, 4, 8, 0, 1);
fill_rectangle(&sl->non_zero_count_cache[scan8[32]], 4, 4, 8, 0, 1);
- h->last_qscale_diff = 0;
+ sl->last_qscale_diff = 0;
}
h->cur_pic.qscale_table[mb_xy] = sl->qscale;