Commit 3d04f9e7 authored by janssonfr's avatar janssonfr
Browse files

Added alternate fix in an inactive define

parent be9605c5
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -168,6 +168,8 @@

#define FIX_395_CNG_BW                                  /* Eri: Issue 395 - CNG bandwidth issue for unified stereo */

/*#define FIX_395_CNG_BW_ALT*/                          /* Eri: Issue 395 - CNG bandwidth issue for unified stereo Alternate solution */

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
#endif
+13 −0
Original line number Diff line number Diff line
@@ -2172,6 +2172,18 @@ void stereo_dft_enc_write_BS(
    k_offset = STEREO_DFT_OFFSET;

    nbands_full = hStereoDft->nbands;
#ifdef FIX_395_CNG_BW_ALT
    if ( core_brate == SID_2k40 )
    {
        NFFT_inner = min( STEREO_DFT_N_32k_ENC,STEREO_DFT_N_MAX_ENC * inner_frame_tbl[hCPE->hCoreCoder[0]->bwidth] / L_FRAME48k );
    }
    else
    {
        NFFT_inner = STEREO_DFT_N_MAX_ENC * inner_frame_tbl[hCPE->hCoreCoder[0]->bwidth] / L_FRAME48k;
    }

    hStereoDft->nbands = stereo_dft_band_config( hStereoDft->band_limits, hStereoDft->band_res[k_offset], NFFT_inner, ENC );
#else
    NFFT_inner = STEREO_DFT_N_MAX_ENC * inner_frame_tbl[hCPE->hCoreCoder[0]->bwidth] / L_FRAME48k;

    if ( !( core_brate == SID_2k40 || core_brate == FRAME_NO_DATA ) )
@@ -2179,6 +2191,7 @@ void stereo_dft_enc_write_BS(
        /* set number of bands according to bandwidth after BWD */
        hStereoDft->nbands = stereo_dft_band_config( hStereoDft->band_limits, hStereoDft->band_res[k_offset], NFFT_inner, ENC );
    }
#endif

    if ( core_brate == FRAME_NO_DATA )
    {