Commit e6bc5df6 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch '1831_basop_predelay_fix' into 'main-pc'

[non-BE][allow-regression] Resolve "[regression-merge] Decoder-Output for BINAURAL_ROOM_REVERB with rend_config_hospital_patientroom.cfg very different in BASOP vs. Float"

See merge request !1946
parents 9d0ac6f8 2a5a43ca
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -164,6 +164,7 @@
#define NONBE_FIX_991_PARAMBIN_BINARY_HRTF              /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to activate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on ) */

#define FIX_1741_REVERB_TIMES_Q_FORMAT                  /* Philips: reverberation times in Q26 format instead of Q31 */
#define FIX_1831_REVERB_REGRESSION                      /* Philips: fixes reverb regression issues  */

/* #################### End BASOP porting switches ############################ */

+11 −0
Original line number Diff line number Diff line
@@ -2426,6 +2426,10 @@ ivas_error ivas_binaural_reverb_init(
    Word32 t60[CLDFB_NO_CHANNELS_MAX];
    Word32 ene[CLDFB_NO_CHANNELS_MAX];
    Word16 preDelay;
#ifdef FIX_1831_REVERB_REGRESSION
    Word16 temp16, s;
    Word32 temp32;
#endif

    error = IVAS_ERR_OK;

@@ -2442,7 +2446,14 @@ ivas_error ivas_binaural_reverb_init(
            return error;
        }

#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
#else
        preDelay = (int16_t) roundf( 48000.0f * roomAcoustics->acousticPreDelay / CLDFB_NO_CHANNELS_MAX );
#endif
#ifdef FIX_1741_REVERB_TIMES_Q_FORMAT
        floatToFixed_arrL( t60_temp, t60, Q26, CLDFB_NO_CHANNELS_MAX );
#else