[FFmpeg-cvslog] r26355 - trunk/libavcodec/ac3enc.c
jbr
subversion
Sat Jan 15 02:59:05 CET 2011
Author: jbr
Date: Sat Jan 15 02:59:04 2011
New Revision: 26355
Log:
Use a local variable in the inner loop of group_exponents() to simplify the
code.
Modified:
trunk/libavcodec/ac3enc.c
Modified: trunk/libavcodec/ac3enc.c
==============================================================================
--- trunk/libavcodec/ac3enc.c Sat Jan 15 02:58:59 2011 (r26354)
+++ trunk/libavcodec/ac3enc.c Sat Jan 15 02:59:04 2011 (r26355)
@@ -642,10 +642,11 @@ static void group_exponents(AC3EncodeCon
for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) {
AC3Block *block = &s->blocks[blk];
for (ch = 0; ch < s->channels; ch++) {
- if (s->exp_strategy[ch][blk] == EXP_REUSE)
+ int exp_strategy = s->exp_strategy[ch][blk];
+ if (exp_strategy == EXP_REUSE)
continue;
- group_size = s->exp_strategy[ch][blk] + (s->exp_strategy[ch][blk] == EXP_D45);
- nb_groups = exponent_group_tab[s->exp_strategy[ch][blk]-1][s->nb_coefs[ch]];
+ group_size = exp_strategy + (exp_strategy == EXP_D45);
+ nb_groups = exponent_group_tab[exp_strategy-1][s->nb_coefs[ch]];
bit_count += 4 + (nb_groups * 7);
p = block->exp[ch];
More information about the ffmpeg-cvslog
mailing list