Revision 4b90c35d libavcodec/ac3enc.c

View differences:

libavcodec/ac3enc.c
642 642
    for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) {
643 643
        AC3Block *block = &s->blocks[blk];
644 644
        for (ch = 0; ch < s->channels; ch++) {
645
            if (s->exp_strategy[ch][blk] == EXP_REUSE)
645
            int exp_strategy = s->exp_strategy[ch][blk];
646
            if (exp_strategy == EXP_REUSE)
646 647
                continue;
647
            group_size = s->exp_strategy[ch][blk] + (s->exp_strategy[ch][blk] == EXP_D45);
648
            nb_groups = exponent_group_tab[s->exp_strategy[ch][blk]-1][s->nb_coefs[ch]];
648
            group_size = exp_strategy + (exp_strategy == EXP_D45);
649
            nb_groups = exponent_group_tab[exp_strategy-1][s->nb_coefs[ch]];
649 650
            bit_count += 4 + (nb_groups * 7);
650 651
            p = block->exp[ch];
651 652

  

Also available in: Unified diff