Commit 2ac81bdc authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'float-pc' into 1567_ref_empty_dirac_param_bands_at_high_br

parents 0f34318b 1984ff0e
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -181,6 +181,7 @@
#define ISAR_BITSTREAM_UPDATE_LC3PLUS                   /* FhG: Multiple improvements to the ISAR bitstream when LC3plus is used. See MR 1456 for details. */
#endif
#define NONBE_FIX_1058_DECODER_ERROR_WITH_REVERB_ROOM   /* FhG: issue 1058: do not initialize EFAP when IntSetup is HOA3 */
#define FIX_963_USAN_ERROR                              /* Eri: Issue 963: USAN error in Stereo CNG, division by zero */
#define NONBE_FIX_952_MC_PARAMUPMIX_5MS                       /* Dlb : issue 952 : Differences between 5ms and 20ms rendering for ParamUpmix*/
#define NONBE_FIX_935_EARLY_REFLECTIONS_WRONG_ORDER           /* Qualcomm: issue 953: fix order or ER channels in LC mode*/
#define FIX_955_FASTCONV_REND_IN_ISM                    /* VA: put FastConv rendering call under DEBUGGING */
@@ -190,6 +191,7 @@
#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 NONBE_FIX_973_HODIRAC_BAND_GROUPING                   /* FhG: issue 973: empty parameter band in DirAC */
#define FIX_971_LOG2_IDX_GAIN_0                         /* VA: prevent -Inf due to log2(ratio==0)  */

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

+22 −0
Original line number Diff line number Diff line
@@ -910,7 +910,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++ )
                {
@@ -945,7 +956,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;
            }
+6 −0
Original line number Diff line number Diff line
@@ -2753,6 +2753,12 @@ void fb_tbe_enc(
    hBWE_TD->prev_fb_energy = sum2_f( input_fhb + L_FRAME48k / 2, L_FRAME48k / 2 );
    fb_exc_energy = sum2_f( fb_exc, L_FRAME16k ) + EPSILON;
    ratio = (float) sqrt( temp2 / fb_exc_energy );
#ifdef FIX_971_LOG2_IDX_GAIN_0
    if ( ratio < 1.0f )
    {
        ratio = 1.0f;
    }
#endif
    idxGain = (int16_t) ( log2_f( (float) ratio ) + 0.5f );
    idxGain = max( 0, min( 15, idxGain ) );
    ratio = (float) ( 1 << idxGain );