shithub: opus

Download patch

ref: d84c8d1fd89ee138d8e496f54708eb080ee1ff0a
parent: b24e57462724185f8922455a2196607f06b98e41
author: Jean-Marc Valin <[email protected]>
date: Tue Oct 11 17:46:55 EDT 2011

Fixes a panned stereo regression

The previous commit introduced some cross-talk for the case of SILK
with one channel muted.

--- a/silk/stereo_find_predictor.c
+++ b/silk/stereo_find_predictor.c
@@ -47,7 +47,7 @@
     /* 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 );