From 7e925d3f7d7006c431930f68c7495758dc9b2e4a Mon Sep 17 00:00:00 2001 From: rtyag Date: Thu, 16 Mar 2023 16:15:50 +1100 Subject: [PATCH] Fix for issue 376 --- lib_com/options.h | 2 ++ lib_rend/lib_rend.c | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 940d3857fa..298fe1391f 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -170,6 +170,8 @@ #define FIX_350_MASA_DELAY_COMP /* Nokia: Issue 350: MASA audio/meta delay compensation */ #define FIX_372_LIB_REND_VALIDATE_IO /* FhG: Issue 372: IVAS_rend segfaults with unsupported I/O configs - add validation checks of I/O config */ +#define FIX_376_SBA_ROTATE /*DLB: Fix for issue 376*/ + /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ #endif diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index 8a4807c8fc..7a1c4f4f30 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -4321,7 +4321,18 @@ static ivas_error rotateFrameSba( ( 1 - headRotData->crossfade[i] ) * gains_prev[n][m] * ( *readPtr ); } } +#ifdef FIX_376_SBA_ROTATE + /* write back the result */ + for ( n = m1; n < m2; n++ ) + { + writePtr = getSmplPtr( outAudio, n, subframe_idx * subframe_len + i ); + ( *writePtr ) = tmpRot[n - m1]; + } + m1 = m2; + m2 += 2 * ( l + 1 ) + 1; +#endif } +#ifndef FIX_376_SBA_ROTATE /* write back the result */ for ( n = m1; n < m2; n++ ) { @@ -4330,6 +4341,7 @@ static ivas_error rotateFrameSba( } m1 = m2; m2 += 2 * ( l + 1 ) + 1; +#endif } /*unoptimized code for reference (full matrix multiplication)*/ -- GitLab