[Ffmpeg-devel] [patch] rc buffer bits reservation for I-frames

Loren Merritt lorenm
Sat Nov 25 00:01:37 CET 2006


On Fri, 24 Nov 2006, Jindrich Makovicka wrote:
> On 11/24/06, Guillaume Poirier <gpoirier at mplayerhq.hu> wrote:
>
>> Maybe I'm not getting the point, but wouldn't it be better to fix
>> whatever is wrong with the RC decisions at tight bitrate constrains
>> rather than adding "yet another custom-fitted option" ?
>
> I am not sure how to do this 100% properly. You probably would have to
> buffer all the frames up to the next scene change, encode the
> following I-frame and then encode the previous I/B frames. But using
> the size of the previous I-frame works quite well.
>
>> x264'RC being as good as it is, wouldn't it be nice to borrow some of
>> the ideas from there and put them in lavc's RC?
>> Alternatively, would it be possible to import x264's RC just like
>> xvid's RC was imported?
>
> Actually, we observe the same problem with x264. I sent a similar
> patch to x264 ML, with no response.

I haven't given up on implementing the correct way in x264, which is:
Buffer a bunch of frames (not necessarily a whole gop, or it could be even 
more), estimate all their complexities (x264 already estimates complexity, 
just only 1 frame in advance), and plan a bit distribution for all those 
frames including any bonus that the keyframe may need.

--Loren Merritt




More information about the ffmpeg-devel mailing list