diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2011-09-16 20:06:55 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2011-09-22 17:25:48 -0700 |
commit | d554b33efe97d4b46c695e7cfa6f248780907ee7 (patch) | |
tree | 67c5b6306da17f9ee59b084745a8073fa5be35d4 /libavcodec/ratecontrol.c | |
parent | 4d4d0e817607bce2a3a0806540f19d5d2b3b9376 (diff) | |
download | ffmpeg-d554b33efe97d4b46c695e7cfa6f248780907ee7.tar.gz |
ratecontrol: update last_qscale_for sooner
In order to make ratecontrol converge properly update the
last_qscale_for values when populating the qscale array.
It fixes the issue reported on
http://lists.libav.org/pipermail/libav-tools/2011-September/000050.html
Diffstat (limited to 'libavcodec/ratecontrol.c')
-rw-r--r-- | libavcodec/ratecontrol.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index dc5c063f02..e984ed5b29 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -861,7 +861,9 @@ static int init_pass2(MpegEncContext *s) /* find qscale */ for(i=0; i<rcc->num_entries; i++){ + RateControlEntry *rce= &rcc->entry[i]; qscale[i]= get_qscale(s, &rcc->entry[i], rate_factor, i); + rcc->last_qscale_for[rce->pict_type] = qscale[i]; } assert(filter_size%2==1); |