[Vorbis-dev] Questions regarding OGG implementation on DSP

Michael Smith mlrsmith at gmail.com
Mon Jan 31 15:09:44 PST 2005


On Mon, 31 Jan 2005 20:06:01 +0800, Yuh-Chin Chang
<yuhchin at ms63.hinet.net> wrote:
>  
>  
> As to tremor fixed-point implementation, i got several questions, and
> hopefully some one can help me out. 
> Thanks a lot! 
>   
> 1. For DSP chips with small and limited memory, how much memory do we really
> need for 
> saving all codebooks before we start to decode audio packets? Can the
> bit-rate give us some clues? 
> Is there some simple guidelines for this? 

This depends mostly on what decoder you use. The Tremor-lowmem version
is specifically tuned to use as little memory as possible. I believe
it typically requires somewhere around 40-60 kB total heap+stack for
decoding.

It's always possible to create pathological streams that require much
more memory, but it's generally considered reasonable for
memory-limited devices to refuse to play those.

>   
> 2. For CRC error protection, it seems to me that we need to get all the
> pages, compute the CRC, 
> and then compare the result to the one for that packet. That means a huge
> input buffer in some cases. 
> So, ignoring the CRC words seems a reasonable compromise for portable
> devices, 
> since it is anyway a error detection, not correction. We cannot do anything
> about it except skipping that 
> packet. Is this assumption ok? 

You only need a single page (NOT a packet), which will typically be
approximately 4 kB or less, which is a pretty small fraction of the
total memory required.

Not reading in the whole page at once would be quite a lot more
development effort for very little gain, plus you'd have the
disadvantage of not detecting corrupt data.

>   
> 3. Any further information/papers/books about how Vorbis gets audio samples
> compressed? 
> Well, the Vorbis I specification does give me some clues, but not very clear
> to me. 

There's little written about the specific techniques the encoder uses
(though there's plenty of information about the general approaches
taken in the literature), and the specification only dictates what a
decoder needs to do. If you have more specific questions, we should be
able to help.

Mike


More information about the Vorbis-dev mailing list