[x264-devel] 2-pass Rate Control Question?

Gabriel Bouvigne gabriel.bouvigne at joost.com
Wed May 21 12:24:18 CEST 2008


??? a écrit :
> Toward the end of the function init_pass2(x264_t *), there's a loop iterating for a fit for expected_bits (toward all_available_bits), 
> "for(step = 1E4 * step_mult; step > 1E-7 * step_mult; step *= 0.5){"
> where each frame's rate control entry has a field "expected_bits" accumulating the expected bits at the end of the loop. 
> 
> It seems the accumulating order is the display order. Shouldn't it be the encoding order?

I think you are right.
Fortunately, the impact is rather small as this per frame value is only 
used in rate_estimate_qscale, for I/P pictures:
             int64_t diff = total_bits - (int64_t)rce.expected_bits;

It will likely introduce a pessimistic bias to the frame qscale 
adjustment, but it should be very small.

note: I have the same problem with the expected_vbv value within the 
2pass_vbv patch.


--
Gabriel


More information about the x264-devel mailing list