From 73e0ec2ff453799e361c67395b93df11986609b3 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 9 Sep 2011 18:50:00 +0200 Subject: [PATCH] rc: finetune convergence failure fix Signed-off-by: Michael Niedermayer --- libavcodec/ratecontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index 1c29dbde4b..d085f04113 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -866,7 +866,7 @@ static int init_pass2(MpegEncContext *s) assert(filter_size%2==1); /* fixed I/B QP relative to P mode */ - for(i=0; inum_entries; i++){ + for(i=FFMAX(0, rcc->num_entries-300); inum_entries; i++){ RateControlEntry *rce= &rcc->entry[i]; qscale[i]= get_diff_limited_q(s, rce, qscale[i]);