Commit fc24b3f8 authored by multrus's avatar multrus
Browse files

Merge branch '20240624_cleanup' into 'main'

20240624 cleanup

See merge request !1656
parents f8a48b18 bb88eafe
Loading
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -3039,11 +3039,7 @@ void mctStereoIGF_enc(
    MCT_ENC_HANDLE hMCT,                                        /* i/o: MCT encoder structure                   */
    Encoder_State **sts,                                        /* i/o: encoder state structure                 */
    float *orig_spectrum[MCT_MAX_CHANNELS][NB_DIV],             /* i  : MDCT spectrum for ITF                   */
#ifdef NONBE_FIX_1097_SBA_DTX_BRATE_SWITCHING_ENC 
    float *powerSpec[MCT_MAX_CHANNELS],                         /* i/o: MDCT^2 + MDST^2 spectrum,or estimate    */
#else
    float powerSpec[MCT_MAX_CHANNELS][L_FRAME48k],              /* i/o: MDCT^2 + MDST^2 spectrum,or estimate    */
#endif
    float *powerSpecMsInv[MCT_MAX_CHANNELS][NB_DIV],            /* i  : same as above but for inverse spect.    */
    float *inv_spectrum[MCT_MAX_CHANNELS][NB_DIV],              /* i  : inverse spectrum                        */
    const int16_t sp_aud_decision0[MCT_MAX_CHANNELS]            /* i  : speech audio decision                   */
+0 −14
Original line number Diff line number Diff line
@@ -457,18 +457,13 @@ void td_stereo_param_updt(
    {
        mvr2r( IAWB_Ave, tdm_lsfQ_PCh, M );

#ifdef FIX_1111_TDM_LSP_BUFFER
        if ( tdm_lspQ_PCh != NULL )
        {
            lsf2lsp( tdm_lsfQ_PCh, tdm_lspQ_PCh, M, INT_FS_12k8 );
        }
#else
        lsf2lsp( tdm_lsfQ_PCh, tdm_lspQ_PCh, M, INT_FS_12k8 );
#endif
    }
    else if ( flag_ACELP16k == 1 )
    {
#ifdef FIX_1111_TDM_LSP_BUFFER
        if ( tdm_lspQ_PCh != NULL )
        {
            mvr2r( lsp_old_PCh, tdm_lspQ_PCh, M );
@@ -482,22 +477,13 @@ void td_stereo_param_updt(
            lsp_convert_poly( lsp_temp, L_FRAME, 0 );
            lsp2lsf( lsp_temp, tdm_lsfQ_PCh, M, INT_FS_12k8 );
        }
#else
        mvr2r( lsp_old_PCh, tdm_lspQ_PCh, M );
        lsp_convert_poly( tdm_lspQ_PCh, L_FRAME, 0 );
        lsp2lsf( tdm_lspQ_PCh, tdm_lsfQ_PCh, M, INT_FS_12k8 );
#endif
    }
    else
    {
#ifdef FIX_1111_TDM_LSP_BUFFER
        if ( tdm_lspQ_PCh != NULL )
        {
            mvr2r( lsp_old_PCh, tdm_lspQ_PCh, M );
        }
#else
        mvr2r( lsp_old_PCh, tdm_lspQ_PCh, M );
#endif
        mvr2r( lsf_old_PCh, tdm_lsfQ_PCh, M );
    }

+0 −6
Original line number Diff line number Diff line
@@ -158,11 +158,8 @@
//#define FIX_CREND_FIX_POINT_HRTF_FILE_FORMAT          /* Orange issue 1031 : new fix point hrtf binary file format */
//#define FIX_CREND_SIMPLIFY_CODE                         /* Ora : simplify line code in crend */
#define FLOAT_FIX_POINT_HRTF_FILE_FORMAT                /* allows reading floation or fix point hrtf binary file format */
#define FIX_1115_FASTCONV_HRTF_FILE_LOAD                /* FhG: issue 1115: fix crash when loading FastConv-only binary HRTF file */


#define FIX_1099_JBM_MD_HANDLE_ALLOC                    /* VA: issue 1099: Limit the allocation of `hJbmMetadata` handle to MASA and OMASA only */
#define FIX_1111_TDM_LSP_BUFFER                         /* VA: issue 1111: remove unused buffer `tdm_lspQ_PCh[]' */
#define FIX_1101_CLEANING_JBM_CALL                      /* VA: issue 1101: remove obsolete call of ivas_jbm_dec_tc_buffer_open() */
#define FIX_1053_AEID_FILE_TEST                         /* Philips: Tests for the -aeid file and fix for memory error */

@@ -172,9 +169,6 @@
/* any switch which is non-be wrt selection floating point code */
/* all switches in this category should start with "NONBE_" */

#define NONBE_FIX_1070_USAN_SEGFAULT_MC_TO_BIN_BTSW_HEADROT   /* fix 1070 USAN: nullptr-with-offset and Segfaults in 7_1_4 to BINAURAL and BINAURAL_ROOM_REVERB decoding with bitrate switching and head rotation*/
#define REVERT_ZERO_FLUSH_TRESH                               /* FhG: issue 1069: revert threshold value introduced with !1518 due to significant complexity increase*/ 
#define NONBE_FIX_1097_SBA_DTX_BRATE_SWITCHING_ENC            /* FhG: fix out-of-bound errors when switching from SID frame to active frame*/
#define NONBE_FIX_1110_STEREO_DTX_BRATE_SWITCHING             /* VA: issue 1110: fix encoder crash in the stereo DTX bitrate switching condition */
#define NONBE_1131_ACELP_OOB                                  /* VA: issue 1131: fix division-by-zero in acelp gain decoding caused by wrong length of buffer update when switching from HQ core to ACELP core */

+0 −16
Original line number Diff line number Diff line
@@ -618,15 +618,7 @@ ivas_error ivas_allocate_binaural_hrtf(

    if ( renderer_type == RENDERER_BINAURAL_FASTCONV || bin_input_config == BINAURAL_INPUT_AUDIO_CONFIG_COMBINED )
    {
#ifndef FIX_1115_FASTCONV_HRTF_FILE_LOAD
        if ( ( HrtfFastConv->leftHRIRReal != NULL ) && ( HrtfFastConv->leftHRIRImag != NULL ) && ( HrtfFastConv->rightHRIRReal != NULL ) && ( HrtfFastConv->rightHRIRImag != NULL ) )
        {
            return IVAS_ERR_OK;
        }
        else
#else
        if ( ( HrtfFastConv->leftHRIRReal == NULL ) && ( HrtfFastConv->leftHRIRImag == NULL ) && ( HrtfFastConv->rightHRIRReal == NULL ) && ( HrtfFastConv->rightHRIRImag == NULL ) )
#endif
        {

            if ( IVAS_ERR_OK != ivas_alloc_pppMem( &HrtfFastConv->leftHRIRReal, BINAURAL_CONVBANDS, HRTF_LS_CHANNELS, BINAURAL_NTAPS, allocate_init_flag ) )
@@ -650,15 +642,7 @@ ivas_error ivas_allocate_binaural_hrtf(

    if ( renderer_type == RENDERER_BINAURAL_FASTCONV_ROOM || bin_input_config == BINAURAL_INPUT_AUDIO_CONFIG_COMBINED )
    {
#ifndef FIX_1115_FASTCONV_HRTF_FILE_LOAD
        if ( ( HrtfFastConv->leftBRIRReal != NULL ) && ( HrtfFastConv->leftBRIRImag != NULL ) && ( HrtfFastConv->rightBRIRReal != NULL ) && ( HrtfFastConv->rightBRIRImag != NULL ) )
        {
            return IVAS_ERR_OK;
        }
        else
#else
        if ( ( HrtfFastConv->leftBRIRReal == NULL ) && ( HrtfFastConv->leftBRIRImag == NULL ) && ( HrtfFastConv->rightBRIRReal == NULL ) && ( HrtfFastConv->rightBRIRImag == NULL ) )
#endif
        {
            if ( IVAS_ERR_OK != ivas_alloc_pppMem( &HrtfFastConv->leftBRIRReal, BINAURAL_CONVBANDS, HRTF_LS_CHANNELS, BINAURAL_NTAPS_MAX, allocate_init_flag ) )
            {
+0 −4
Original line number Diff line number Diff line
@@ -2074,11 +2074,7 @@ ivas_error ivas_init_decoder(
    }

#endif
#ifdef FIX_1099_JBM_MD_HANDLE_ALLOC
    if ( ( st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT ) && st_ivas->hDecoderConfig->Opt_tsm )
#else
    if ( st_ivas->hJbmMetadata == NULL && st_ivas->hDecoderConfig->Opt_tsm )
#endif
    {
        if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL )
        {
Loading