Fixes a panned stereo regression
authorJean-Marc Valin <jmvalin@jmvalin.ca>
Wed, 12 Oct 2011 01:46:55 +0000 (21:46 -0400)
committerJean-Marc Valin <jmvalin@jmvalin.ca>
Wed, 12 Oct 2011 01:46:55 +0000 (21:46 -0400)
The previous commit introduced some cross-talk for the case of SILK
with one channel muted.

silk/stereo_find_predictor.c

index 49ef46d..d7be0f5 100644 (file)
@@ -47,7 +47,7 @@ opus_int32 silk_stereo_find_predictor(                   /* O    Returns predict
     /* Find  predictor */
     silk_sum_sqr_shift( &nrgx, &scale1, x, length );
     silk_sum_sqr_shift( &nrgy, &scale2, y, length );
-    scale = silk_max_int( scale1, scale2 ) + 1;
+    scale = silk_max_int( scale1, scale2 );
     scale = scale + ( scale & 1 );          /* make even */
     nrgy = silk_RSHIFT32( nrgy, scale - scale2 );
     nrgx = silk_RSHIFT32( nrgx, scale - scale1 );