shithub: opus

Download patch

ref: fd3139cccfc543f1e2fb201dab4e7b58234bced5
parent: 8d18601413963497f47022773ca8a6e1b6b67aae
author: Jean-Marc Valin <[email protected]>
date: Thu Jul 29 08:51:06 EDT 2010

Separate qtheta offset for stereo

--- a/libcelt/bands.c
+++ b/libcelt/bands.c
@@ -598,7 +598,7 @@
       int qalloc;
       celt_word16 mid, side;
       int offset, N2;
-      offset = ((m->logN[i]+(LM<<BITRES))>>1)-QTHETA_OFFSET;
+      offset = ((m->logN[i]+(LM<<BITRES))>>1) - (stereo ? QTHETA_OFFSET_STEREO : QTHETA_OFFSET);
 
       /* Decide on the resolution to give to the split parameter theta */
       N2 = 2*N-1;
--- a/libcelt/rate.h
+++ b/libcelt/rate.h
@@ -41,7 +41,8 @@
 
 #define BITRES 3
 #define FINE_OFFSET 14
-#define QTHETA_OFFSET (-2)
+#define QTHETA_OFFSET (-4)
+#define QTHETA_OFFSET_STEREO (0)
 
 #define BITOVERFLOW 30000