Revision 956177fb libavcodec/ratecontrol.c

View differences:

libavcodec/ratecontrol.c
435 435
static double modify_qscale(MpegEncContext *s, RateControlEntry *rce, double q, int frame_num){
436 436
    RateControlContext *rcc= &s->rc_context;
437 437
    int qmin, qmax;
438
    double bits;
439 438
    const int pict_type= rce->new_pict_type;
440 439
    const double buffer_size= s->avctx->rc_buffer_size;
441 440
    const double fps= 1/av_q2d(s->avctx->time_base);
......
448 447
    if(s->avctx->rc_qmod_freq && frame_num%s->avctx->rc_qmod_freq==0 && pict_type==FF_P_TYPE)
449 448
        q*= s->avctx->rc_qmod_amp;
450 449

  
451
    bits= qp2bits(rce, q);
452 450
//printf("q:%f\n", q);
453 451
    /* buffer overflow/underflow protection */
454 452
    if(buffer_size){

Also available in: Unified diff