total_bits,
(double)total_bits,
static int rate_estimate_qscale(MpegEncContext *s){    long long total_bits = s->total_bits;    float q;    int qscale, diff, qmin;    if (s->pict_type == I_TYPE) {        s->wanted_bits += s->I_frame_bits;    } else {        s->wanted_bits += s->P_frame_bits;    }    diff = s->wanted_bits - total_bits;    q = 31.0 - (float)diff / (QSCALE_K * s->mb_height * s->mb_width);    /* adjust for I frame */    if (s->pict_type == I_TYPE && !s->intra_only) {        q /= I_FRAME_SIZE_RATIO;    }    /* using a too small Q scale leeds to problems in mpeg1 and h263       because AC coefficients are clamped to 255 or 127 */    qmin = 3;    if (q < qmin)        q = qmin;    else if (q > 31)        q = 31;    qscale = (int)(q + 0.5);#if defined(DEBUG)    printf("%d: total=%Ld br=%0.1f diff=%d qest=%0.1f\n",            s->picture_number,            total_bits,            (float)s->frame_rate / FRAME_RATE_BASE *            total_bits / s->picture_number,            diff, q);#endif    return qscale;}