summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Terriberry <tterribe@xiph.org>2010-10-21 18:14:51 +0000
committerTim Terriberry <tterribe@xiph.org>2010-10-21 18:14:51 +0000
commiteb57c519c1abf697b517e104df59e75aa8b09025 (patch)
treea1c0213f0728ce3faae304e396e0ec9c6652dc62
parent285149a6a33a4a95b85537b9e1f0da2367e833b9 (diff)
downloadtremor-eb57c519c1abf697b517e104df59e75aa8b09025.tar.gz
Port r17543 from Tremor.
A codebook that allows values outside the circular range of the piecewise floor1 representation can overflow the lookup Also fix a typo in the comments of the original patch. git-svn-id: https://svn.xiph.org/trunk/Tremor@17555 0101bb08-14d6-0310-b084-bc0e0c8e3800
-rw-r--r--floor1.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/floor1.c b/floor1.c
index a408392..a013552 100644
--- a/floor1.c
+++ b/floor1.c
@@ -425,7 +425,7 @@ static int floor1_inverse2(vorbis_block *vb,vorbis_look_floor *in,void *memo,
int hx=0;
int lx=0;
int ly=fit_value[0]*info->mult;
- /* guard lookup against out-of-rage values */
+ /* guard lookup against out-of-range values */
ly=(ly<0?0:ly>255?255:ly);
for(j=1;j<look->posts;j++){
@@ -435,10 +435,9 @@ static int floor1_inverse2(vorbis_block *vb,vorbis_look_floor *in,void *memo,
hx=info->postlist[current];
hy*=info->mult;
- /* guard lookup against out-of-rage values */
+ /* guard lookup against out-of-range values */
hy=(hy<0?0:hy>255?255:hy);
-
render_line(n,lx,hx,ly,hy,out);
lx=hx;