[Vorbis] Block sizes
    Tony O'Bryan 
    stormreaver at direcway.com
       
    Sat Sep  3 09:28:48 PDT 2005
    
    
  
On Saturday 03 September 2005 10:35 am, you wrote:
> I'm not quite sure where you got the idea that you should square this
> value (if something in the spec is unclear, let us know where, so we
> can fix it).
In section 4.2.2, the text for lines 7 and 8 say, "2 exponent (read 4 bits as
unsigned integer)".  This gave me the impression that the block size being
read (call it "x") is finalized as x^2 (an exponent of 2) mathematically.
> The correct way to calculate blocksize is:
>   blocksize = 1 << block_bits;
>
> For the cases you give here, that gives 1<< 8 = 256, and 1 << 11 =
> 2048, which are the standard values used by the reference encoder for
> 44.1kHz audio at most bitrates.
That makes more sense, and indeed gives me the correct values.  :)
On a tangent: It took some searching through various documentation files to
find where I should start looking for information on writing a decoder from
scratch, but once I found the starting point, I found the docs to be very
helpful.  Many thanks to whoever writes them.
    
    
More information about the Vorbis
mailing list