[XviD-devel] vfw 2pass stats

Marc FD xvid-devel@xvid.org
Sun, 13 Oct 2002 19:34:49 +0200


>sounds nice, i would also like a variable for bits spent on texture data
(since quant affects it more than motion vector cost).

what do you think of a sum of motion vector lengths ? would be interessing
too.
(because if there is alot of movement we could use higher quantizers)

> Uff, finally someone wrote that here, too ;)
> I was hoping to get better 2pass support but just mentioned that on
> doom9's for now ;)

yes i remember i saw it ^^.

> I think we need to have full control for the 2nd pass: dynamic i/p/b
> decision totally messes up overflow treatment/curve compression.

i love this part of the code (syskin, this rocks !)
i think we can improve it, but currently it's really great.
dynamic decision should be of course overrided by the vbr module.
maybe we need a VOP_type field instead of intra ?

> So to join the proposals made, the stats file could look like this:
>
> Frame No. | total bytes | texture bytes (or bits) | Frame Type | Frame
> Quant [|kblk|mblk|ublk (imho not necessary)]
> 000001 | 1024 |  1024 | I | 2 | [680|0|0]
> 000002 | 96 | 0 | P | 2 | [0|0|680]

i think a short header with all the information we can show would be usefull
for debugging purpose, and too make 2 pass more easy.

like :

XviD stats file version : xxxx
First Pass File
search effort preset  : 6
motion : PMV_HALFPEL16 | [....]
general : XVID_INTERLACING | XVID_LUMIMASKING | [...]
[...]

you see. information from the vfw interface and from XviD itself would be
great.

i think automation would be possible like this. you could add a new mode :
- Automatic 2nd Pass.
all the settings would be grayed, only an entry for the First/Second pass
statfile.
XviD would be configurated with the info in the 1st pass. like this, it's a
garantee
that the second pass will work :)

An external Scaler with graphical output would be very usefull too. i think
we should
be able to tune the 2nd pass curve theorically before an encode.

> What we need as well for further analysis/improvement is an output of
> the decisions made, like we fetch with debugview for now - but it should
> be possible to get such a file with xvidcore/vfw as well.

i'd like to get rid of debug view. a more elegant solution would be a log
file
for the internal decisions, a 1st pass statfile creation, and an
internal/external
2nd pass creation. then the 2nd vbr mode would only log if there is a
problem
or dynamic informations (overflow,ect...)