[XviD-devel] Min. FrameSize II
Dirk Knop
xvid-devel@xvid.org
Sun, 15 Sep 2002 13:35:33 +0200
Thanks for the idea, Eduard, but I think this is overkill:
I need those numbers for 2pass curve treatment. At the moment, in XviD
(VfW) all frames get downscaled on 2nd pass. But there's a limit below
which you can't scale a frame, the min. size. So it shouldn't matter
whether there is avi overhead involved or not (can only be 24 bytes or 0
bytes- and in fact it is involved since I gathered those values with
DebugView first and then confirmed them with virtualdub's file
information ;) ), the values just need 24bytes subtracted in this case.
The problem with these frames is, that due to the downscaled values we
stack up overflow which degrades the following bigger frames
significantly in quality, so we shouldn't touch those frames, and if we
downscale the rest of the curve, introduce a highpass at the min. size.
My tests with the StatsReader are very successfull, this behaviour
prevents quantizer distributions like I've posted for my matrix-encodes
(lots of frames with quant. > 5 - my last test with Zoolander had only 9
frames with quant 6 as lowest value... this IS a step in the right
direction) on doom9 forums, and the scaling is still linear. (Of course
you have to do a "pre-pass" with the bitrate curve to sum up the
resulting overflow to respect that with the scaler factor).
(I wanted to keep the values original, but I can easily give a
"corrected" table:
Resolution | MBs | Minsize frame bytes
-----------+-----+---------------------
320x240 | 300 | 24 (kf: 831 bytes)
352x288 | 396 | 36 (kf: 1095 bytes)
480x576 |1080 | 122 (kf: 2976 bytes)
640x272 | 680 | 72 (kf: 1876 bytes)
640x352 | 880 | 97 (kf: 2426 bytes)
720x576 |1620 | 189 (kf: 4461 bytes)
So these are the values that I'd get with "raw m4v" sizes).
Thanks for the help,
do you have some more ideas? :) I "just" need a formula to better (at
least) approximate the min. size value...
Best regards,
Koepi