Commit a616f1e5 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_1461_CNG_BW_SWITCHING

parent 55d7e480
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -103,7 +103,6 @@
/* #################### Start NON-BE switches ############################ */
/* #################### Start NON-BE switches ############################ */
/* any switch which is non-be wrt. TS 26.251 V3.0 */
/* any switch which is non-be wrt. TS 26.251 V3.0 */


#define FIX_1461_CNG_BW_SWITCHING                       /* Eri: float issue 1461: Stereo parameters are not updated when SID/NODATA forces BW to stay the same */
#define FIX_2041_SPECTRAL_GAPS_FOR_INACTIVE_FRAMES      /* FhG: Using rounding in multiplication to improve precision in cngNoiseLevel[] */
#define FIX_2041_SPECTRAL_GAPS_FOR_INACTIVE_FRAMES      /* FhG: Using rounding in multiplication to improve precision in cngNoiseLevel[] */
#define FIX_2264_OUT_OF_BOUND_READING_IN_LOG2_NORM_LC   /* VA: Fix issue 2264 by adding a proper safeguard in log2 and by adding a missing normalization in swb_pre_proc_ivas_fx()*/
#define FIX_2264_OUT_OF_BOUND_READING_IN_LOG2_NORM_LC   /* VA: Fix issue 2264 by adding a proper safeguard in log2 and by adding a missing normalization in swb_pre_proc_ivas_fx()*/
#define FIX_2250_LARGE_DIFFERENCES_BETWEEN_BASOP_AND_FLOAT  /* Dolby: Issue 2250:  random vector generation in GenShapedSHBExcitation() */
#define FIX_2250_LARGE_DIFFERENCES_BETWEEN_BASOP_AND_FLOAT  /* Dolby: Issue 2250:  random vector generation in GenShapedSHBExcitation() */
+0 −4
Original line number Original line Diff line number Diff line
@@ -127,9 +127,7 @@ ivas_error ivas_cpe_enc_fx(
    Word16 old_wsp_fx[CPE_CHANNELS][L_WSP];
    Word16 old_wsp_fx[CPE_CHANNELS][L_WSP];
    Word16 e_old_wsp[CPE_CHANNELS], q_old_wsp;
    Word16 e_old_wsp[CPE_CHANNELS], q_old_wsp;
    Word16 Q_new[CPE_CHANNELS] = { 0 };
    Word16 Q_new[CPE_CHANNELS] = { 0 };
#ifdef FIX_1461_CNG_BW_SWITCHING
    Word16 NFFT_inner;
    Word16 NFFT_inner;
#endif
    move16();
    move16();
    move16();
    move16();
    Word16 q_com, shift, q_min, gb;
    Word16 q_com, shift, q_min, gb;
@@ -1132,12 +1130,10 @@ ivas_error ivas_cpe_enc_fx(
            IF( EQ_32( sts[0]->core_brate, SID_2k40 ) || sts[0]->core_brate == FRAME_NO_DATA )
            IF( EQ_32( sts[0]->core_brate, SID_2k40 ) || sts[0]->core_brate == FRAME_NO_DATA )
            {
            {
                /* Reconfigure DFT Stereo for inactive frames */
                /* Reconfigure DFT Stereo for inactive frames */
#ifdef FIX_1461_CNG_BW_SWITCHING
                /* -- nbands may need to be updated here in case the bandwidth was changed due to inactive frames */
                /* -- nbands may need to be updated here in case the bandwidth was changed due to inactive frames */
                NFFT_inner = shl( inner_frame_tbl[sts[0]->bwidth], 1 );
                NFFT_inner = shl( inner_frame_tbl[sts[0]->bwidth], 1 );
                hCPE->hStereoDft->nbands = stereo_dft_band_config_fx( hCPE->hStereoDft->band_limits, hCPE->hStereoDft->hConfig->band_res, NFFT_inner, ENC );
                hCPE->hStereoDft->nbands = stereo_dft_band_config_fx( hCPE->hStereoDft->band_limits, hCPE->hStereoDft->hConfig->band_res, NFFT_inner, ENC );
                move16();
                move16();
#endif
                IF( EQ_32( sts[0]->core_brate, SID_2k40 ) )
                IF( EQ_32( sts[0]->core_brate, SID_2k40 ) )
                {
                {
                    stereo_dft_config_fx( hConfigDft, IVAS_SID_5k2, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal );
                    stereo_dft_config_fx( hConfigDft, IVAS_SID_5k2, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal );
+0 −2
Original line number Original line Diff line number Diff line
@@ -3849,7 +3849,6 @@ static void stereo_dft_enc_compute_prm_fx(
    hStereoDft->nrg_past_pos = ( pos + 1 ) % STEREO_DFT_NRG_PAST_LEN;
    hStereoDft->nrg_past_pos = ( pos + 1 ) % STEREO_DFT_NRG_PAST_LEN;
    move16();
    move16();


#ifdef FIX_1461_CNG_BW_SWITCHING
    /* Replicate last band for remaining bands in case the bandwidth is higher after SID/NODATA is considered */
    /* Replicate last band for remaining bands in case the bandwidth is higher after SID/NODATA is considered */
    FOR( i = hStereoDft->nbands; i < STEREO_DFT_BAND_MAX; i++ )
    FOR( i = hStereoDft->nbands; i < STEREO_DFT_BAND_MAX; i++ )
    {
    {
@@ -3858,7 +3857,6 @@ static void stereo_dft_enc_compute_prm_fx(
        pSideGain[i] = pSideGain[i - 1];
        pSideGain[i] = pSideGain[i - 1];
        move32();
        move32();
    }
    }
#endif




    /*------------------------------------------------------------------*
    /*------------------------------------------------------------------*