Commit 1b6cae9b authored by vaclav's avatar vaclav
Browse files

Merge branch 'main' into 133-bitrate-switching-in-core-coder

parents c664f705 6256d892
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -158,6 +158,8 @@

#define ALIGN_SID_SIZE                                  /* Issue 111: make all DTX modes use one SID frame bitrate (5.2 kbps) */

#define FIX_135_MDCT_STEREO_MODE_UNINITIALIZED          /* Issue 135: fix uninitialized value usage in SBA MDCT-Stereo core with PLC */


#define CORECODER_BITRATE_SWITCHING                     /* Issue 133: support bitrate switching in core-coder */

+6 −0
Original line number Diff line number Diff line
@@ -826,6 +826,12 @@ ivas_error create_cpe_dec(
        set_s( hCPE->hStereoMdct->prev_ms_mask[0], 0, MAX_SFB );
        set_s( hCPE->hStereoMdct->prev_ms_mask[1], 0, MAX_SFB );
        hCPE->hStereoMdct->lastCoh = 1.f;
#ifdef FIX_135_MDCT_STEREO_MODE_UNINITIALIZED
        hCPE->hStereoMdct->mdct_stereo_mode[0] = SMDCT_DUAL_MONO;
        hCPE->hStereoMdct->mdct_stereo_mode[1] = SMDCT_DUAL_MONO;
        hCPE->hStereoMdct->IGFStereoMode[0] = -1;
        hCPE->hStereoMdct->IGFStereoMode[1] = -1;
#endif
    }

    /*-----------------------------------------------------------------*
+2 −0
Original line number Diff line number Diff line
@@ -218,11 +218,13 @@ void stereo_mdct_core_dec(
    initMdctStereoDecData( hCPE->hStereoMdct, sts[0]->igf, sts[0]->hIGFDec->igfData.igfInfo.grid, hCPE->element_brate, sts[0]->bwidth );

    hCPE->hStereoMdct->isSBAStereoMode = ( ( st_ivas->ivas_format == SBA_FORMAT ) && ( st_ivas->nchan_transport == 2 ) );
#ifndef FIX_135_MDCT_STEREO_MODE_UNINITIALIZED
    /*to prevent unitialized values during condition checks for stereo IGF*/
    if ( hCPE->hStereoMdct->isSBAStereoMode )
    {
        set_s( hCPE->hStereoMdct->IGFStereoMode, -1, 2 );
    }
#endif

    if ( !bfi )
    {
+8 −0
Original line number Diff line number Diff line
@@ -276,6 +276,14 @@
../IVAS_cod -ism 1 testv/stvISM1.csv 13200 48 testv/stv1ISM48s.pcm bit
../IVAS_dec MONO 48 bit testv/stv1ISM48s.pcm_13200_48-48_MONO.tst

// 1 ISm with metadata at 13.2 kbps, 48 kHz in, 48 kHz out, DTX on, BINAURAL out, random FEC at 5%
../IVAS_cod -dtx -ism 1 testv/stvISM1.csv 13200 48 testv/stv48n.pcm bit
../IVAS_dec -fec 5 BINAURAL 48 bit testv/stv48n.pcm_13200_48-48_DTX_FEC5_BINAURAL.tst

// 1 ISm with metadata at 32 kbps, 32 kHz in, 32 kHz out, DTX on, MONO out
../IVAS_cod -dtx -ism 1 testv/stvISM1.csv 32000 32 testv/stv32n.pcm bit
../IVAS_dec MONO 32 bit testv/stv32n.pcm_32000_32-32_DTX_MONO.tst

// 2 ISm with metadata at 16.4 kbps, 48 kHz in, 48 kHz out, STEREO out
../IVAS_cod -ism 2 testv/stvISM1.csv testv/stvISM2.csv 16400 48 testv/stv2ISM48s.pcm bit
../IVAS_dec STEREO 48 bit testv/stv2ISM48s.pcm_16400_48-48_STEREO.tst