[xiph-commits] r17688 - trunk/vorbis/lib
tterribe at svn.xiph.org
tterribe at svn.xiph.org
Mon Nov 29 15:53:30 PST 2010
Author: tterribe
Date: 2010-11-29 15:53:30 -0800 (Mon, 29 Nov 2010)
New Revision: 17688
Modified:
trunk/vorbis/lib/codebook.c
trunk/vorbis/lib/floor1.c
trunk/vorbis/lib/psy.c
Log:
A trio of warning fixes.
Thanks to Josh Soref for the report.
Modified: trunk/vorbis/lib/codebook.c
===================================================================
--- trunk/vorbis/lib/codebook.c 2010-11-29 21:04:02 UTC (rev 17687)
+++ trunk/vorbis/lib/codebook.c 2010-11-29 23:53:30 UTC (rev 17688)
@@ -248,7 +248,7 @@
}
/* quantized values */
- if((quantvals*s->q_quant+7>>3)>opb->storage-oggpack_bytes(opb))
+ if((quantvals*s->q_quant+7)>>3>opb->storage-oggpack_bytes(opb))
goto _eofout;
s->quantlist=_ogg_malloc(sizeof(*s->quantlist)*quantvals);
for(i=0;i<quantvals;i++)
Modified: trunk/vorbis/lib/floor1.c
===================================================================
--- trunk/vorbis/lib/floor1.c 2010-11-29 21:04:02 UTC (rev 17687)
+++ trunk/vorbis/lib/floor1.c 2010-11-29 23:53:30 UTC (rev 17688)
@@ -1035,7 +1035,7 @@
}
}
- fit_value[i]=val+predicted&0x7fff;
+ fit_value[i]=(val+predicted)&0x7fff;
fit_value[look->loneighbor[i-2]]&=0x7fff;
fit_value[look->hineighbor[i-2]]&=0x7fff;
Modified: trunk/vorbis/lib/psy.c
===================================================================
--- trunk/vorbis/lib/psy.c 2010-11-29 21:04:02 UTC (rev 17687)
+++ trunk/vorbis/lib/psy.c 2010-11-29 23:53:30 UTC (rev 17688)
@@ -1154,28 +1154,29 @@
reM[j] += reA[j];
qeM[j] = fabs(reM[j]);
}else{
+#if 0
/* AoTuV */
/** @ M2 **
The boost problem by the combination of noise normalization and point stereo is eased.
However, this is a temporary patch.
by Aoyumi @ 2004/04/18
*/
- /*float derate = (1.0 - de*((float)(j-limit+i) / (float)(n-limit)));
- /* elliptical
+ float derate = (1.0 - de*((float)(j-limit+i) / (float)(n-limit)));
+ /* elliptical */
if(reM[j]+reA[j]<0){
reM[j] = - (qeM[j] = (fabs(reM[j])+fabs(reA[j]))*derate*derate);
}else{
reM[j] = (qeM[j] = (fabs(reM[j])+fabs(reA[j]))*derate*derate);
- }*/
-
+ }
+#else
/* elliptical */
if(reM[j]+reA[j]<0){
reM[j] = - (qeM[j] = fabs(reM[j])+fabs(reA[j]));
}else{
reM[j] = (qeM[j] = fabs(reM[j])+fabs(reA[j]));
}
+#endif
-
}
reA[j]=qeA[j]=0.f;
fA[j]=1;
More information about the commits
mailing list