From 4d35114259267cf1c38b9edc23e492cac70a8270 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Wed, 28 Jan 2026 11:25:35 +0100 Subject: [PATCH 1/5] [cleanup] accept FIX_2344_ALIGN_PREPROC --- lib_com/ivas_prot.h | 12 ----- lib_com/options.h | 1 - lib_enc/ivas_core_enc.c | 7 --- lib_enc/ivas_core_pre_proc.c | 80 ------------------------------ lib_enc/ivas_core_pre_proc_front.c | 22 -------- lib_enc/ivas_cpe_enc.c | 9 ---- lib_enc/ivas_ism_enc.c | 9 ---- lib_enc/ivas_sce_enc.c | 9 ---- 8 files changed, 149 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 1aa64fd416..e997bf36a4 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -160,11 +160,7 @@ ivas_error ivas_mct_enc( const int16_t nb_bits_metadata /* i : number of metadata bits */ ); -#ifdef FIX_2344_ALIGN_PREPROC void pre_proc_front_ivas( -#else -ivas_error pre_proc_front_ivas( -#endif SCE_ENC_HANDLE hSCE, /* i/o: SCE encoder structure */ CPE_ENC_HANDLE hCPE, /* i/o: CPE encoder structure */ const int32_t element_brate, /* i : SCE/CPE element bitrate */ @@ -211,11 +207,7 @@ ivas_error pre_proc_front_ivas( const int32_t ivas_total_brate /* i : IVAS total bitrate */ ); -#ifdef FIX_2344_ALIGN_PREPROC void pre_proc_ivas( -#else -ivas_error pre_proc_ivas( -#endif Encoder_State *st, /* i/o: encoder state structure */ const int16_t last_element_mode, /* i : last element mode */ const int32_t element_brate, /* i : element bitrate */ @@ -243,11 +235,7 @@ ivas_error pre_proc_ivas( const int16_t flag_16k_smc /* i : flag to indicate if the OL SMC is run at 16 kHz */ ); -#ifdef FIX_2344_ALIGN_PREPROC void ivas_compute_core_buffers( -#else -ivas_error ivas_compute_core_buffers( -#endif Encoder_State *st, /* i/o: encoder state structure */ float **inp16k_out, /* o : ptr. to inp. signal in the current frame*/ float *old_inp_16k, /* i/o: buffer of old input signal @ 16kHz */ diff --git a/lib_com/options.h b/lib_com/options.h index 30f559de2c..56970ac2b5 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -162,7 +162,6 @@ /*#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_2344_ALIGN_PREPROC /* VA: basop issue 2344: Align pre_proc_ivas() between FLP and BASOP */ #define FIX_FLOAT_1501_UNIT_VALUE_IN_OMASA /* Nokia: Fix float issue 1501, uninitialized value in ivas_masa_combine_directions for OMASA */ #define FIX_2331_CLANG18_MSAN_UNINIT_VARIABLE /* FhG: Fix issue 2331: Uninitialized variable */ diff --git a/lib_enc/ivas_core_enc.c b/lib_enc/ivas_core_enc.c index 9b8e53791a..049e35722a 100644 --- a/lib_enc/ivas_core_enc.c +++ b/lib_enc/ivas_core_enc.c @@ -174,14 +174,7 @@ ivas_error ivas_core_enc( * Pre-processing, incl. Decision matrix *---------------------------------------------------------------------*/ -#ifdef FIX_2344_ALIGN_PREPROC pre_proc_ivas( st, last_element_mode, element_brate, ivas_format == SBA_FORMAT ? last_element_brate : element_brate, input_frame, old_inp_12k8[n], old_inp_16k[n], &inp[n], &ener[n], A[n], Aw[n], epsP[n], lsp_new[n], lsp_mid[n], new_inp_resamp16k[n], &Voicing_flag[n], old_wsp[n], loc_harm[n], cor_map_sum[n], vad_flag_dtx[n], enerBuffer[n], fft_buff[n], MCT_flag, vad_hover_flag[n], flag_16k_smc ); -#else - if ( ( error = pre_proc_ivas( st, last_element_mode, element_brate, ivas_format == SBA_FORMAT ? last_element_brate : element_brate, input_frame, old_inp_12k8[n], old_inp_16k[n], &inp[n], &ener[n], A[n], Aw[n], epsP[n], lsp_new[n], lsp_mid[n], new_inp_resamp16k[n], &Voicing_flag[n], old_wsp[n], loc_harm[n], cor_map_sum[n], vad_flag_dtx[n], enerBuffer[n], fft_buff[n], MCT_flag, vad_hover_flag[n], flag_16k_smc ) ) != IVAS_ERR_OK ) - { - return error; - } -#endif if ( st->element_mode == IVAS_CPE_MDCT || st->element_mode == IVAS_SCE ) { diff --git a/lib_enc/ivas_core_pre_proc.c b/lib_enc/ivas_core_pre_proc.c index ba748cdd17..fb709d6dc8 100644 --- a/lib_enc/ivas_core_pre_proc.c +++ b/lib_enc/ivas_core_pre_proc.c @@ -51,11 +51,7 @@ * Decision matrix, Preprocessing at other Fs, core switching decision, ...) *--------------------------------------------------------------------*/ -#ifdef FIX_2344_ALIGN_PREPROC void pre_proc_ivas( -#else -ivas_error pre_proc_ivas( -#endif Encoder_State *st, /* i/o: encoder state structure */ const int16_t last_element_mode, /* i : last element mode */ const int32_t element_brate, /* i : element bitrate */ @@ -87,15 +83,9 @@ ivas_error pre_proc_ivas( float *inp_12k8, *new_inp_12k8, *inp_16k; /* pointers to current frame and new data */ const float *wsp; /* weighted input signal buffer */ int32_t sr_core_tmp, total_brate_tmp; -#ifndef FIX_2344_ALIGN_PREPROC - ivas_error error; -#endif push_wmops( "pre_proc" ); -#ifndef FIX_2344_ALIGN_PREPROC - error = IVAS_ERR_OK; -#endif /*----------------------------------------------------------------* * Initialization *----------------------------------------------------------------*/ @@ -359,13 +349,6 @@ ivas_error pre_proc_ivas( } } -#ifndef FIX_2344_ALIGN_PREPROC - /* channel-aware mode - due to lack of signaling bit, sharpFlag is 1 always in RF mode */ - if ( st->rf_mode && ( st->coder_type == VOICED || st->coder_type == GENERIC ) ) - { - st->sharpFlag = 1; - } -#endif /* TD stereo, secondary channel - due to lack of signaling bits, sharpFlag is always 1 */ if ( element_mode == IVAS_CPE_TD && st->idchan == 1 ) { @@ -401,15 +384,7 @@ ivas_error pre_proc_ivas( if ( !flag_16k_smc ) { -#ifdef FIX_2344_ALIGN_PREPROC ivas_compute_core_buffers( st, &inp_16k, old_inp_16k, new_inp_resamp16k, input_frame, last_element_mode, sr_core_tmp, ener, A, Aw, epsP, lsp_new, lsp_mid ); -#else - error = ivas_compute_core_buffers( st, &inp_16k, old_inp_16k, new_inp_resamp16k, input_frame, last_element_mode, sr_core_tmp, ener, A, Aw, epsP, lsp_new, lsp_mid ); - if ( error != IVAS_ERR_OK ) - { - return error; - } -#endif } if ( !( st->L_frame == L_FRAME16k && element_mode != IVAS_CPE_MDCT ) ) @@ -482,11 +457,7 @@ ivas_error pre_proc_ivas( #endif pop_wmops(); -#ifdef FIX_2344_ALIGN_PREPROC return; -#else - return error; -#endif } @@ -496,11 +467,7 @@ ivas_error pre_proc_ivas( * Compute core-coder buffers at internal sampling rate *--------------------------------------------------------------------*/ -#ifdef FIX_2344_ALIGN_PREPROC void ivas_compute_core_buffers( -#else -ivas_error ivas_compute_core_buffers( -#endif Encoder_State *st, /* i/o: encoder state structure */ float **inp16k_out, /* o : ptr. to inp. signal in the current frame */ float *old_inp_16k, /* i/o: buffer of old input signal @ 16kHz */ @@ -613,33 +580,17 @@ ivas_error ivas_compute_core_buffers( modify_Fs( signal_in - lMemRecalc - length_inp, length_inp, input_Fs, new_inp_16k - lMemRecalc_16k - length_16k, sr_core, st->mem_decim16k, 0 ); } -#ifdef FIX_2344_ALIGN_PREPROC modify_Fs( signal_in - lMemRecalc, input_frame, input_Fs, new_inp_16k - lMemRecalc_16k, sr_core, st->mem_decim16k, 0 ); -#else - modify_Fs( signal_in - lMemRecalc, input_frame, input_Fs, new_inp_16k - ( lMemRecalc * sr_core ) / st->input_Fs, sr_core, st->mem_decim16k, 0 ); -#endif mvr2r( st->mem_decim16k, mem_decim16k_dummy, 2 * L_FILT_MAX ); if ( lMemRecalc > 0 ) { -#ifdef FIX_2344_ALIGN_PREPROC modify_Fs( signal_in - lMemRecalc + input_frame, lMemRecalc, input_Fs, new_inp_16k + NS2SA( sr_core, FRAME_SIZE_NS ) - lMemRecalc_16k, sr_core, mem_decim16k_dummy, 0 ); -#else - modify_Fs( signal_in - lMemRecalc + input_frame, lMemRecalc, input_Fs, new_inp_16k + NS2SA( sr_core, FRAME_SIZE_NS ) - ( lMemRecalc * sr_core ) / st->input_Fs, sr_core, mem_decim16k_dummy, 0 ); -#endif } set_f( temp1F_icatdmResampBuf, 0, L_FILT_MAX ); modify_Fs( temp1F_icatdmResampBuf, NS2SA( input_Fs, DELAY_FIR_RESAMPL_NS ), input_Fs, new_inp_16k + NS2SA( sr_core, FRAME_SIZE_NS ), sr_core, mem_decim16k_dummy, 0 ); } -#ifndef FIX_2344_ALIGN_PREPROC -#ifdef DEBUGGING - else - { - return ( IVAS_ERROR( IVAS_ERR_INTERNAL_FATAL, "Wrong internal sampling rate. Exiting..." ) ); - } -#endif -#endif } else if ( st->idchan == 0 ) { @@ -704,11 +655,7 @@ ivas_error ivas_compute_core_buffers( st->mem_preemph_enc = new_inp_16k[L_frame_tmp - 1]; } -#ifdef FIX_2344_ALIGN_PREPROC if ( sr_core == INT_FS_16k && element_mode != IVAS_CPE_MDCT ) -#else - if ( input_Fs > 8000 && sr_core == INT_FS_16k && element_mode != IVAS_CPE_MDCT ) -#endif { if ( element_mode == IVAS_CPE_DFT ) { @@ -758,23 +705,8 @@ ivas_error ivas_compute_core_buffers( preemph( new_inp_16k + L_FRAME16k, PREEMPH_FAC_16k, L_FILT16k, &tmp ); } } -#ifdef FIX_2344_ALIGN_PREPROC else /* keep memory up-to-date in case of bitrate switching */ -#else - else if ( input_Fs > 8000 ) /* keep memory up-to-date in case of bitrate switching */ -#endif { -#ifndef FIX_2344_ALIGN_PREPROC - if ( element_mode == IVAS_CPE_DFT ) - { - st->mem_preemph16k = new_inp_16k[L_frame_tmp - STEREO_DFT_OVL_16k - 1]; - } - else if ( element_mode == IVAS_CPE_TD ) - { - st->mem_preemph16k = new_inp_16k[L_frame_tmp - lMemRecalc_16k - 1]; - } - else -#endif if ( element_mode == IVAS_CPE_MDCT ) { st->mem_preemph16k = 0; @@ -836,19 +768,11 @@ ivas_error ivas_compute_core_buffers( { set_f( st->old_inp_16k, 0, L_INP_MEM ); } -#ifdef FIX_2344_ALIGN_PREPROC else if ( sr_core == INT_FS_16k ) -#else - else if ( input_Fs > 8000 && sr_core == INT_FS_16k ) -#endif { mvr2r( &old_inp_16k[L_frame_tmp], st->old_inp_16k, L_INP_MEM ); } -#ifdef FIX_2344_ALIGN_PREPROC else -#else - else if ( input_Fs > 8000 ) -#endif { lerp( st->old_inp_12k8 + L_INP_MEM - L_INP_MEM * 4 / 5, st->old_inp_16k, L_INP_MEM, L_INP_MEM * 4 / 5 ); } @@ -863,9 +787,5 @@ ivas_error ivas_compute_core_buffers( mvr2r( new_inp_resamp16k, new_inp_resamp16k_out, L_FRAME16k ); } -#ifdef FIX_2344_ALIGN_PREPROC return; -#else - return IVAS_ERR_OK; -#endif } diff --git a/lib_enc/ivas_core_pre_proc_front.c b/lib_enc/ivas_core_pre_proc_front.c index e3e72839f5..46c537445b 100644 --- a/lib_enc/ivas_core_pre_proc_front.c +++ b/lib_enc/ivas_core_pre_proc_front.c @@ -67,11 +67,7 @@ static void calculate_energy_buffer( CPE_ENC_HANDLE hCPE, float enerBuffer_dft[] * (resampling, spectral analysis, LP analysis, VAD, OL pitch calculation, classification) *--------------------------------------------------------------------*/ -#ifdef FIX_2344_ALIGN_PREPROC void pre_proc_front_ivas( -#else -ivas_error pre_proc_front_ivas( -#endif SCE_ENC_HANDLE hSCE, /* i/o: SCE encoder structure */ CPE_ENC_HANDLE hCPE, /* i/o: CPE encoder structure */ const int32_t element_brate, /* i : SCE/CPE element bitrate */ @@ -168,9 +164,6 @@ ivas_error pre_proc_front_ivas( float temp1F_icatdmResampBuf[L_FILT_MAX]; /* temp buffers for ICA TDM resamplers */ int16_t old_pitch1; /* previous frame OL pitch[1] @12.8 kHz */ int16_t LR_localVAD; -#ifndef FIX_2344_ALIGN_PREPROC - ivas_error error; -#endif push_wmops( "pre_proc_front" ); @@ -178,9 +171,6 @@ ivas_error pre_proc_front_ivas( * Initialization *------------------------------------------------------------------*/ -#ifndef FIX_2344_ALIGN_PREPROC - error = IVAS_ERR_OK; -#endif tmpS = 0; tdm_SM_last_clas = &tmpS; set_f( tmpF, 0, STEREO_DFT_BAND_MAX ); @@ -813,15 +803,7 @@ ivas_error pre_proc_front_ivas( if ( flag_16k_smc ) { /* Compute core-coder buffers at internal sampling rate */ -#ifdef FIX_2344_ALIGN_PREPROC ivas_compute_core_buffers( st, NULL, old_inp_16k, NULL, input_frame, IVAS_SCE /*last_element_mode*/, INT_FS_16k /*sr_core_tmp*/, ener, A, Aw, epsP, lsp_new, lsp_mid ); -#else - error = ivas_compute_core_buffers( st, NULL, old_inp_16k, NULL, input_frame, IVAS_SCE /*last_element_mode*/, INT_FS_16k /*sr_core_tmp*/, ener, A, Aw, epsP, lsp_new, lsp_mid ); - if ( error != IVAS_ERR_OK ) - { - return error; - } -#endif smc_dec = ivas_acelp_tcx20_switching( st, st->speech_enc, st->wspeech_enc, non_staX, pitch_fr, voicing_fr, currFlatness, lsp_mid, stab_fac, res_cod_SNR_M, flag_16k_smc ); } @@ -873,11 +855,7 @@ ivas_error pre_proc_front_ivas( mvr2r( &old_inp_12k8[L_FRAME], st->old_inp_12k8, L_INP_MEM ); pop_wmops(); -#ifdef FIX_2344_ALIGN_PREPROC return; -#else - return error; -#endif } diff --git a/lib_enc/ivas_cpe_enc.c b/lib_enc/ivas_cpe_enc.c index 7fd14ef3f2..f8814147b7 100644 --- a/lib_enc/ivas_cpe_enc.c +++ b/lib_enc/ivas_cpe_enc.c @@ -480,20 +480,11 @@ ivas_error ivas_cpe_enc( #ifdef DEBUGGING st_ivas->noClipping += check_clipping( hCPE->hCoreCoder[n]->input, input_frame, &st_ivas->maxOverload, &st_ivas->minOverload ); -#endif -#ifndef FIX_2344_ALIGN_PREPROC - error = #endif 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], 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, hEncoderConfig->last_ivas_total_brate, ivas_total_brate ); -#ifndef FIX_2344_ALIGN_PREPROC - if ( error != IVAS_ERR_OK ) - { - return error; - } -#endif } /* sanity check -> DTX not supported for more than one SCEs/CPEs */ diff --git a/lib_enc/ivas_ism_enc.c b/lib_enc/ivas_ism_enc.c index 9523a93c28..19fbd6d438 100644 --- a/lib_enc/ivas_ism_enc.c +++ b/lib_enc/ivas_ism_enc.c @@ -175,20 +175,11 @@ ivas_error ivas_ism_enc( #ifdef DEBUGGING st_ivas->noClipping += check_clipping( hSCE->hCoreCoder[0]->input, input_frame, &st_ivas->maxOverload, &st_ivas->minOverload ); -#endif -#ifndef FIX_2344_ALIGN_PREPROC - error = #endif pre_proc_front_ivas( hSCE, NULL, hSCE->element_brate, nb_bits_metadata[sce_id], input_frame, 0, old_inp_12k8[sce_id][0], old_inp_16k[sce_id][0], &ener[sce_id][0], &relE[sce_id][0], A[sce_id][0], Aw[sce_id][0], epsP[sce_id][0], lsp_new[sce_id][0], lsp_mid[sce_id][0], &vad_hover_flag[sce_id][0], &attack_flag[sce_id][0], realBuffer[sce_id][0], imagBuffer[sce_id][0], old_wsp[sce_id][0], pitch_fr[sce_id][0], voicing_fr[sce_id][0], &loc_harm[sce_id][0], &cor_map_sum[sce_id][0], &vad_flag_dtx[sce_id][0], enerBuffer[sce_id][0], fft_buff[sce_id][0], A[sce_id][0], lsp_new[sce_id][0], currFlatness[0], 0, fr_bands, Etot_LR, lf_E, localVAD_HE_SAD, NULL, 0, 0, 0, 0, ISM_FORMAT, 0, st_ivas->hEncoderConfig->last_ivas_total_brate, st_ivas->hEncoderConfig->ivas_total_brate ); -#ifndef FIX_2344_ALIGN_PREPROC - if ( error != IVAS_ERR_OK ) - { - return error; - } -#endif if ( st_ivas->hEncoderConfig->Opt_DTX_ON ) { diff --git a/lib_enc/ivas_sce_enc.c b/lib_enc/ivas_sce_enc.c index 368d7c2988..ffd4b64507 100644 --- a/lib_enc/ivas_sce_enc.c +++ b/lib_enc/ivas_sce_enc.c @@ -184,21 +184,12 @@ ivas_error ivas_sce_enc( #ifdef DEBUGGING st_ivas->noClipping += check_clipping( hSCE->hCoreCoder[0]->input, input_frame, &st_ivas->maxOverload, &st_ivas->minOverload ); -#endif -#ifndef FIX_2344_ALIGN_PREPROC - error = #endif pre_proc_front_ivas( hSCE, NULL, hSCE->element_brate, nb_bits_metadata, input_frame, 0, old_inp_12k8[0], old_inp_16k[0], &ener[0], &relE[0], A[0], Aw[0], epsP[0], lsp_new[0], lsp_mid[0], &vad_hover_flag[0], &attack_flag[0], realBuffer[0], imagBuffer[0], old_wsp[0], pitch_fr[0], voicing_fr[0], &loc_harm[0], &cor_map_sum[0], &vad_flag_dtx[0], enerBuffer[0], fft_buff[0], A[0], lsp_new[0], currFlatness[0], 0, fr_bands, Etot_LR, lf_E, localVAD_HE_SAD, NULL, flag_16k_smc, st_ivas->hSpar != NULL ? st_ivas->hSpar->front_vad_flag : 0, st_ivas->hSpar != NULL ? st_ivas->hSpar->force_front_vad : 0, st_ivas->hSpar != NULL ? st_ivas->hSpar->front_vad_dtx_flag : 0, ivas_format, 0, st_ivas->hEncoderConfig->last_ivas_total_brate, st_ivas->hEncoderConfig->ivas_total_brate ); -#ifndef FIX_2344_ALIGN_PREPROC - if ( error != IVAS_ERR_OK ) - { - return error; - } -#endif /* sanity check -> DTX not supported for more than one SCEs/CPEs */ if ( st_ivas->nSCE + st_ivas->nCPE > 1 ) -- GitLab From 6b59c2b110a0145296aacac6a25fba21ddb7cbb7 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Wed, 28 Jan 2026 11:26:19 +0100 Subject: [PATCH 2/5] [cleanup] accept FIX_FLOAT_1501_UNIT_VALUE_IN_OMASA --- lib_com/options.h | 1 - lib_enc/ivas_masa_enc.c | 4 ---- 2 files changed, 5 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 56970ac2b5..642d69e066 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -162,7 +162,6 @@ /*#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_1501_UNIT_VALUE_IN_OMASA /* Nokia: Fix float issue 1501, uninitialized value in ivas_masa_combine_directions for OMASA */ #define FIX_2331_CLANG18_MSAN_UNINIT_VARIABLE /* FhG: Fix issue 2331: Uninitialized variable */ /* #################### End BE switches ################################## */ diff --git a/lib_enc/ivas_masa_enc.c b/lib_enc/ivas_masa_enc.c index 5efcea91f7..f52fa0a52c 100644 --- a/lib_enc/ivas_masa_enc.c +++ b/lib_enc/ivas_masa_enc.c @@ -1232,10 +1232,8 @@ void ivas_masa_combine_directions( } } -#ifdef FIX_FLOAT_1501_UNIT_VALUE_IN_OMASA if ( hMasa->config.numTwoDirBands > 0 ) { -#endif /* Estimate the importance of having two directions instead of one */ for ( i = 0; i < numCodingBands; i++ ) { @@ -1251,10 +1249,8 @@ void ivas_masa_combine_directions( /* Determine bands where to use two directions */ find_n_largest( importance, indicesOfLargest, numCodingBands, hMasa->config.numTwoDirBands ); -#ifdef FIX_FLOAT_1501_UNIT_VALUE_IN_OMASA } -#endif for ( i = 0; i < numCodingBands; i++ ) { hMasa->data.twoDirBands[i] = 0; -- GitLab From 2bcac3f83faab87cbfabadbd9467083a3f6f318b Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Wed, 28 Jan 2026 11:26:53 +0100 Subject: [PATCH 3/5] [cleanup] accept FIX_2331_CLANG18_MSAN_UNINIT_VARIABLE --- lib_com/options.h | 1 - lib_rend/lib_rend.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 642d69e066..15112f83e1 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -162,7 +162,6 @@ /*#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_2331_CLANG18_MSAN_UNINIT_VARIABLE /* FhG: Fix issue 2331: Uninitialized variable */ /* #################### End BE switches ################################## */ diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index b9f9da1ec2..ecb39a3651 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -5996,9 +5996,7 @@ static ivas_error renderIsmToSba( push_wmops( "renderIsmToSba" ); -#ifdef FIX_2331_CLANG18_MSAN_UNINIT_VARIABLE set_zero( currentPanGains, MAX_OUTPUT_CHANNELS ); -#endif if ( ( error = getAudioConfigNumChannels( outConfig, &numOutChannels ) ) != IVAS_ERR_OK ) { -- GitLab From da0b021e345611553ef4f28aa3ce4f76c102e4f1 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Wed, 28 Jan 2026 11:27:33 +0100 Subject: [PATCH 4/5] [cleanup] accept FIX_1500_ISM_MD_DTX --- lib_com/options.h | 1 - lib_dec/ivas_ism_metadata_dec.c | 4 ---- 2 files changed, 5 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 15112f83e1..d4bf5e830e 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -170,7 +170,6 @@ #define FIX_1465_SWB_TBE_RANDOM_VECTOR_CREATION /* Dolby: issue 1465: Fix constant in create_random_vector() to allow more reliable fixed point port */ #define FIX_BASOP_2317_UNINIT_VALUE_IN_STEREO_CNG /* Eri: Basop issue 2317: Uninitialized value read in case of DTX and BW switching */ -#define FIX_1500_ISM_MD_DTX /* VA: float issue 1500: fix ISM elevation metadata smoothing in DTX */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/ivas_ism_metadata_dec.c b/lib_dec/ivas_ism_metadata_dec.c index f129a1c6b6..97283e3348 100644 --- a/lib_dec/ivas_ism_metadata_dec.c +++ b/lib_dec/ivas_ism_metadata_dec.c @@ -119,11 +119,7 @@ static void ism_metadata_smooth( /* smooth elevation */ diff = hIsmMetaData->last_true_elevation - hIsmMetaData->last_elevation; -#ifdef FIX_1500_ISM_MD_DTX if ( ism_total_brate > IVAS_SID_5k2 && fabsf( diff ) > IVAS_ISM_DTX_HO_MAX * CNG_MD_MAX_DIFF_ELEVATION ) -#else - if ( ism_total_brate > IVAS_SID_5k2 && diff > IVAS_ISM_DTX_HO_MAX * CNG_MD_MAX_DIFF_ELEVATION ) -#endif { /* skip the smoothing */ } -- GitLab From fad0750701e3514ef849aaaeddf36736ac6438bd Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Wed, 28 Jan 2026 11:29:45 +0100 Subject: [PATCH 5/5] formatting --- lib_com/options.h | 1 - lib_enc/ivas_core_pre_proc.c | 2 +- lib_enc/ivas_cpe_enc.c | 8 ++++---- lib_enc/ivas_ism_enc.c | 8 ++++---- lib_enc/ivas_sce_enc.c | 10 +++++----- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index d4bf5e830e..76297b41dc 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -170,7 +170,6 @@ #define FIX_1465_SWB_TBE_RANDOM_VECTOR_CREATION /* Dolby: issue 1465: Fix constant in create_random_vector() to allow more reliable fixed point port */ #define FIX_BASOP_2317_UNINIT_VALUE_IN_STEREO_CNG /* Eri: Basop issue 2317: Uninitialized value read in case of DTX and BW switching */ - /* ##################### End NON-BE switches ########################### */ /* ################## End MAINTENANCE switches ######################### */ diff --git a/lib_enc/ivas_core_pre_proc.c b/lib_enc/ivas_core_pre_proc.c index fb709d6dc8..94dd61c9a5 100644 --- a/lib_enc/ivas_core_pre_proc.c +++ b/lib_enc/ivas_core_pre_proc.c @@ -707,7 +707,7 @@ void ivas_compute_core_buffers( } else /* keep memory up-to-date in case of bitrate switching */ { - if ( element_mode == IVAS_CPE_MDCT ) + if ( element_mode == IVAS_CPE_MDCT ) { st->mem_preemph16k = 0; } diff --git a/lib_enc/ivas_cpe_enc.c b/lib_enc/ivas_cpe_enc.c index f8814147b7..152414be9a 100644 --- a/lib_enc/ivas_cpe_enc.c +++ b/lib_enc/ivas_cpe_enc.c @@ -481,10 +481,10 @@ ivas_error ivas_cpe_enc( st_ivas->noClipping += check_clipping( hCPE->hCoreCoder[n]->input, input_frame, &st_ivas->maxOverload, &st_ivas->minOverload ); #endif - 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], - 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, hEncoderConfig->last_ivas_total_brate, ivas_total_brate ); + 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], + 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, hEncoderConfig->last_ivas_total_brate, ivas_total_brate ); } /* sanity check -> DTX not supported for more than one SCEs/CPEs */ diff --git a/lib_enc/ivas_ism_enc.c b/lib_enc/ivas_ism_enc.c index 19fbd6d438..412df40a4e 100644 --- a/lib_enc/ivas_ism_enc.c +++ b/lib_enc/ivas_ism_enc.c @@ -176,10 +176,10 @@ ivas_error ivas_ism_enc( st_ivas->noClipping += check_clipping( hSCE->hCoreCoder[0]->input, input_frame, &st_ivas->maxOverload, &st_ivas->minOverload ); #endif - pre_proc_front_ivas( hSCE, NULL, hSCE->element_brate, nb_bits_metadata[sce_id], input_frame, 0, old_inp_12k8[sce_id][0], old_inp_16k[sce_id][0], - &ener[sce_id][0], &relE[sce_id][0], A[sce_id][0], Aw[sce_id][0], epsP[sce_id][0], lsp_new[sce_id][0], lsp_mid[sce_id][0], &vad_hover_flag[sce_id][0], &attack_flag[sce_id][0], - realBuffer[sce_id][0], imagBuffer[sce_id][0], old_wsp[sce_id][0], pitch_fr[sce_id][0], voicing_fr[sce_id][0], &loc_harm[sce_id][0], &cor_map_sum[sce_id][0], &vad_flag_dtx[sce_id][0], enerBuffer[sce_id][0], - fft_buff[sce_id][0], A[sce_id][0], lsp_new[sce_id][0], currFlatness[0], 0, fr_bands, Etot_LR, lf_E, localVAD_HE_SAD, NULL, 0, 0, 0, 0, ISM_FORMAT, 0, st_ivas->hEncoderConfig->last_ivas_total_brate, st_ivas->hEncoderConfig->ivas_total_brate ); + pre_proc_front_ivas( hSCE, NULL, hSCE->element_brate, nb_bits_metadata[sce_id], input_frame, 0, old_inp_12k8[sce_id][0], old_inp_16k[sce_id][0], + &ener[sce_id][0], &relE[sce_id][0], A[sce_id][0], Aw[sce_id][0], epsP[sce_id][0], lsp_new[sce_id][0], lsp_mid[sce_id][0], &vad_hover_flag[sce_id][0], &attack_flag[sce_id][0], + realBuffer[sce_id][0], imagBuffer[sce_id][0], old_wsp[sce_id][0], pitch_fr[sce_id][0], voicing_fr[sce_id][0], &loc_harm[sce_id][0], &cor_map_sum[sce_id][0], &vad_flag_dtx[sce_id][0], enerBuffer[sce_id][0], + fft_buff[sce_id][0], A[sce_id][0], lsp_new[sce_id][0], currFlatness[0], 0, fr_bands, Etot_LR, lf_E, localVAD_HE_SAD, NULL, 0, 0, 0, 0, ISM_FORMAT, 0, st_ivas->hEncoderConfig->last_ivas_total_brate, st_ivas->hEncoderConfig->ivas_total_brate ); if ( st_ivas->hEncoderConfig->Opt_DTX_ON ) { diff --git a/lib_enc/ivas_sce_enc.c b/lib_enc/ivas_sce_enc.c index ffd4b64507..6e3b504cc7 100644 --- a/lib_enc/ivas_sce_enc.c +++ b/lib_enc/ivas_sce_enc.c @@ -185,11 +185,11 @@ ivas_error ivas_sce_enc( st_ivas->noClipping += check_clipping( hSCE->hCoreCoder[0]->input, input_frame, &st_ivas->maxOverload, &st_ivas->minOverload ); #endif - pre_proc_front_ivas( hSCE, NULL, hSCE->element_brate, nb_bits_metadata, input_frame, 0, old_inp_12k8[0], old_inp_16k[0], - &ener[0], &relE[0], A[0], Aw[0], epsP[0], lsp_new[0], lsp_mid[0], &vad_hover_flag[0], &attack_flag[0], - realBuffer[0], imagBuffer[0], old_wsp[0], pitch_fr[0], voicing_fr[0], &loc_harm[0], &cor_map_sum[0], &vad_flag_dtx[0], enerBuffer[0], - fft_buff[0], A[0], lsp_new[0], currFlatness[0], 0, fr_bands, Etot_LR, lf_E, localVAD_HE_SAD, NULL, flag_16k_smc, - st_ivas->hSpar != NULL ? st_ivas->hSpar->front_vad_flag : 0, st_ivas->hSpar != NULL ? st_ivas->hSpar->force_front_vad : 0, st_ivas->hSpar != NULL ? st_ivas->hSpar->front_vad_dtx_flag : 0, ivas_format, 0, st_ivas->hEncoderConfig->last_ivas_total_brate, st_ivas->hEncoderConfig->ivas_total_brate ); + pre_proc_front_ivas( hSCE, NULL, hSCE->element_brate, nb_bits_metadata, input_frame, 0, old_inp_12k8[0], old_inp_16k[0], + &ener[0], &relE[0], A[0], Aw[0], epsP[0], lsp_new[0], lsp_mid[0], &vad_hover_flag[0], &attack_flag[0], + realBuffer[0], imagBuffer[0], old_wsp[0], pitch_fr[0], voicing_fr[0], &loc_harm[0], &cor_map_sum[0], &vad_flag_dtx[0], enerBuffer[0], + fft_buff[0], A[0], lsp_new[0], currFlatness[0], 0, fr_bands, Etot_LR, lf_E, localVAD_HE_SAD, NULL, flag_16k_smc, + st_ivas->hSpar != NULL ? st_ivas->hSpar->front_vad_flag : 0, st_ivas->hSpar != NULL ? st_ivas->hSpar->force_front_vad : 0, st_ivas->hSpar != NULL ? st_ivas->hSpar->front_vad_dtx_flag : 0, ivas_format, 0, st_ivas->hEncoderConfig->last_ivas_total_brate, st_ivas->hEncoderConfig->ivas_total_brate ); /* sanity check -> DTX not supported for more than one SCEs/CPEs */ if ( st_ivas->nSCE + st_ivas->nCPE > 1 ) -- GitLab