[x264-devel] Re: [MOD] [PATCH] Rate control

Måns Rullgård mru at mru.ath.cx
Sun Aug 8 21:34:53 CEST 2004


Laurent Aimar <fenrir at via.ecp.fr> writes:

> On Sun, Aug 08, 2004, Måns Rullgård wrote:
>> Laurent Aimar <fenrir at via.ecp.fr> writes:
>> 
>> >  It seems to work pretty well :) but from my (really too) limited tests,
>> > it seems to always produce lower bitrate than requested (semething like
>> > 5-7%).
>> 
>> Which number did you look at?  The rate printed by x264_encoder_close
>> is always a bit lower than the actual file size.
>  The rate printed by x264_encoder_close is the rate of the slice data.
> It doesn't take into account the size of PPS/SPS and the startcode added
> for each nal by x264.c
>
>>  Which of these should be the target?
> The difference should be small, the overhead is < 50 bytes every IDR frame
> + 4 bytes / frame.
>
>  Moreover it depends of the muxer, for example in .mp4 the SPS/PPS should
> be store once, and there is no start code. So I think the right bitrate
> is the one from x264_encoder_close.

That makes sense.  I'll see if I can make it more accurate without
buffer underflows.

-- 
Måns Rullgård
mru at mru.ath.cx

-- 
This is the x264-devel mailing-list
If you are in trouble, please contact <postmaster at videolan.org>



More information about the x264-devel mailing list