[Vorbis-dev] Input buffer requirement.

Sherin S sherin.s at gmail.com
Mon Aug 1 02:43:38 PDT 2005


Hi all,

I am in the thinking phase of Vorbis 'file' to 'buffer' conversion.
ie, accessing the stream data from the static buffer, rather than
accessing the file from the decoder( the way it is implemented in the
vorbis decoder).

I am putting my understanding and the respective query below,

As the general convention , there are two methods by which i can do this.

1) Assume what ever size input buffer.
-------------------------------------------------------
    In this case,  from every point in the decoder when ever the input
stream is accessed, it has to check for wheather the end of the buffer
has reached or not.\

If (end of buffer )
{
then request for populating the input buffer;
}
else
{
continue processing;
}

2) Assume a max input buffer size.
---------------------------------------------------
     In this case, every time the decoder is invoked we are sure the
input buffer contains full data required for that audio packet.
So, there is no need for any complexity inside the decoder like
checking for end of buffer or so.

But, vorbis specification is not giving any max limit (or minimum
compression) figure. (In AAC case the standard mention about this
scenario)

What is the input buffer size which i can assume, which will cover
real world "OGG VORBIS" stream. ie none of the input granule won't
exceed the max limit.

What is the choice of the implementors ??

I found it in one source that, 
they have assumed 8KB input buffer. they are saying they hav't come
accross any ogg stream which exceed this limit.

How risky is this assumption ?

Can I go ahead with this figure ?? 

- sher


More information about the Vorbis-dev mailing list