[XviD-devel] VBV into CVS HEAD
Christoph Lampert
chl at math.uni-bonn.de
Thu Jun 10 19:46:43 CEST 2004
Hi,
sorry for the big delay, now I finally committed VBV to CVS HEAD.
As I wrote the last time when I committed to the wrong place, it's
mainly in the 2pass encoding plugin, because 2pass the place where it
belongs.
VBV is activated by setting 2pass-parameter vbv_size (from xvid.h)
nonzero. Typical values (DivX Home Theater) are
rc2pass2.vbv_size = 3145728;
rc2pass2.vbv_initial = 2359296; // 75% of vbv_size
rc2pass2.vbv_maxrate = 4000000;
rc2pass2.vbv_peakrate = 10000000;
Since default is 0 for all unknown parameters, default for VBV is OFF.
Please test, especially with difficult material, like high action,
explosions, long fades...
gruel
P.S.
I attached a small plot of vbv control in action: Red is the first pass,
green the second without VBV, blue the second with DivX Home Theater VBV.
Max bitrate is 4000 kbps, which corresponds to the 200000 bit level.
As you see, there is a very difficult scene starting at frame 400. With
quant 2, bitrate goes up to far over 10000 kbps!
Target bitrate was 3000kbps. Normal 2nd-pass encodes at much higher
bitrate than 4000kbps for almost 200 frames. That's too much data for a
too long time, the VBV conditions will be violated and hardware players
might not catch up with reading from disk.
VBV keeps track of total data, and reduces bitrate after a while such
that VBV is fulfilled and buffer don't run empty. Bitrate can go over the
max of 4000 kbps, but not for too long.
The disadvantage is that the quantizer is raised if very difficult
scenes go on for too long. This cannot really be avoided, if we want to be
VBV compatible (although I have some ideas how to get rid of it). However,
usually these scenes can tolerate higher quants rather well.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vbv-vs-2pass.gif
Type: image/gif
Size: 12200 bytes
Desc:
Url : http://edu.bnhof.de/pipermail/xvid-devel/attachments/20040610/bba18f7d/vbv-vs-2pass.gif
More information about the XviD-devel
mailing list