Commit 25cee31e authored by kinuthia's avatar kinuthia
Browse files

Merge branch 'main' into 978-tdrend-mc-with-head-tracking-has-no-reverb

parents 6a0190b6 2e2ec8a0
Loading
Loading
Loading
Loading
Loading

lib_com/options.h

100644 → 100755
+1 −0
Original line number Diff line number Diff line
@@ -158,6 +158,7 @@
#define FIX_955_FASTCONV_REND_IN_ISM                    /* VA: put FastConv rendering call under DEBUGGING */
#define FIX_969_USAN_IGF_ARITH                          /* FhG: issue 969: fix USAN error in igf_sce_dec; same issue as #962 */
#define FIX_959_MASA_LINEAR_REND                        /* VA: issue 959: remove unused calling of ivas_sba_linear_renderer() in MASA rendering */
#define FIX_963_USAN_ERROR                              /* Eri: Issue 963: USAN error in Stereo CNG, division by zero */
#define FIX_971_LOG2_IDX_GAIN_0                         /* VA: prevent -Inf due to log2(ratio==0) */

/* #################### End BE switches ################################## */
+22 −0
Original line number Diff line number Diff line
@@ -908,7 +908,18 @@ void stereo_dft_enc_compute_itd(
                {
                    hStereoDft->expectedNumUpdates += 1 + min( hCPE->hFrontVad[0]->rem_dtx_ho, hCPE->hFrontVad[1]->rem_dtx_ho );
                }
#ifdef FIX_963_USAN_ERROR
                if ( hStereoDft->expectedNumUpdates + hStereoDft->currentNumUpdates == 0 )
                {
                    cng_xcorr_filt = max( CORR_FILT, sfm_L );
                }
                else
                {
                    cng_xcorr_filt = max( min( CORR_FILT, 10.0f * CORR_FILT / ( hStereoDft->expectedNumUpdates + hStereoDft->currentNumUpdates ) ), sfm_L );
                }
#else
                cng_xcorr_filt = max( min( CORR_FILT, 10.0f * CORR_FILT / ( hStereoDft->expectedNumUpdates + hStereoDft->currentNumUpdates ) ), sfm_L );
#endif
                hStereoDft->currentNumUpdates++;
                for ( i = 1; i < NFFT / 2; i++ )
                {
@@ -943,7 +954,18 @@ void stereo_dft_enc_compute_itd(
            if ( vad_flag_dtx[0] == 0 )
            {
                /* expectedNumUpdates updated after call to dtx() in SID frames */
#ifdef FIX_963_USAN_ERROR
                if ( hStereoDft->expectedNumUpdates + hStereoDft->currentNumUpdates == 0 )
                {
                    cng_xcorr_filt = max( CORR_FILT, sfm_L );
                }
                else
                {
                    cng_xcorr_filt = max( min( CORR_FILT, 10.0f * CORR_FILT / ( hStereoDft->expectedNumUpdates + hStereoDft->currentNumUpdates ) ), sfm_L );
                }
#else
                cng_xcorr_filt = max( min( CORR_FILT, 10.0f * CORR_FILT / ( hStereoDft->expectedNumUpdates + hStereoDft->currentNumUpdates ) ), sfm_L );
#endif
                hStereoDft->currentNumUpdates++;
                hStereoDft->sfm = cng_xcorr_filt;
            }