From 7315c455d40a9d4a6d64204f7b4ec58c98af663f Mon Sep 17 00:00:00 2001 From: Eleni Fotopoulou Date: Thu, 9 Jan 2025 12:29:29 +0100 Subject: [PATCH] fix that enables forcing MDCT stereo mode --- lib_enc/ivas_cpe_enc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib_enc/ivas_cpe_enc.c b/lib_enc/ivas_cpe_enc.c index 9340d34cb..c0fd2918c 100644 --- a/lib_enc/ivas_cpe_enc.c +++ b/lib_enc/ivas_cpe_enc.c @@ -1052,6 +1052,20 @@ ivas_error create_cpe_enc( #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( hCPE->hStereoMdct, ivas_format, hCPE->element_mode, hCPE->element_brate, max_bwidth, 0, NULL, 1 ); hCPE->hStereoMdct->isSBAStereoMode = ( ( ivas_format == SBA_FORMAT || ivas_format == SBA_ISM_FORMAT ) && ( st_ivas->nchan_transport == 2 ) ); -- GitLab