aboutsummaryrefslogtreecommitdiff
path: root/silk/stereo_MS_to_LR.c
diff options
context:
space:
mode:
authorHarish Mahendrakar <harish.mahendrakar@ittiam.com>2022-08-08 17:56:31 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-08-08 17:56:31 +0000
commit0c5459731645f6137cf70a2ff47887d07f89e63f (patch)
treec78adfd6bffe3bf8b0f2edb165f4687a16f9dad5 /silk/stereo_MS_to_LR.c
parent3eb6b26bc34ace509cd8d5842d276f2934cfa07a (diff)
parent8e70d764467652b3ab43e65d30d50df72532ea45 (diff)
downloadlibopus-0c5459731645f6137cf70a2ff47887d07f89e63f.tar.gz
Merge commit 'c9d5bea13e3cb7381bfa897a45d8bab4e7b767a7' into HEAD am: 170fd0b529 am: 0a0c005652 am: 8e70d76446
Original change: https://android-review.googlesource.com/c/platform/external/libopus/+/2164282 Change-Id: Ie7fb76a91cd4a2bb51d391cd4e464daf0fa3a50b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'silk/stereo_MS_to_LR.c')
-rw-r--r--silk/stereo_MS_to_LR.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/silk/stereo_MS_to_LR.c b/silk/stereo_MS_to_LR.c
index 62521a4f..1e01bb6e 100644
--- a/silk/stereo_MS_to_LR.c
+++ b/silk/stereo_MS_to_LR.c
@@ -59,7 +59,7 @@ void silk_stereo_MS_to_LR(
for( n = 0; n < STEREO_INTERP_LEN_MS * fs_kHz; n++ ) {
pred0_Q13 += delta0_Q13;
pred1_Q13 += delta1_Q13;
- sum = silk_LSHIFT( silk_ADD_LSHIFT( x1[ n ] + x1[ n + 2 ], x1[ n + 1 ], 1 ), 9 ); /* Q11 */
+ sum = silk_LSHIFT( silk_ADD_LSHIFT32( x1[ n ] + (opus_int32)x1[ n + 2 ], x1[ n + 1 ], 1 ), 9 ); /* Q11 */
sum = silk_SMLAWB( silk_LSHIFT( (opus_int32)x2[ n + 1 ], 8 ), sum, pred0_Q13 ); /* Q8 */
sum = silk_SMLAWB( sum, silk_LSHIFT( (opus_int32)x1[ n + 1 ], 11 ), pred1_Q13 ); /* Q8 */
x2[ n + 1 ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( sum, 8 ) );
@@ -67,7 +67,7 @@ void silk_stereo_MS_to_LR(
pred0_Q13 = pred_Q13[ 0 ];
pred1_Q13 = pred_Q13[ 1 ];
for( n = STEREO_INTERP_LEN_MS * fs_kHz; n < frame_length; n++ ) {
- sum = silk_LSHIFT( silk_ADD_LSHIFT( x1[ n ] + x1[ n + 2 ], x1[ n + 1 ], 1 ), 9 ); /* Q11 */
+ sum = silk_LSHIFT( silk_ADD_LSHIFT32( x1[ n ] + (opus_int32)x1[ n + 2 ], x1[ n + 1 ], 1 ), 9 ); /* Q11 */
sum = silk_SMLAWB( silk_LSHIFT( (opus_int32)x2[ n + 1 ], 8 ), sum, pred0_Q13 ); /* Q8 */
sum = silk_SMLAWB( sum, silk_LSHIFT( (opus_int32)x1[ n + 1 ], 11 ), pred1_Q13 ); /* Q8 */
x2[ n + 1 ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( sum, 8 ) );