[XviD-devel] Min. FrameSize II

Dirk Knop xvid-devel@xvid.org
Sun, 15 Sep 2002 14:59:36 +0200


Michael Niedermayer wrote:

>for P frames the minimum bitstream size is: (headerSize + MBnum + 8)/8
>
>the headerSize is not constant though (the timestamps for example can be 
>stored with differnt number of bits and need 1 extra bit every sec ...) 
>
>for I Frames: (IHeaderSize + firstMB + (MBnum-1)*MBSize + 8)/8
>
Thanks Michael, that's exactly the formula I need - I'm going to hack 
that into 2pass.c ASAP.

for the min. size, the header can be assumed to be const. 80 bits - test 
with the values from the table, it's right for the scenario I need :)

I think I'll simply forget about iframes ;) they are usually seldom 
compared to pframes, thus introducing only a small error (plus: I never 
saw a keyframe occur at min size ;) ) - and this error is distributed 
over the whole scene in VfW anyways (should be the same with Eduard's 
2pass-lib).

Thanks a million,

best regards,

Dirk