[vorbis-dev] Feedback on Ogg Speex file format

Michael Smith msmith at labyrinth.net.au
Thu Aug 15 02:23:36 PDT 2002



At 02:21 AM 8/15/02 +0200, you wrote:
>
>
>Michael Smith wrote:
>> 
>> >
>> >If the first packet has, say, 1000 samples, and you have just
>> >the one packet in the first ogg page, should the granulepos
>> >be 1000 or 999?
>> 
>> 1000
>> 
>
>So granulepos actually is the number of the first sample _not_
>decodable using only this page and all pages before it?  Except
>if adding this page to the ones before it would not increase
>the number of samples decodable, in which case we set granulepos
>to -1?  Oh, and special cases for begin/end of stream, of course.
>
>Something is redundant here, or very convoluted, at least ;)

No, it's the number of the last sample decodable from this page.
Yes, it counts from 1, not 0 (because 0 is a valid value to mean
'no samples decodable yet', as the headers have).

By the way, rehuff seems to produce horribly screwed up streams
with granulepos == -1 on every page (or at least most of them). 
You should probably fix that.

Mike

--- >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