Commit 65bf6c33 authored by vaclav's avatar vaclav
Browse files

#define NONBE_FIX_788_SBA_DTX_BR_SWITCHING /* VA: issue...

#define NONBE_FIX_788_SBA_DTX_BR_SWITCHING                    /* VA: issue 787: fix Msan error in SBA BR switching with dtx in FOA encoding */
parent 41465f08
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -204,6 +204,9 @@ ivas_error pre_proc_front_ivas(
    const int16_t force_front_vad,                              /* i  : flag to force VAD decision                 */
    const int16_t front_vad_dtx_flag,                           /* i  : front-VAD DTX flag to overwrite VAD decision*/
    const IVAS_FORMAT ivas_format,                              /* i  : IVAS format                                */
#ifdef NONBE_FIX_788_SBA_DTX_BR_SWITCHING
    const int16_t MCT_flag, /* i  : hMCT handle allocated (1) or not (0)    */
#endif
    const int32_t ivas_total_brate                              /* i  : IVAS total bitrate                         */
);

+1 −0
Original line number Diff line number Diff line
@@ -204,6 +204,7 @@
#define NONBE_FIX_588_UPDATE_FASTCONV_SD                      /* FhG: issue 588: update FastConv SD HRTFs in CLDFB domain with new conversion method */
#define NONBE_FIX_778_TNS_UNFIED_STEREO_MSAN                  /* FhG: Issue 778: MSAN error due to uninitialized TNS configuration */
#define NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ                 /* VA: issue 797:  fix of crash when the separated object is inactive and the MASA metadata is using very few bits */
#define NONBE_FIX_788_SBA_DTX_BR_SWITCHING                    /* VA: issue 787: fix Msan error in SBA BR switching with dtx in FOA encoding */


/* ##################### End NON-BE switches ########################### */
+6 −1
Original line number Diff line number Diff line
@@ -282,8 +282,13 @@ ivas_error pre_proc_ivas(
        st->hTcxEnc->tfm_mem = 0.75f;
    }
    else if ( element_brate != last_element_brate )
    {
#ifdef NONBE_FIX_788_SBA_DTX_BR_SWITCHING
        if ( st->core_brate != FRAME_NO_DATA )
#endif
        {
            SetModeIndex( st, st->bits_frame_nominal * FRAMES_PER_SEC, element_mode, MCT_flag );
        }

        if ( st->extl != -1 && st->extl != IGF_BWE && st->igf == 1 )
        {
+11 −1
Original line number Diff line number Diff line
@@ -108,6 +108,9 @@ ivas_error pre_proc_front_ivas(
    const int16_t force_front_vad,                             /* i  : flag to force VAD decision               */
    const int16_t front_vad_dtx_flag,                          /* i  : front-VAD DTX flag to overwrite VAD decision*/
    const IVAS_FORMAT ivas_format,                             /* i  : IVAS format                              */
#ifdef NONBE_FIX_788_SBA_DTX_BR_SWITCHING
    const int16_t MCT_flag, /* i  : hMCT handle allocated (1) or not (0)    */
#endif
    const int32_t ivas_total_brate /* i  : IVAS total bitrate - for setting the DTX */
)
{
@@ -780,6 +783,13 @@ ivas_error pre_proc_front_ivas(
        /* SNR-based speech/music classification */
        if ( ( element_mode >= IVAS_CPE_DFT && element_brate >= IVAS_24k4 ) || ( element_mode == IVAS_SCE && element_brate >= SCE_SMC_THR ) )
        {
#ifdef NONBE_FIX_788_SBA_DTX_BR_SWITCHING
            if ( ivas_format == SBA_FORMAT && st->core_brate != FRAME_NO_DATA && st->last_core_brate == FRAME_NO_DATA )
            {
                SetModeIndex( st, st->bits_frame_nominal * FRAMES_PER_SEC, element_mode, MCT_flag );
            }
#endif

            if ( flag_16k_smc )
            {
                /* Compute core-coder buffers at internal sampling rate */
+4 −0
Original line number Diff line number Diff line
@@ -473,7 +473,11 @@ ivas_error ivas_cpe_enc(
        error = pre_proc_front_ivas( NULL, hCPE, hCPE->element_brate, nb_bits_metadata, input_frame, n, old_inp_12k8[n], old_inp_16k[n],
                                     &ener[n], &relE[n], A[n], Aw[n], epsP[n], lsp_new[n], lsp_mid[n], &vad_hover_flag[n], &attack_flag[n],
                                     realBuffer[n], imagBuffer[n], old_wsp[n], pitch_fr[n], voicing_fr[n], &loc_harm[n], &cor_map_sum[n], &vad_flag_dtx[n], enerBuffer[n],
#ifdef NONBE_FIX_788_SBA_DTX_BR_SWITCHING
                                     fft_buff[n], A[0], lsp_new[0], currFlatness[n], tdm_ratio_idx, fr_bands, Etot_LR, lf_E, localVAD_HE_SAD, band_energies_LR, 0, st_ivas->hSpar != NULL ? st_ivas->hSpar->front_vad_flag : 0, 0, 0, ivas_format, st_ivas->hMCT != NULL, ivas_total_brate );
#else
                                     fft_buff[n], A[0], lsp_new[0], currFlatness[n], tdm_ratio_idx, fr_bands, Etot_LR, lf_E, localVAD_HE_SAD, band_energies_LR, 0, st_ivas->hSpar != NULL ? st_ivas->hSpar->front_vad_flag : 0, 0, 0, ivas_format, ivas_total_brate );
#endif
        if ( error != IVAS_ERR_OK )
        {
            return error;
Loading