Commit fe896ec2 authored by Luca Barbato's avatar Luca Barbato

ratecontrol: estimate twice the qscale values

This had been the fix used by Michael Niedermayer to solve the
ratecontrol convergence issue.
parent 492bd1a2
...@@ -862,8 +862,8 @@ static int init_pass2(MpegEncContext *s) ...@@ -862,8 +862,8 @@ static int init_pass2(MpegEncContext *s)
/* find qscale */ /* find qscale */
for(i=0; i<rcc->num_entries; i++){ for(i=0; i<rcc->num_entries; i++){
RateControlEntry *rce= &rcc->entry[i]; RateControlEntry *rce= &rcc->entry[i];
qscale[i]= get_qscale(s, &rcc->entry[i], rate_factor, i); double q = get_qscale(s, &rcc->entry[i], rate_factor, i);
rcc->last_qscale_for[rce->pict_type] = qscale[i]; qscale[i] = get_diff_limited_q(s, rce, q);
} }
assert(filter_size%2==1); assert(filter_size%2==1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment