Commit 55acd93b authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch 'fix_debug_force_mdct_stereo_mode' into 'main'

fixes for the debug force mdct stereo mode functionality

See merge request !866
parents a17ebd15 0767565f
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -1396,6 +1396,20 @@ ivas_error create_cpe_enc_fx(

#ifdef DEBUGGING
        hCPE->hStereoMdct->mdct_stereo_mode_cmdl = st_ivas->hEncoderConfig->mdct_stereo_mode_cmdl;
#ifdef DEBUG_FORCE_MDCT_STEREO_MODE
        /*set all other members to defined states */
        hCPE->hStereoMdct->fDualMono = 0;
        hCPE->hStereoMdct->fMSstereo = 0;

        if ( hCPE->hStereoMdct->mdct_stereo_mode_cmdl == SMDCT_FORCE_LR )
        {
            hCPE->hStereoMdct->fDualMono = 1;
        }
        else if ( hCPE->hStereoMdct->mdct_stereo_mode_cmdl == SMDCT_FORCE_MS )
        {
            hCPE->hStereoMdct->fMSstereo = 1;
        }
#endif
#endif

        initMdctStereoEncData_fx( hCPE->hStereoMdct, ivas_format, hCPE->element_mode, hCPE->element_brate, max_bwidth, 0, NULL, 1 );
+0 −10
Original line number Diff line number Diff line
@@ -233,17 +233,7 @@ void stereo_mdct_core_enc_fx(
    }
    IF( hCPE->hCoreCoder[0]->igf )
    {

#ifdef DEBUGGING
        int16_t orig_mdct_stereo_mode_cmdl = hCPE->hStereoMdct->mdct_stereo_mode_cmdl;
        hCPE->hStereoMdct->mdct_stereo_mode_cmdl = SMDCT_MS_DECISION;
#endif
        initMdctStereoEncData_fx( hCPE->hStereoMdct, STEREO_FORMAT, IVAS_CPE_MDCT, hCPE->element_brate, hCPE->hCoreCoder[0]->bwidth, hCPE->hCoreCoder[0]->igf, hCPE->hCoreCoder[0]->hIGFEnc->igfData.igfInfo.grid, 0 );

#ifdef DEBUGGING
        hCPE->hStereoMdct->mdct_stereo_mode_cmdl = orig_mdct_stereo_mode_cmdl;
#endif

        stereo_mdct_init_igf_start_band_fx( &( hCPE->hStereoMdct->stbParamsTCX20 ), 16384 /* 1.0f in Q14 */, hCPE->hCoreCoder[0]->bwidth, hCPE->element_brate );
        stereo_mdct_init_igf_start_band_fx( &( hCPE->hStereoMdct->stbParamsTCX10 ), 8192 /* 0.5f in Q14 */, hCPE->hCoreCoder[0]->bwidth, hCPE->element_brate );
        stereo_mdct_init_igf_start_band_fx( &( hCPE->hStereoMdct->stbParamsTCX20afterACELP ), 20480 /* 1.25f in Q14 */, hCPE->hCoreCoder[0]->bwidth, hCPE->element_brate );
+0 −15
Original line number Diff line number Diff line
@@ -1301,21 +1301,6 @@ void initMdctStereoEncData_fx(

    set16_fx( hStereoMdct->IGFStereoMode, -1, 2 );

#ifdef DEBUG_FORCE_MDCT_STEREO_MODE
    /*set all other members to defined states */
    hStereoMdct->fDualMono = 0;
    hStereoMdct->fMSstereo = 0;

    if ( hStereoMdct->mdct_stereo_mode_cmdl == SMDCT_FORCE_LR )
    {
        hStereoMdct->fDualMono = 1;
    }
    else if ( hStereoMdct->mdct_stereo_mode_cmdl == SMDCT_FORCE_MS )
    {
        hStereoMdct->fMSstereo = 1;
    }
#endif

    hStereoMdct->split_ratio = SMDCT_EQUAL_RATIO_RANGE;
    move16();
    set16_fx( hStereoMdct->global_ild, SMDCT_ILD_RANGE >> 1, 2 );