Commit f44e54a3 authored by Jan Kiene's avatar Jan Kiene
Browse files

port MR 2297 from float

Fix crash with IGF and bandwidth switching when DTX is enabled
parent 312fc774
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -188,7 +188,7 @@
#define FIX_1370_EXTERNAL_ORIENTATION_CHECK             /* Nokia: add sanity check for Euler angles for external orientations */
#define FIX_1413_IGF_INIT_PRINTOUT                      /* FhG: use correct variable for IGF initiliazation */
#define CODE_IMPROVEMENTS

#define FIX_1411_IGF_CRASH_BW_SWITCHING                 /* FhG: Fix for issue 1411: fixes crash that can happen for IGF with BW switching and DTX*/

// object-editing feature porting
#define FIX_HRTF_LOAD_API                               // solves API conflicts between HRTF and object-editing features
+30 −23
Original line number Diff line number Diff line
@@ -558,6 +558,10 @@ ivas_error ivas_cpe_enc(
     * Core codec configuration
     *----------------------------------------------------------------*/

#ifdef FIX_1411_IGF_CRASH_BW_SWITCHING
    if ( !( sts[0]->core_brate == SID_2k40 || sts[0]->core_brate == FRAME_NO_DATA ) ) /* Reconfigurations not needed with DTX*/
    {
#endif
        if ( hCPE->element_mode == IVAS_CPE_MDCT && st_ivas->hMCT == NULL )
        {
            /* set coded BW for MDCT stereo */
@@ -599,6 +603,9 @@ ivas_error ivas_cpe_enc(
                }
            }
        }
#ifdef FIX_1411_IGF_CRASH_BW_SWITCHING
    }
#endif

    /* set ACELP@12k8 / ACELP@16k flag for flexible ACELP core */
    for ( n = 0; n < n_CoreChannels; n++ )