A trio of warning fixes.
authorTim Terriberry <tterribe@xiph.org>
Mon, 29 Nov 2010 23:53:30 +0000 (23:53 +0000)
committerTim Terriberry <tterribe@xiph.org>
Mon, 29 Nov 2010 23:53:30 +0000 (23:53 +0000)
Thanks to Josh Soref for the report.

svn path=/trunk/vorbis/; revision=17688

lib/codebook.c
lib/floor1.c
lib/psy.c

index d71525bef7c1be481c29adf6d978133a78af48c7..0cbb5ecfb21be034cb5a0d3527c0fe6b66c12009 100644 (file)
@@ -248,7 +248,7 @@ static_codebook *vorbis_staticbook_unpack(oggpack_buffer *opb){
       }
 
       /* 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++)
index e1dc2c7288e6d9fff99d50c567623c620338efe9..a9a873a283422585dfddce4e421a0b51227346a7 100644 (file)
@@ -1035,7 +1035,7 @@ static void *floor1_inverse1(vorbis_block *vb,vorbis_look_floor *in){
           }
         }
 
-        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;
 
index 507b5095200d82a91da491a2931174523070508f..8c6918cdbb19e928a949ba276e8f06dbfaf72bb7 100644 (file)
--- a/lib/psy.c
+++ b/lib/psy.c
@@ -1154,27 +1154,28 @@ void _vp_couple_quantize_normalize(int blobno,
                 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;