[XviD-devel] XVID Bframe AVIs and ffmpeg decoding

Christoph Lampert xvid-devel@xvid.org
Mon, 13 Jan 2003 14:38:13 +0100 (CET)


On Mon, 13 Jan 2003, Christoph Lampert wrote:
> Michael Niedermayer <michaelni@gmx.at> wrote:
> > btw, could it be that xvid doesnt add stuffing bits if the last bit ends at 
> > byte aligned boudary?
> 
> Yes, that's it! I'll a commit a patch... It has to be done just before
> VOP/VOL/VO startcodes, not between other structures, am I right? 

I guess "PadAlways()" is always needed before every any START_CODE, even
if it's "clear" that this will be at byte boundary. Also, I assume that
padding before a START_CODE is part of the  _previous_ VOP not of the new
one? 
So the padding before a VOP-header is done _after_ the previous VOP is
finished and the resulting padding (possible a full 0x7F byte) is returned 
as part of the encoded VOP. 
Then the next VOP header can always start without padding (we wouldn't
even have to check for it). 

Comments? If not, then I'll commit... 

gruel 

P.S. Since the full padding byte is 0x7F, we should really combine this
with the VfW 0x7F to something standardized. Any suggestions?