shithub: opus

Download patch

ref: cb2c77c68ea88b18490cc81ed58cda033ed4b62f
parent: ba760bc52593ba6dae8b3886b3f68226e50c951a
author: Jean-Marc Valin <[email protected]>
date: Tue Sep 14 12:43:35 EDT 2010

Add an extra safety bit in intra_decision()

--- a/libcelt/quant_bands.c
+++ b/libcelt/quant_bands.c
@@ -74,11 +74,11 @@
    {
       for (i=start;i<end;i++)
       {
-         celt_word16 d = SHR16(SUB16(eBands[i+c*len], oldEBands[i+c*len]),1);
+         celt_word16 d = SHR16(SUB16(eBands[i+c*len], oldEBands[i+c*len]),2);
          dist = MAC16_16(dist, d,d);
       }
    }
-   return SHR32(dist,2*DB_SHIFT-2) > 2*C*(end-start);
+   return SHR32(dist,2*DB_SHIFT-4) > 2*C*(end-start);
 }
 
 #ifndef STATIC_MODES