Fw: Re: [XviD-devel] stream position after reading the user data
suxen_drol
suxen_drol at hotmail.com
Wed Jan 19 10:14:54 CET 2005
Forwarded by suxen_drol <suxen_drol at hotmail.com>
----------------------- Original Message -----------------------
From: pete <pross at xvid.org>
To: xvid-devel at xvid.org
Date: Tue, 18 Jan 2005 23:22:07 +1100
Subject: Re: [XviD-devel] stream position after reading the user data
----
hi martin,
On Sun, 16 Jan 2005 15:39:28 +0100 Martin Kuball <MartinKuball at web.de> wrote:
> I'm currently trying to understand how to read a mp4 as profile. And
> my reference is the xvid implementation. While reading the code I
> noticed that the after reading the user data string the bitstream is
> positioned at the last character (not the terminating 0). Why is this
> so? The character is skipt when reading the next startcode. I can't
> see situation where it is part of the next startcode.
there is no requirement in the mpeg-4 standard for a terminating zero.
therefore xvid must stop reading bytes the moment it see a zero, because
this may belong to the subsequent startcode (see example below).
00 00 01 b2 | 'X' 'V' 'I' 'D' | 00 00 01 b3
USERDATA_SC | arbitrary data | VOP_SC
here's another example, where there is a zero embedded in the arbitrary
data! xvid will only parse the "XV". this is sufficient because we only
care about xvid and divx userdata.
00 00 01 b2 | 'X' 'V' 00 'I' 'D' | 00 00 01 b3
USERDATA_SC | arbitrary data | VOP_SC
> All the more the code for reading the user data looks overly complicated
> just to achieve this effect.
we welcome any suggestions (or patches) that improve the readibility of
the code!
cheers,
-- pete
--------------------- Original Message Ends --------------------
-- pete
More information about the XviD-devel
mailing list