Commit b057f1a2 authored by emerit's avatar emerit
Browse files

Merge branch 'ivas-float-update' into 1963_ref_portFltMR-1568-1471-1690

parents 94c107b6 a9428e06
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -153,6 +153,7 @@
/* #################### End FIXES switches ############################ */

#define BASOP_NOGLOB                                    /* Disable global symbols in BASOPs, Overflow/Carry in BASOPs disabled, additional BASOPs in case of Overflow */
#define FIX_1995_REVERB_INIT                            /* issue 1995: Fix use-of-uninitialized-value in ivas_binaural_reverb_init() */

/* #################### Start BASOP porting switches ############################ */

+11 −3
Original line number Diff line number Diff line
@@ -1868,6 +1868,7 @@ static ivas_error ivas_binaural_reverb_open(
 * Allocate and initialize binaural room reverberator handle
 * for CLDFB renderers
 *------------------------------------------------------------------------*/

ivas_error ivas_binaural_reverb_init(
    REVERB_STRUCT_HANDLE *hReverbPr,                      /* i/o: binaural reverb handle               */
    const HRTFS_STATISTICS_HANDLE hHrtfStatistics,        /* i  : HRTF statistics handle               */
@@ -1876,8 +1877,7 @@ ivas_error ivas_binaural_reverb_init(
    const IVAS_ROOM_ACOUSTICS_CONFIG_DATA *roomAcoustics, /* i/o: room acoustics parameters            */
    const int32_t sampling_rate,                          /* i  : sampling rate                        */
    const float *defaultTimes,                            /* i  : default reverberation times          */
    const float *defaultEne                               /* i  : default reverberation energies       */
    ,
    const float *defaultEne,                              /* i  : default reverberation energies       */
    float *earlyEne                                       /* i/o: Early part energies to be modified   */
)
{
@@ -1899,7 +1899,11 @@ ivas_error ivas_binaural_reverb_init(
    }
    else
    {
#ifdef FIX_1995_REVERB_INIT
        for ( bin = 0; bin < numBins; bin++ )
#else
        for ( bin = 0; bin < CLDFB_NO_CHANNELS_MAX; bin++ )
#endif
        {
            revTimes[bin] = defaultTimes[bin];
            revEne[bin] = defaultEne[bin];
@@ -1907,7 +1911,11 @@ ivas_error ivas_binaural_reverb_init(
        preDelay = 10;
    }

#ifdef FIX_1995_REVERB_INIT
    for ( bin = 0; bin < numBins; bin++ )
#else
    for ( bin = 0; bin < CLDFB_NO_CHANNELS_MAX; bin++ )
#endif
    {
        /* Adjust the room effect parameters when the reverberation time is less than a threshold value, to avoid
           spectral artefacts with the synthetic reverberator. */