static void dca_downmix(float **samples, int srcfmt, int lfe_present,

                        float coef[DCA_PRIM_CHANNELS_MAX + 1][2],

                        const int8_t *channel_mapping)

{

    int c, l, r, sl, sr, s;

    int i;

    float t, u, v;



    switch (srcfmt) {

    case DCA_MONO:

    case DCA_CHANNEL:

    case DCA_STEREO_TOTAL:

    case DCA_STEREO_SUMDIFF:

    case DCA_4F2R:

        av_log(NULL, 0, "Not implemented!\n");

        break;

    case DCA_STEREO:

        break;

    case DCA_3F:

        c = channel_mapping[0];

        l = channel_mapping[1];

        r = channel_mapping[2];

        DOWNMIX_TO_STEREO(MIX_FRONT3(samples, coef), );

        break;

    case DCA_2F1R:

        s = channel_mapping[2];

        DOWNMIX_TO_STEREO(MIX_REAR1(samples, s, 2, coef), );

        break;

    case DCA_3F1R:

        c = channel_mapping[0];

        l = channel_mapping[1];

        r = channel_mapping[2];

        s = channel_mapping[3];

        DOWNMIX_TO_STEREO(MIX_FRONT3(samples, coef),

                          MIX_REAR1(samples, s, 3, coef));

        break;

    case DCA_2F2R:

        sl = channel_mapping[2];

        sr = channel_mapping[3];

        DOWNMIX_TO_STEREO(MIX_REAR2(samples, sl, sr, 2, coef), );

        break;

    case DCA_3F2R:

        c  = channel_mapping[0];

        l  = channel_mapping[1];

        r  = channel_mapping[2];

        sl = channel_mapping[3];

        sr = channel_mapping[4];

        DOWNMIX_TO_STEREO(MIX_FRONT3(samples, coef),

                          MIX_REAR2(samples, sl, sr, 3, coef));

        break;

    }

    if (lfe_present) {

        int lf_buf = dca_lfe_index[srcfmt];

        int lf_idx = dca_channels [srcfmt];

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

            samples[0][i] += samples[lf_buf][i] * coef[lf_idx][0];

            samples[1][i] += samples[lf_buf][i] * coef[lf_idx][1];

        }

    }

}

static void dca_downmix(float **samples, int srcfmt, int lfe_present,

                        float coef[DCA_PRIM_CHANNELS_MAX + 1][2],

                        const int8_t *channel_mapping)

{

    int c, l, r, sl, sr, s;

    int i;

    float t, u, v;



    switch (srcfmt) {

    case DCA_MONO:

    case DCA_CHANNEL:

    case DCA_STEREO_TOTAL:

    case DCA_STEREO_SUMDIFF:

    case DCA_4F2R:

        av_log(NULL, 0, "Not implemented!\n");

        break;

    case DCA_STEREO:

        break;

    case DCA_3F:

        c = channel_mapping[0];

        l = channel_mapping[1];

        r = channel_mapping[2];

        DOWNMIX_TO_STEREO(MIX_FRONT3(samples, coef), );

        break;

    case DCA_2F1R:

        s = channel_mapping[2];

        DOWNMIX_TO_STEREO(MIX_REAR1(samples, s, 2, coef), );

        break;

    case DCA_3F1R:

        c = channel_mapping[0];

        l = channel_mapping[1];

        r = channel_mapping[2];

        s = channel_mapping[3];

        DOWNMIX_TO_STEREO(MIX_FRONT3(samples, coef),

                          MIX_REAR1(samples, s, 3, coef));

        break;

    case DCA_2F2R:

        sl = channel_mapping[2];

        sr = channel_mapping[3];

        DOWNMIX_TO_STEREO(MIX_REAR2(samples, sl, sr, 2, coef), );

        break;

    case DCA_3F2R:

        c  = channel_mapping[0];

        l  = channel_mapping[1];

        r  = channel_mapping[2];

        sl = channel_mapping[3];

        sr = channel_mapping[4];

        DOWNMIX_TO_STEREO(MIX_FRONT3(samples, coef),

                          MIX_REAR2(samples, sl, sr, 3, coef));

        break;

    }

    if (lfe_present) {

        int lf_buf = dca_lfe_index[srcfmt];

        int lf_idx = dca_channels [srcfmt];

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

            samples[0][i] += samples[lf_buf][i] * coef[lf_idx][0];

            samples[1][i] += samples[lf_buf][i] * coef[lf_idx][1];

        }

    }

}

static void FUNC_0(float **VAR_0, int VAR_1, int VAR_2,

                        float VAR_3[DCA_PRIM_CHANNELS_MAX + 1][2],

                        const int8_t *VAR_4)

{

    int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10;

    int VAR_11;

    float VAR_12, VAR_13, VAR_14;



    switch (VAR_1) {

    case DCA_MONO:

    case DCA_CHANNEL:

    case DCA_STEREO_TOTAL:

    case DCA_STEREO_SUMDIFF:

    case DCA_4F2R:

        av_log(NULL, 0, "Not implemented!\n");

        break;

    case DCA_STEREO:

        break;

    case DCA_3F:

        VAR_5 = VAR_4[0];

        VAR_6 = VAR_4[1];

        VAR_7 = VAR_4[2];

        DOWNMIX_TO_STEREO(MIX_FRONT3(VAR_0, VAR_3), );

        break;

    case DCA_2F1R:

        VAR_10 = VAR_4[2];

        DOWNMIX_TO_STEREO(MIX_REAR1(VAR_0, VAR_10, 2, VAR_3), );

        break;

    case DCA_3F1R:

        VAR_5 = VAR_4[0];

        VAR_6 = VAR_4[1];

        VAR_7 = VAR_4[2];

        VAR_10 = VAR_4[3];

        DOWNMIX_TO_STEREO(MIX_FRONT3(VAR_0, VAR_3),

                          MIX_REAR1(VAR_0, VAR_10, 3, VAR_3));

        break;

    case DCA_2F2R:

        VAR_8 = VAR_4[2];

        VAR_9 = VAR_4[3];

        DOWNMIX_TO_STEREO(MIX_REAR2(VAR_0, VAR_8, VAR_9, 2, VAR_3), );

        break;

    case DCA_3F2R:

        VAR_5  = VAR_4[0];

        VAR_6  = VAR_4[1];

        VAR_7  = VAR_4[2];

        VAR_8 = VAR_4[3];

        VAR_9 = VAR_4[4];

        DOWNMIX_TO_STEREO(MIX_FRONT3(VAR_0, VAR_3),

                          MIX_REAR2(VAR_0, VAR_8, VAR_9, 3, VAR_3));

        break;

    }

    if (VAR_2) {

        int VAR_15 = dca_lfe_index[VAR_1];

        int VAR_16 = dca_channels [VAR_1];

        for (VAR_11 = 0; VAR_11 < 256; VAR_11++) {

            VAR_0[0][VAR_11] += VAR_0[VAR_15][VAR_11] * VAR_3[VAR_16][0];

            VAR_0[1][VAR_11] += VAR_0[VAR_15][VAR_11] * VAR_3[VAR_16][1];

        }

    }

}

static void FUNC_0(float **VAR_0, int VAR_1, int VAR_2,
float VAR_3[DCA_PRIM_CHANNELS_MAX + 1][2],
const int8_t *VAR_4)
{ int VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10; int VAR_11; float VAR_12, VAR_13, VAR_14; switch (VAR_1) { case DCA_MONO:
case DCA_CHANNEL:
case DCA_STEREO_TOTAL:
case DCA_STEREO_SUMDIFF:
case DCA_4F2R:
av_log(NULL, 0, "Not implemented!\n"); break; case DCA_STEREO:
break; case DCA_3F:
VAR_5 = VAR_4[0]; VAR_6 = VAR_4[1]; VAR_7 = VAR_4[2]; DOWNMIX_TO_STEREO(MIX_FRONT3(VAR_0, VAR_3), ); break; case DCA_2F1R:
VAR_10 = VAR_4[2]; DOWNMIX_TO_STEREO(MIX_REAR1(VAR_0, VAR_10, 2, VAR_3), ); break; case DCA_3F1R:
VAR_5 = VAR_4[0]; VAR_6 = VAR_4[1]; VAR_7 = VAR_4[2]; VAR_10 = VAR_4[3]; DOWNMIX_TO_STEREO(MIX_FRONT3(VAR_0, VAR_3),
MIX_REAR1(VAR_0, VAR_10, 3, VAR_3)); break; case DCA_2F2R:
VAR_8 = VAR_4[2]; VAR_9 = VAR_4[3]; DOWNMIX_TO_STEREO(MIX_REAR2(VAR_0, VAR_8, VAR_9, 2, VAR_3), ); break; case DCA_3F2R:
VAR_5  = VAR_4[0]; VAR_6  = VAR_4[1]; VAR_7  = VAR_4[2]; VAR_8 = VAR_4[3]; VAR_9 = VAR_4[4]; DOWNMIX_TO_STEREO(MIX_FRONT3(VAR_0, VAR_3),
MIX_REAR2(VAR_0, VAR_8, VAR_9, 3, VAR_3)); break; } if (VAR_2) { int VAR_15 = dca_lfe_index[VAR_1]; int VAR_16 = dca_channels [VAR_1]; for (VAR_11 = 0; VAR_11 < 256; VAR_11++) { VAR_0[0][VAR_11] += VAR_0[VAR_15][VAR_11] * VAR_3[VAR_16][0]; VAR_0[1][VAR_11] += VAR_0[VAR_15][VAR_11] * VAR_3[VAR_16][1]; } } }