Skip to content
Snippets Groups Projects
Commit 4b90c35d authored by Justin Ruggles's avatar Justin Ruggles
Browse files

Use a local variable in the inner loop of group_exponents() to simplify the

code.

Originally committed as revision 26355 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent a281c650
No related branches found
No related tags found
No related merge requests found
...@@ -642,10 +642,11 @@ static void group_exponents(AC3EncodeContext *s) ...@@ -642,10 +642,11 @@ static void group_exponents(AC3EncodeContext *s)
for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) {
AC3Block *block = &s->blocks[blk]; AC3Block *block = &s->blocks[blk];
for (ch = 0; ch < s->channels; ch++) { 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; continue;
group_size = s->exp_strategy[ch][blk] + (s->exp_strategy[ch][blk] == EXP_D45); group_size = exp_strategy + (exp_strategy == EXP_D45);
nb_groups = exponent_group_tab[s->exp_strategy[ch][blk]-1][s->nb_coefs[ch]]; nb_groups = exponent_group_tab[exp_strategy-1][s->nb_coefs[ch]];
bit_count += 4 + (nb_groups * 7); bit_count += 4 + (nb_groups * 7);
p = block->exp[ch]; p = block->exp[ch];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment