Browse Source

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
tags/n0.9
Luca Barbato 13 years ago
parent
commit
d554b33efe
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/ratecontrol.c

+ 2
- 0
libavcodec/ratecontrol.c View File

@@ -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);



Loading…
Cancel
Save