[XviD-devel] XVID Bframe AVIs and ffmpeg decoding

Michael Niedermayer xvid-devel@xvid.org
Mon, 13 Jan 2003 15:03:26 +0100


Hi

On Monday 13 January 2003 14:38, Christoph Lampert wrote:
> 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...
IMHO padding is not done before startcodes but at the end of the various 
headers, and not allways, for example according to the std. there is no 
padding between VisObjSeq & VisObj and VidObj & VidObjLayer at least i dont 
see any in the text

[...]

Michael