From c78405727f8c5fcc9d1a8d23d57f16fc4c7dface Mon Sep 17 00:00:00 2001 From: "Loren M. Lang" Date: Sat, 11 Nov 2017 02:14:35 -0800 Subject: [PATCH] Fixed error in Vorbis I specification for limiting residue vector size The minimum between the encoded residue boundaries and actual block size needs to be used, otherwise it pushes the boundaries to the edge of the actual blocksize or beyond. --- doc/08-residue.tex | 4 ++-- doc/Vorbis_I_spec.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/08-residue.tex b/doc/08-residue.tex index 2c1da67..ea38243 100644 --- a/doc/08-residue.tex +++ b/doc/08-residue.tex @@ -269,8 +269,8 @@ process. 1) [actual\_size] = current blocksize/2; 2) if residue encoding is format 2 3) [actual\_size] = [actual\_size] * [ch]; - 4) [limit\_residue\_begin] = maximum of ([residue\_begin],[actual\_size]); - 5) [limit\_residue\_end] = maximum of ([residue\_end],[actual\_size]); + 4) [limit\_residue\_begin] = minimum of ([residue\_begin],[actual\_size]); + 5) [limit\_residue\_end] = minimum of ([residue\_end],[actual\_size]); \end{programlisting} The following convenience values are conceptually useful to clarifying diff --git a/doc/Vorbis_I_spec.html b/doc/Vorbis_I_spec.html index 145d88b..629b2fb 100644 --- a/doc/Vorbis_I_spec.html +++ b/doc/Vorbis_I_spec.html @@ -9737,7 +9737,7 @@ class="cmtt-8">  4) [limit\_residue\_begin] = maximum minimum of ([residue\_begin],[actual\_size]);
  5) [limit\_residue\_end] = maximum minimum of ([residue\_end],[actual\_size]);

The following convenience values are conceptually useful to clarifying the decode process: -- 2.7.4