From d84c8d1fd89ee138d8e496f54708eb080ee1ff0a Mon Sep 17 00:00:00 2001
From: Jean-Marc Valin <jmvalin@jmvalin.ca>
Date: Tue, 11 Oct 2011 21:46:55 -0400
Subject: [PATCH] Fixes a panned stereo regression

The previous commit introduced some cross-talk for the case of SILK
with one channel muted.
---
 silk/stereo_find_predictor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/silk/stereo_find_predictor.c b/silk/stereo_find_predictor.c
index 49ef46d77..d7be0f5f8 100644
--- a/silk/stereo_find_predictor.c
+++ b/silk/stereo_find_predictor.c
@@ -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 );
-- 
GitLab