static void encode_scale_factors(AVCodecContext *avctx, AACEncContext *s,

                                 SingleChannelElement *sce)

{

    int off = sce->sf_idx[0], diff;

    int i, w;



    for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) {

        for (i = 0; i < sce->ics.max_sfb; i++) {

            if (!sce->zeroes[w*16 + i]) {

                diff = sce->sf_idx[w*16 + i] - off + SCALE_DIFF_ZERO;

                if (diff < 0 || diff > 120)

                    av_log(avctx, AV_LOG_ERROR, "Scalefactor difference is too big to be coded\n");

                off = sce->sf_idx[w*16 + i];

                put_bits(&s->pb, ff_aac_scalefactor_bits[diff], ff_aac_scalefactor_code[diff]);

            }

        }

    }

}

static void encode_scale_factors(AVCodecContext *avctx, AACEncContext *s,

                                 SingleChannelElement *sce)

{

    int off = sce->sf_idx[0], diff;

    int i, w;



    for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) {

        for (i = 0; i < sce->ics.max_sfb; i++) {

            if (!sce->zeroes[w*16 + i]) {

                diff = sce->sf_idx[w*16 + i] - off + SCALE_DIFF_ZERO;

                if (diff < 0 || diff > 120)

                    av_log(avctx, AV_LOG_ERROR, "Scalefactor difference is too big to be coded\n");

                off = sce->sf_idx[w*16 + i];

                put_bits(&s->pb, ff_aac_scalefactor_bits[diff], ff_aac_scalefactor_code[diff]);

            }

        }

    }

}

                if (diff < 0 || diff > 120)                     av_log(avctx, AV_LOG_ERROR, "Scalefactor difference is too big to be coded\n");
static void FUNC_0(AVCodecContext *VAR_0, AACEncContext *VAR_1,

                                 SingleChannelElement *VAR_2)

{

    int VAR_3 = VAR_2->sf_idx[0], VAR_4;

    int VAR_5, VAR_6;



    for (VAR_6 = 0; VAR_6 < VAR_2->ics.num_windows; VAR_6 += VAR_2->ics.group_len[VAR_6]) {

        for (VAR_5 = 0; VAR_5 < VAR_2->ics.max_sfb; VAR_5++) {

            if (!VAR_2->zeroes[VAR_6*16 + VAR_5]) {

                VAR_4 = VAR_2->sf_idx[VAR_6*16 + VAR_5] - VAR_3 + SCALE_DIFF_ZERO;

                if (VAR_4 < 0 || VAR_4 > 120)

                    av_log(VAR_0, AV_LOG_ERROR, "Scalefactor difference is too big to be coded\n");

                VAR_3 = VAR_2->sf_idx[VAR_6*16 + VAR_5];

                put_bits(&VAR_1->pb, ff_aac_scalefactor_bits[VAR_4], ff_aac_scalefactor_code[VAR_4]);

            }

        }

    }

}

static void FUNC_0(AVCodecContext *VAR_0, AACEncContext *VAR_1,
SingleChannelElement *VAR_2)
{ int VAR_3 = VAR_2->sf_idx[0], VAR_4; int VAR_5, VAR_6; for (VAR_6 = 0; VAR_6 < VAR_2->ics.num_windows; VAR_6 += VAR_2->ics.group_len[VAR_6]) { for (VAR_5 = 0; VAR_5 < VAR_2->ics.max_sfb; VAR_5++) { if (!VAR_2->zeroes[VAR_6*16 + VAR_5]) { VAR_4 = VAR_2->sf_idx[VAR_6*16 + VAR_5] - VAR_3 + SCALE_DIFF_ZERO; if (VAR_4 < 0 || VAR_4 > 120)
av_log(VAR_0, AV_LOG_ERROR, "Scalefactor difference is too big to be coded\n"); VAR_3 = VAR_2->sf_idx[VAR_6*16 + VAR_5]; put_bits(&VAR_1->pb, ff_aac_scalefactor_bits[VAR_4], ff_aac_scalefactor_code[VAR_4]); } } } }