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];

            uint8_t *exp   = block->exp[ch];

            int32_t *coef = block->fixed_coef[ch];

            int exp_shift  = block->exp_shift[ch];

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

                int e;

                int v = abs(coef[i]);

                if (v == 0)

                    e = 24;

                else {

                    e = 23 - av_log2(v) + exp_shift;

                    if (e >= 24) {

                        e = 24;

                        coef[i] = 0;

                    }

                    av_assert2(e >= 0);

                }

                exp[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];

            uint8_t *exp   = block->exp[ch];

            int32_t *coef = block->fixed_coef[ch];

            int exp_shift  = block->exp_shift[ch];

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

                int e;

                int v = abs(coef[i]);

                if (v == 0)

                    e = 24;

                else {

                    e = 23 - av_log2(v) + exp_shift;

                    if (e >= 24) {

                        e = 24;

                        coef[i] = 0;

                    }

                    av_assert2(e >= 0);

                }

                exp[i] = e;

            }

        }

    }

}

            int exp_shift  = block->exp_shift[ch];                     e = 23 - av_log2(v) + exp_shift;
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];

            uint8_t *exp   = block->exp[VAR_2];

            int32_t *coef = block->fixed_coef[VAR_2];

            int exp_shift  = block->exp_shift[VAR_2];

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

                int e;

                int v = abs(coef[VAR_3]);

                if (v == 0)

                    e = 24;

                else {

                    e = 23 - av_log2(v) + exp_shift;

                    if (e >= 24) {

                        e = 24;

                        coef[VAR_3] = 0;

                    }

                    av_assert2(e >= 0);

                }

                exp[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]; uint8_t *exp   = block->exp[VAR_2]; int32_t *coef = block->fixed_coef[VAR_2]; int exp_shift  = block->exp_shift[VAR_2]; for (VAR_3 = 0; VAR_3 < AC3_MAX_COEFS; VAR_3++) { int e; int v = abs(coef[VAR_3]); if (v == 0)
e = 24; else { e = 23 - av_log2(v) + exp_shift; if (e >= 24) { e = 24; coef[VAR_3] = 0; } av_assert2(e >= 0); } exp[VAR_3] = e; } } } }