Mercurial > libavcodec.hg
changeset 4096:99616a74260a libavcodec
use lambda/lmax instead of qscale/qmax as end check for vbv retry
author | michael |
---|---|
date | Sat, 28 Oct 2006 11:15:06 +0000 |
parents | fda3ec8e96e1 |
children | de30c06dc299 |
files | mpegvideo.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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