# HG changeset patch # User michael # Date 1162034106 0 # Node ID 99616a74260a6c2f15e62afbbd442f19158b5746 # Parent fda3ec8e96e1b7d602cd61d326313c634eceff08 use lambda/lmax instead of qscale/qmax as end check for vbv retry diff -r fda3ec8e96e1 -r 99616a74260a mpegvideo.c --- a/mpegvideo.c Sat Oct 28 09:49:13 2006 +0000 +++ b/mpegvideo.c Sat Oct 28 11:15:06 2006 +0000 @@ -2535,7 +2535,7 @@ RateControlContext *rcc= &s->rc_context; int max_size= rcc->buffer_index/3; - if(put_bits_count(&s->pb) > max_size && s->qscale < s->avctx->qmax){ + if(put_bits_count(&s->pb) > max_size && s->lambda < s->avctx->lmax){ s->next_lambda= FFMAX(s->lambda+1, s->lambda*(s->qscale+1) / s->qscale); s->mb_skipped = 0; //done in MPV_frame_start() if(s->pict_type==P_TYPE){ //done in encode_picture() so we must undo it