[x264-devel] Re: bit allocation algorithms among frames

Loren Merritt lorenm at u.washington.edu
Fri Jul 14 19:07:37 CEST 2006


On Fri, 14 Jul 2006, Tuukka Toivonen wrote:
> On Thu, 13 Jul 2006, Loren Merritt wrote:
>
>> Also, there must be some way to start with an approximation of a good bit
>> allocation, rather than decrementing from qp=51.
>
> That is what I was thinking. Maybe you could first pick good guesses for
> all QPs in all frames, then pick a frame where changing the QP improves the
> result the most, then either increment or decrement the QP, depending
> whether the current bitrate is too low or high. I'm not sure if it is
> possible to modify the algorithm to also increase QPs when necessary,
> probably there is some reason to disallow that, but maybe the limitation
> could be overcome?

I think the reason the didn't do that is that there's no easy termination 
condition. In practice, I'd do "stop when the difference between the 
highest and lowest dD/dR is small enough that there's not much to gain 
from reallocating bits". But there's no good definition of optimal if 
your algorithm gets to choose its own lambda and you don't enforce a hard 
max bitrate.

> Heck, this is almost like motion estimation: in ME you try to minimize
> distortion+lambda*rate by changing mvx and mvy, why not trying to minimize
> distortion+lambda*rate among frames by changing a vector of QPs?

Which means that the whole optimization problem goes into one pass of 
the current multipass framework, and we need conventional ratecontrol 
to guess a lambda for a given target size...

--Loren Merritt

-- 
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html



More information about the x264-devel mailing list