[Tremor] What can be the max code word length in a code book?

Vinoth Kumar vinoth at vinjey.com
Fri Aug 26 01:59:06 PDT 2005

Hi Sanjay,

    According to the spec the max code word length is 32 bits. As you have noted most of the time the code words length is less than 24 bits. So if you are interested in saving memory you can probably try having a run-time flag to represent whether a code book is < 24 bit or not. So for code books less than 24 bits you can possibly use 24 bits. But i believe you still need to keep support for 32 bits as well, so that when some bitstreams in current or future uses more than 24 bits your code can still handle that.


  ----- Original Message ----- 
  From: Sanjaykumar Gupta 
  To: Michael Smith 
  Cc: mlrsmith at gmail.com ; tremor at xiph.org ; vorbis-bounces at xiph.org ; Hibbs, Phil on [vorbis] ; tremor-bounces at xiph.org 
  Sent: Friday, August 26, 2005 9:51 AM
  Subject: [Tremor] What can be the max code word length in a code book?


  Thanks for the reply. 

  I have another important question wrt 24 bit platform implementation of OggVorbis 

  What can be the max code word length in a code book? 

  In some cases, I have seen it is max 21 bits. Can it go beyond 24 bits? If it can occur, Can you suggest how to handle it in 24bit platform as we don't have any variable type representing more than 24 bit. 

  Please reply at your earliest. 


  Best Regards,
  Sanjay Kumar                                Philips Innovation Campus
  Technical Specialist                        #1 Murphy Road
  Philips Applied Technologies                Ulsoor, Bangalore - 560 008
                                         Ph: +91 80 25579000 Extn. 5002
                                         Fax: +91 80 25561283
                                         Email: sanjaykumar.gupta at philips.com        

        Michael Smith 
        Sent by: 
        mlrsmith at gmail.com 

        2005-08-25 03:07 PM 
       To Sanjaykumar Gupta/BTC/PDSL/PHILIPS at PHILIPS  
              cc tremor at xiph.org
              tremor-bounces at xiph.org
              "Hibbs, Phil on [vorbis]" <vorbis at xiph.org>
              vorbis-bounces at xiph.org  
              Subject Re: [Tremor] what is max and min bitrate supported in OggVorbis?  



  On 8/25/05, Sanjaykumar Gupta <sanjaykumar.gupta at philips.com> wrote:
  > Hi All, 
  > I am planning to implement Ogg Vorbis Decoder on a 24 bit DSP. 
  > I have following doubts: 
  > 1) What is min and max bitrate? 

  Minimum bitrate is extremely low. Much less than one kilobit per
  second. Maximum bitrate is not strictly bounded in the full vorbis
  specification (we still hope to create a 'portable friendly profile'
  in the future), but over 500 kbps is unusual.

  > 2)What is max Audio Packet size ? 

  Not strictly bounded. You can experiment with the reference encoder at
  very high bitrates to get an idea of what real streams are likely to
  top out at.

  > 3)What is the max size of setup header? 

  Can be large. Several kilobytes is common. Perhaps a limit of 8 kB
  might be reasonable for portable implementations?

  > 4)Any idea how to start for making a 24Bit fixed point reference code? Shall
  > I start with floating point or Tremor or Tremor Low Mem Version? 

  I'd say tremor or tremor-lowmem, depending on whether you require
  particularly low memory usage or not (note that -lowmem requires
  somewhat more cpu).

  > 5) What window sizes in Ogg Vorbis are normally supported for audio portable
  > player? 

  You should ideally support all window sizes (i.e. from 64 to 8096).
  The smaller ones (64 and 128) are pretty simple to deal with. 256,
  512, 2048, and 4096 are all used by the reference encoder for common
  cases, so are absolutely crucial. I think some encoders use 1024 as
  well. 8096 is something you could skip if you don't have the memory
  available, but if you can fit it in that would be preferable.

  > 6) Floor0 is termed to be obsolete, Does this mean non of the commercially
  > available encoder supports Floor0? 

  It's not obvious what you mean by "commercially available". Certainly
  there were releases of the reference encoder (which is by far the most
  commonly used one) which used floor0, and some people have floor0
  files. However, later releases (including 1.0 and later) do not use
  floor0, it's uncommon, and it's reasonable to remove support for it if
  you have limited cpu power (it's significantly more cpu-intensive than



  Tremor mailing list
  Tremor at xiph.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/tremor/attachments/20050826/eba53f27/attachment.htm

More information about the Tremor mailing list