shithub: opus

Download patch

ref: 817220e91d67215ed3d21ef683f5b605fed12544
parent: f93d81b15e6e98f3f07af868a687d82a894d8f18
author: Jean-Marc Valin <[email protected]>
date: Mon Aug 8 07:33:17 EDT 2011

Using a more conservative trim (just in case) following Greg's last patch

--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -840,7 +840,9 @@
          diff += bandLogE[i+c*m->nbEBands]*(opus_int32)(2+2*i-m->nbEBands);
       }
    } while (++c<C);
-   diff /= C*(end-1);
+   /* We divide by two here to avoid making the tilt larger for stereo as a
+      result of a bug in the loop above */
+   diff /= 2*C*(end-1);
    /*printf("%f\n", diff);*/
    if (diff > QCONST16(2.f, DB_SHIFT))
       trim_index--;