static int bands_dist(OpusPsyContext *s, CeltFrame *f, float *total_dist)

{

    int i, tdist = 0.0f;

    OpusRangeCoder dump;



    ff_opus_rc_enc_init(&dump);

    ff_celt_enc_bitalloc(f, &dump);



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

        float bits = 0.0f;

        float dist = f->pvq->band_cost(f->pvq, f, &dump, i, &bits, s->lambda);

        tdist += dist;

    }



    *total_dist = tdist;



    return 0;

}

static int bands_dist(OpusPsyContext *s, CeltFrame *f, float *total_dist)

{

    int i, tdist = 0.0f;

    OpusRangeCoder dump;



    ff_opus_rc_enc_init(&dump);

    ff_celt_enc_bitalloc(f, &dump);



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

        float bits = 0.0f;

        float dist = f->pvq->band_cost(f->pvq, f, &dump, i, &bits, s->lambda);

        tdist += dist;

    }



    *total_dist = tdist;



    return 0;

}

static int FUNC_0(OpusPsyContext *VAR_0, CeltFrame *VAR_1, float *VAR_2)

{

    int VAR_3, VAR_4 = 0.0f;

    OpusRangeCoder dump;



    ff_opus_rc_enc_init(&dump);

    ff_celt_enc_bitalloc(VAR_1, &dump);



    for (VAR_3 = 0; VAR_3 < CELT_MAX_BANDS; VAR_3++) {

        float bits = 0.0f;

        float dist = VAR_1->pvq->band_cost(VAR_1->pvq, VAR_1, &dump, VAR_3, &bits, VAR_0->lambda);

        VAR_4 += dist;

    }



    *VAR_2 = VAR_4;



    return 0;

}

static int FUNC_0(OpusPsyContext *VAR_0, CeltFrame *VAR_1, float *VAR_2)
{ int VAR_3, VAR_4 = 0.0f; OpusRangeCoder dump; ff_opus_rc_enc_init(&dump); ff_celt_enc_bitalloc(VAR_1, &dump); for (VAR_3 = 0; VAR_3 < CELT_MAX_BANDS; VAR_3++) { float bits = 0.0f; float dist = VAR_1->pvq->band_cost(VAR_1->pvq, VAR_1, &dump, VAR_3, &bits, VAR_0->lambda); VAR_4 += dist; } *VAR_2 = VAR_4; return 0; }