summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorJason Garrett-Glaser <darkshikari@gmail.com>2008-07-28 15:42:49 +0000
committerJason Garrett-Glaser <darkshikari@gmail.com>2008-07-28 15:42:49 +0000
commitaa6a89aa792ec62dfa08d44e29406ad96aa8103e (patch)
tree1e7242d7d8ec25b4ed8a352e4b418890539a12e5 /libavcodec
parent2754fe8ba5519026d51af0edd2f0d05c6edfd84c (diff)
Small h264 decoding speed optimization: while->do/while
Originally committed as revision 14459 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 2c24787e48..62bc05e281 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -5356,10 +5356,10 @@ static av_always_inline void decode_cabac_residual_internal( H264Context *h, DCT
}
}
- while( coeff_count-- ) {
+ do {
uint8_t *ctx = coeff_abs_level1_ctx[node_ctx] + abs_level_m1_ctx_base;
- int j= scantable[index[coeff_count]];
+ int j= scantable[index[--coeff_count]];
if( get_cabac( CC, ctx ) == 0 ) {
node_ctx = coeff_abs_level_transition[0][node_ctx];
@@ -5396,7 +5396,7 @@ static av_always_inline void decode_cabac_residual_internal( H264Context *h, DCT
block[j] = (get_cabac_bypass_sign( CC, -coeff_abs ) * qmul[j] + 32) >> 6;
}
}
- }
+ } while( coeff_count );
#ifdef CABAC_ON_STACK
h->cabac.range = cc.range ;
h->cabac.low = cc.low ;