diff --git a/lib_rend/ivas_reverb_fx.c b/lib_rend/ivas_reverb_fx.c index 5156911f327f550c558d1169dad100ffb7afde06..3a03377722135aa5a74d2f6c2569e593ea6d604f 100644 --- a/lib_rend/ivas_reverb_fx.c +++ b/lib_rend/ivas_reverb_fx.c @@ -2427,7 +2427,6 @@ ivas_error ivas_binaural_reverb_init( Word32 ene[CLDFB_NO_CHANNELS_MAX]; Word16 preDelay; #ifdef FIX_1831_REVERB_REGRESSION - Word16 temp16, s; Word32 temp32; #endif @@ -2447,12 +2446,10 @@ ivas_error ivas_binaural_reverb_init( } #ifdef FIX_1831_REVERB_REGRESSION - temp16 = BASOP_Util_Divide3216_Scale( 48000, CLDFB_NO_CHANNELS_MAX, &s ); - temp16 = shl( temp16, s ); // Q0 - temp32 = Mult_32_16( roomAcoustics->acousticPreDelay_fx, temp16 ); // Q11 - preDelay = extract_l( L_shr( L_add( temp32, L_shl( 1, 10 ) ), 11 ) ); // Q0 + temp32 = Mult_32_16( roomAcoustics->acousticPreDelay_fx, ( ( IVAS_48k / CLDFB_NO_CHANNELS_MAX ) >> 1 ) ); // Q11 + preDelay = extract_l( L_shr( L_add( temp32, L_shl( 1, 10 ) ), 11 ) ); // Q0 #else - preDelay = (int16_t) roundf( 48000.0f * roomAcoustics->acousticPreDelay / CLDFB_NO_CHANNELS_MAX ); + preDelay = (int16_t) roundf( ( 48000.0f / CLDFB_NO_CHANNELS_MAX ) * roomAcoustics->acousticPreDelay ); #endif #ifdef FIX_1741_REVERB_TIMES_Q_FORMAT floatToFixed_arrL( t60_temp, t60, Q26, CLDFB_NO_CHANNELS_MAX );