static int apply_window_and_mdct(vorbis_enc_context *venc,

                                 float **audio, int samples)

{

    int channel;

    const float * win = venc->win[0];

    int window_len = 1 << (venc->log2_blocksize[0] - 1);

    float n = (float)(1 << venc->log2_blocksize[0]) / 4.0;

    AVFloatDSPContext *fdsp = venc->fdsp;



    if (!venc->have_saved && !samples)

        return 0;



    if (venc->have_saved) {

        for (channel = 0; channel < venc->channels; channel++)

            memcpy(venc->samples + channel * window_len * 2,

                   venc->saved + channel * window_len, sizeof(float) * window_len);

    } else {

        for (channel = 0; channel < venc->channels; channel++)

            memset(venc->samples + channel * window_len * 2, 0,

                   sizeof(float) * window_len);

    }



    if (samples) {

        for (channel = 0; channel < venc->channels; channel++) {

            float *offset = venc->samples + channel * window_len * 2 + window_len;



            fdsp->vector_fmul_reverse(offset, audio[channel], win, samples);

            fdsp->vector_fmul_scalar(offset, offset, 1/n, samples);

        }

    } else {

        for (channel = 0; channel < venc->channels; channel++)

            memset(venc->samples + channel * window_len * 2 + window_len,

                   0, sizeof(float) * window_len);

    }



    for (channel = 0; channel < venc->channels; channel++)

        venc->mdct[0].mdct_calc(&venc->mdct[0], venc->coeffs + channel * window_len,

                     venc->samples + channel * window_len * 2);



    if (samples) {

        for (channel = 0; channel < venc->channels; channel++) {

            float *offset = venc->saved + channel * window_len;



            fdsp->vector_fmul(offset, audio[channel], win, samples);

            fdsp->vector_fmul_scalar(offset, offset, 1/n, samples);

        }

        venc->have_saved = 1;

    } else {

        venc->have_saved = 0;

    }

    return 1;

}

static int apply_window_and_mdct(vorbis_enc_context *venc,

                                 float **audio, int samples)

{

    int channel;

    const float * win = venc->win[0];

    int window_len = 1 << (venc->log2_blocksize[0] - 1);

    float n = (float)(1 << venc->log2_blocksize[0]) / 4.0;

    AVFloatDSPContext *fdsp = venc->fdsp;



    if (!venc->have_saved && !samples)

        return 0;



    if (venc->have_saved) {

        for (channel = 0; channel < venc->channels; channel++)

            memcpy(venc->samples + channel * window_len * 2,

                   venc->saved + channel * window_len, sizeof(float) * window_len);

    } else {

        for (channel = 0; channel < venc->channels; channel++)

            memset(venc->samples + channel * window_len * 2, 0,

                   sizeof(float) * window_len);

    }



    if (samples) {

        for (channel = 0; channel < venc->channels; channel++) {

            float *offset = venc->samples + channel * window_len * 2 + window_len;



            fdsp->vector_fmul_reverse(offset, audio[channel], win, samples);

            fdsp->vector_fmul_scalar(offset, offset, 1/n, samples);

        }

    } else {

        for (channel = 0; channel < venc->channels; channel++)

            memset(venc->samples + channel * window_len * 2 + window_len,

                   0, sizeof(float) * window_len);

    }



    for (channel = 0; channel < venc->channels; channel++)

        venc->mdct[0].mdct_calc(&venc->mdct[0], venc->coeffs + channel * window_len,

                     venc->samples + channel * window_len * 2);



    if (samples) {

        for (channel = 0; channel < venc->channels; channel++) {

            float *offset = venc->saved + channel * window_len;



            fdsp->vector_fmul(offset, audio[channel], win, samples);

            fdsp->vector_fmul_scalar(offset, offset, 1/n, samples);

        }

        venc->have_saved = 1;

    } else {

        venc->have_saved = 0;

    }

    return 1;

}

                                 float **audio, int samples)             fdsp->vector_fmul_reverse(offset, audio[channel], win, samples);             fdsp->vector_fmul(offset, audio[channel], win, samples);
static int FUNC_0(vorbis_enc_context *VAR_0,

                                 float **VAR_1, int VAR_2)

{

    int VAR_3;

    const float * VAR_4 = VAR_0->VAR_4[0];

    int VAR_5 = 1 << (VAR_0->log2_blocksize[0] - 1);

    float VAR_6 = (float)(1 << VAR_0->log2_blocksize[0]) / 4.0;

    AVFloatDSPContext *fdsp = VAR_0->fdsp;



    if (!VAR_0->have_saved && !VAR_2)

        return 0;



    if (VAR_0->have_saved) {

        for (VAR_3 = 0; VAR_3 < VAR_0->channels; VAR_3++)

            memcpy(VAR_0->VAR_2 + VAR_3 * VAR_5 * 2,

                   VAR_0->saved + VAR_3 * VAR_5, sizeof(float) * VAR_5);

    } else {

        for (VAR_3 = 0; VAR_3 < VAR_0->channels; VAR_3++)

            memset(VAR_0->VAR_2 + VAR_3 * VAR_5 * 2, 0,

                   sizeof(float) * VAR_5);

    }



    if (VAR_2) {

        for (VAR_3 = 0; VAR_3 < VAR_0->channels; VAR_3++) {

            float *offset = VAR_0->VAR_2 + VAR_3 * VAR_5 * 2 + VAR_5;



            fdsp->vector_fmul_reverse(offset, VAR_1[VAR_3], VAR_4, VAR_2);

            fdsp->vector_fmul_scalar(offset, offset, 1/VAR_6, VAR_2);

        }

    } else {

        for (VAR_3 = 0; VAR_3 < VAR_0->channels; VAR_3++)

            memset(VAR_0->VAR_2 + VAR_3 * VAR_5 * 2 + VAR_5,

                   0, sizeof(float) * VAR_5);

    }



    for (VAR_3 = 0; VAR_3 < VAR_0->channels; VAR_3++)

        VAR_0->mdct[0].mdct_calc(&VAR_0->mdct[0], VAR_0->coeffs + VAR_3 * VAR_5,

                     VAR_0->VAR_2 + VAR_3 * VAR_5 * 2);



    if (VAR_2) {

        for (VAR_3 = 0; VAR_3 < VAR_0->channels; VAR_3++) {

            float *offset = VAR_0->saved + VAR_3 * VAR_5;



            fdsp->vector_fmul(offset, VAR_1[VAR_3], VAR_4, VAR_2);

            fdsp->vector_fmul_scalar(offset, offset, 1/VAR_6, VAR_2);

        }

        VAR_0->have_saved = 1;

    } else {

        VAR_0->have_saved = 0;

    }

    return 1;

}

static int FUNC_0(vorbis_enc_context *VAR_0,
float **VAR_1, int VAR_2)
{ int VAR_3; const float * VAR_4 = VAR_0->VAR_4[0]; int VAR_5 = 1 << (VAR_0->log2_blocksize[0] - 1); float VAR_6 = (float)(1 << VAR_0->log2_blocksize[0]) / 4.0; AVFloatDSPContext *fdsp = VAR_0->fdsp; if (!VAR_0->have_saved && !VAR_2)
return 0; if (VAR_0->have_saved) { for (VAR_3 = 0; VAR_3 < VAR_0->channels; VAR_3++) memcpy(VAR_0->VAR_2 + VAR_3 * VAR_5 * 2,
VAR_0->saved + VAR_3 * VAR_5, sizeof(float) * VAR_5); } else { for (VAR_3 = 0; VAR_3 < VAR_0->channels; VAR_3++) memset(VAR_0->VAR_2 + VAR_3 * VAR_5 * 2, 0,
sizeof(float) * VAR_5); } if (VAR_2) { for (VAR_3 = 0; VAR_3 < VAR_0->channels; VAR_3++) { float *offset = VAR_0->VAR_2 + VAR_3 * VAR_5 * 2 + VAR_5; fdsp->vector_fmul_reverse(offset, VAR_1[VAR_3], VAR_4, VAR_2); fdsp->vector_fmul_scalar(offset, offset, 1/VAR_6, VAR_2); } } else { for (VAR_3 = 0; VAR_3 < VAR_0->channels; VAR_3++) memset(VAR_0->VAR_2 + VAR_3 * VAR_5 * 2 + VAR_5,
0, sizeof(float) * VAR_5); } for (VAR_3 = 0; VAR_3 < VAR_0->channels; VAR_3++) VAR_0->mdct[0].mdct_calc(&VAR_0->mdct[0], VAR_0->coeffs + VAR_3 * VAR_5,
VAR_0->VAR_2 + VAR_3 * VAR_5 * 2); if (VAR_2) { for (VAR_3 = 0; VAR_3 < VAR_0->channels; VAR_3++) { float *offset = VAR_0->saved + VAR_3 * VAR_5; fdsp->vector_fmul(offset, VAR_1[VAR_3], VAR_4, VAR_2); fdsp->vector_fmul_scalar(offset, offset, 1/VAR_6, VAR_2); } VAR_0->have_saved = 1; } else { VAR_0->have_saved = 0; } return 1; }