[xiph-commits] r14602 - in trunk/vorbis: doc lib

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Tue Mar 18 11:12:52 PDT 2008


Author: xiphmont
Date: 2008-03-18 11:12:52 -0700 (Tue, 18 Mar 2008)
New Revision: 14602

Modified:
   trunk/vorbis/doc/Vorbis_I_spec.html
   trunk/vorbis/doc/Vorbis_I_spec.pdf
   trunk/vorbis/lib/codebook.c
Log:
correctly handle the nonsensical codebook.dim==0 case


Modified: trunk/vorbis/doc/Vorbis_I_spec.html
===================================================================
--- trunk/vorbis/doc/Vorbis_I_spec.html	2008-03-18 17:58:44 UTC (rev 14601)
+++ trunk/vorbis/doc/Vorbis_I_spec.html	2008-03-18 18:12:52 UTC (rev 14602)
@@ -1,4 +1,4 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Vorbis I specification</title><meta name="generator" content="DocBook XSL Stylesheets V1.72.0"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="article" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="id209753"></a>Vorbis I specification</h1></div><div><h3 class="corpauthor">Xiph.org Foundation</h3></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#vorbis-spec-intro">1. Introduction and Description</a></span></dt><dd><dl><dt><span class="section"><a href="#id322780">1.1. Overview</a></span></dt><dt><span class="section"><a href="#id256749">1.2. Decoder Configuration</a></span></dt><dt><span class="section"><a href="#id257049">1.3. High-level Decode Process</a></span></dt></dl></dd><dt><span class="section"><a href="#vorbis-spec-bitpacking">2. Bitpacking C
 onvention</a></span></dt><dd><dl><dt><span class="section"><a href="#id316853">2.1. Overview</a></span></dt></dl></dd><dt><span class="section"><a href="#vorbis-spec-codebook">3. Probability Model and Codebooks</a></span></dt><dd><dl><dt><span class="section"><a href="#id326636">3.1. Overview</a></span></dt><dt><span class="section"><a href="#id329366">3.2. Packed codebook format</a></span></dt><dt><span class="section"><a href="#id320654">3.3. Use of the codebook abstraction</a></span></dt></dl></dd><dt><span class="section"><a href="#vorbis-spec-codec">4. Codec Setup and Packet Decode</a></span></dt><dd><dl><dt><span class="section"><a href="#id332455">4.1. Overview</a></span></dt><dt><span class="section"><a href="#id332825">4.2. Header decode and decode setup</a></span></dt><dt><span class="section"><a href="#id341314">4.3. Audio packet decode and synthesis</a></span></dt></dl></dd><dt><span class="section"><a href="#vorbis-spec-comment">5. comment field and header speci
 fication</a></span></dt><dd><dl><dt><span class="section"><a href="#id333629">5.1. Overview</a></span></dt><dt><span class="section"><a href="#id333657">5.2. Comment encoding</a></span></dt></dl></dd><dt><span class="section"><a href="#vorbis-spec-floor0">6. Floor type 0 setup and decode</a></span></dt><dd><dl><dt><span class="section"><a href="#id331401">6.1. Overview</a></span></dt><dt><span class="section"><a href="#id336955">6.2. Floor 0 format</a></span></dt></dl></dd><dt><span class="section"><a href="#vorbis-spec-floor1">7. Floor type 1 setup and decode</a></span></dt><dd><dl><dt><span class="section"><a href="#id315995">7.1. Overview</a></span></dt><dt><span class="section"><a href="#id313615">7.2. Floor 1 format</a></span></dt></dl></dd><dt><span class="section"><a href="#vorbis-spec-residue">8. Residue setup and decode</a></span></dt><dd><dl><dt><span class="section"><a href="#id312917">8.1. Overview</a></span></dt><dt><span class="section"><a href="#id336796">8.2.
  Residue format</a></span></dt><dt><span class="section"><a href="#id338976">8.3. residue 0</a></span></dt><dt><span class="section"><a href="#id309342">8.4. residue 1</a></span></dt><dt><span class="section"><a href="#id309367">8.5. residue 2</a></span></dt><dt><span class="section"><a href="#id304415">8.6. Residue decode</a></span></dt></dl></dd><dt><span class="section"><a href="#vorbis-spec-helper">9. Helper equations</a></span></dt><dd><dl><dt><span class="section"><a href="#id299483">9.1. Overview</a></span></dt><dt><span class="section"><a href="#id337672">9.2. Functions</a></span></dt></dl></dd><dt><span class="section"><a href="#vorbis-spec-tables">10. Tables</a></span></dt><dd><dl><dt><span class="section"><a href="#vorbis-spec-floor1_inverse_dB_table">10.1. floor1_inverse_dB_table</a></span></dt></dl></dd><dt><span class="appendix"><a href="#vorbis-over-ogg">1. Embedding Vorbis into an Ogg stream</a></span></dt><dd><dl><dt><span class="section"><a href="#id326343"
 >1.1. Overview</a></span></dt><dd><dl><dt><span class="section"><a href="#id310304">1.1.1. Restrictions</a></span></dt><dt><span class="section"><a href="#id310248">1.1.2. MIME type</a></span></dt></dl></dd><dt><span class="section"><a href="#id301737">1.2. Encapsulation</a></span></dt></dl></dd><dt><span class="appendix"><a href="#vorbis-over-rtp">2. Vorbis encapsulation in RTP</a></span></dt><dt><span class="appendix"><a href="#footer">3. Colophon</a></span></dt></dl></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="vorbis-spec-intro"></a>1. Introduction and Description</h2></div><div><p class="releaseinfo">
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Vorbis I specification</title><meta name="generator" content="DocBook XSL Stylesheets V1.72.0"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="article" lang="en"><div class="titlepage"><div><div><h1 class="title"><a name="id209753"></a>Vorbis I specification</h1></div><div><h3 class="corpauthor">Xiph.org Foundation</h3></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="#vorbis-spec-intro">1. Introduction and Description</a></span></dt><dd><dl><dt><span class="section"><a href="#id322780">1.1. Overview</a></span></dt><dt><span class="section"><a href="#id256749">1.2. Decoder Configuration</a></span></dt><dt><span class="section"><a href="#id257049">1.3. High-level Decode Process</a></span></dt></dl></dd><dt><span class="section"><a href="#vorbis-spec-bitpacking">2. Bitpacking C
 onvention</a></span></dt><dd><dl><dt><span class="section"><a href="#id316853">2.1. Overview</a></span></dt></dl></dd><dt><span class="section"><a href="#vorbis-spec-codebook">3. Probability Model and Codebooks</a></span></dt><dd><dl><dt><span class="section"><a href="#id326636">3.1. Overview</a></span></dt><dt><span class="section"><a href="#id329366">3.2. Packed codebook format</a></span></dt><dt><span class="section"><a href="#id320654">3.3. Use of the codebook abstraction</a></span></dt></dl></dd><dt><span class="section"><a href="#vorbis-spec-codec">4. Codec Setup and Packet Decode</a></span></dt><dd><dl><dt><span class="section"><a href="#id332455">4.1. Overview</a></span></dt><dt><span class="section"><a href="#id332825">4.2. Header decode and decode setup</a></span></dt><dt><span class="section"><a href="#id341314">4.3. Audio packet decode and synthesis</a></span></dt></dl></dd><dt><span class="section"><a href="#vorbis-spec-comment">5. comment field and header speci
 fication</a></span></dt><dd><dl><dt><span class="section"><a href="#id333629">5.1. Overview</a></span></dt><dt><span class="section"><a href="#id333657">5.2. Comment encoding</a></span></dt></dl></dd><dt><span class="section"><a href="#vorbis-spec-floor0">6. Floor type 0 setup and decode</a></span></dt><dd><dl><dt><span class="section"><a href="#id331401">6.1. Overview</a></span></dt><dt><span class="section"><a href="#id336955">6.2. Floor 0 format</a></span></dt></dl></dd><dt><span class="section"><a href="#vorbis-spec-floor1">7. Floor type 1 setup and decode</a></span></dt><dd><dl><dt><span class="section"><a href="#id315995">7.1. Overview</a></span></dt><dt><span class="section"><a href="#id313615">7.2. Floor 1 format</a></span></dt></dl></dd><dt><span class="section"><a href="#vorbis-spec-residue">8. Residue setup and decode</a></span></dt><dd><dl><dt><span class="section"><a href="#id312917">8.1. Overview</a></span></dt><dt><span class="section"><a href="#id336796">8.2.
  Residue format</a></span></dt><dt><span class="section"><a href="#id309374">8.3. residue 0</a></span></dt><dt><span class="section"><a href="#id343072">8.4. residue 1</a></span></dt><dt><span class="section"><a href="#id343097">8.5. residue 2</a></span></dt><dt><span class="section"><a href="#id343146">8.6. Residue decode</a></span></dt></dl></dd><dt><span class="section"><a href="#vorbis-spec-helper">9. Helper equations</a></span></dt><dd><dl><dt><span class="section"><a href="#id308612">9.1. Overview</a></span></dt><dt><span class="section"><a href="#id320333">9.2. Functions</a></span></dt></dl></dd><dt><span class="section"><a href="#vorbis-spec-tables">10. Tables</a></span></dt><dd><dl><dt><span class="section"><a href="#vorbis-spec-floor1_inverse_dB_table">10.1. floor1_inverse_dB_table</a></span></dt></dl></dd><dt><span class="appendix"><a href="#vorbis-over-ogg">1. Embedding Vorbis into an Ogg stream</a></span></dt><dd><dl><dt><span class="section"><a href="#id321543"
 >1.1. Overview</a></span></dt><dd><dl><dt><span class="section"><a href="#id315128">1.1.1. Restrictions</a></span></dt><dt><span class="section"><a href="#id302634">1.1.2. MIME type</a></span></dt></dl></dd><dt><span class="section"><a href="#id319135">1.2. Encapsulation</a></span></dt></dl></dd><dt><span class="appendix"><a href="#vorbis-over-rtp">2. Vorbis encapsulation in RTP</a></span></dt><dt><span class="appendix"><a href="#footer">3. Colophon</a></span></dt></dl></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="vorbis-spec-intro"></a>1. Introduction and Description</h2></div><div><p class="releaseinfo">
  $Id: 01-introduction.xml 7186 2004-07-20 07:19:25Z xiphmont $
 </p></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id322780"></a>1.1. Overview</h3></div></div></div><p>
 This document provides a high level description of the Vorbis codec's
@@ -1648,7 +1648,7 @@
  16) done
 
 </pre></div></div></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="vorbis-spec-residue"></a>8. Residue setup and decode</h2></div><div><p class="releaseinfo">
-  $Id: 08-residue.xml 13159 2007-06-21 05:22:35Z xiphmont $
+  $Id: 08-residue.xml 14598 2008-03-18 15:39:43Z xiphmont $
  </p></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id312917"></a>8.1. Overview</h3></div></div></div><p>
 A residue vector represents the fine detail of the audio spectrum of
 one channel in an audio frame after the encoder subtracts the floor
@@ -1695,7 +1695,7 @@
 from multiple decode passes.  The classification value associated with
 a partition is the same in each pass, thus the classification codeword
 is coded only in the first pass.</p></li></ul></div><p>
-</p><div class="mediaobject"><img src="residue-pack.png" alt="[illustration of residue vector format]"></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id338976"></a>8.3. residue 0</h3></div></div></div><p>
+</p><div class="mediaobject"><img src="residue-pack.png" alt="[illustration of residue vector format]"></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id309374"></a>8.3. residue 0</h3></div></div></div><p>
 Residue 0 and 1 differ only in the way the values within a residue
 partition are interleaved during partition encoding (visually treated
 as a black box--or cyan box or brown box--in the above figure).</p><p>
@@ -1719,7 +1719,7 @@
 
 </pre><p>
 It is worth mentioning at this point that no configurable value in the
-residue coding setup is restricted to a power of two.</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id309342"></a>8.4. residue 1</h3></div></div></div><p>
+residue coding setup is restricted to a power of two.</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id343072"></a>8.4. residue 1</h3></div></div></div><p>
 Residue 1 does not interleave VQ encoding.  It represents partition
 vector scalars in order.  As with residue 0, however, partition length
 must be an integer multiple of the codebook dimension, although
@@ -1737,14 +1737,14 @@
 
 codebook dimensions = 1  encoded as: [ 0 ], [ 1 ], [ 2 ], [ 3 ], [ 4 ], [ 5 ], [ 6 ], [ 7 ]
 
-</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id309367"></a>8.5. residue 2</h3></div></div></div><p>
+</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id343097"></a>8.5. residue 2</h3></div></div></div><p>
 Residue type two can be thought of as a variant of residue type 1.
 Rather than encoding multiple passed-in vectors as in residue type 1,
 the <span class="emphasis"><em>ch</em></span> passed in vectors of length <span class="emphasis"><em>n</em></span> are first
 interleaved and flattened into a single vector of length
 <span class="emphasis"><em>ch</em></span>*<span class="emphasis"><em>n</em></span>.  Encoding then proceeds as in type 1. Decoding is
 as in type 1 with decode interleave reversed. If operating on a single
-vector to begin with, residue type 1 and type 2 are equivalent.</p><div class="mediaobject"><img src="residue2.png" alt="[illustration of residue type 2]"></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id304415"></a>8.6. Residue decode</h3></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id304421"></a>8.6.1. header decode</h4></div></div></div><p>
+vector to begin with, residue type 1 and type 2 are equivalent.</p><div class="mediaobject"><img src="residue2.png" alt="[illustration of residue type 2]"></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id343146"></a>8.6. Residue decode</h3></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id343152"></a>8.6.1. header decode</h4></div></div></div><p>
 Header decode for all three residue types is identical.</p><pre class="programlisting">
   1) [residue_begin] = read 24 bits as unsigned integer
   2) [residue_end] = read 24 bits as unsigned integer
@@ -1752,21 +1752,29 @@
   4) [residue_classifications] = read 6 bits as unsigned integer and add one
   5) [residue_classbook] = read 8 bits as unsigned integer
 </pre><p>
-<code class="varname">[residue_begin]</code> and <code class="varname">[residue_end]</code> select the specific
-sub-portion of each vector that is actually coded; it implements akin
-to a bandpass where, for coding purposes, the vector effectively
-begins at element <code class="varname">[residue_begin]</code> and ends at
-<code class="varname">[residue_end]</code>.  Preceding and following values in the unpacked
-vectors are zeroed.  Note that for residue type 2, these values as
-well as <code class="varname">[residue_partition_size]</code>apply to the interleaved
-vector, not the individual vectors before interleave.
+<code class="varname">[residue_begin]</code> and
+<code class="varname">[residue_end]</code> select the specific sub-portion of
+each vector that is actually coded; it implements akin to a bandpass
+where, for coding purposes, the vector effectively begins at element
+<code class="varname">[residue_begin]</code> and ends at
+<code class="varname">[residue_end]</code>.  Preceding and following values in
+the unpacked vectors are zeroed.  Note that for residue type 2, these
+values as well as <code class="varname">[residue_partition_size]</code>apply to
+the interleaved vector, not the individual vectors before interleave.
 <code class="varname">[residue_partition_size]</code> is as explained above,
 <code class="varname">[residue_classifications]</code> is the number of possible
 classification to which a partition can belong and
-<code class="varname">[residue_classbook]</code> is the codebook number used to code
-classification codewords.  The number of dimensions in book
-<code class="varname">[residue_classbook]</code> determines how many classification values
-are grouped into a single classification codeword.</p><p>
+<code class="varname">[residue_classbook]</code> is the codebook number used to
+code classification codewords.  The number of dimensions in book
+<code class="varname">[residue_classbook]</code> determines how many
+classification values are grouped into a single classification
+codeword.  Note that the number of entries and dimensions in book
+<code class="varname">[residue_classbook]</code>, along with
+<code class="varname">[residue_classifications]</code>, overdetermines to
+possible number of classification codewords.  If
+<code class="varname">[residue_classifications]</code>^<code class="varname">[residue_classbook]</code>.dimensions
+does not equal <code class="varname">[residue_classbook]</code>.entries, the
+bitstream should be regarded to be undecodable. </p><p>
 Next we read a bitmap pattern that specifies which partition classes
 code values in which passes.</p><pre class="programlisting">
   1) iterate [i] over the range 0 ... [residue_classifications]-1 {
@@ -1805,7 +1813,7 @@
 An end-of-packet condition at any point in header decode renders the
 stream undecodable.  In addition, any codebook number greater than the
 maximum numbered codebook set up in this stream also renders the
-stream undecodable.</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id304514"></a>8.6.2. packet decode</h4></div></div></div><p>
+stream undecodable.</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id304464"></a>8.6.2. packet decode</h4></div></div></div><p>
 Format 0 and 1 packet decode is identical except for specific
 partition interleave.  Format 2 packet decode can be built out of the
 format 1 decode process.  Thus we describe first the decode
@@ -1899,7 +1907,7 @@
 </pre><p>
 An end-of-packet condition during packet decode is to be considered a
 nominal occurrence.  Decode returns the result of vector decode up to
-that point.</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id306680"></a>8.6.3. format 0 specifics</h4></div></div></div><p>
+that point.</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id315244"></a>8.6.3. format 0 specifics</h4></div></div></div><p>
 Format zero decodes partitions exactly as described earlier in the
 'Residue Format: residue 0' section.  The following pseudocode
 presents the same algorithm. Assume:</p><p>
@@ -1921,7 +1929,7 @@
 
   6) done
 
-</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id299260"></a>8.6.4. format 1 specifics</h4></div></div></div><p>
+</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id299210"></a>8.6.4. format 1 specifics</h4></div></div></div><p>
 Format 1 decodes partitions exactly as described earlier in the
 'Residue Format: residue 1' section.  The following pseudocode
 presents the same algorithm. Assume:</p><p>
@@ -1941,7 +1949,7 @@
  
   6) if ( [i] is less than [n] ) continue at step 2
   7) done
-</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id299311"></a>8.6.5. format 2 specifics</h4></div></div></div><p>
+</pre></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id299262"></a>8.6.5. format 2 specifics</h4></div></div></div><p>
 Format 2 is reducible to format 1.  It may be implemented as an additional step prior to and an additional post-decode step after a normal format 1 decode.
 </p><p>
 Format 2 handles 'do not decode' vectors differently than residue 0 or
@@ -1964,11 +1972,11 @@
   </pre><p>
  </p></li></ol></div></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="vorbis-spec-helper"></a>9. Helper equations</h2></div><div><p class="releaseinfo">
  $Id: 09-helper.xml 7186 2004-07-20 07:19:25Z xiphmont $
-</p></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id299483"></a>9.1. Overview</h3></div></div></div><p>
+</p></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id308612"></a>9.1. Overview</h3></div></div></div><p>
 The equations below are used in multiple places by the Vorbis codec
 specification.  Rather than cluttering up the main specification
 documents, they are defined here and referenced where appropriate.
-</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id337672"></a>9.2. Functions</h3></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="vorbis-spec-ilog"></a>9.2.1. ilog</h4></div></div></div><p>
+</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id320333"></a>9.2. Functions</h3></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="vorbis-spec-ilog"></a>9.2.1. ilog</h4></div></div></div><p>
 The "ilog(x)" function returns the position number (1 through n) of the highest set bit in the two's complement integer value
 <code class="varname">[x]</code>.  Values of <code class="varname">[x]</code> less than zero are defined to return zero.</p><pre class="programlisting">
   1) [return_value] = 0;
@@ -2149,7 +2157,7 @@
   0.50028648,    0.53279791,    0.56742212,    0.60429640, 
   0.64356699,    0.68538959,    0.72993007,    0.77736504, 
   0.82788260,    0.88168307,    0.9389798,     1.
-</pre></div></div><div class="appendix" lang="en"><h2 class="title" style="clear: both"><a name="vorbis-over-ogg"></a>1. Embedding Vorbis into an Ogg stream</h2><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id326343"></a>1.1. Overview</h3></div></div></div><p>
+</pre></div></div><div class="appendix" lang="en"><h2 class="title" style="clear: both"><a name="vorbis-over-ogg"></a>1. Embedding Vorbis into an Ogg stream</h2><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id321543"></a>1.1. Overview</h3></div></div></div><p>
 This document describes using Ogg logical and physical transport
 streams to encapsulate Vorbis compressed audio packet data into file
 form.</p><p>
@@ -2160,7 +2168,7 @@
 bitstream and framing spec</a> provide detailed descriptions of Ogg
 transport streams. This specification document assumes a working
 knowledge of the concepts covered in these named backround
-documents.  Please read them first.</p><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id310304"></a>1.1.1. Restrictions</h4></div></div></div><p>
+documents.  Please read them first.</p><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id315128"></a>1.1.1. Restrictions</h4></div></div></div><p>
 The Ogg/Vorbis I specification currently dictates that Ogg/Vorbis
 streams use Ogg transport streams in degenerate, unmultiplexed
 form only. That is:
@@ -2183,11 +2191,11 @@
 specific support of Vorbis within a degenrate ogg stream (naturally,
 application authors are encouraged to support full multiplexed Ogg
 handling).
-</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id310248"></a>1.1.2. MIME type</h4></div></div></div><p>
+</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id302634"></a>1.1.2. MIME type</h4></div></div></div><p>
 The correct MIME type of any Ogg file is <code class="literal">application/ogg</code>.
 However, if a file is a Vorbis I audio file (which implies a
 degenerate Ogg stream including only unmultiplexed Vorbis audio), the
-mime type <code class="literal">audio/x-vorbis</code> is also allowed.</p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id301737"></a>1.2. Encapsulation</h3></div></div></div><p>
+mime type <code class="literal">audio/x-vorbis</code> is also allowed.</p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id319135"></a>1.2. Encapsulation</h3></div></div></div><p>
 Ogg encapsulation of a Vorbis packet stream is straightforward.</p><div class="itemizedlist"><ul type="disc"><li>
   The first Vorbis packet (the identification header), which
   uniquely identifies a stream as Vorbis audio, is placed alone in the

Modified: trunk/vorbis/doc/Vorbis_I_spec.pdf
===================================================================
(Binary files differ)

Modified: trunk/vorbis/lib/codebook.c
===================================================================
--- trunk/vorbis/lib/codebook.c	2008-03-18 17:58:44 UTC (rev 14601)
+++ trunk/vorbis/lib/codebook.c	2008-03-18 18:12:52 UTC (rev 14602)
@@ -225,7 +225,7 @@
       int quantvals=0;
       switch(s->maptype){
       case 1:
-	quantvals=_book_maptype1_quantvals(s);
+	quantvals=(s->dim==0?0:_book_maptype1_quantvals(s));
 	break;
       case 2:
 	quantvals=s->entries*s->dim;



More information about the commits mailing list