static void apply_dependent_coupling(AACContext * ac, SingleChannelElement * target, ChannelElement * cce, int index) {

    IndividualChannelStream * ics = &cce->ch[0].ics;

    const uint16_t * offsets = ics->swb_offset;

    float * dest = target->coeffs;

    const float * src = cce->ch[0].coeffs;

    int g, i, group, k, idx = 0;

    if(ac->m4ac.object_type == AOT_AAC_LTP) {

        av_log(ac->avccontext, AV_LOG_ERROR,

               "Dependent coupling is not supported together with LTP\n");

        return;

    }

    for (g = 0; g < ics->num_window_groups; g++) {

        for (i = 0; i < ics->max_sfb; i++, idx++) {

            if (cce->ch[0].band_type[idx] != ZERO_BT) {

                for (group = 0; group < ics->group_len[g]; group++) {

                    for (k = offsets[i]; k < offsets[i+1]; k++) {

                        // XXX dsputil-ize

                        dest[group*128+k] += cce->coup.gain[index][idx] * src[group*128+k];

                    }

                }

            }

        }

        dest += ics->group_len[g]*128;

        src  += ics->group_len[g]*128;

    }

}

static void apply_dependent_coupling(AACContext * ac, SingleChannelElement * target, ChannelElement * cce, int index) {

    IndividualChannelStream * ics = &cce->ch[0].ics;

    const uint16_t * offsets = ics->swb_offset;

    float * dest = target->coeffs;

    const float * src = cce->ch[0].coeffs;

    int g, i, group, k, idx = 0;

    if(ac->m4ac.object_type == AOT_AAC_LTP) {

        av_log(ac->avccontext, AV_LOG_ERROR,

               "Dependent coupling is not supported together with LTP\n");

        return;

    }

    for (g = 0; g < ics->num_window_groups; g++) {

        for (i = 0; i < ics->max_sfb; i++, idx++) {

            if (cce->ch[0].band_type[idx] != ZERO_BT) {

                for (group = 0; group < ics->group_len[g]; group++) {

                    for (k = offsets[i]; k < offsets[i+1]; k++) {

                        

                        dest[group*128+k] += cce->coup.gain[index][idx] * src[group*128+k];

                    }

                }

            }

        }

        dest += ics->group_len[g]*128;

        src  += ics->group_len[g]*128;

    }

}

static void FUNC_0(AACContext * VAR_0, SingleChannelElement * VAR_1, ChannelElement * VAR_2, int VAR_3) {

    IndividualChannelStream * ics = &VAR_2->ch[0].ics;

    const uint16_t * VAR_4 = ics->swb_offset;

    float * VAR_5 = VAR_1->coeffs;

    const float * VAR_6 = VAR_2->ch[0].coeffs;

    int VAR_7, VAR_8, VAR_9, VAR_10, VAR_11 = 0;

    if(VAR_0->m4ac.object_type == AOT_AAC_LTP) {

        av_log(VAR_0->avccontext, AV_LOG_ERROR,

               "Dependent coupling is not supported together with LTP\n");

        return;

    }

    for (VAR_7 = 0; VAR_7 < ics->num_window_groups; VAR_7++) {

        for (VAR_8 = 0; VAR_8 < ics->max_sfb; VAR_8++, VAR_11++) {

            if (VAR_2->ch[0].band_type[VAR_11] != ZERO_BT) {

                for (VAR_9 = 0; VAR_9 < ics->group_len[VAR_7]; VAR_9++) {

                    for (VAR_10 = VAR_4[VAR_8]; VAR_10 < VAR_4[VAR_8+1]; VAR_10++) {

                        

                        VAR_5[VAR_9*128+VAR_10] += VAR_2->coup.gain[VAR_3][VAR_11] * VAR_6[VAR_9*128+VAR_10];

                    }

                }

            }

        }

        VAR_5 += ics->group_len[VAR_7]*128;

        VAR_6  += ics->group_len[VAR_7]*128;

    }

}

static void FUNC_0(AACContext * VAR_0, SingleChannelElement * VAR_1, ChannelElement * VAR_2, int VAR_3) { IndividualChannelStream * ics = &VAR_2->ch[0].ics; const uint16_t * VAR_4 = ics->swb_offset; float * VAR_5 = VAR_1->coeffs; const float * VAR_6 = VAR_2->ch[0].coeffs; int VAR_7, VAR_8, VAR_9, VAR_10, VAR_11 = 0; if(VAR_0->m4ac.object_type == AOT_AAC_LTP) { av_log(VAR_0->avccontext, AV_LOG_ERROR,
"Dependent coupling is not supported together with LTP\n"); return; } for (VAR_7 = 0; VAR_7 < ics->num_window_groups; VAR_7++) { for (VAR_8 = 0; VAR_8 < ics->max_sfb; VAR_8++, VAR_11++) { if (VAR_2->ch[0].band_type[VAR_11] != ZERO_BT) { for (VAR_9 = 0; VAR_9 < ics->group_len[VAR_7]; VAR_9++) { for (VAR_10 = VAR_4[VAR_8]; VAR_10 < VAR_4[VAR_8+1]; VAR_10++) { VAR_5[VAR_9*128+VAR_10] += VAR_2->coup.gain[VAR_3][VAR_11] * VAR_6[VAR_9*128+VAR_10]; } } } } VAR_5 += ics->group_len[VAR_7]*128; VAR_6  += ics->group_len[VAR_7]*128; } }