[vorbis-dev] Packet Granule position
Sebastian Gesemann
sgeseman at upb.de
Fri Mar 26 07:40:32 PST 2004
Hi Adriano !
On Fri, 26 Mar 2004, Adriano Almeida wrote:
> Is there a way to know the exact packet granule position before I decode it?
> is there any relationship between packet size and granule position? I know
> each page has its own granule position, can i calculate it for each packet??
I'm not sure what you mean by "packet granule position". A packet
contains several audio samples, so it has a granule pos start end
granule pos end (actually it's a bit more complicated because of
the overlap-add synthesis).
According to the "Ogg logical bitstream framing" specification the
granule pos of a page determines the position after the last packet
that finishes on that page (or -1 if no packet finishes on that
page).
According to "Ogg Vorbis I format specification: codec setup and
packet decode" each audio packet starts with a zero-bit followed
by a "mode" field. Dependent on the mode's "blockflag" the packet
stores either 0.5*blocksize_0 or 0.5*blocksize_1 samples per
channel.
HTH,
Sebastian
--
PGP-Key-ID (long): 572B1778A4CA0707
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Vorbis-dev
mailing list