static void spectral_to_sample(AACContext *ac)

{

    int i, type;

    void (*imdct_and_window)(AACContext *ac, SingleChannelElement *sce);

    switch (ac->oc[1].m4ac.object_type) {

    case AOT_ER_AAC_LD:

        imdct_and_window = imdct_and_windowing_ld;

        break;

    case AOT_ER_AAC_ELD:

        imdct_and_window = imdct_and_windowing_eld;

        break;

    default:

        imdct_and_window = ac->imdct_and_windowing;

    }

    for (type = 3; type >= 0; type--) {

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

            ChannelElement *che = ac->che[type][i];

            if (che && che->present) {

                if (type <= TYPE_CPE)

                    apply_channel_coupling(ac, che, type, i, BEFORE_TNS, AAC_RENAME(apply_dependent_coupling));

                if (ac->oc[1].m4ac.object_type == AOT_AAC_LTP) {

                    if (che->ch[0].ics.predictor_present) {

                        if (che->ch[0].ics.ltp.present)

                            ac->apply_ltp(ac, &che->ch[0]);

                        if (che->ch[1].ics.ltp.present && type == TYPE_CPE)

                            ac->apply_ltp(ac, &che->ch[1]);

                    }

                }

                if (che->ch[0].tns.present)

                    ac->apply_tns(che->ch[0].coeffs, &che->ch[0].tns, &che->ch[0].ics, 1);

                if (che->ch[1].tns.present)

                    ac->apply_tns(che->ch[1].coeffs, &che->ch[1].tns, &che->ch[1].ics, 1);

                if (type <= TYPE_CPE)

                    apply_channel_coupling(ac, che, type, i, BETWEEN_TNS_AND_IMDCT, AAC_RENAME(apply_dependent_coupling));

                if (type != TYPE_CCE || che->coup.coupling_point == AFTER_IMDCT) {

                    imdct_and_window(ac, &che->ch[0]);

                    if (ac->oc[1].m4ac.object_type == AOT_AAC_LTP)

                        ac->update_ltp(ac, &che->ch[0]);

                    if (type == TYPE_CPE) {

                        imdct_and_window(ac, &che->ch[1]);

                        if (ac->oc[1].m4ac.object_type == AOT_AAC_LTP)

                            ac->update_ltp(ac, &che->ch[1]);

                    }

                    if (ac->oc[1].m4ac.sbr > 0) {

                        AAC_RENAME(ff_sbr_apply)(ac, &che->sbr, type, che->ch[0].ret, che->ch[1].ret);

                    }

                }

                if (type <= TYPE_CCE)

                    apply_channel_coupling(ac, che, type, i, AFTER_IMDCT, AAC_RENAME(apply_independent_coupling));



#if USE_FIXED

                {

                    int j;

                    /* preparation for resampler */

                    for(j = 0; j<2048; j++){

                        che->ch[0].ret[j] = (int32_t)av_clipl_int32((int64_t)che->ch[0].ret[j]<<7)+0x8000;

                        che->ch[1].ret[j] = (int32_t)av_clipl_int32((int64_t)che->ch[1].ret[j]<<7)+0x8000;

                    }

                }

#endif /* USE_FIXED */

                che->present = 0;

            } else if (che) {

                av_log(ac->avctx, AV_LOG_VERBOSE, "ChannelElement %d.%d missing \n", type, i);

            }

        }

    }

}

static void spectral_to_sample(AACContext *ac)

{

    int i, type;

    void (*imdct_and_window)(AACContext *ac, SingleChannelElement *sce);

    switch (ac->oc[1].m4ac.object_type) {

    case AOT_ER_AAC_LD:

        imdct_and_window = imdct_and_windowing_ld;

        break;

    case AOT_ER_AAC_ELD:

        imdct_and_window = imdct_and_windowing_eld;

        break;

    default:

        imdct_and_window = ac->imdct_and_windowing;

    }

    for (type = 3; type >= 0; type--) {

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

            ChannelElement *che = ac->che[type][i];

            if (che && che->present) {

                if (type <= TYPE_CPE)

                    apply_channel_coupling(ac, che, type, i, BEFORE_TNS, AAC_RENAME(apply_dependent_coupling));

                if (ac->oc[1].m4ac.object_type == AOT_AAC_LTP) {

                    if (che->ch[0].ics.predictor_present) {

                        if (che->ch[0].ics.ltp.present)

                            ac->apply_ltp(ac, &che->ch[0]);

                        if (che->ch[1].ics.ltp.present && type == TYPE_CPE)

                            ac->apply_ltp(ac, &che->ch[1]);

                    }

                }

                if (che->ch[0].tns.present)

                    ac->apply_tns(che->ch[0].coeffs, &che->ch[0].tns, &che->ch[0].ics, 1);

                if (che->ch[1].tns.present)

                    ac->apply_tns(che->ch[1].coeffs, &che->ch[1].tns, &che->ch[1].ics, 1);

                if (type <= TYPE_CPE)

                    apply_channel_coupling(ac, che, type, i, BETWEEN_TNS_AND_IMDCT, AAC_RENAME(apply_dependent_coupling));

                if (type != TYPE_CCE || che->coup.coupling_point == AFTER_IMDCT) {

                    imdct_and_window(ac, &che->ch[0]);

                    if (ac->oc[1].m4ac.object_type == AOT_AAC_LTP)

                        ac->update_ltp(ac, &che->ch[0]);

                    if (type == TYPE_CPE) {

                        imdct_and_window(ac, &che->ch[1]);

                        if (ac->oc[1].m4ac.object_type == AOT_AAC_LTP)

                            ac->update_ltp(ac, &che->ch[1]);

                    }

                    if (ac->oc[1].m4ac.sbr > 0) {

                        AAC_RENAME(ff_sbr_apply)(ac, &che->sbr, type, che->ch[0].ret, che->ch[1].ret);

                    }

                }

                if (type <= TYPE_CCE)

                    apply_channel_coupling(ac, che, type, i, AFTER_IMDCT, AAC_RENAME(apply_independent_coupling));



#if USE_FIXED

                {

                    int j;

                    

                    for(j = 0; j<2048; j++){

                        che->ch[0].ret[j] = (int32_t)av_clipl_int32((int64_t)che->ch[0].ret[j]<<7)+0x8000;

                        che->ch[1].ret[j] = (int32_t)av_clipl_int32((int64_t)che->ch[1].ret[j]<<7)+0x8000;

                    }

                }

#endif 

                che->present = 0;

            } else if (che) {

                av_log(ac->avctx, AV_LOG_VERBOSE, "ChannelElement %d.%d missing \n", type, i);

            }

        }

    }

}

static void spectral_to_sample(AACContext *ac)                     for(j = 0; j<2048; j++){
static void FUNC_0(AACContext *VAR_4)

{

    int VAR_1, VAR_2;

    void (*VAR_3)(AACContext *VAR_4, SingleChannelElement *VAR_4);

    switch (VAR_4->oc[1].m4ac.object_type) {

    case AOT_ER_AAC_LD:

        VAR_3 = imdct_and_windowing_ld;

        break;

    case AOT_ER_AAC_ELD:

        VAR_3 = imdct_and_windowing_eld;

        break;

    default:

        VAR_3 = VAR_4->imdct_and_windowing;

    }

    for (VAR_2 = 3; VAR_2 >= 0; VAR_2--) {

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

            ChannelElement *che = VAR_4->che[VAR_2][VAR_1];

            if (che && che->present) {

                if (VAR_2 <= TYPE_CPE)

                    apply_channel_coupling(VAR_4, che, VAR_2, VAR_1, BEFORE_TNS, AAC_RENAME(apply_dependent_coupling));

                if (VAR_4->oc[1].m4ac.object_type == AOT_AAC_LTP) {

                    if (che->ch[0].ics.predictor_present) {

                        if (che->ch[0].ics.ltp.present)

                            VAR_4->apply_ltp(VAR_4, &che->ch[0]);

                        if (che->ch[1].ics.ltp.present && VAR_2 == TYPE_CPE)

                            VAR_4->apply_ltp(VAR_4, &che->ch[1]);

                    }

                }

                if (che->ch[0].tns.present)

                    VAR_4->apply_tns(che->ch[0].coeffs, &che->ch[0].tns, &che->ch[0].ics, 1);

                if (che->ch[1].tns.present)

                    VAR_4->apply_tns(che->ch[1].coeffs, &che->ch[1].tns, &che->ch[1].ics, 1);

                if (VAR_2 <= TYPE_CPE)

                    apply_channel_coupling(VAR_4, che, VAR_2, VAR_1, BETWEEN_TNS_AND_IMDCT, AAC_RENAME(apply_dependent_coupling));

                if (VAR_2 != TYPE_CCE || che->coup.coupling_point == AFTER_IMDCT) {

                    VAR_3(VAR_4, &che->ch[0]);

                    if (VAR_4->oc[1].m4ac.object_type == AOT_AAC_LTP)

                        VAR_4->update_ltp(VAR_4, &che->ch[0]);

                    if (VAR_2 == TYPE_CPE) {

                        VAR_3(VAR_4, &che->ch[1]);

                        if (VAR_4->oc[1].m4ac.object_type == AOT_AAC_LTP)

                            VAR_4->update_ltp(VAR_4, &che->ch[1]);

                    }

                    if (VAR_4->oc[1].m4ac.sbr > 0) {

                        AAC_RENAME(ff_sbr_apply)(VAR_4, &che->sbr, VAR_2, che->ch[0].ret, che->ch[1].ret);

                    }

                }

                if (VAR_2 <= TYPE_CCE)

                    apply_channel_coupling(VAR_4, che, VAR_2, VAR_1, AFTER_IMDCT, AAC_RENAME(apply_independent_coupling));



#if USE_FIXED

                {

                    int j;

                    

                    for(j = 0; j<2048; j++){

                        che->ch[0].ret[j] = (int32_t)av_clipl_int32((int64_t)che->ch[0].ret[j]<<7)+0x8000;

                        che->ch[1].ret[j] = (int32_t)av_clipl_int32((int64_t)che->ch[1].ret[j]<<7)+0x8000;

                    }

                }

#endif 

                che->present = 0;

            } else if (che) {

                av_log(VAR_4->avctx, AV_LOG_VERBOSE, "ChannelElement %d.%d missing \n", VAR_2, VAR_1);

            }

        }

    }

}

static void FUNC_0(AACContext *VAR_4)
{ int VAR_1, VAR_2; void (*VAR_3)(AACContext *VAR_4, SingleChannelElement *VAR_4); switch (VAR_4->oc[1].m4ac.object_type) { case AOT_ER_AAC_LD:
VAR_3 = imdct_and_windowing_ld; break; case AOT_ER_AAC_ELD:
VAR_3 = imdct_and_windowing_eld; break; default:
VAR_3 = VAR_4->imdct_and_windowing; } for (VAR_2 = 3; VAR_2 >= 0; VAR_2--) { for (VAR_1 = 0; VAR_1 < MAX_ELEM_ID; VAR_1++) { ChannelElement *che = VAR_4->che[VAR_2][VAR_1]; if (che && che->present) { if (VAR_2 <= TYPE_CPE)
apply_channel_coupling(VAR_4, che, VAR_2, VAR_1, BEFORE_TNS, AAC_RENAME(apply_dependent_coupling)); if (VAR_4->oc[1].m4ac.object_type == AOT_AAC_LTP) { if (che->ch[0].ics.predictor_present) { if (che->ch[0].ics.ltp.present)
VAR_4->apply_ltp(VAR_4, &che->ch[0]); if (che->ch[1].ics.ltp.present && VAR_2 == TYPE_CPE)
VAR_4->apply_ltp(VAR_4, &che->ch[1]); } } if (che->ch[0].tns.present)
VAR_4->apply_tns(che->ch[0].coeffs, &che->ch[0].tns, &che->ch[0].ics, 1); if (che->ch[1].tns.present)
VAR_4->apply_tns(che->ch[1].coeffs, &che->ch[1].tns, &che->ch[1].ics, 1); if (VAR_2 <= TYPE_CPE)
apply_channel_coupling(VAR_4, che, VAR_2, VAR_1, BETWEEN_TNS_AND_IMDCT, AAC_RENAME(apply_dependent_coupling)); if (VAR_2 != TYPE_CCE || che->coup.coupling_point == AFTER_IMDCT) { VAR_3(VAR_4, &che->ch[0]); if (VAR_4->oc[1].m4ac.object_type == AOT_AAC_LTP)
VAR_4->update_ltp(VAR_4, &che->ch[0]); if (VAR_2 == TYPE_CPE) { VAR_3(VAR_4, &che->ch[1]); if (VAR_4->oc[1].m4ac.object_type == AOT_AAC_LTP)
VAR_4->update_ltp(VAR_4, &che->ch[1]); } if (VAR_4->oc[1].m4ac.sbr > 0) { AAC_RENAME(ff_sbr_apply)(VAR_4, &che->sbr, VAR_2, che->ch[0].ret, che->ch[1].ret); } } if (VAR_2 <= TYPE_CCE)
apply_channel_coupling(VAR_4, che, VAR_2, VAR_1, AFTER_IMDCT, AAC_RENAME(apply_independent_coupling)); #if USE_FIXED
{ int j; for(j = 0; j<2048; j++){ che->ch[0].ret[j] = (int32_t)av_clipl_int32((int64_t)che->ch[0].ret[j]<<7)+0x8000; che->ch[1].ret[j] = (int32_t)av_clipl_int32((int64_t)che->ch[1].ret[j]<<7)+0x8000; } } #endif
che->present = 0; } else if (che) { av_log(VAR_4->avctx, AV_LOG_VERBOSE, "ChannelElement %d.%d missing \n", VAR_2, VAR_1); } } } }