Commit 9b34e74d authored by vaillancour's avatar vaillancour
Browse files

Merge branch 'main' into...

Merge branch 'main' into basop-2432-spikes-in-omasa-ltv-at-160-kbps-with-16-khz-output-happens-also-with-ism4-coding
parents 87f5e8bf 7a2247e2
Loading
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1109,11 +1109,17 @@ ivas_error ivas_param_ism_dec_open(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                      */
);

#ifdef FIX_FLOAT_1526_DIRAC_MEM_LEAK
void ivas_param_ism_dec_close(
    PARAM_ISM_DEC_HANDLE *hParamIsmDec                          /* i/o: decoder ParamISM handle                     */
);
#else
void ivas_param_ism_dec_close(
    PARAM_ISM_DEC_HANDLE *hParamIsmDec,                         /* i/o: decoder ParamISM handle                     */
    SPAT_PARAM_REND_COMMON_DATA_HANDLE *hSpatParamRendCom_out,  /* i/o: common spatial renderer data                */
    const AUDIO_CONFIG output_config                            /* i  : output audio configuration                  */
);
#endif

void ivas_ism_dec_digest_tc(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                      */
+3 −1
Original line number Diff line number Diff line
@@ -161,7 +161,9 @@
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define FIX_FLOAT_1522_LTV_MSAN_QMETADATA_ENC_EC3       /* Nokia: float issue 1522: fix uninit MSAN in EC3 of qmetadata encoding */
#define FIX_2235_TD_RENDERER_WORD16                     /* Eri: For float: small synch with BASOP, removing unnecessary abs. BASOP: Use Word16 in TD renderer without converting to Word32 */
#define FIX_FLOAT_1526_DIRAC_MEM_LEAK                   /* FhG: potential memory leak in DirAC handles in case of format switching */
#define ALIGN_ACELP_CORE                                /* VA: align ACELP core functions with BASOP */

/* #################### End BE switches ################################## */

+11 −7
Original line number Diff line number Diff line
@@ -2336,7 +2336,9 @@ void MDCT_classifier_reset(
ivas_error acelp_core_enc(
    Encoder_State *st, /* i/o: encoder state structure                 */
    const float inp[], /* i  : input signal of the current frame       */
#ifndef ALIGN_ACELP_CORE
    const float ener, /* i  : residual energy from Levinson-Durbin    */
#endif
    float A[NB_SUBFR16k * ( M + 1 )],    /* i  : A(z) unquantized for the 4 subframes    */
    float Aw[NB_SUBFR16k * ( M + 1 )],   /* i  : weighted A(z) unquant. for subframes    */
    const float epsP[M + 1],             /* i  : LP prediction errors                    */
@@ -3029,7 +3031,9 @@ void CNG_enc(
    Encoder_State *st,   /* i/o: State structure                                     */
    float Aq[],          /* o  : LP coefficients                                     */
    const float *speech, /* i  : pointer to current frame input speech buffer        */
#ifndef ALIGN_ACELP_CORE
    float enr, /* i  : frame energy output from Levinson recursion         */
#endif
    const float *lsp_mid,   /* i  : mid frame LSPs                                      */
    float *lsp_new,         /* i/o: current frame LSPs                                  */
    float *lsf_new,         /* i/o: current frame LSFs                                  */
+10 −0
Original line number Diff line number Diff line
@@ -2884,6 +2884,15 @@ void ivas_destroy_dec(
    /* ISM renderer handle */
    ivas_ism_renderer_close( &( st_ivas->hIsmRendererData ) );

#ifdef FIX_FLOAT_1526_DIRAC_MEM_LEAK
    /* ParamISM dec handle */
    ivas_param_ism_dec_close( &( st_ivas->hParamIsmDec ) );

    /* DirAC handles */
    ivas_dirac_rend_close( &( st_ivas->hDirACRend ) );
    ivas_spat_hSpatParamRendCom_close( &( st_ivas->hSpatParamRendCom ) );
    ivas_dirac_dec_close( &( st_ivas->hDirAC ) );
#else
    /* DirAC handle */
    if ( st_ivas->ivas_format == ISM_FORMAT )
    {
@@ -2895,6 +2904,7 @@ void ivas_destroy_dec(
        ivas_spat_hSpatParamRendCom_close( &( st_ivas->hSpatParamRendCom ) );
        ivas_dirac_dec_close( &( st_ivas->hDirAC ) );
    }
#endif

    /* SPAR handle */
    ivas_spar_dec_close( &( st_ivas->hSpar ), st_ivas->hDecoderConfig->output_Fs, 0 );
+6 −0
Original line number Diff line number Diff line
@@ -149,7 +149,13 @@ static ivas_error ivas_ism_bitrate_switching_dec(
    if ( st_ivas->ism_mode == ISM_MODE_DISC && last_ism_mode == ISM_MODE_PARAM )
    {
        /* Deallocate the ParamISM struct */
#ifdef FIX_FLOAT_1526_DIRAC_MEM_LEAK
        ivas_param_ism_dec_close( &( st_ivas->hParamIsmDec ) );

        ivas_spat_hSpatParamRendCom_close( &( st_ivas->hSpatParamRendCom ) );
#else
        ivas_param_ism_dec_close( &( st_ivas->hParamIsmDec ), &( st_ivas->hSpatParamRendCom ), st_ivas->hDecoderConfig->output_config );
#endif

        if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
        {
Loading