summaryrefslogtreecommitdiff
path: root/libavcodec/h264_cabac.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-04-10 19:53:43 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-04-10 22:33:42 +0200
commit179106ed7890600956f95b42279c4c45cda27f7e (patch)
treeca48f1c8f97d2f66d5b84af10b8c82f1357f6bca /libavcodec/h264_cabac.c
parenta50f0bea25a3da605cd547fe3bdfd36c8764b847 (diff)
H264: factor if() out of coef decoding loop of decode_cabac_residual_internal()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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 b9c1c6286b..7873c28a26 100644
--- a/libavcodec/h264_cabac.c
+++ b/libavcodec/h264_cabac.c
@@ -1101,12 +1101,12 @@ static av_always_inline void decode_cabac_residual_internal( H264Context *h, DCT
}
}
- do {
- uint8_t *ctx = coeff_abs_level1_ctx[node_ctx] + abs_level_m1_ctx_base;
-
- int j= scantable[index[--coeff_count]];
#define STORE_BLOCK(type) \
+ do {\
+ uint8_t *ctx = coeff_abs_level1_ctx[node_ctx] + abs_level_m1_ctx_base;\
+\
+ int j= scantable[index[--coeff_count]];\
if( get_cabac( CC, ctx ) == 0 ) { \
node_ctx = coeff_abs_level_transition[0][node_ctx]; \
if( is_dc ) { \
@@ -1141,14 +1141,14 @@ static av_always_inline void decode_cabac_residual_internal( H264Context *h, DCT
}else{ \
((type*)block)[j] = ((int)(get_cabac_bypass_sign( CC, -coeff_abs ) * qmul[j] + 32)) >> 6; \
} \
- }
+ }\
+ } while( coeff_count );
if (h->pixel_shift) {
STORE_BLOCK(int32_t)
} else {
STORE_BLOCK(int16_t)
}
- } while( coeff_count );
#ifdef CABAC_ON_STACK
h->cabac.range = cc.range ;
h->cabac.low = cc.low ;