static int64_t find_best_filter(const DCAADPCMEncContext *s, const int32_t *in, int len)

{

    const premultiplied_coeffs *precalc_data = s->private_data;

    int i, j, k = 0;

    int vq;

    int64_t err;

    int64_t min_err = 1ll << 62;

    int64_t corr[15];



    for (i = 0; i <= DCA_ADPCM_COEFFS; i++)

        for (j = i; j <= DCA_ADPCM_COEFFS; j++)

            corr[k++] = calc_corr(in+4, len, i, j);



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

        err = apply_filter(ff_dca_adpcm_vb[i], corr, *precalc_data);

        if (err < min_err) {

            min_err = err;

            vq = i;

        }

        precalc_data++;

    }



    return vq;

}

static int64_t find_best_filter(const DCAADPCMEncContext *s, const int32_t *in, int len)

{

    const premultiplied_coeffs *precalc_data = s->private_data;

    int i, j, k = 0;

    int vq;

    int64_t err;

    int64_t min_err = 1ll << 62;

    int64_t corr[15];



    for (i = 0; i <= DCA_ADPCM_COEFFS; i++)

        for (j = i; j <= DCA_ADPCM_COEFFS; j++)

            corr[k++] = calc_corr(in+4, len, i, j);



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

        err = apply_filter(ff_dca_adpcm_vb[i], corr, *precalc_data);

        if (err < min_err) {

            min_err = err;

            vq = i;

        }

        precalc_data++;

    }



    return vq;

}

    int vq;
static int64_t FUNC_0(const DCAADPCMEncContext *s, const int32_t *in, int len)

{

    const premultiplied_coeffs *VAR_0 = s->private_data;

    int VAR_1, VAR_2, VAR_3 = 0;

    int VAR_4;

    int64_t err;

    int64_t min_err = 1ll << 62;

    int64_t corr[15];



    for (VAR_1 = 0; VAR_1 <= DCA_ADPCM_COEFFS; VAR_1++)

        for (VAR_2 = VAR_1; VAR_2 <= DCA_ADPCM_COEFFS; VAR_2++)

            corr[VAR_3++] = calc_corr(in+4, len, VAR_1, VAR_2);



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

        err = apply_filter(ff_dca_adpcm_vb[VAR_1], corr, *VAR_0);

        if (err < min_err) {

            min_err = err;

            VAR_4 = VAR_1;

        }

        VAR_0++;

    }



    return VAR_4;

}

static int64_t FUNC_0(const DCAADPCMEncContext *s, const int32_t *in, int len)
{ const premultiplied_coeffs *VAR_0 = s->private_data; int VAR_1, VAR_2, VAR_3 = 0; int VAR_4; int64_t err; int64_t min_err = 1ll << 62; int64_t corr[15]; for (VAR_1 = 0; VAR_1 <= DCA_ADPCM_COEFFS; VAR_1++) for (VAR_2 = VAR_1; VAR_2 <= DCA_ADPCM_COEFFS; VAR_2++) corr[VAR_3++] = calc_corr(in+4, len, VAR_1, VAR_2); for (VAR_1 = 0; VAR_1 < DCA_ADPCM_VQCODEBOOK_SZ; VAR_1++) { err = apply_filter(ff_dca_adpcm_vb[VAR_1], corr, *VAR_0); if (err < min_err) { min_err = err; VAR_4 = VAR_1; } VAR_0++; } return VAR_4; }