Commit 648cf28d authored by multrus's avatar multrus
Browse files

Merge branch '1842-optimization-predelay' into 'main'

In ivas_binaural_reverb_init(), the division of two constants was moved from...

Closes #1842

See merge request !1960
parents c5b32330 9c46fd6c
Loading
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -2537,7 +2537,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

@@ -2557,9 +2556,7 @@ 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
        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 );