static void extract_exponents(AC3EncodeContext *s)

{

    int blk, ch, i;



    for (ch = 0; ch < s->channels; ch++) {

        for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) {

            AC3Block *block = &s->blocks[blk];

            for (i = 0; i < AC3_MAX_COEFS; i++) {

                int e;

                int v = abs(SCALE_COEF(block->mdct_coef[ch][i]));

                if (v == 0)

                    e = 24;

                else {

                    e = 23 - av_log2(v) + block->exp_shift[ch];

                    if (e >= 24) {

                        e = 24;

                        block->mdct_coef[ch][i] = 0;

                    }

                }

                block->exp[ch][i] = e;

            }

        }

    }

}

static void extract_exponents(AC3EncodeContext *s)

{

    int blk, ch, i;



    for (ch = 0; ch < s->channels; ch++) {

        for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) {

            AC3Block *block = &s->blocks[blk];

            for (i = 0; i < AC3_MAX_COEFS; i++) {

                int e;

                int v = abs(SCALE_COEF(block->mdct_coef[ch][i]));

                if (v == 0)

                    e = 24;

                else {

                    e = 23 - av_log2(v) + block->exp_shift[ch];

                    if (e >= 24) {

                        e = 24;

                        block->mdct_coef[ch][i] = 0;

                    }

                }

                block->exp[ch][i] = e;

            }

        }

    }

}

static void FUNC_0(AC3EncodeContext *VAR_0)

{

    int VAR_1, VAR_2, VAR_3;



    for (VAR_2 = 0; VAR_2 < VAR_0->channels; VAR_2++) {

        for (VAR_1 = 0; VAR_1 < AC3_MAX_BLOCKS; VAR_1++) {

            AC3Block *block = &VAR_0->blocks[VAR_1];

            for (VAR_3 = 0; VAR_3 < AC3_MAX_COEFS; VAR_3++) {

                int e;

                int v = abs(SCALE_COEF(block->mdct_coef[VAR_2][VAR_3]));

                if (v == 0)

                    e = 24;

                else {

                    e = 23 - av_log2(v) + block->exp_shift[VAR_2];

                    if (e >= 24) {

                        e = 24;

                        block->mdct_coef[VAR_2][VAR_3] = 0;

                    }

                }

                block->exp[VAR_2][VAR_3] = e;

            }

        }

    }

}

static void FUNC_0(AC3EncodeContext *VAR_0)
{ int VAR_1, VAR_2, VAR_3; for (VAR_2 = 0; VAR_2 < VAR_0->channels; VAR_2++) { for (VAR_1 = 0; VAR_1 < AC3_MAX_BLOCKS; VAR_1++) { AC3Block *block = &VAR_0->blocks[VAR_1]; for (VAR_3 = 0; VAR_3 < AC3_MAX_COEFS; VAR_3++) { int e; int v = abs(SCALE_COEF(block->mdct_coef[VAR_2][VAR_3])); if (v == 0)
e = 24; else { e = 23 - av_log2(v) + block->exp_shift[VAR_2]; if (e >= 24) { e = 24; block->mdct_coef[VAR_2][VAR_3] = 0; } } block->exp[VAR_2][VAR_3] = e; } } } }