Commit 66b88fe4 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files
Merge branch 'main' of ssh://forge.3gpp.org:29419/ivas-codec-pc/ivas-codec into 1466-renderer-enable-rendering-of-mono-stereo-to-all-formats-add-tests
parents 2dc5aeb1 fdcce24c
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@

# Compiler output Unix
IVAS_cod
IVAS_cod_fmtsw
IVAS_dec
IVAS_rend
ISAR_post_rend
@@ -16,6 +17,7 @@ build*/**/*

# Compiler output VS2017
IVAS_cod.exe
IVAS_cod_fmtsw.exe
IVAS_dec.exe
IVAS_rend.exe
ISAR_post_rend.exe
+1 −0
Original line number Diff line number Diff line
@@ -174,6 +174,7 @@

#define FIX_1435_MOVE_STEREO_PANNING                    /* VA: issue 1435: do the EVS stereo panning in the renderer */
#define FIX_1454_FIX_STEREO_TO_FOA_JBM                  /* VA: issue 1454: fix buggy stereo to FOA in JBM */
#define FIX_1461_CNG_BW_SWITCHING                       /* Eri: issue 1461: Stereo parameters are not updated when SID/NODATA forces BW to stay the same */


/* ##################### End NON-BE switches ########################### */
+8 −0
Original line number Diff line number Diff line
@@ -112,6 +112,9 @@ ivas_error ivas_cpe_enc(
    int32_t cpe_brate;
    int32_t element_brate_ref;
    int16_t last_bits_frame_nominal; /* last_bits_frame_nominal for M or PCh channel */
#ifdef FIX_1461_CNG_BW_SWITCHING
    int16_t NFFT_inner;
#endif

    error = IVAS_ERR_OK;
    push_wmops( "ivas_cpe_enc" );
@@ -628,6 +631,11 @@ ivas_error ivas_cpe_enc(
            if ( sts[0]->core_brate == SID_2k40 || sts[0]->core_brate == FRAME_NO_DATA )
            {
                /* 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 */
                NFFT_inner = STEREO_DFT_N_MAX_ENC * inner_frame_tbl[sts[0]->bwidth] / L_FRAME48k;
                hCPE->hStereoDft->nbands = stereo_dft_band_config( hCPE->hStereoDft->band_limits, hCPE->hStereoDft->hConfig->band_res, NFFT_inner, ENC );
#endif
                if ( sts[0]->core_brate == SID_2k40 )
                {
                    stereo_dft_config( hConfigDft, IVAS_SID_5k2, &sts[0]->bits_frame_nominal, &sts[1]->bits_frame_nominal );
+9 −0
Original line number Diff line number Diff line
@@ -2879,6 +2879,15 @@ static void stereo_dft_enc_compute_prm(

    hStereoDft->nrg_past_pos = ( pos + 1 ) % STEREO_DFT_NRG_PAST_LEN;

#ifdef FIX_1461_CNG_BW_SWITCHING
    /* 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++ )
    {
        pPredGain[i] = pPredGain[i - 1];
        pSideGain[i] = pSideGain[i - 1];
    }
#endif

#ifdef DEBUG_MODE_DFT
    {
        float tmp_f;