From da879d57a46dc8aeadb556cf12ff9236f23d2517 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Sun, 6 Apr 2025 14:59:05 +0200 Subject: [PATCH 01/43] Add NONBE_1300_TDREND_JBM_SHORT_FRAMES to address short JBM frames in TD renderer --- lib_com/options.h | 1 + lib_rend/ivas_objectRenderer.c | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 92a2e7a0f8..e23aa77962 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -180,6 +180,7 @@ #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 NONBE_1296_TDREND_ITD_OUT_OF_BOUNDS_ACCESS /* Eri: issue 1296: ITD resampling can occasionally read out of bounds, especially when the requested subframes are short (1.25 ms). Seen for headtracking+JBM. */ #define NONBE_1303_GRANULARITY_OSBA_REND /* VA: issue 1303: Correctly set the granularity in OSBA, Disc mode, and BINAURAL_ROOM_REVERB output */ +#define NONBE_1300_TDREND_JBM_SHORT_FRAMES /* Eri: issue 1300: The JBM operates on 1.25 ms granularity, compatible with CLDFB. The TD renderer needs adaptations to handle such short frames. */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index 4be6fda156..aa0f59c134 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -437,6 +437,9 @@ ivas_error TDREND_GetMix( float hrf_left_delta[SFX_SPAT_BIN_MAX_FILTER_LENGTH]; float hrf_right_delta[SFX_SPAT_BIN_MAX_FILTER_LENGTH]; int16_t intp_count; +#ifdef NONBE_1300_TDREND_JBM_SHORT_FRAMES + int16_t currShift, prevShift, transition_len, length_in2; +#endif error = IVAS_ERR_OK; @@ -462,6 +465,19 @@ ivas_error TDREND_GetMix( { TDREND_SRC_REND_UpdateFiltersFromSpatialParams( hBinRendererTd, SrcRend_p, SrcSpatial_p, Src_p->hrf_left_prev, Src_p->hrf_right_prev, hrf_left_delta, hrf_right_delta, &intp_count, &Src_p->filterlength, &Src_p->itd, &Src_p->Gain, Src_p ); +#ifdef NONBE_1300_TDREND_JBM_SHORT_FRAMES + /* For short subframes triggered by JBM, ensure interpolation and ITD transition fits within subframe */ + intp_count = min( intp_count, subframe_length ); + currShift = abs( Src_p->itd ); + prevShift = abs( Src_p->previtd ); + transition_len = subframe_length - max( 0, SFX_SPAT_BIN_SINC_M - currShift ); + length_in2 = transition_len - (int16_t) ( ( (float) ( transition_len * prevShift ) / ( (float) ( prevShift + currShift ) ) ) + 0.5f ) - currShift; + if ( Src_p->itd * Src_p->previtd < 0 && length_in2 <= 0 ) + { + /* Subframe too short for ITD transition -- change to ITD=0 and push the rest of the transition to next subframe */ + Src_p->itd = 0; + } +#endif } /* Render source if needed */ -- GitLab From d8d8952b1c822211802813315b328a36e73bcf6f Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Mon, 7 Apr 2025 06:46:33 +0200 Subject: [PATCH 02/43] Small fix for NONBE_1300_TDREND_JBM_SHORT_FRAMES --- lib_rend/ivas_objectRenderer.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib_rend/ivas_objectRenderer.c b/lib_rend/ivas_objectRenderer.c index aa0f59c134..b3e38f5baa 100644 --- a/lib_rend/ivas_objectRenderer.c +++ b/lib_rend/ivas_objectRenderer.c @@ -467,15 +467,17 @@ ivas_error TDREND_GetMix( Src_p->hrf_right_prev, hrf_left_delta, hrf_right_delta, &intp_count, &Src_p->filterlength, &Src_p->itd, &Src_p->Gain, Src_p ); #ifdef NONBE_1300_TDREND_JBM_SHORT_FRAMES /* For short subframes triggered by JBM, ensure interpolation and ITD transition fits within subframe */ - intp_count = min( intp_count, subframe_length ); - currShift = abs( Src_p->itd ); - prevShift = abs( Src_p->previtd ); - transition_len = subframe_length - max( 0, SFX_SPAT_BIN_SINC_M - currShift ); - length_in2 = transition_len - (int16_t) ( ( (float) ( transition_len * prevShift ) / ( (float) ( prevShift + currShift ) ) ) + 0.5f ) - currShift; - if ( Src_p->itd * Src_p->previtd < 0 && length_in2 <= 0 ) + if ( Src_p->itd * Src_p->previtd < 0 ) { - /* Subframe too short for ITD transition -- change to ITD=0 and push the rest of the transition to next subframe */ - Src_p->itd = 0; + currShift = (int16_t) abs( Src_p->itd ); + prevShift = (int16_t) abs( Src_p->previtd ); + transition_len = subframe_length - max( 0, SFX_SPAT_BIN_SINC_M - currShift ); + length_in2 = transition_len - (int16_t) ( ( (float) ( transition_len * prevShift ) / ( (float) ( prevShift + currShift ) ) ) + 0.5f ) - currShift; + if ( length_in2 <= 0 ) + { + /* Subframe too short for ITD transition -- change to ITD=0 and push the rest of the transition to next subframe */ + Src_p->itd = 0; + } } #endif } -- GitLab From 9a529ee27019145caac9319affd99af1b9ec4516 Mon Sep 17 00:00:00 2001 From: vaclav Date: Fri, 18 Apr 2025 13:50:49 +0200 Subject: [PATCH 03/43] issue 880: remove leftovers after NONBE_UNIFIED_DECODING_PATHS; under UNIFIED_DECODING_PATHS_LEFTOVERS --- lib_com/ivas_cnst.h | 4 ++ lib_com/ivas_prot.h | 6 +- lib_com/options.h | 1 + lib_dec/ivas_ism_param_dec.c | 69 +++++++++++++++---- lib_dec/ivas_jbm_dec.c | 130 +++++++++++++++++++++++++++++++++-- lib_dec/ivas_mc_param_dec.c | 32 +++++++-- lib_dec/lib_dec.c | 2 + 7 files changed, 217 insertions(+), 27 deletions(-) diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index 8a9e8dea19..28bdbba4e8 100755 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -175,7 +175,11 @@ typedef enum #define MAX_JBM_L_FRAME48k 1920 #define MAX_JBM_L_FRAME_NS 40000000L #define MAX_SPAR_INTERNAL_CHANNELS IVAS_SPAR_MAX_CH +#ifdef UNIFIED_DECODING_PATHS_LEFTOVERS +#define MAX_CLDFB_DIGEST_CHANNELS 3 /* == maximum of ParamISM TCs and ParamMC TCs */ +#else #define MAX_CLDFB_DIGEST_CHANNELS (FOA_CHANNELS + MAX_NUM_OBJECTS) +#endif typedef enum { diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index fb8973884e..5e60b04464 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -875,13 +875,14 @@ void ivas_jbm_dec_get_md_map( int16_t ivas_jbm_dec_get_num_tc_channels( Decoder_Struct *st_ivas /* i : IVAS decoder handle */ ); - +#ifndef UNIFIED_DECODING_PATHS_LEFTOVERS void ivas_jbm_dec_copy_tc_no_tsm( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ float *tc[], /* i : transport channels */ const int16_t output_frame /* i : output frame size */ ); +#endif void ivas_jbm_dec_get_md_map_even_spacing( const int16_t len, /* i : length of the modfied frames in metadata slots */ const int16_t subframe_len, /* i : default length of a subframe */ @@ -1142,13 +1143,14 @@ void ivas_param_ism_dec_prepare_renderer( const uint16_t nCldfbSlots /* i : number of CLDFB slots in transport channels */ ); +#ifndef UNIFIED_DECODING_PATHS_LEFTOVERS void ivas_ism_param_dec_tc_gain_ajust( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nSamples, /* i : number of samples to be compensate */ const uint16_t nFadeLength, /* i : length of the crossfade in samples */ float *transport_channels_f[] /* i : synthesized core-coder transport channels/DirAC output */ ); - +#endif void ivas_param_ism_dec_render( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nSamplesAsked, /* i : number of CLDFB slots requested */ diff --git a/lib_com/options.h b/lib_com/options.h index 23a9a303de..7f24c19944 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -161,6 +161,7 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ #define TMP_FIX_1119_SPLIT_RENDERING_VOIP /* FhG: Add error check for unsupported config: split rendering with VoIP mode */ #define LIB_DEC_REVISION /* VA: cleaning and simplification of lib_dec.c */ +#define UNIFIED_DECODING_PATHS_LEFTOVERS /* VA: issue 880: remove leftovers after NONBE_UNIFIED_DECODING_PATHS */ /* #################### End BE switches ################################## */ diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 93202b94cf..926955a23f 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -45,12 +45,20 @@ #include "wmc_auto.h" +#ifdef UNIFIED_DECODING_PATHS_LEFTOVERS +/*-----------------------------------------------------------------------* + * Local function declarations + *-----------------------------------------------------------------------*/ + +static void ivas_ism_param_dec_tc_gain_adjust( Decoder_Struct *st_ivas, const int16_t nSamples, const int16_t nFadeLength, float *p_data_f[] ); + +#endif /*-----------------------------------------------------------------------* * Local function definitions *-----------------------------------------------------------------------*/ static void ivas_param_ism_dec_dequant_DOA( - PARAM_ISM_DEC_HANDLE hParamIsmDec, /* i/o: decoder ParamISM handle */ + PARAM_ISM_DEC_HANDLE hParamIsmDec, /* i/o: decoder ParamISM handle */ const int16_t nchan_ism /* i : number of ISM channels */ ) { @@ -809,14 +817,28 @@ void ivas_param_ism_dec_digest_tc( float *transport_channels_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ ) { +#ifdef UNIFIED_DECODING_PATHS_LEFTOVERS + int16_t ch, slot_idx, output_frame; + int16_t num_freq_bands, cldfb_ch, n_ch_cldfb; + float *cldfb_real_buffer, *cldfb_imag_buffer; +#else int16_t ch, nchan_transport; int16_t slot_idx; int16_t output_frame; PARAM_ISM_DEC_HANDLE hParamIsmDec; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; int16_t fade_len; +#endif /* Initialization */ +#ifdef UNIFIED_DECODING_PATHS_LEFTOVERS + num_freq_bands = st_ivas->hSpatParamRendCom->num_freq_bands; + output_frame = nCldfbSlots * num_freq_bands; + n_ch_cldfb = st_ivas->hTcBuffer->nchan_transport_jbm - st_ivas->hTcBuffer->nchan_buffer_full; + + cldfb_real_buffer = st_ivas->hParamIsmDec->hParamIsmRendering->Cldfb_RealBuffer_tc; + cldfb_imag_buffer = st_ivas->hParamIsmDec->hParamIsmRendering->Cldfb_ImagBuffer_tc; +#else hParamIsmDec = st_ivas->hParamIsmDec; assert( hParamIsmDec ); hSpatParamRendCom = st_ivas->hSpatParamRendCom; @@ -825,15 +847,31 @@ void ivas_param_ism_dec_digest_tc( fade_len = output_frame / 2; nchan_transport = st_ivas->nchan_transport; +#endif - push_wmops( "ivas_param_ism_dec_digest_tc" ); - +#ifdef UNIFIED_DECODING_PATHS_LEFTOVERS + ivas_ism_param_dec_tc_gain_adjust( st_ivas, output_frame, output_frame / 2, transport_channels_f ); +#else if ( st_ivas->hDecoderConfig->Opt_tsm ) { /*TODO : FhG to check*/ ivas_ism_param_dec_tc_gain_ajust( st_ivas, output_frame, fade_len, transport_channels_f ); } +#endif +#ifdef UNIFIED_DECODING_PATHS_LEFTOVERS + /* CLDFB Analysis */ + for ( ch = 0, cldfb_ch = 0; cldfb_ch < n_ch_cldfb; cldfb_ch++, ch++ ) + { + for ( slot_idx = 0; slot_idx < nCldfbSlots; slot_idx++ ) + { + cldfbAnalysis_ts( &( transport_channels_f[ch][num_freq_bands * slot_idx] ), + &cldfb_real_buffer[slot_idx * num_freq_bands * n_ch_cldfb + cldfb_ch * num_freq_bands], + &cldfb_imag_buffer[slot_idx * num_freq_bands * n_ch_cldfb + cldfb_ch * num_freq_bands], + num_freq_bands, st_ivas->cldfbAnaDec[cldfb_ch] ); + } + } +#else for ( ch = 0; ch < nchan_transport; ch++ ) { /* CLDFB Analysis */ @@ -850,9 +888,7 @@ void ivas_param_ism_dec_digest_tc( } } } - - - pop_wmops(); +#endif return; } @@ -924,8 +960,6 @@ void ivas_param_ism_dec_prepare_renderer( nchan_out_woLFE = st_ivas->hIntSetup.nchan_out_woLFE; } - push_wmops( "ivas_param_ism_dec_digest_tc" ); - /* general setup */ ivas_jbm_dec_get_adapted_linear_interpolator( DEFAULT_JBM_CLDFB_TIMESLOTS, nCldfbSlots, hParamIsmDec->hParamIsmRendering->interpolator ); @@ -1006,22 +1040,29 @@ void ivas_param_ism_dec_prepare_renderer( /* Compute mixing matrix */ ivas_param_ism_compute_mixing_matrix( st_ivas->nchan_ism, hParamIsmDec, st_ivas->hISMDTX, direct_response, nchan_transport, nchan_out_woLFE, cx_diag, ref_power, hParamIsmDec->hParamIsmRendering->mixing_matrix_lin ); - pop_wmops(); - return; } /*-------------------------------------------------------------------------* - * ivas_ism_param_dec_tc_gain_ajust() + * ivas_ism_param_dec_tc_gain_adjust() * * *-------------------------------------------------------------------------*/ +#ifdef UNIFIED_DECODING_PATHS_LEFTOVERS +static void ivas_ism_param_dec_tc_gain_adjust( +#else void ivas_ism_param_dec_tc_gain_ajust( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ - const uint16_t nSamples, /* i : number of samples to be compensate */ - const uint16_t nFadeLength, /* i : length of the crossfade in samples */ +#endif + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ +#ifdef UNIFIED_DECODING_PATHS_LEFTOVERS + const int16_t nSamples, /* i : number of samples to be compensate */ + const int16_t nFadeLength, /* i : length of the crossfade in samples */ +#else + const uint16_t nSamples, /* i : number of samples to be compensate */ + const uint16_t nFadeLength, /* i : length of the crossfade in samples */ +#endif float *transport_channels_f[] /* i : synthesized core-coder transport channels/DirAC output*/ ) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 4d381bc980..4231afc321 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -50,8 +50,9 @@ * Local function prototypes *-----------------------------------------------------------------------*/ +#ifndef UNIFIED_DECODING_PATHS_LEFTOVERS static void ivas_jbm_dec_copy_tc( Decoder_Struct *st_ivas, const int16_t nSamplesForRendering, int16_t *nSamplesResidual, float *data, float *tc_digest_f[] ); - +#endif static void ivas_jbm_dec_tc_buffer_playout( Decoder_Struct *st_ivas, const uint16_t nSamplesAsked, uint16_t *nSamplesRendered, float *output[] ); static void ivas_jbm_dec_copy_masa_meta_to_buffer( Decoder_Struct *st_ivas ); @@ -98,6 +99,7 @@ ivas_error ivas_jbm_dec_tc( output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC ); + /* set pointers to transport channels audio */ for ( n = 0; n < MAX_TRANSPORT_CHANNELS; n++ ) { p_output[n] = st_ivas->p_output_f[n]; @@ -213,11 +215,12 @@ ivas_error ivas_jbm_dec_tc( { return error; } - +#ifndef UNIFIED_DECODING_PATHS_LEFTOVERS if ( output_config == IVAS_AUDIO_CONFIG_EXTERNAL && st_ivas->hDecoderConfig->Opt_tsm ) { ivas_jbm_dec_copy_masa_meta_to_buffer( st_ivas ); } +#endif } else if ( st_ivas->ivas_format == SBA_FORMAT ) { @@ -412,11 +415,12 @@ ivas_error ivas_jbm_dec_tc( /* Extract objects from MASA, output MASA + all objects (i.e., extracted and separated objects) */ ivas_omasa_render_objects_from_mix( st_ivas, p_output, st_ivas->nchan_ism, output_frame ); } - +#ifndef UNIFIED_DECODING_PATHS_LEFTOVERS if ( st_ivas->hDecoderConfig->Opt_tsm ) { ivas_jbm_dec_copy_masa_meta_to_buffer( st_ivas ); } +#endif } } else if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) @@ -727,6 +731,7 @@ ivas_error ivas_jbm_dec_tc( } } +#ifndef UNIFIED_DECODING_PATHS_LEFTOVERS /*----------------------------------------------------------------* * Write IVAS transport channels *----------------------------------------------------------------*/ @@ -746,6 +751,7 @@ ivas_error ivas_jbm_dec_tc( ivas_jbm_dec_copy_tc_no_tsm( st_ivas, p_output, output_frame ); } +#endif /*----------------------------------------------------------------* * Common updates *----------------------------------------------------------------*/ @@ -781,6 +787,111 @@ ivas_error ivas_jbm_dec_tc( return IVAS_ERR_OK; } +#ifdef UNIFIED_DECODING_PATHS_LEFTOVERS + +/*--------------------------------------------------------------------------* + * ivas_dec_feed_tc_to_renderer() + * + * Feed decoded transport channels to the IVAS renderer routine + * + digest TC channels in ParamISM and ParamMC + *--------------------------------------------------------------------------*/ + +void ivas_jbm_dec_feed_tc_to_renderer( + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + const int16_t nSamplesForRendering, /* i : number of TC samples available for rendering */ + int16_t *nSamplesResidual, /* o : number of samples not fitting into the renderer grid and buffer for the next call*/ + float *data /* i : transport channels */ +) +{ + float data_f[MAX_CLDFB_DIGEST_CHANNELS][MAX_JBM_L_FRAME48k]; /* 'float' buffer for transport channels that will be directly converted with the CLDFB */ + float *p_data_f[MAX_CLDFB_DIGEST_CHANNELS]; + int16_t n, n_render_timeslots, n_ch_cldfb; + int16_t ch; + DECODER_TC_BUFFER_HANDLE hTcBuffer; + + hTcBuffer = st_ivas->hTcBuffer; + n_ch_cldfb = hTcBuffer->nchan_transport_jbm - hTcBuffer->nchan_buffer_full; + + if ( st_ivas->hDecoderConfig->Opt_tsm ) + { + int16_t n_samples_still_available, m; + int16_t n_ch_full_copy; + int16_t n_ch_res_copy; + + for ( n = 0; n < n_ch_cldfb; n++ ) + { + p_data_f[n] = &data_f[n][0]; + } + + n_samples_still_available = hTcBuffer->n_samples_buffered - hTcBuffer->n_samples_rendered; + hTcBuffer->n_samples_buffered = n_samples_still_available + nSamplesForRendering + hTcBuffer->n_samples_discard; + hTcBuffer->n_samples_available = hTcBuffer->n_samples_granularity * ( hTcBuffer->n_samples_buffered / hTcBuffer->n_samples_granularity ); + *nSamplesResidual = hTcBuffer->n_samples_buffered - hTcBuffer->n_samples_available; + n_ch_full_copy = min( hTcBuffer->nchan_transport_jbm, hTcBuffer->nchan_buffer_full ); + n_ch_res_copy = hTcBuffer->nchan_transport_jbm - hTcBuffer->nchan_buffer_full; + + for ( ch = 0; ch < n_ch_full_copy; ch++ ) + { + set_zero( hTcBuffer->tc[ch], hTcBuffer->n_samples_discard ); + mvr2r( hTcBuffer->tc[ch] + hTcBuffer->n_samples_rendered, hTcBuffer->tc[ch] + hTcBuffer->n_samples_discard, n_samples_still_available ); + for ( m = 0; m < nSamplesForRendering; m++ ) + { + hTcBuffer->tc[ch][n_samples_still_available + hTcBuffer->n_samples_discard + m] = data[m * hTcBuffer->nchan_transport_jbm + ch]; + } + } + + if ( n_ch_res_copy > 0 ) + { + for ( ; ch < hTcBuffer->nchan_transport_jbm; ch++ ) + { + mvr2r( hTcBuffer->tc[ch], p_data_f[ch], n_samples_still_available ); + + for ( m = 0; m < nSamplesForRendering; m++ ) + { + p_data_f[ch][n_samples_still_available + m] = data[m * hTcBuffer->nchan_transport_jbm + ch]; + } + mvr2r( p_data_f[ch] + hTcBuffer->n_samples_available, hTcBuffer->tc[ch], *nSamplesResidual ); + } + } + + n_render_timeslots = hTcBuffer->n_samples_available / hTcBuffer->n_samples_granularity; + } + else + { + for ( n = 0; n < n_ch_cldfb; n++ ) + { + p_data_f[n] = &st_ivas->p_output_f[n][0]; + } + + for ( n = 0; n < ivas_get_nchan_buffers_dec( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); n++ ) + { + hTcBuffer->tc[n] = st_ivas->p_output_f[n]; /* note: buffers needed in the TD decorellator */ + } + + hTcBuffer->n_samples_buffered = nSamplesForRendering; + hTcBuffer->n_samples_available = hTcBuffer->n_samples_buffered; + *nSamplesResidual = 0; + + n_render_timeslots = DEFAULT_JBM_CLDFB_TIMESLOTS; + } + + /* CLDFB analysis for ParamMC/ParamISM */ + if ( st_ivas->ivas_format == ISM_FORMAT && st_ivas->ism_mode == ISM_MODE_PARAM && ( st_ivas->renderer_type == RENDERER_PARAM_ISM || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC ) ) + { + ivas_param_ism_dec_digest_tc( st_ivas, n_render_timeslots, p_data_f ); + } + else if ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_PARAMMC && hTcBuffer->tc_buffer_mode == TC_BUFFER_MODE_RENDERER ) + { + ivas_param_mc_dec_digest_tc( st_ivas, (uint8_t) n_render_timeslots, p_data_f ); + } + + hTcBuffer->n_samples_rendered = 0; + hTcBuffer->subframes_rendered = 0; + + return; +} + +#else /*--------------------------------------------------------------------------* * ivas_jbm_dec_feed_tc_to_renderer() @@ -846,6 +957,7 @@ void ivas_jbm_dec_feed_tc_to_renderer( return; } +#endif /*--------------------------------------------------------------------------* * ivas_dec_render() @@ -2020,7 +2132,7 @@ int16_t ivas_jbm_dec_get_num_tc_channels( return num_tc; } - +#ifndef UNIFIED_DECODING_PATHS_LEFTOVERS /*--------------------------------------------------------------------------* * ivas_jbm_dec_copy_tc() * @@ -2078,7 +2190,7 @@ static void ivas_jbm_dec_copy_tc( return; } - +#endif /*--------------------------------------------------------------------------* * ivas_jbm_dec_get_render_granularity() @@ -2605,7 +2717,7 @@ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode( return buffer_mode; } - +#ifndef UNIFIED_DECODING_PATHS_LEFTOVERS /*--------------------------------------------------------------------------* * ivas_jbm_dec_copy_tc_no_tsm() * @@ -2678,7 +2790,7 @@ void ivas_jbm_dec_copy_tc_no_tsm( return; } - +#endif /*--------------------------------------------------------------------------* * ivas_jbm_dec_metadata_open() @@ -2768,6 +2880,10 @@ static void ivas_jbm_masa_sf_to_slot_map( int16_t slot_idx; int16_t write_idx, sf_index; +#ifdef UNIFIED_DECODING_PATHS_LEFTOVERS + ivas_jbm_dec_copy_masa_meta_to_buffer( st_ivas ); + +#endif /* Set values */ hJbmMetadata = st_ivas->hJbmMetadata; num_slots_in_subfr = CLDFB_NO_COL_MAX / MAX_PARAM_SPATIAL_SUBFRAMES; diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index 048f26e379..4ea5a2824c 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -1335,17 +1335,42 @@ void ivas_param_mc_dec_digest_tc( float *transport_channels_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ ) { +#ifdef UNIFIED_DECODING_PATHS_LEFTOVERS + int16_t ch, num_freq_bands, slot_idx, cldfb_ch, n_ch_cldfb; + float *cldfb_real_buffer, *cldfb_imag_buffer; +#else PARAM_MC_DEC_HANDLE hParamMC; int16_t ch, slot_idx; int16_t nchan_transport; +#endif + /* Initialization */ +#ifdef UNIFIED_DECODING_PATHS_LEFTOVERS + num_freq_bands = st_ivas->hParamMC->num_freq_bands; + n_ch_cldfb = st_ivas->hTcBuffer->nchan_transport_jbm - st_ivas->hTcBuffer->nchan_buffer_full; + + cldfb_real_buffer = st_ivas->hParamMC->Cldfb_RealBuffer_tc; + cldfb_imag_buffer = st_ivas->hParamMC->Cldfb_ImagBuffer_tc; +#else hParamMC = st_ivas->hParamMC; assert( hParamMC ); - push_wmops( "param_mc_dec_digest_tc" ); - nchan_transport = st_ivas->nchan_transport; +#endif +#ifdef UNIFIED_DECODING_PATHS_LEFTOVERS + /* CLDFB Analysis */ + for ( ch = 0, cldfb_ch = 0; cldfb_ch < n_ch_cldfb; cldfb_ch++, ch++ ) + { + for ( slot_idx = 0; slot_idx < nCldfbSlots; slot_idx++ ) + { + cldfbAnalysis_ts( &( transport_channels_f[ch][num_freq_bands * slot_idx] ), + &cldfb_real_buffer[slot_idx * num_freq_bands * n_ch_cldfb + cldfb_ch * num_freq_bands], + &cldfb_imag_buffer[slot_idx * num_freq_bands * n_ch_cldfb + cldfb_ch * num_freq_bands], + num_freq_bands, st_ivas->cldfbAnaDec[cldfb_ch] ); + } + } +#else /* slot loop for gathering the input data */ for ( slot_idx = 0; slot_idx < nCldfbSlots; slot_idx++ ) { @@ -1364,8 +1389,7 @@ void ivas_param_mc_dec_digest_tc( } } } - - pop_wmops(); +#endif return; } diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 37b50287ad..68f388267f 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -4771,10 +4771,12 @@ static ivas_error evs_dec_main( mvs2r( pcm_buf_local, p_output[ch], nOutSamples ); } } +#ifndef UNIFIED_DECODING_PATHS_LEFTOVERS else // ToDo: the 'else' branch can be removed once UNIFIED_DECODING_PATHS_LEFTOVERS is merged { ivas_jbm_dec_copy_tc_no_tsm( st_ivas, p_output, nOutSamples ); } +#endif #else if ( !st_ivas->hDecoderConfig->Opt_tsm ) { -- GitLab From 3a7ba51c7dce0cd8b1ff799b3adbd0c86af073c8 Mon Sep 17 00:00:00 2001 From: vaclav Date: Fri, 18 Apr 2025 20:32:52 +0200 Subject: [PATCH 04/43] remove outdated todo comments --- lib_dec/ivas_dirac_dec.c | 2 +- lib_dec/ivas_osba_dec.c | 2 +- lib_dec/ivas_sba_rendering_internal.c | 2 +- lib_dec/ivas_stat_dec.h | 20 ++++++++++---------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index 6ce9439d4b..cfc4b0bc30 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -1554,7 +1554,7 @@ void ivas_dirac_dec_render( uint16_t slot_size, n_samples_sf, ch, nchan_intern; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; float *output_f_local[MAX_OUTPUT_CHANNELS]; - float output_f_local_buff[MAX_OUTPUT_CHANNELS][L_FRAME48k]; // VE2SB: TBV + float output_f_local_buff[MAX_OUTPUT_CHANNELS][L_FRAME48k]; hSpatParamRendCom = st_ivas->hSpatParamRendCom; diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index 0bc478c4a9..afa273fdbb 100644 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -134,7 +134,7 @@ ivas_error ivas_osba_dirac_td_binaural_jbm( { int16_t n; ivas_error error; - float output_separated_objects[BINAURAL_CHANNELS][L_FRAME48k]; // VE2SB: TBV + float output_separated_objects[BINAURAL_CHANNELS][L_FRAME48k]; float *p_sepobj[BINAURAL_CHANNELS]; int16_t channel_offset; int16_t slot_idx_start; diff --git a/lib_dec/ivas_sba_rendering_internal.c b/lib_dec/ivas_sba_rendering_internal.c index 06410aa542..1861186abc 100644 --- a/lib_dec/ivas_sba_rendering_internal.c +++ b/lib_dec/ivas_sba_rendering_internal.c @@ -358,7 +358,7 @@ void ivas_ism2sba_sf( { int16_t i, j, k; float g1, *g2, *tc, *out, gain, prev_gain; - float buffer_tmp[HOA3_CHANNELS][L_FRAME48k]; // VE2SB: TBV + float buffer_tmp[HOA3_CHANNELS][L_FRAME48k]; int16_t sba_num_chans; assert( ( sba_order <= 3 ) && "Only order up to 3 is supported!" ); diff --git a/lib_dec/ivas_stat_dec.h b/lib_dec/ivas_stat_dec.h index 8d5f167620..89d53452bb 100644 --- a/lib_dec/ivas_stat_dec.h +++ b/lib_dec/ivas_stat_dec.h @@ -944,16 +944,16 @@ typedef struct ivas_masa_ism_data_structure typedef struct decoder_tc_buffer_structure { - float *tc_buffer; /* the buffer itself */ - float *tc[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS]; /* pointers into the buffer to the beginning of each tc */ // VE2SB: TBV - TC_BUFFER_MODE tc_buffer_mode; /* mode of the buffer (no buffering, render buffering, out buffering) */ - int16_t nchan_transport_jbm; /* number of TCs after TC decoding */ - int16_t nchan_transport_internal; /* total number of TC buffer channels, can include e.g. TD decorr data */ - int16_t nchan_buffer_full; /* number of channels to be fully buffered */ - int16_t n_samples_available; /* samples still available for rendering in the current frame */ - int16_t n_samples_buffered; /* full number of samples in the buffer (including spill to next frame) */ - int16_t n_samples_rendered; /* samples already rendered in the current frame */ - int16_t n_samples_granularity; /* render granularity */ + float *tc_buffer; /* the buffer itself */ + float *tc[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS]; /* pointers into the buffer to the beginning of each tc */ + TC_BUFFER_MODE tc_buffer_mode; /* mode of the buffer (no buffering, render buffering, out buffering) */ + int16_t nchan_transport_jbm; /* number of TCs after TC decoding */ + int16_t nchan_transport_internal; /* total number of TC buffer channels, can include e.g. TD decorr data */ + int16_t nchan_buffer_full; /* number of channels to be fully buffered */ + int16_t n_samples_available; /* samples still available for rendering in the current frame */ + int16_t n_samples_buffered; /* full number of samples in the buffer (including spill to next frame) */ + int16_t n_samples_rendered; /* samples already rendered in the current frame */ + int16_t n_samples_granularity; /* render granularity */ int16_t n_samples_flushed; int16_t subframe_nbslots[MAX_JBM_SUBFRAMES_5MS]; int16_t nb_subframes; -- GitLab From 8d76d1c32beebe87d004df5538c9c3740c3590f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 21:35:01 +0100 Subject: [PATCH 05/43] Move variables to separate file --- .gitlab-ci.yml | 42 +--------------------------------------- .gitlab-ci/variables.yml | 40 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 41 deletions(-) create mode 100644 .gitlab-ci/variables.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 068dfb0193..704908ea75 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,44 +1,4 @@ -variables: - TESTV_DIR: "/usr/local/testv" - LTV_DIR: "/usr/local/ltv" - BUILD_OUTPUT: "build_output.txt" - EVS_BE_TEST_DIR: "/usr/local/be_2_evs_test" - EVS_BE_WIN_TEST_DIR: "C:/Users/gitlab-runner/testvec" - EXIT_CODE_NON_BE: 123 - EXIT_CODE_FAIL: 1 - PROCESSING_SCRIPTS_BIN_DIR: "/test-bin" - TESTS_DIR_CODEC_BE_ON_MR: "tests/codec_be_on_mr_nonselection" - SANITIZER_TESTS: "CLANG1 CLANG2 CLANG3" - OUT_FORMATS_CHANNEL_BASED: "stereo mono 5_1 5_1_2 5_1_4 7_1 7_1_4" - OUT_FORMATS_SCENE_BASED: "FOA HOA2 HOA3" - OUT_FORMATS_BINAURAL: "BINAURAL BINAURAL_ROOM_IR BINAURAL_ROOM_REVERB" - OUT_FORMATS_ALL: "$OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT" - IVAS_PIPELINE_NAME: '' - MANUAL_PIPELINE_TYPE: - description: "Type for the manual pipeline run. Use 'test-be-release' to run BE test against release codec." - value: 'default' - options: - - 'default' - - 'test-be-release' - - 'test-long-self-test' - - 'ivas-conformance' - - 'ivas-conformance-linux' - - 'check-clipping' - - 'test-branch-vs-input-passthrough' - - GIT_CLEAN_FLAGS: -ffdxq - TESTCASE_TIMEOUT_STV_SANITIZERS: 240 - TESTCASE_TIMEOUT_LTV_SANITIZERS: 2400 - BASOP_REFERENCE_BRANCH: "ivas-float-update" - SCALE_FACTOR: "3.162" - PYTEST_ARGS: "" - LONG_TEST_SUITE: "tests/codec_be_on_mr_nonselection tests/renderer --param_file scripts/config/self_test_ltv.prm --use_ltv" - LONG_TEST_SUITE_NO_RENDERER: "tests/codec_be_on_mr_nonselection --param_file scripts/config/self_test_ltv.prm --use_ltv" - SHORT_TEST_SUITE: "tests/codec_be_on_mr_nonselection" - SHORT_TEST_SUITE_ENCODER: "tests/codec_be_on_mr_nonselection/test_param_file.py --param_file scripts/config/self_test_basop_encoder.prm" - LONG_TEST_SUITE_ENCODER: "tests/codec_be_on_mr_nonselection/test_param_file.py --param_file scripts/config/self_test_ltv_basop_encoder.prm" - TEST_SUITE: "" - +include: '.gitlab-ci/variables.yml' default: interruptible: true # Make all jobs by default interruptible diff --git a/.gitlab-ci/variables.yml b/.gitlab-ci/variables.yml new file mode 100644 index 0000000000..7c800a3471 --- /dev/null +++ b/.gitlab-ci/variables.yml @@ -0,0 +1,40 @@ +variables: + TESTV_DIR: "/usr/local/testv" + LTV_DIR: "/usr/local/ltv" + BUILD_OUTPUT: "build_output.txt" + EVS_BE_TEST_DIR: "/usr/local/be_2_evs_test" + EVS_BE_WIN_TEST_DIR: "C:/Users/gitlab-runner/testvec" + EXIT_CODE_NON_BE: 123 + EXIT_CODE_FAIL: 1 + PROCESSING_SCRIPTS_BIN_DIR: "/test-bin" + TESTS_DIR_CODEC_BE_ON_MR: "tests/codec_be_on_mr_nonselection" + SANITIZER_TESTS: "CLANG1 CLANG2 CLANG3" + OUT_FORMATS_CHANNEL_BASED: "stereo mono 5_1 5_1_2 5_1_4 7_1 7_1_4" + OUT_FORMATS_SCENE_BASED: "FOA HOA2 HOA3" + OUT_FORMATS_BINAURAL: "BINAURAL BINAURAL_ROOM_IR BINAURAL_ROOM_REVERB" + OUT_FORMATS_ALL: "$OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT" + IVAS_PIPELINE_NAME: '' + MANUAL_PIPELINE_TYPE: + description: "Type for the manual pipeline run. Use 'test-be-release' to run BE test against release codec." + value: 'default' + options: + - 'default' + - 'test-be-release' + - 'test-long-self-test' + - 'ivas-conformance' + - 'ivas-conformance-linux' + - 'check-clipping' + - 'test-branch-vs-input-passthrough' + + GIT_CLEAN_FLAGS: -ffdxq + TESTCASE_TIMEOUT_STV_SANITIZERS: 180 + TESTCASE_TIMEOUT_LTV_SANITIZERS: 2400 + BASOP_REFERENCE_BRANCH: "ivas-float-update" + SCALE_FACTOR: "3.162" + PYTEST_ARGS: "" + LONG_TEST_SUITE: "tests/codec_be_on_mr_nonselection tests/renderer --param_file scripts/config/self_test_ltv.prm --use_ltv" + LONG_TEST_SUITE_NO_RENDERER: "tests/codec_be_on_mr_nonselection --param_file scripts/config/self_test_ltv.prm --use_ltv" + SHORT_TEST_SUITE: "tests/codec_be_on_mr_nonselection" + SHORT_TEST_SUITE_ENCODER: "tests/codec_be_on_mr_nonselection/test_param_file.py --param_file scripts/config/self_test_basop_encoder.prm" + LONG_TEST_SUITE_ENCODER: "tests/codec_be_on_mr_nonselection/test_param_file.py --param_file scripts/config/self_test_ltv_basop_encoder.prm" + TEST_SUITE: "" -- GitLab From ab66e48b1ad262f8e3833a5da1daffb51d95d116 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 21:36:38 +0100 Subject: [PATCH 06/43] Use extends: for sanitizer-selftest-anchor --- .gitlab-ci.yml | 14 +++++++------- .gitlab-ci/snippets/print-common-info.sh | 9 +++++++++ 2 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 .gitlab-ci/snippets/print-common-info.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 704908ea75..d8a1ef35a0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -198,7 +198,7 @@ stages: # to be reused in MR and LTV-scheduled sanitizer test jobs # set CLANG_NUM, SELFTEST_SANITY_TIMEOUT and SELF_TEST_PRM_FILE in before_script section -.sanitizer-selftest-anchor: &sanitizer-selftest-anchor +.sanitizer-selftest-anchor: script: - *print-common-info - *copy-ltv-files-to-testv-dir @@ -624,6 +624,7 @@ codec-smoke-test: codec-msan: extends: - .sanitizer-selftest-on-mr + - .sanitizer-selftest-anchor tags: - ivas-linux-fast before_script: @@ -631,23 +632,23 @@ codec-msan: - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" - USE_LTV="" - <<: *sanitizer-selftest-anchor # code selftest testvectors with address-sanitizer binaries codec-asan: extends: - .sanitizer-selftest-on-mr + - .sanitizer-selftest-anchor before_script: - CLANG_NUM=2 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" - USE_LTV="" - <<: *sanitizer-selftest-anchor # code selftest testvectors with undefined-behaviour-sanitizer binaries codec-usan: extends: - .sanitizer-selftest-on-mr + - .sanitizer-selftest-anchor tags: - ivas-linux-fast before_script: @@ -655,7 +656,6 @@ codec-usan: - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" - USE_LTV="" - <<: *sanitizer-selftest-anchor # compare bit-exactness between 5ms and 20 on the branch pytest-compare-20ms-and-5ms-rendering: @@ -1774,6 +1774,7 @@ test-branch-vs-input-passthrough: ltv-msan: extends: - .sanitizer-selftest-ltv + - .sanitizer-selftest-anchor rules: - if: $SANITIZER_SCHEDULE_E timeout: 4 hours @@ -1784,12 +1785,12 @@ ltv-msan: - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" - USE_LTV="--use_ltv" - <<: *sanitizer-selftest-anchor # code selftest long testvectors with address-sanitizer binaries ltv-asan: extends: - .sanitizer-selftest-ltv + - .sanitizer-selftest-anchor rules: - if: $SANITIZER_SCHEDULE_E when: delayed @@ -1802,12 +1803,12 @@ ltv-asan: - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" - USE_LTV="--use_ltv" - <<: *sanitizer-selftest-anchor # code selftest long testvectors with undefined-behaviour-sanitizer binaries ltv-usan: extends: - .sanitizer-selftest-ltv + - .sanitizer-selftest-anchor rules: - if: $SANITIZER_SCHEDULE_E when: delayed @@ -1820,7 +1821,6 @@ ltv-usan: - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" - USE_LTV="--use_ltv" - <<: *sanitizer-selftest-anchor .sanitizer-test-template: extends: diff --git a/.gitlab-ci/snippets/print-common-info.sh b/.gitlab-ci/snippets/print-common-info.sh new file mode 100644 index 0000000000..32b29b3985 --- /dev/null +++ b/.gitlab-ci/snippets/print-common-info.sh @@ -0,0 +1,9 @@ +#! /bin/bash + +set -euo pipefail + +echo "Printing common information for build job." +echo "Current job is run on commit $CI_COMMIT_SHA" +echo "Commit time was $CI_COMMIT_TIMESTAMP" +echo -n "System time is " +date -- GitLab From 2bb4199134f27276aa9c94641a3560f1c07d6db9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 21:39:30 +0100 Subject: [PATCH 07/43] Replace print-common-info with shell script --- .gitlab-ci.yml | 58 ++++++++++++++++++++++---------------------------- 1 file changed, 25 insertions(+), 33 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d8a1ef35a0..867cd13d8e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,14 +59,6 @@ stages: # These can be used later on to do common tasks -# Prints useful information for every job and should be used at the beginning of each job -.print-common-info: &print-common-info - - | - echo "Printing common information for build job." - echo "Current job is run on commit $CI_COMMIT_SHA" - echo "Commit time was $CI_COMMIT_TIMESTAMP" - date | xargs echo "System time is" - .print-common-info-windows: &print-common-info-windows - | echo "Printing common information for build job." @@ -200,8 +192,8 @@ stages: # set CLANG_NUM, SELFTEST_SANITY_TIMEOUT and SELF_TEST_PRM_FILE in before_script section .sanitizer-selftest-anchor: script: - - *print-common-info - - *copy-ltv-files-to-testv-dir + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash .gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh - make clean - make -j CLANG=$CLANG_NUM - testcase_timeout=$SELFTEST_SANITY_TIMEOUT @@ -518,7 +510,7 @@ build-codec-linux-make: - .build-job-linux - .rules-basis script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *activate-Werror-linux - make -j @@ -527,7 +519,7 @@ build-codec-linux-cmake: - .build-job-linux - .rules-basis script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *activate-Werror-linux - mkdir build - cd build @@ -541,7 +533,7 @@ build-codec-instrumented-linux: - .rules-basis timeout: "10 minutes" script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - ./scripts/prepare_instrumentation.sh - make -j -C scripts/c-code_instrument @@ -551,7 +543,7 @@ build-codec-sanitizers-linux: - .build-job-linux - .rules-basis script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *activate-Werror-linux - bash ci/build_codec_sanitizers_linux.sh @@ -589,7 +581,7 @@ codec-smoke-test: stage: test needs: ["build-codec-linux-cmake", "build-codec-linux-make", "build-codec-instrumented-linux", "build-codec-sanitizers-linux"] script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh # LTV update needed as ltv ISM metadata files are used - *update-ltv-repo @@ -665,7 +657,7 @@ pytest-compare-20ms-and-5ms-rendering: stage: test needs: ["build-codec-linux-cmake", "build-codec-linux-make", "build-codec-instrumented-linux", "build-codec-sanitizers-linux"] script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *disable-limiter - make clean - make -j @@ -812,7 +804,7 @@ renderer-pytest-on-merge-request: timeout: "20 minutes" stage: compare script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *get-commits-behind-count - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -897,7 +889,7 @@ split-rendering-pytest-on-merge-request: timeout: "30 minutes" stage: compare script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *get-commits-behind-count - *check-commits-behind-count-in-compare-jobs @@ -968,7 +960,7 @@ ivas-pytest-on-merge-request: needs: ["build-codec-linux-cmake", "codec-smoke-test"] timeout: "14 minutes" script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *get-commits-behind-count - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -1022,7 +1014,7 @@ ivas-interop-on-merge-request: needs: ["build-codec-linux-cmake"] timeout: "10 minutes" script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *get-commits-behind-count - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -1071,7 +1063,7 @@ evs-pytest-on-merge-request: needs: ["build-codec-linux-cmake", "codec-smoke-test"] timeout: "10 minutes" script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *get-commits-behind-count - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -1123,7 +1115,7 @@ voip-be-on-merge-request: needs: ["build-codec-linux-make"] timeout: "10 minutes" script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - make clean - make -j - python3 -m pytest tests/test_be_for_jbm_neutral_dly_profile.py @@ -1184,7 +1176,7 @@ check-first-frame-is-sid: stage: test needs: ["build-codec-linux-cmake"] script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *update-ltv-repo # this rm makes check-for-testvectors only check for the signals we actually need in this test - rm scripts/config/ci_linux_ltv.json scripts/config/ci_linux.json @@ -1225,7 +1217,7 @@ check-bitexactness-hrtf-rom-and-file: needs: ["build-codec-linux-cmake"] timeout: "5 minutes" script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - cmake . - make -j - python3 tests/create_short_testvectors.py --cut_len 1.0 @@ -1247,7 +1239,7 @@ check-bitexactness-ext-and-transport-format: needs: ["build-codec-linux-cmake"] timeout: "5 minutes" script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - cmake . - make -j - python3 tests/create_short_testvectors.py --cut_len 1.0 @@ -1301,7 +1293,7 @@ be-2-evs-linux: needs: ["build-codec-linux-cmake"] timeout: "20 minutes" # To be revisited script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - mkdir build - cd build @@ -1325,7 +1317,7 @@ codec-comparison-on-main-push: needs: ["build-codec-linux-cmake"] timeout: "30 minutes" # To be revisited script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - latest_commit=$(git rev-parse HEAD) # Latest commit - *get-previous-merge-commit-sha # Stored in previous_merge_commit shell variable now - echo "Comparing changes from $previous_merge_commit to $latest_commit" @@ -1535,7 +1527,7 @@ ivas-conformance-linux: exit_codes: - 123 script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - make -j - cp IVAS_cod IVAS_cod_ref - cp IVAS_dec IVAS_dec_ref @@ -1643,7 +1635,7 @@ test-long-self-test: exit_codes: - 123 script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *update-ltv-repo ### build branch binaries @@ -1712,7 +1704,7 @@ check-clipping: exit_codes: - 123 script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *enable-debugging-macro - make -j - tests/scale_pcm.py ./scripts/testv/ $SCALE_FACTOR # Default: 3.162 (+10 dB). Can be set in manual trigger. @@ -1742,7 +1734,7 @@ test-branch-vs-input-passthrough: exit_codes: - 123 script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - make -j - exit_code=0 @@ -2362,7 +2354,7 @@ coverage-test-on-main-scheduled: - if: $COVERAGE_TEST timeout: 3 hours script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *update-ltv-repo - *copy-ltv-files-to-testv-dir - make GCOV=1 -j @@ -2469,7 +2461,7 @@ coverage-test-on-main-scheduled: timeout: 3 hours 30 minutes stage: test before_script: - - *print-common-info + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *update-ltv-repo - *complexity-measurements-setup allow_failure: -- GitLab From b748715d00af0937357b98293a9cd8e776fecbde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 21:45:02 +0100 Subject: [PATCH 08/43] Replace copy-ltv-files-to-testv-dir with shell script --- .gitlab-ci.yml | 13 ++++--------- .gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh | 9 +++++++++ 2 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 .gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 867cd13d8e..11ab57a7eb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -170,11 +170,6 @@ stages: .check-commits-behind-count-in-compare-jobs: &check-commits-behind-count-in-compare-jobs - if [ $commits_behind_count -ne 0 ]; then echo "Your branch is not up-to-date with main -> Compare tests will not run as they can contain false negatives this way.\nMain might have changed during your pipeline run. Run 'git merge origin/main' to update."; exit 1; fi -.copy-ltv-files-to-testv-dir: ©-ltv-files-to-testv-dir - - cp "$LTV_DIR"/*.wav scripts/testv/ - - cp "$LTV_DIR"/*.met scripts/testv/ - - cp "$LTV_DIR"/*.csv scripts/testv/ - .copy-ltv-files-to-testv-dir-win: ©-ltv-files-to-testv-dir-win - cp $LTV_DIR_WIN\*.wav scripts\testv - cp $LTV_DIR_WIN\*.met scripts\testv @@ -193,7 +188,7 @@ stages: .sanitizer-selftest-anchor: script: - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - - bash .gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh - make clean - make -j CLANG=$CLANG_NUM - testcase_timeout=$SELFTEST_SANITY_TIMEOUT @@ -431,7 +426,7 @@ branch-is-up-to-date-with-main-post: - python3 scripts/prepare_combined_format_inputs.py - *update-ltv-repo - - *copy-ltv-files-to-testv-dir + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh - *get-basop-float-reference @@ -1664,7 +1659,7 @@ test-long-self-test: ### prepare pytest # Copy test vectors from LTV to TESTV - - *copy-ltv-files-to-testv-dir + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh # create references - exit_code_ref=0 @@ -2356,7 +2351,7 @@ coverage-test-on-main-scheduled: script: - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - *update-ltv-repo - - *copy-ltv-files-to-testv-dir + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh - make GCOV=1 -j - cp IVAS_rend IVAS_rend_ref # Copy exec to be able to run renderer script diff --git a/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh b/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh new file mode 100644 index 0000000000..c9190f1abf --- /dev/null +++ b/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh @@ -0,0 +1,9 @@ +#! /bin/bash + +set -euo pipefail + +cd "${CI_PROJECT_DIR}" + +cp "$LTV_DIR"/*.wav scripts/testv/ +cp "$LTV_DIR"/*.met scripts/testv/ +cp "$LTV_DIR"/*.csv scripts/testv/ -- GitLab From da340e5ac643ba864899b1714900adbdf6aff66a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 21:46:52 +0100 Subject: [PATCH 09/43] Remove get-previous-merge-commit-sha anchor --- .gitlab-ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 11ab57a7eb..d6d2c8b189 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,9 +66,6 @@ stages: echo "Commit time was $CI_COMMIT_TIMESTAMP" ("echo 'System time is'", "Get-Date -Format 'dddd dd/MM/yyyy HH:mm K'") | Invoke-Expression -.get-previous-merge-commit-sha: &get-previous-merge-commit-sha - - previous_merge_commit=$(git --no-pager log --merges HEAD~1 -n 1 --pretty=format:%H) - .mr-fetch-target-branch: &mr-fetch-target-branch # first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching # depending on chaching, the branch may not be there, so prevent failure of this command -> should maybe be done smarter later @@ -1314,7 +1311,7 @@ codec-comparison-on-main-push: script: - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - latest_commit=$(git rev-parse HEAD) # Latest commit - - *get-previous-merge-commit-sha # Stored in previous_merge_commit shell variable now + - previous_merge_commit=$(git --no-pager log --merges HEAD~1 -n 1 --pretty=format:%H) - echo "Comparing changes from $previous_merge_commit to $latest_commit" - git --no-pager diff --stat $previous_merge_commit..$latest_commit -- GitLab From 8480cf9f5324aee9e5e169b96f943a3826263180 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 21:58:56 +0100 Subject: [PATCH 10/43] Replace mr-fetch-target-branch with shell script --- .gitlab-ci.yml | 15 ++++----------- .gitlab-ci/snippets/mr-fetch-target-branch.sh | 11 +++++++++++ 2 files changed, 15 insertions(+), 11 deletions(-) create mode 100644 .gitlab-ci/snippets/mr-fetch-target-branch.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d6d2c8b189..6ab59e994a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,13 +66,6 @@ stages: echo "Commit time was $CI_COMMIT_TIMESTAMP" ("echo 'System time is'", "Get-Date -Format 'dddd dd/MM/yyyy HH:mm K'") | Invoke-Expression -.mr-fetch-target-branch: &mr-fetch-target-branch - # first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching - # depending on chaching, the branch may not be there, so prevent failure of this command -> should maybe be done smarter later - - git branch -D $CI_MERGE_REQUEST_TARGET_BRANCH_NAME || true - # needed when depth is lower than the number of commits in the branch - - git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME:$CI_MERGE_REQUEST_TARGET_BRANCH_NAME - .mr-get-target-commit: &mr-get-target-commit # compare to last target branch commit before pipeline was created - target_commit=$(git log $CI_MERGE_REQUEST_TARGET_BRANCH_NAME -1 --oneline --before=${CI_PIPELINE_CREATED_AT} --format=%H) @@ -116,8 +109,8 @@ stages: - source_branch_commit_sha=$(git rev-parse HEAD) ### checkout version to compare against - - *mr-fetch-target-branch - - *mr-get-target-commit + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/mr-fetch-target-branch.sh + - target_commit="$("$CI_PROJECT_DIR"/.gitlab-ci/snippets/mr-get-target-commit.sh)" - git checkout $target_commit - echo "Building reference codec at commit $target_commit" @@ -894,8 +887,8 @@ split-rendering-pytest-on-merge-request: # store the current commit hash - source_branch_commit_sha=$(git rev-parse HEAD) - - *mr-fetch-target-branch - - *mr-get-target-commit + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/mr-fetch-target-branch.sh + - target_commit="$("$CI_PROJECT_DIR"/.gitlab-ci/snippets/mr-get-target-commit.sh)" - git checkout $target_commit - echo "Building reference codec at commit $target_commit" diff --git a/.gitlab-ci/snippets/mr-fetch-target-branch.sh b/.gitlab-ci/snippets/mr-fetch-target-branch.sh new file mode 100644 index 0000000000..57735e2510 --- /dev/null +++ b/.gitlab-ci/snippets/mr-fetch-target-branch.sh @@ -0,0 +1,11 @@ +#! /bin/bash + +set -euo pipefail + +cd "${CI_PROJECT_DIR}" + +# first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching +# depending on chaching, the branch may not be there, so prevent failure of this command -> should maybe be done smarter later +git branch -D "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" || true +# needed when depth is lower than the number of commits in the branch +git fetch origin "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME":"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" -- GitLab From 40516f6c6f7596eb22d85eff685998328bb6971b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 22:38:52 +0100 Subject: [PATCH 11/43] Replace mr-get-target-commit with shell script --- .gitlab-ci.yml | 3 --- .gitlab-ci/snippets/mr-get-target-commit.sh | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 .gitlab-ci/snippets/mr-get-target-commit.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6ab59e994a..47aecac48b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,9 +66,6 @@ stages: echo "Commit time was $CI_COMMIT_TIMESTAMP" ("echo 'System time is'", "Get-Date -Format 'dddd dd/MM/yyyy HH:mm K'") | Invoke-Expression -.mr-get-target-commit: &mr-get-target-commit # compare to last target branch commit before pipeline was created - - target_commit=$(git log $CI_MERGE_REQUEST_TARGET_BRANCH_NAME -1 --oneline --before=${CI_PIPELINE_CREATED_AT} --format=%H) - .check-for-testvectors: &check-for-testvectors # check if the testvector files specified in scripts/config/ci_linux*.json are present - python3 -m pytest ci/test_vectors_available.py diff --git a/.gitlab-ci/snippets/mr-get-target-commit.sh b/.gitlab-ci/snippets/mr-get-target-commit.sh new file mode 100644 index 0000000000..728149f6f7 --- /dev/null +++ b/.gitlab-ci/snippets/mr-get-target-commit.sh @@ -0,0 +1,7 @@ +#! /bin/bash + +set -euo pipefail + +cd "${CI_PROJECT_DIR}" + +exec git log "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" -1 --oneline --before="${CI_PIPELINE_CREATED_AT}" --format="%H" -- GitLab From 7f1281f0043f3fb63eaf19460a066ac85580d267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 22:43:36 +0100 Subject: [PATCH 12/43] Replace check-for-testvectors with shell script --- .gitlab-ci.yml | 5 +---- .gitlab-ci/snippets/check-for-testvectors.sh | 7 +++++++ 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 .gitlab-ci/snippets/check-for-testvectors.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 47aecac48b..4177f7b66b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,9 +66,6 @@ stages: echo "Commit time was $CI_COMMIT_TIMESTAMP" ("echo 'System time is'", "Get-Date -Format 'dddd dd/MM/yyyy HH:mm K'") | Invoke-Expression -.check-for-testvectors: &check-for-testvectors # check if the testvector files specified in scripts/config/ci_linux*.json are present - - python3 -m pytest ci/test_vectors_available.py - .disable-debugging-macro: &disable-debugging-macro # automatically disable #DEBUGGING macro in options.h using /**/-comment - sed -i.bak -e "s/^[[:space:]]*\(#define[[:space:]]*DEBUGGING\)/\/\*\1\*\//g" lib_com/options.h @@ -1162,7 +1159,7 @@ check-first-frame-is-sid: - *update-ltv-repo # this rm makes check-for-testvectors only check for the signals we actually need in this test - rm scripts/config/ci_linux_ltv.json scripts/config/ci_linux.json - - *check-for-testvectors + - bash "${CI_PROJECT_DIR}"/.gitlab-ci/snippets/check-for-testvectors.sh - bash ci/run-first-frame-is-sid-test.sh artifacts: diff --git a/.gitlab-ci/snippets/check-for-testvectors.sh b/.gitlab-ci/snippets/check-for-testvectors.sh new file mode 100644 index 0000000000..633c81bbbe --- /dev/null +++ b/.gitlab-ci/snippets/check-for-testvectors.sh @@ -0,0 +1,7 @@ +#! /bin/bash + +set -euo pipefail + +cd "${CI_PROJECT_DIR}" + +exec python3 -m pytest ci/test_vectors_available.py -- GitLab From a6cfd59377a31b487d297d7f94bb915a3e4e9f93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 22:46:08 +0100 Subject: [PATCH 13/43] Replace disable-debugging-macro with shell script --- .gitlab-ci.yml | 8 ++------ .gitlab-ci/snippets/disable-debugging-macro.sh | 8 ++++++++ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 .gitlab-ci/snippets/disable-debugging-macro.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4177f7b66b..662eec04a9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,10 +66,6 @@ stages: echo "Commit time was $CI_COMMIT_TIMESTAMP" ("echo 'System time is'", "Get-Date -Format 'dddd dd/MM/yyyy HH:mm K'") | Invoke-Expression -.disable-debugging-macro: &disable-debugging-macro -# automatically disable #DEBUGGING macro in options.h using /**/-comment - - sed -i.bak -e "s/^[[:space:]]*\(#define[[:space:]]*DEBUGGING\)/\/\*\1\*\//g" lib_com/options.h - .enable-debugging-macro: &enable-debugging-macro # automatically enable #DEBUGGING macro in options.h using either /**/-comment or //-comment - sed -i.bak -e "s/\/\*\ *\(#define\ *DEBUGGING\ *\)\*\//\1/g" lib_com/options.h @@ -86,7 +82,7 @@ stages: .merge-request-comparison-setup-codec: &merge-request-comparison-setup-codec ### build test binaries, initial clean for paranoia reasons - - *disable-debugging-macro + - bash "${CI_PROJECT_DIR}"/.gitlab-ci/snippets/disable-debugging-macro.sh - make clean - mkdir build - cd build @@ -109,7 +105,7 @@ stages: - echo "Building reference codec at commit $target_commit" ### build reference binaries - - *disable-debugging-macro + - bash "${CI_PROJECT_DIR}"/.gitlab-ci/snippets/disable-debugging-macro.sh - cd build - cmake .. - make -j diff --git a/.gitlab-ci/snippets/disable-debugging-macro.sh b/.gitlab-ci/snippets/disable-debugging-macro.sh new file mode 100644 index 0000000000..3abbea15fb --- /dev/null +++ b/.gitlab-ci/snippets/disable-debugging-macro.sh @@ -0,0 +1,8 @@ +#! /bin/bash + +set -euo pipefail + +cd "${CI_PROJECT_DIR}" + +# automatically disable #DEBUGGING macro in options.h using /**/-comment +sed -i.bak -e "s/^[[:space:]]*\(#define[[:space:]]*DEBUGGING\)/\/\*\1\*\//g" lib_com/options.h -- GitLab From 942e159b85cec02098416ad94a2984de7df4351a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 22:49:00 +0100 Subject: [PATCH 14/43] Replace enable-debugging-macro with shell script --- .gitlab-ci.yml | 7 +------ .gitlab-ci/snippets/enable-debugging-macro.sh | 9 +++++++++ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 .gitlab-ci/snippets/enable-debugging-macro.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 662eec04a9..b6ef907235 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,11 +66,6 @@ stages: echo "Commit time was $CI_COMMIT_TIMESTAMP" ("echo 'System time is'", "Get-Date -Format 'dddd dd/MM/yyyy HH:mm K'") | Invoke-Expression -.enable-debugging-macro: &enable-debugging-macro -# automatically enable #DEBUGGING macro in options.h using either /**/-comment or //-comment - - sed -i.bak -e "s/\/\*\ *\(#define\ *DEBUGGING\ *\)\*\//\1/g" lib_com/options.h - - sed -i.bak -e "s/\/\/\ *\(#define\ *DEBUGGING\ *\)/\1/g" lib_com/options.h - .get-basop-float-reference: &get-basop-float-reference - git clone -b $BASOP_REFERENCE_BRANCH https://forge.3gpp.org/rep/sa4/audio/ivas-basop.git --single-branch --depth 1 ivas-basop - cd ivas-basop @@ -1680,7 +1675,7 @@ check-clipping: - 123 script: - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - - *enable-debugging-macro + - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/enable-debugging-macro.sh - make -j - tests/scale_pcm.py ./scripts/testv/ $SCALE_FACTOR # Default: 3.162 (+10 dB). Can be set in manual trigger. - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1 --html=report.html --self-contained-html --junit-xml=report-junit.xml --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec diff --git a/.gitlab-ci/snippets/enable-debugging-macro.sh b/.gitlab-ci/snippets/enable-debugging-macro.sh new file mode 100644 index 0000000000..d52401d358 --- /dev/null +++ b/.gitlab-ci/snippets/enable-debugging-macro.sh @@ -0,0 +1,9 @@ +#! /bin/bash + +set -euo pipefail + +cd "${CI_PROJECT_DIR}" + +# automatically enable #DEBUGGING macro in options.h using either /**/-comment or //-comment +sed -i.bak -e "s/\/\*\ *\(#define\ *DEBUGGING\ *\)\*\//\1/g" lib_com/options.h +sed -i.bak -e "s/\/\/\ *\(#define\ *DEBUGGING\ *\)/\1/g" lib_com/options.h -- GitLab From 71763425991c3877f7fe5030b0898815fb6cbcf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 23:25:18 +0100 Subject: [PATCH 15/43] Replace get-commits-behind-count with shell script --- .gitlab-ci.yml | 19 +++++++------------ .../snippets/get-commits-behind-count.sh | 10 ++++++++++ 2 files changed, 17 insertions(+), 12 deletions(-) create mode 100644 .gitlab-ci/snippets/get-commits-behind-count.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b6ef907235..5441d5e4c1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -137,11 +137,6 @@ stages: # automatically enable #define DISABLE_LIMITER in options.h, handling both /**/-comment and //-comment - sed -i.bak -e "s/\/\*[[:space:]]*\(#define[[:space:]]*DISABLE_LIMITER\)[[:space:]]*\*\//\1/g" ./lib_com/options.h -.get-commits-behind-count: &get-commits-behind-count - - echo $CI_COMMIT_SHA - - echo $CI_MERGE_REQUEST_TARGET_BRANCH_NAME - - commits_behind_count=$(git rev-list --count $CI_COMMIT_SHA..origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME) - .check-commits-behind-count-in-compare-jobs: &check-commits-behind-count-in-compare-jobs - if [ $commits_behind_count -ne 0 ]; then echo "Your branch is not up-to-date with main -> Compare tests will not run as they can contain false negatives this way.\nMain might have changed during your pipeline run. Run 'git merge origin/main' to update."; exit 1; fi @@ -354,9 +349,9 @@ branch-is-up-to-date-with-main-pre: tags: - ivas-linux script: - - *get-commits-behind-count - echo $commits_behind_count - if [ $commits_behind_count -eq 0 ]; then exit 0; else echo "Your branch is behind main, run 'git merge origin/main' to update."; exit 1; fi; + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" check-self-test-names-pre: extends: @@ -385,9 +380,9 @@ branch-is-up-to-date-with-main-post: tags: - ivas-linux script: - - *get-commits-behind-count - echo $commits_behind_count - if [ $commits_behind_count -eq 0 ]; then exit 0; else echo "Your branch is behind main, possibly main changed during your pipeline run, run 'git merge origin/main' to update." exit 1; fi; + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" .basop-ci-branch-compat-template: extends: @@ -775,7 +770,7 @@ renderer-pytest-on-merge-request: stage: compare script: - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - - *get-commits-behind-count + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -860,7 +855,7 @@ split-rendering-pytest-on-merge-request: stage: compare script: - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - - *get-commits-behind-count + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs # some helper variables - "|| true" to prevent failures from grep not finding anything @@ -931,7 +926,7 @@ ivas-pytest-on-merge-request: timeout: "14 minutes" script: - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - - *get-commits-behind-count + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -985,7 +980,7 @@ ivas-interop-on-merge-request: timeout: "10 minutes" script: - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - - *get-commits-behind-count + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec # the next line is dependent on ref-using-main flag in the other tests, but here the flag does not make sense @@ -1034,7 +1029,7 @@ evs-pytest-on-merge-request: timeout: "10 minutes" script: - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - - *get-commits-behind-count + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec diff --git a/.gitlab-ci/snippets/get-commits-behind-count.sh b/.gitlab-ci/snippets/get-commits-behind-count.sh new file mode 100644 index 0000000000..93d4cb9a0f --- /dev/null +++ b/.gitlab-ci/snippets/get-commits-behind-count.sh @@ -0,0 +1,10 @@ +#! /bin/bash + +set -euo pipefail + +cd "${CI_PROJECT_DIR}" + +echo "CI_COMMIT_SHA: ${CI_COMMIT_SHA}" 1>&2 +echo "CI_MERGE_REQUEST_TARGET_BRANCH_NAME: ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}" 1>&2 + +git rev-list --count "$CI_COMMIT_SHA"..origin/"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" -- GitLab From 72e66d48665d9841a8cdc7a0cdba8d7a0bdb96c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 21 Feb 2025 23:25:51 +0100 Subject: [PATCH 16/43] Improve branch-is-up-to-date scripts --- .gitlab-ci.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5441d5e4c1..a7cf06df1c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -349,9 +349,13 @@ branch-is-up-to-date-with-main-pre: tags: - ivas-linux script: - - echo $commits_behind_count - - if [ $commits_behind_count -eq 0 ]; then exit 0; else echo "Your branch is behind main, run 'git merge origin/main' to update."; exit 1; fi; - - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" + - | + commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" + echo "Commits behind: $commits_behind_count" + if [ "$commits_behind_count" -nq 0 ]; then + echo "Your branch is behind main, run 'git merge origin/main' to update." + exit 1 + fi check-self-test-names-pre: extends: @@ -380,9 +384,13 @@ branch-is-up-to-date-with-main-post: tags: - ivas-linux script: - - echo $commits_behind_count - - if [ $commits_behind_count -eq 0 ]; then exit 0; else echo "Your branch is behind main, possibly main changed during your pipeline run, run 'git merge origin/main' to update." exit 1; fi; - - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" + - | + commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" + echo "Commits behind: $commits_behind_count" + if [ "$commits_behind_count" -nq 0 ]; then + echo "Your branch is behind main, possibly main changed during your pipeline run, run 'git merge origin/main' to update." + exit 1 + fi .basop-ci-branch-compat-template: extends: -- GitLab From c7c47de65cb91669a889aada3e9383f0dcf95b23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 7 Mar 2025 17:07:50 +0100 Subject: [PATCH 17/43] Include CI code from ivas-codec-ci repository --- .gitlab-ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a7cf06df1c..18cc641812 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,11 @@ -include: '.gitlab-ci/variables.yml' - -default: - interruptible: true # Make all jobs by default interruptible +variables: + IVAS_CODEC_CI_REF: &IVAS_CODEC_CI_REF mullerfa/ci-refactor + +include: + - local: .gitlab-ci/variables.yml + - project: ivas-codec-pc/ivas-codec-ci + ref: *IVAS_CODEC_CI_REF + file: main.yml # This sets when pipelines are created. Jobs have more specific rules to restrict them. workflow: -- GitLab From d4fb6190f25e7c605b8e24cc6396f84cd936826a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 7 Mar 2025 17:08:04 +0100 Subject: [PATCH 18/43] Remove redundant stages --- .gitlab-ci.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 18cc641812..f4a3139f4a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,16 +47,6 @@ workflow: variables: IVAS_PIPELINE_NAME: 'Pass-through comparison vs input: $CI_COMMIT_BRANCH' -stages: - - .pre - - maintenance - - prevalidate - - build - - test - - compare - - postvalidate - - deploy - # --------------------------------------------------------------- # Generic script anchors # --------------------------------------------------------------- -- GitLab From 18592da420c89b9d5b6536d43dae55243f3f6fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 7 Mar 2025 17:08:26 +0100 Subject: [PATCH 19/43] Move rules and job templates to ivas-codec-ci --- .gitlab-ci.yml | 134 --------------------------------------- .gitlab-ci/variables.yml | 12 ---- 2 files changed, 146 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f4a3139f4a..ac0e756066 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -175,140 +175,6 @@ workflow: - if [ $exit_code20 -ne 0 ] || [ $exit_code10 -ne 0 ] || [ $exit_code5 -ne 0 ]; then exit 1; fi -# --------------------------------------------------------------- -# Job templates -# --------------------------------------------------------------- - -# When designing templates, try not to use too much inheritance and -# if multiple templates and extended on, remember that on conflict, -# latest overwrites the parameter. - -# templates for rules -.rules-basis: - rules: - - if: $MIRROR_ACCESS_TOKEN # Don't run in the mirror update pipeline (only then MIRROR_ACCESS_TOKEN is defined) - when: never - - if: $CI_PIPELINE_SOURCE == 'schedule' # Don't run in any scheduled pipelines by default (use schedule templates below to enable again for certain conditions) - when: never - - if: $CI_PIPELINE_SOURCE == 'trigger' # Don't run triggered pipeline by default - when: never - - if: $MANUAL_PIPELINE_TYPE == 'test-be-release' # Skip all the normal jobs when testing manually against release codec - when: never - - if: $MANUAL_PIPELINE_TYPE == 'test-long-self-test' # Skip all the normal jobs when testing manually against release codec - when: never - - if: $MANUAL_PIPELINE_TYPE == 'ivas-conformance' - when: never - - if: $MANUAL_PIPELINE_TYPE == 'ivas-conformance-linux' - when: never - - if: $MANUAL_PIPELINE_TYPE == 'check-clipping' - when: never - - if: $MANUAL_PIPELINE_TYPE == 'test-branch-vs-input-passthrough' - when: never - - when: on_success - -.rules-merge-request-to-main: - extends: .rules-basis - rules: - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - -.rules-merge-request-to-basop-ci-branch: - extends: .rules-basis - rules: - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "basop-ci-branch" - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - -.rules-merge-request-to-basop-ci-branch-or-main: - extends: .rules-basis - rules: - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "basop-ci-branch" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main") - - if: $CI_PIPELINE_SOURCE == 'push' - when: never - -.rules-main-push: - extends: .rules-basis - rules: - - if: $CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - -.rules-main-scheduled: - extends: .rules-basis - rules: - - if: $CI_PIPELINE_SOURCE == 'schedule' && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - -# templates to define stages and platforms -.test-job-linux: - tags: - - ivas-linux - -.build-job-linux: - stage: build - timeout: "4 minutes" - needs: [] - tags: - - ivas-linux - -.build-job-windows: - stage: build - needs: [] - timeout: "4 minutes" - tags: - - ivas-windows - -# template for test jobs on linux that need the TESTV_DIR -.test-job-linux-needs-testv-dir: - extends: .test-job-linux - before_script: - - if [ ! -d "$TESTV_DIR" ]; then mkdir -p $TESTV_DIR; fi - - python3 scripts/prepare_combined_format_inputs.py - - cp -r scripts/testv/* $TESTV_DIR/ - -.sanitizer-selftest-on-mr: - stage: test - extends: - - .test-job-linux-needs-testv-dir - - .rules-merge-request-to-main - artifacts: - name: "mr-$CI_MERGE_REQUEST_IID--sha-$CI_COMMIT_SHORT_SHA--stage-$CI_JOB_STAGE--results" - expire_in: 1 week - when: always - paths: - - report-junit-20ms.xml - - report-junit-10ms.xml - - report-junit-5ms.xml - - report-20ms.html - - report-10ms.html - - report-5ms.html - expose_as: "Sanitizer selftest results" - reports: - junit: - - report-junit-20ms.xml - - report-junit-10ms.xml - - report-junit-5ms.xml - -.sanitizer-selftest-ltv: - stage: test - extends: - - .test-job-linux-needs-testv-dir - artifacts: - name: "$CI_JOB_NAME--sha-$CI_COMMIT_SHORT_SHA--results" - expire_in: 2 week - when: always - paths: - - report-junit-20ms.xml - - report-junit-10ms.xml - - report-junit-5ms.xml - - report-20ms.html - - report-10ms.html - - report-5ms.html - expose_as: "Sanitizer selftest results" - reports: - junit: - - report-junit-20ms.xml - - report-junit-10ms.xml - - report-junit-5ms.xml - # --------------------------------------------------------------- # .pre jobs for setting up things # --------------------------------------------------------------- diff --git a/.gitlab-ci/variables.yml b/.gitlab-ci/variables.yml index 7c800a3471..50f6f405c0 100644 --- a/.gitlab-ci/variables.yml +++ b/.gitlab-ci/variables.yml @@ -1,19 +1,12 @@ variables: - TESTV_DIR: "/usr/local/testv" - LTV_DIR: "/usr/local/ltv" - BUILD_OUTPUT: "build_output.txt" EVS_BE_TEST_DIR: "/usr/local/be_2_evs_test" EVS_BE_WIN_TEST_DIR: "C:/Users/gitlab-runner/testvec" - EXIT_CODE_NON_BE: 123 - EXIT_CODE_FAIL: 1 PROCESSING_SCRIPTS_BIN_DIR: "/test-bin" - TESTS_DIR_CODEC_BE_ON_MR: "tests/codec_be_on_mr_nonselection" SANITIZER_TESTS: "CLANG1 CLANG2 CLANG3" OUT_FORMATS_CHANNEL_BASED: "stereo mono 5_1 5_1_2 5_1_4 7_1 7_1_4" OUT_FORMATS_SCENE_BASED: "FOA HOA2 HOA3" OUT_FORMATS_BINAURAL: "BINAURAL BINAURAL_ROOM_IR BINAURAL_ROOM_REVERB" OUT_FORMATS_ALL: "$OUT_FORMATS_CHANNEL_BASED $OUT_FORMATS_SCENE_BASED $OUT_FORMATS_BINAURAL EXT" - IVAS_PIPELINE_NAME: '' MANUAL_PIPELINE_TYPE: description: "Type for the manual pipeline run. Use 'test-be-release' to run BE test against release codec." value: 'default' @@ -26,11 +19,6 @@ variables: - 'check-clipping' - 'test-branch-vs-input-passthrough' - GIT_CLEAN_FLAGS: -ffdxq - TESTCASE_TIMEOUT_STV_SANITIZERS: 180 - TESTCASE_TIMEOUT_LTV_SANITIZERS: 2400 - BASOP_REFERENCE_BRANCH: "ivas-float-update" - SCALE_FACTOR: "3.162" PYTEST_ARGS: "" LONG_TEST_SUITE: "tests/codec_be_on_mr_nonselection tests/renderer --param_file scripts/config/self_test_ltv.prm --use_ltv" LONG_TEST_SUITE_NO_RENDERER: "tests/codec_be_on_mr_nonselection --param_file scripts/config/self_test_ltv.prm --use_ltv" -- GitLab From 4b951083c48b8447d7e20ca361dc2f98696f336f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Fri, 7 Mar 2025 17:21:57 +0100 Subject: [PATCH 20/43] Move scripts over to ivas-codec-ci --- .gitlab-ci.yml | 72 +++++++++---------- .gitlab-ci/snippets/check-for-testvectors.sh | 7 -- .../snippets/copy-ltv-files-to-testv-dir.sh | 9 --- .../snippets/disable-debugging-macro.sh | 8 --- .gitlab-ci/snippets/enable-debugging-macro.sh | 9 --- .../snippets/get-commits-behind-count.sh | 10 --- .gitlab-ci/snippets/mr-fetch-target-branch.sh | 11 --- .gitlab-ci/snippets/mr-get-target-commit.sh | 7 -- .gitlab-ci/snippets/print-common-info.sh | 9 --- 9 files changed, 36 insertions(+), 106 deletions(-) delete mode 100644 .gitlab-ci/snippets/check-for-testvectors.sh delete mode 100644 .gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh delete mode 100644 .gitlab-ci/snippets/disable-debugging-macro.sh delete mode 100644 .gitlab-ci/snippets/enable-debugging-macro.sh delete mode 100644 .gitlab-ci/snippets/get-commits-behind-count.sh delete mode 100644 .gitlab-ci/snippets/mr-fetch-target-branch.sh delete mode 100644 .gitlab-ci/snippets/mr-get-target-commit.sh delete mode 100644 .gitlab-ci/snippets/print-common-info.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ac0e756066..e0dc100b19 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -71,7 +71,7 @@ workflow: .merge-request-comparison-setup-codec: &merge-request-comparison-setup-codec ### build test binaries, initial clean for paranoia reasons - - bash "${CI_PROJECT_DIR}"/.gitlab-ci/snippets/disable-debugging-macro.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/disable-debugging-macro.sh - make clean - mkdir build - cd build @@ -88,13 +88,13 @@ workflow: - source_branch_commit_sha=$(git rev-parse HEAD) ### checkout version to compare against - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/mr-fetch-target-branch.sh - - target_commit="$("$CI_PROJECT_DIR"/.gitlab-ci/snippets/mr-get-target-commit.sh)" + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/mr-fetch-target-branch.sh + - target_commit="$("${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/mr-get-target-commit.sh)" - git checkout $target_commit - echo "Building reference codec at commit $target_commit" ### build reference binaries - - bash "${CI_PROJECT_DIR}"/.gitlab-ci/snippets/disable-debugging-macro.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/disable-debugging-macro.sh - cd build - cmake .. - make -j @@ -151,8 +151,8 @@ workflow: # set CLANG_NUM, SELFTEST_SANITY_TIMEOUT and SELF_TEST_PRM_FILE in before_script section .sanitizer-selftest-anchor: script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/copy-ltv-files-to-testv-dir.sh - make clean - make -j CLANG=$CLANG_NUM - testcase_timeout=$SELFTEST_SANITY_TIMEOUT @@ -264,7 +264,7 @@ branch-is-up-to-date-with-main-post: - python3 scripts/prepare_combined_format_inputs.py - *update-ltv-repo - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/copy-ltv-files-to-testv-dir.sh - *get-basop-float-reference @@ -343,7 +343,7 @@ build-codec-linux-make: - .build-job-linux - .rules-basis script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - *activate-Werror-linux - make -j @@ -352,7 +352,7 @@ build-codec-linux-cmake: - .build-job-linux - .rules-basis script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - *activate-Werror-linux - mkdir build - cd build @@ -366,7 +366,7 @@ build-codec-instrumented-linux: - .rules-basis timeout: "10 minutes" script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - ./scripts/prepare_instrumentation.sh - make -j -C scripts/c-code_instrument @@ -376,7 +376,7 @@ build-codec-sanitizers-linux: - .build-job-linux - .rules-basis script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - *activate-Werror-linux - bash ci/build_codec_sanitizers_linux.sh @@ -414,7 +414,7 @@ codec-smoke-test: stage: test needs: ["build-codec-linux-cmake", "build-codec-linux-make", "build-codec-instrumented-linux", "build-codec-sanitizers-linux"] script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh # LTV update needed as ltv ISM metadata files are used - *update-ltv-repo @@ -490,7 +490,7 @@ pytest-compare-20ms-and-5ms-rendering: stage: test needs: ["build-codec-linux-cmake", "build-codec-linux-make", "build-codec-instrumented-linux", "build-codec-sanitizers-linux"] script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - *disable-limiter - make clean - make -j @@ -637,7 +637,7 @@ renderer-pytest-on-merge-request: timeout: "20 minutes" stage: compare script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -722,7 +722,7 @@ split-rendering-pytest-on-merge-request: timeout: "30 minutes" stage: compare script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs @@ -735,8 +735,8 @@ split-rendering-pytest-on-merge-request: # store the current commit hash - source_branch_commit_sha=$(git rev-parse HEAD) - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/mr-fetch-target-branch.sh - - target_commit="$("$CI_PROJECT_DIR"/.gitlab-ci/snippets/mr-get-target-commit.sh)" + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/mr-fetch-target-branch.sh + - target_commit="$("${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/mr-get-target-commit.sh)" - git checkout $target_commit - echo "Building reference codec at commit $target_commit" @@ -793,7 +793,7 @@ ivas-pytest-on-merge-request: needs: ["build-codec-linux-cmake", "codec-smoke-test"] timeout: "14 minutes" script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -847,7 +847,7 @@ ivas-interop-on-merge-request: needs: ["build-codec-linux-cmake"] timeout: "10 minutes" script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -896,7 +896,7 @@ evs-pytest-on-merge-request: needs: ["build-codec-linux-cmake", "codec-smoke-test"] timeout: "10 minutes" script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -948,7 +948,7 @@ voip-be-on-merge-request: needs: ["build-codec-linux-make"] timeout: "10 minutes" script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - make clean - make -j - python3 -m pytest tests/test_be_for_jbm_neutral_dly_profile.py @@ -1009,11 +1009,11 @@ check-first-frame-is-sid: stage: test needs: ["build-codec-linux-cmake"] script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - *update-ltv-repo # this rm makes check-for-testvectors only check for the signals we actually need in this test - rm scripts/config/ci_linux_ltv.json scripts/config/ci_linux.json - - bash "${CI_PROJECT_DIR}"/.gitlab-ci/snippets/check-for-testvectors.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/check-for-testvectors.sh - bash ci/run-first-frame-is-sid-test.sh artifacts: @@ -1050,7 +1050,7 @@ check-bitexactness-hrtf-rom-and-file: needs: ["build-codec-linux-cmake"] timeout: "5 minutes" script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - cmake . - make -j - python3 tests/create_short_testvectors.py --cut_len 1.0 @@ -1072,7 +1072,7 @@ check-bitexactness-ext-and-transport-format: needs: ["build-codec-linux-cmake"] timeout: "5 minutes" script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - cmake . - make -j - python3 tests/create_short_testvectors.py --cut_len 1.0 @@ -1126,7 +1126,7 @@ be-2-evs-linux: needs: ["build-codec-linux-cmake"] timeout: "20 minutes" # To be revisited script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - mkdir build - cd build @@ -1150,7 +1150,7 @@ codec-comparison-on-main-push: needs: ["build-codec-linux-cmake"] timeout: "30 minutes" # To be revisited script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - latest_commit=$(git rev-parse HEAD) # Latest commit - previous_merge_commit=$(git --no-pager log --merges HEAD~1 -n 1 --pretty=format:%H) - echo "Comparing changes from $previous_merge_commit to $latest_commit" @@ -1360,7 +1360,7 @@ ivas-conformance-linux: exit_codes: - 123 script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - make -j - cp IVAS_cod IVAS_cod_ref - cp IVAS_dec IVAS_dec_ref @@ -1468,7 +1468,7 @@ test-long-self-test: exit_codes: - 123 script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - *update-ltv-repo ### build branch binaries @@ -1497,7 +1497,7 @@ test-long-self-test: ### prepare pytest # Copy test vectors from LTV to TESTV - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/copy-ltv-files-to-testv-dir.sh # create references - exit_code_ref=0 @@ -1537,8 +1537,8 @@ check-clipping: exit_codes: - 123 script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/enable-debugging-macro.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/enable-debugging-macro.sh - make -j - tests/scale_pcm.py ./scripts/testv/ $SCALE_FACTOR # Default: 3.162 (+10 dB). Can be set in manual trigger. - python3 -m pytest $TESTS_DIR_CODEC_BE_ON_MR -v --update_ref 1 --html=report.html --self-contained-html --junit-xml=report-junit.xml --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec @@ -1567,7 +1567,7 @@ test-branch-vs-input-passthrough: exit_codes: - 123 script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - make -j - exit_code=0 @@ -2187,9 +2187,9 @@ coverage-test-on-main-scheduled: - if: $COVERAGE_TEST timeout: 3 hours script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - *update-ltv-repo - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/copy-ltv-files-to-testv-dir.sh - make GCOV=1 -j - cp IVAS_rend IVAS_rend_ref # Copy exec to be able to run renderer script @@ -2294,7 +2294,7 @@ coverage-test-on-main-scheduled: timeout: 3 hours 30 minutes stage: test before_script: - - bash "$CI_PROJECT_DIR"/.gitlab-ci/snippets/print-common-info.sh + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - *update-ltv-repo - *complexity-measurements-setup allow_failure: diff --git a/.gitlab-ci/snippets/check-for-testvectors.sh b/.gitlab-ci/snippets/check-for-testvectors.sh deleted file mode 100644 index 633c81bbbe..0000000000 --- a/.gitlab-ci/snippets/check-for-testvectors.sh +++ /dev/null @@ -1,7 +0,0 @@ -#! /bin/bash - -set -euo pipefail - -cd "${CI_PROJECT_DIR}" - -exec python3 -m pytest ci/test_vectors_available.py diff --git a/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh b/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh deleted file mode 100644 index c9190f1abf..0000000000 --- a/.gitlab-ci/snippets/copy-ltv-files-to-testv-dir.sh +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/bash - -set -euo pipefail - -cd "${CI_PROJECT_DIR}" - -cp "$LTV_DIR"/*.wav scripts/testv/ -cp "$LTV_DIR"/*.met scripts/testv/ -cp "$LTV_DIR"/*.csv scripts/testv/ diff --git a/.gitlab-ci/snippets/disable-debugging-macro.sh b/.gitlab-ci/snippets/disable-debugging-macro.sh deleted file mode 100644 index 3abbea15fb..0000000000 --- a/.gitlab-ci/snippets/disable-debugging-macro.sh +++ /dev/null @@ -1,8 +0,0 @@ -#! /bin/bash - -set -euo pipefail - -cd "${CI_PROJECT_DIR}" - -# automatically disable #DEBUGGING macro in options.h using /**/-comment -sed -i.bak -e "s/^[[:space:]]*\(#define[[:space:]]*DEBUGGING\)/\/\*\1\*\//g" lib_com/options.h diff --git a/.gitlab-ci/snippets/enable-debugging-macro.sh b/.gitlab-ci/snippets/enable-debugging-macro.sh deleted file mode 100644 index d52401d358..0000000000 --- a/.gitlab-ci/snippets/enable-debugging-macro.sh +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/bash - -set -euo pipefail - -cd "${CI_PROJECT_DIR}" - -# automatically enable #DEBUGGING macro in options.h using either /**/-comment or //-comment -sed -i.bak -e "s/\/\*\ *\(#define\ *DEBUGGING\ *\)\*\//\1/g" lib_com/options.h -sed -i.bak -e "s/\/\/\ *\(#define\ *DEBUGGING\ *\)/\1/g" lib_com/options.h diff --git a/.gitlab-ci/snippets/get-commits-behind-count.sh b/.gitlab-ci/snippets/get-commits-behind-count.sh deleted file mode 100644 index 93d4cb9a0f..0000000000 --- a/.gitlab-ci/snippets/get-commits-behind-count.sh +++ /dev/null @@ -1,10 +0,0 @@ -#! /bin/bash - -set -euo pipefail - -cd "${CI_PROJECT_DIR}" - -echo "CI_COMMIT_SHA: ${CI_COMMIT_SHA}" 1>&2 -echo "CI_MERGE_REQUEST_TARGET_BRANCH_NAME: ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}" 1>&2 - -git rev-list --count "$CI_COMMIT_SHA"..origin/"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" diff --git a/.gitlab-ci/snippets/mr-fetch-target-branch.sh b/.gitlab-ci/snippets/mr-fetch-target-branch.sh deleted file mode 100644 index 57735e2510..0000000000 --- a/.gitlab-ci/snippets/mr-fetch-target-branch.sh +++ /dev/null @@ -1,11 +0,0 @@ -#! /bin/bash - -set -euo pipefail - -cd "${CI_PROJECT_DIR}" - -# first delete local target branch to avoid conflicts when branch is cached and there are merge conflicts during fetching -# depending on chaching, the branch may not be there, so prevent failure of this command -> should maybe be done smarter later -git branch -D "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" || true -# needed when depth is lower than the number of commits in the branch -git fetch origin "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME":"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" diff --git a/.gitlab-ci/snippets/mr-get-target-commit.sh b/.gitlab-ci/snippets/mr-get-target-commit.sh deleted file mode 100644 index 728149f6f7..0000000000 --- a/.gitlab-ci/snippets/mr-get-target-commit.sh +++ /dev/null @@ -1,7 +0,0 @@ -#! /bin/bash - -set -euo pipefail - -cd "${CI_PROJECT_DIR}" - -exec git log "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" -1 --oneline --before="${CI_PIPELINE_CREATED_AT}" --format="%H" diff --git a/.gitlab-ci/snippets/print-common-info.sh b/.gitlab-ci/snippets/print-common-info.sh deleted file mode 100644 index 32b29b3985..0000000000 --- a/.gitlab-ci/snippets/print-common-info.sh +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/bash - -set -euo pipefail - -echo "Printing common information for build job." -echo "Current job is run on commit $CI_COMMIT_SHA" -echo "Commit time was $CI_COMMIT_TIMESTAMP" -echo -n "System time is " -date -- GitLab From 70e359720df550bf7f63c4613e4855432c105e19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 10:18:58 +0100 Subject: [PATCH 21/43] Document YAML anchor --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e0dc100b19..ad5865edd7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,5 @@ variables: + # note: GitLab cannot reference the variable in the include ref:, we need to use a YAML anchor for this IVAS_CODEC_CI_REF: &IVAS_CODEC_CI_REF mullerfa/ci-refactor include: -- GitLab From 74efe169413dcbb95e97b664fac9174911e6519f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 10:25:21 +0100 Subject: [PATCH 22/43] Fix branch-is-up-to-date-with-main-pre --- .gitlab-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ad5865edd7..cc3f529ca9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -205,10 +205,9 @@ uninterruptible: branch-is-up-to-date-with-main-pre: extends: - .rules-merge-request-to-main + - .job-linux stage: prevalidate needs: [] - tags: - - ivas-linux script: - | commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" -- GitLab From 2ee156ae3319de79309f4bcab2bb337bd865630b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 10:34:16 +0100 Subject: [PATCH 23/43] Use .job-linux template where applicable --- .gitlab-ci.yml | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cc3f529ca9..c0bba38291 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -220,29 +220,26 @@ branch-is-up-to-date-with-main-pre: check-self-test-names-pre: extends: - .rules-merge-request-to-main + - .job-linux stage: prevalidate needs: [] - tags: - - ivas-linux script: - python3 ci/check_self_test_names.py scripts/config/self_test.prm 135 check-no-duplicates-in-self-tests: extends: - .rules-merge-request-to-main + - .job-linux stage: prevalidate needs: [] - tags: - - ivas-linux script: - python3 ci/find_duplicates_in_prm_files.py branch-is-up-to-date-with-main-post: extends: - .rules-merge-request-to-main + - .job-linux stage: postvalidate - tags: - - ivas-linux script: - | commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" @@ -1350,8 +1347,8 @@ ivas-conformance: junit: report-junit.xml ivas-conformance-linux: - tags: - - ivas-linux + extends: + - .job-linux stage: test timeout: "90 minutes" rules: @@ -1457,8 +1454,8 @@ ivas-conformance-linux: test-long-self-test: - tags: - - ivas-linux-fast + extends: + - .job-linux stage: compare resource_group: ivas-long-self-test-resource timeout: "50 minutes" @@ -1527,8 +1524,8 @@ test-long-self-test: - report-junit-ltv.xml check-clipping: - tags: - - ivas-linux + extends: + - .job-linux stage: test timeout: "30 minutes" rules: @@ -1557,8 +1554,8 @@ check-clipping: - report-junit.xml test-branch-vs-input-passthrough: - tags: - - ivas-linux + extends: + - .job-linux stage: compare timeout: "30 minutes" # TBD rules: @@ -2612,8 +2609,8 @@ complexity-osba-in-binaural_room_ir-out: # job that sets up gitlab pages website pages: stage: deploy - tags: - - ivas-linux + extends: + - .job-linux rules: - if: $UPDATE_PAGES script: -- GitLab From 69f39a89cb41e3744e685e18c74c6c6803c2d8e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 10:34:32 +0100 Subject: [PATCH 24/43] Remove superfluous tag --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c0bba38291..58b9415821 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1001,8 +1001,6 @@ check-first-frame-is-sid: extends: - .test-job-linux-needs-testv-dir - .rules-merge-request-to-main - tags: - - ivas-linux stage: test needs: ["build-codec-linux-cmake"] script: -- GitLab From 9bf0d87d3e02326364cfc724eb56cb592bf7d686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 10:38:59 +0100 Subject: [PATCH 25/43] Include existing before_script snippets --- .gitlab-ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 58b9415821..c7d0f0cfcf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -256,6 +256,7 @@ branch-is-up-to-date-with-main-post: tags: - ivas-linux before_script: + - !reference [.test-job-linux, before_script] - python3 ci/remove_unsupported_testcases.py scripts/config/self_test.prm scripts/config/self_test_ltv.prm - python3 tests/create_short_testvectors.py - python3 scripts/prepare_combined_format_inputs.py @@ -450,6 +451,7 @@ codec-msan: tags: - ivas-linux-fast before_script: + - !reference [.sanitizer-selftest-on-mr, before_script] - CLANG_NUM=1 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" @@ -461,6 +463,7 @@ codec-asan: - .sanitizer-selftest-on-mr - .sanitizer-selftest-anchor before_script: + - !reference [.sanitizer-selftest-on-mr, before_script] - CLANG_NUM=2 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" @@ -474,6 +477,7 @@ codec-usan: tags: - ivas-linux-fast before_script: + - !reference [.sanitizer-selftest-on-mr, before_script] - CLANG_NUM=3 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" @@ -1601,6 +1605,7 @@ ltv-msan: tags: - ivas-linux-fast before_script: + - !reference [.sanitizer-selftest-ltv, before_script] - CLANG_NUM=1 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" @@ -1619,6 +1624,7 @@ ltv-asan: - ivas-linux-fast timeout: 4 hours before_script: + - !reference [.sanitizer-selftest-ltv, before_script] - CLANG_NUM=2 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" @@ -1637,6 +1643,7 @@ ltv-usan: - ivas-linux-fast timeout: 4 hours before_script: + - !reference [.sanitizer-selftest-ltv, before_script] - CLANG_NUM=3 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" @@ -2289,6 +2296,7 @@ coverage-test-on-main-scheduled: timeout: 3 hours 30 minutes stage: test before_script: + - !reference [.test-job-linux-needs-testv-dir, before_script] - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - *update-ltv-repo - *complexity-measurements-setup -- GitLab From c967767198127fc2723c895368728bf32898fc93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 10:44:56 +0100 Subject: [PATCH 26/43] Use direct references --- .gitlab-ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c7d0f0cfcf..6f02545402 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -256,7 +256,7 @@ branch-is-up-to-date-with-main-post: tags: - ivas-linux before_script: - - !reference [.test-job-linux, before_script] + - !reference [.job-linux, before_script] - python3 ci/remove_unsupported_testcases.py scripts/config/self_test.prm scripts/config/self_test_ltv.prm - python3 tests/create_short_testvectors.py - python3 scripts/prepare_combined_format_inputs.py @@ -451,7 +451,7 @@ codec-msan: tags: - ivas-linux-fast before_script: - - !reference [.sanitizer-selftest-on-mr, before_script] + - !reference [.job-linux, before_script] - CLANG_NUM=1 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" @@ -463,7 +463,7 @@ codec-asan: - .sanitizer-selftest-on-mr - .sanitizer-selftest-anchor before_script: - - !reference [.sanitizer-selftest-on-mr, before_script] + - !reference [.job-linux, before_script] - CLANG_NUM=2 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" @@ -477,7 +477,7 @@ codec-usan: tags: - ivas-linux-fast before_script: - - !reference [.sanitizer-selftest-on-mr, before_script] + - !reference [.job-linux, before_script] - CLANG_NUM=3 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_STV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test.prm" @@ -1605,7 +1605,7 @@ ltv-msan: tags: - ivas-linux-fast before_script: - - !reference [.sanitizer-selftest-ltv, before_script] + - !reference [.job-linux, before_script] - CLANG_NUM=1 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" @@ -1624,7 +1624,7 @@ ltv-asan: - ivas-linux-fast timeout: 4 hours before_script: - - !reference [.sanitizer-selftest-ltv, before_script] + - !reference [.job-linux, before_script] - CLANG_NUM=2 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" @@ -1643,7 +1643,7 @@ ltv-usan: - ivas-linux-fast timeout: 4 hours before_script: - - !reference [.sanitizer-selftest-ltv, before_script] + - !reference [.job-linux, before_script] - CLANG_NUM=3 - SELFTEST_SANITY_TIMEOUT=$TESTCASE_TIMEOUT_LTV_SANITIZERS - SELF_TEST_PRM_FILE="scripts/config/self_test_ltv.prm" @@ -2296,7 +2296,7 @@ coverage-test-on-main-scheduled: timeout: 3 hours 30 minutes stage: test before_script: - - !reference [.test-job-linux-needs-testv-dir, before_script] + - !reference [.job-linux, before_script] - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - *update-ltv-repo - *complexity-measurements-setup -- GitLab From 7bd8eab0b0c22e9aaf46b35b82ff4ff5b908ea38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 10:49:07 +0100 Subject: [PATCH 27/43] Trigger build -- GitLab From c94a2bdc8c298a0897833009d528e7c1013199ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 10:50:52 +0100 Subject: [PATCH 28/43] Fix pre/post branch update --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6f02545402..5ef2a30913 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -210,7 +210,7 @@ branch-is-up-to-date-with-main-pre: needs: [] script: - | - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" + commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" echo "Commits behind: $commits_behind_count" if [ "$commits_behind_count" -nq 0 ]; then echo "Your branch is behind main, run 'git merge origin/main' to update." @@ -242,7 +242,7 @@ branch-is-up-to-date-with-main-post: stage: postvalidate script: - | - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" + commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" echo "Commits behind: $commits_behind_count" if [ "$commits_behind_count" -nq 0 ]; then echo "Your branch is behind main, possibly main changed during your pipeline run, run 'git merge origin/main' to update." -- GitLab From 49e0f9c8d121f0fe0694e77cbbcdb07039a13471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 10:54:24 +0100 Subject: [PATCH 29/43] Fix numeric comparison --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5ef2a30913..86a45aefe6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -212,7 +212,7 @@ branch-is-up-to-date-with-main-pre: - | commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" echo "Commits behind: $commits_behind_count" - if [ "$commits_behind_count" -nq 0 ]; then + if [ "$commits_behind_count" -ne 0 ]; then echo "Your branch is behind main, run 'git merge origin/main' to update." exit 1 fi @@ -244,7 +244,7 @@ branch-is-up-to-date-with-main-post: - | commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" echo "Commits behind: $commits_behind_count" - if [ "$commits_behind_count" -nq 0 ]; then + if [ "$commits_behind_count" -ne 0 ]; then echo "Your branch is behind main, possibly main changed during your pipeline run, run 'git merge origin/main' to update." exit 1 fi -- GitLab From d0f7fdf589d186b284ee729dbd199172f8a2b17a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 11:01:54 +0100 Subject: [PATCH 30/43] Fix more references to ivas-codec-ci/snippets --- .gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 86a45aefe6..c3f1362b97 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -639,7 +639,7 @@ renderer-pytest-on-merge-request: stage: compare script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -724,7 +724,7 @@ split-rendering-pytest-on-merge-request: stage: compare script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs # some helper variables - "|| true" to prevent failures from grep not finding anything @@ -795,7 +795,7 @@ ivas-pytest-on-merge-request: timeout: "14 minutes" script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec @@ -849,7 +849,7 @@ ivas-interop-on-merge-request: timeout: "10 minutes" script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec # the next line is dependent on ref-using-main flag in the other tests, but here the flag does not make sense @@ -898,7 +898,7 @@ evs-pytest-on-merge-request: timeout: "10 minutes" script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/snippets/get-commits-behind-count.sh)" + - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" - *check-commits-behind-count-in-compare-jobs - *merge-request-comparison-setup-codec -- GitLab From f1fb6bcc3cdc74def66d12a90a78523679b4a3ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 18:23:24 +0100 Subject: [PATCH 31/43] Move update-ltv-repo to ivas-codec-ci --- .gitlab-ci.yml | 111 +++++++++++++++++++++++-------------------------- 1 file changed, 53 insertions(+), 58 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c3f1362b97..cae90c038e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -117,11 +117,6 @@ workflow: - if [ $exit_code -ne 0 ] && [ $non_be_flag != 0 ]; then echo "Non-bitexact cases with non-BE tag encountered"; exit $EXIT_CODE_NON_BE; fi - exit 0 -.update-ltv-repo: &update-ltv-repo - - cd $LTV_DIR - - git pull - - cd - - .update-ltv-repo-win: &update-ltv-repo-win - Push-Location - cd $LTV_DIR_WIN @@ -261,7 +256,7 @@ branch-is-up-to-date-with-main-post: - python3 tests/create_short_testvectors.py - python3 scripts/prepare_combined_format_inputs.py - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/copy-ltv-files-to-testv-dir.sh - *get-basop-float-reference @@ -414,7 +409,7 @@ codec-smoke-test: script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh # LTV update needed as ltv ISM metadata files are used - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh # for MRs to basop-ci-branch, we want to test with the BASOP float reference build # per default, the smoke test builds the current repo again with WMOPS activated to catch unbalanced instrumentation macros @@ -1009,7 +1004,7 @@ check-first-frame-is-sid: needs: ["build-codec-linux-cmake"] script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh # this rm makes check-for-testvectors only check for the signals we actually need in this test - rm scripts/config/ci_linux_ltv.json scripts/config/ci_linux.json - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/check-for-testvectors.sh @@ -1468,7 +1463,7 @@ test-long-self-test: - 123 script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh ### build branch binaries - cmake . -Bbuild-test @@ -1680,7 +1675,7 @@ sanitizer-test-mono: - if: $SANITIZER_SCHEDULE_A timeout: 1.25 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py mono mono --tests $SANITIZER_TESTS sanitizer-test-stereo: @@ -1691,7 +1686,7 @@ sanitizer-test-stereo: start_in: 1.25 hours timeout: 2.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py stereo $OUT_FORMATS_CHANNEL_BASED EXT --tests $SANITIZER_TESTS sanitizer-test-stereodmxevs: @@ -1702,7 +1697,7 @@ sanitizer-test-stereodmxevs: start_in: 3.75 hours timeout: 1.25 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py StereoDmxEVS mono --tests $SANITIZER_TESTS sanitizer-test-mc-5_1: @@ -1713,7 +1708,7 @@ sanitizer-test-mc-5_1: start_in: 5 hours timeout: 2.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py 5_1 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-mc-5_1_2: @@ -1724,7 +1719,7 @@ sanitizer-test-mc-5_1_2: start_in: 7.5 hours timeout: 2.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py 5_1_2 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-mc-5_1_4: @@ -1735,7 +1730,7 @@ sanitizer-test-mc-5_1_4: start_in: 10 hours timeout: 3.75 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py 5_1_4 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-mc-7_1: @@ -1746,7 +1741,7 @@ sanitizer-test-mc-7_1: start_in: 13.75 hours timeout: 2.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py 7_1 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-mc-7_1_4: @@ -1757,7 +1752,7 @@ sanitizer-test-mc-7_1_4: start_in: 16.25 hours timeout: 5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py 7_1_4 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-ism+1: @@ -1768,7 +1763,7 @@ sanitizer-test-ism+1: start_in: 21.25 hours timeout: 1.25 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py ISM1 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-ism+2: @@ -1779,7 +1774,7 @@ sanitizer-test-ism+2: start_in: 22.5 hours timeout: 2.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py ISM2 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-ism+3: @@ -1790,7 +1785,7 @@ sanitizer-test-ism+3: start_in: 25 hours timeout: 3.75 hour script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py ISM3 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-ism+4: @@ -1801,7 +1796,7 @@ sanitizer-test-ism+4: start_in: 28.75 hours timeout: 5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py ISM4 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-masa: @@ -1812,7 +1807,7 @@ sanitizer-test-masa: start_in: 33.75 hours timeout: 10 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py MASA $OUT_FORMATS_ALL --tests $SANITIZER_TESTS ### --- sanitizer schedule B --- @@ -1827,7 +1822,7 @@ sanitizer-test-foa: rules: - if: $SANITIZER_SCHEDULE_B script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py FOA $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-hoa2: @@ -1837,7 +1832,7 @@ sanitizer-test-hoa2: when: delayed start_in: 7.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py HOA2 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-hoa3: @@ -1847,7 +1842,7 @@ sanitizer-test-hoa3: when: delayed start_in: 15 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py HOA3 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-foa-ism1: @@ -1857,7 +1852,7 @@ sanitizer-test-osba-foa-ism1: when: delayed start_in: 22.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py FOA-ISM1 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-foa-ism2: @@ -1867,7 +1862,7 @@ sanitizer-test-osba-foa-ism2: when: delayed start_in: 30 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py FOA-ISM2 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-foa-ism3: @@ -1877,7 +1872,7 @@ sanitizer-test-osba-foa-ism3: when: delayed start_in: 37.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py FOA-ISM3 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-foa-ism4: @@ -1887,7 +1882,7 @@ sanitizer-test-osba-foa-ism4: when: delayed start_in: 45 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py FOA-ISM4 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-hoa2-ism1: @@ -1897,7 +1892,7 @@ sanitizer-test-osba-hoa2-ism1: when: delayed start_in: 52.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py HOA2-ISM1 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-hoa2-ism2: @@ -1907,7 +1902,7 @@ sanitizer-test-osba-hoa2-ism2: when: delayed start_in: 60 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py HOA2-ISM2 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-hoa2-ism3: @@ -1917,7 +1912,7 @@ sanitizer-test-osba-hoa2-ism3: when: delayed start_in: 67.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py HOA2-ISM3 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-hoa2-ism4: @@ -1927,7 +1922,7 @@ sanitizer-test-osba-hoa2-ism4: when: delayed start_in: 75 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py HOA2-ISM4 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-hoa3-ism1: @@ -1937,7 +1932,7 @@ sanitizer-test-osba-hoa3-ism1: when: delayed start_in: 82.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py HOA3-ISM1 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-hoa3-ism2: @@ -1947,7 +1942,7 @@ sanitizer-test-osba-hoa3-ism2: when: delayed start_in: 90 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py HOA3-ISM2 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-omasa-ism4: @@ -1958,7 +1953,7 @@ sanitizer-test-omasa-ism4: start_in: 97.5 hours timeout: 10 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py MASA-ISM4 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS @@ -1974,7 +1969,7 @@ sanitizer-test-omasa-ism1: rules: - if: $SANITIZER_SCHEDULE_C script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py MASA-ISM1 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-omasa-ism2: @@ -1984,7 +1979,7 @@ sanitizer-test-omasa-ism2: when: delayed start_in: 10 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py MASA-ISM2 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-omasa-ism3: @@ -1994,7 +1989,7 @@ sanitizer-test-omasa-ism3: when: delayed start_in: 20 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py MASA-ISM3 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-hoa3-ism3: @@ -2005,7 +2000,7 @@ sanitizer-test-osba-hoa3-ism3: start_in: 30 hours timeout: 7.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py HOA3-ISM3 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-hoa3-ism4: @@ -2016,7 +2011,7 @@ sanitizer-test-osba-hoa3-ism4: start_in: 37.5 hours timeout: 7.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py HOA3-ISM4 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS ### --- sanitizer schedule D --- @@ -2031,7 +2026,7 @@ sanitizer-test-planar-foa: rules: - if: $SANITIZER_SCHEDULE_D script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarFOA $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-planar-hoa2: @@ -2041,7 +2036,7 @@ sanitizer-test-planar-hoa2: when: delayed start_in: 7.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarHOA2 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-planar-hoa3: @@ -2051,7 +2046,7 @@ sanitizer-test-planar-hoa3: when: delayed start_in: 15 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarHOA3 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-foa-ism1: @@ -2061,7 +2056,7 @@ sanitizer-test-osba-planar-foa-ism1: when: delayed start_in: 22.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarFOA-ISM1 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-foa-ism2: @@ -2071,7 +2066,7 @@ sanitizer-test-osba-planar-foa-ism2: when: delayed start_in: 30 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarFOA-ISM2 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-foa-ism3: @@ -2081,7 +2076,7 @@ sanitizer-test-osba-planar-foa-ism3: when: delayed start_in: 37.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarFOA-ISM3 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-foa-ism4: @@ -2091,7 +2086,7 @@ sanitizer-test-osba-planar-foa-ism4: when: delayed start_in: 45 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarFOA-ISM4 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-hoa2-ism1: @@ -2101,7 +2096,7 @@ sanitizer-test-osba-planar-hoa2-ism1: when: delayed start_in: 52.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarHOA2-ISM1 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-hoa2-ism2: @@ -2111,7 +2106,7 @@ sanitizer-test-osba-planar-hoa2-ism2: when: delayed start_in: 60 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarHOA2-ISM2 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-hoa2-ism3: @@ -2121,7 +2116,7 @@ sanitizer-test-osba-planar-hoa2-ism3: when: delayed start_in: 67.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarHOA2-ISM3 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-hoa2-ism4: @@ -2131,7 +2126,7 @@ sanitizer-test-osba-planar-hoa2-ism4: when: delayed start_in: 75 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarHOA2-ISM4 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-hoa3-ism1: @@ -2141,7 +2136,7 @@ sanitizer-test-osba-planar-hoa3-ism1: when: delayed start_in: 82.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarHOA3-ISM1 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-hoa3-ism2: @@ -2151,7 +2146,7 @@ sanitizer-test-osba-planar-hoa3-ism2: when: delayed start_in: 90 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarHOA3-ISM2 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-hoa3-ism3: @@ -2161,7 +2156,7 @@ sanitizer-test-osba-planar-hoa3-ism3: when: delayed start_in: 97.5 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarHOA3-ISM3 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS sanitizer-test-osba-planar-hoa3-ism4: @@ -2171,7 +2166,7 @@ sanitizer-test-osba-planar-hoa3-ism4: when: delayed start_in: 105 hours script: - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - python3 ci/run_scheduled_sanitizer_test.py PlanarHOA3-ISM4 $OUT_FORMATS_ALL --tests $SANITIZER_TESTS @@ -2190,7 +2185,7 @@ coverage-test-on-main-scheduled: timeout: 3 hours script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/copy-ltv-files-to-testv-dir.sh - make GCOV=1 -j - cp IVAS_rend IVAS_rend_ref # Copy exec to be able to run renderer script @@ -2298,7 +2293,7 @@ coverage-test-on-main-scheduled: before_script: - !reference [.job-linux, before_script] - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - *update-ltv-repo + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/update-ltv-repo.sh - *complexity-measurements-setup allow_failure: exit_codes: -- GitLab From b6a0ac979cacffdb993b49e5c6e1034cdfadf655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 18:47:30 +0100 Subject: [PATCH 32/43] Move activate-Werror-linux to ivas-codec-ci --- .gitlab-ci.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cae90c038e..fb97dcfab6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -135,10 +135,6 @@ workflow: - cp $LTV_DIR_WIN\*.met scripts\testv - cp $LTV_DIR_WIN\*.csv scripts\testv -.activate-Werror-linux: &activate-Werror-linux - - sed -i.bak "s/^# \(CFLAGS += -Werror\)/\1/" Makefile - - sed -i.bak "s/# \(set(CMAKE_C_FLAGS \"\${CMAKE_C_FLAGS} -Werror\")\)/\1/" CMakeLists.txt - .activate-WX-windows: &activate-WX-windows - (Get-Content -Path "CMakeLists.txt") -replace '# \(add_compile_options\("\/WX"\)\)', '$1' | Set-Content -Path "CMakeLists.txt" - Get-ChildItem -Path "Workspace_msvc" -Filter "*.vcxproj" | ForEach-Object { (Get-Content -Path $_.FullName) -replace 'false', 'true' | Set-Content -Path $_.FullName } @@ -337,7 +333,7 @@ build-codec-linux-make: - .rules-basis script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - *activate-Werror-linux + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/activate-Werror-linux.sh - make -j build-codec-linux-cmake: @@ -346,7 +342,7 @@ build-codec-linux-cmake: - .rules-basis script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - *activate-Werror-linux + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/activate-Werror-linux.sh - mkdir build - cd build - cmake .. @@ -370,7 +366,7 @@ build-codec-sanitizers-linux: - .rules-basis script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - *activate-Werror-linux + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/activate-Werror-linux.sh - bash ci/build_codec_sanitizers_linux.sh build-codec-windows-cmake: -- GitLab From 3fd7636e16b2b77624bbd2cb7e2909beb2d8c367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 18:53:36 +0100 Subject: [PATCH 33/43] Move check-commits-behind-count-in-compare-jobs to ivas-codec-ci --- .gitlab-ci.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fb97dcfab6..26b8b66c4a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -127,9 +127,6 @@ workflow: # automatically enable #define DISABLE_LIMITER in options.h, handling both /**/-comment and //-comment - sed -i.bak -e "s/\/\*[[:space:]]*\(#define[[:space:]]*DISABLE_LIMITER\)[[:space:]]*\*\//\1/g" ./lib_com/options.h -.check-commits-behind-count-in-compare-jobs: &check-commits-behind-count-in-compare-jobs - - if [ $commits_behind_count -ne 0 ]; then echo "Your branch is not up-to-date with main -> Compare tests will not run as they can contain false negatives this way.\nMain might have changed during your pipeline run. Run 'git merge origin/main' to update."; exit 1; fi - .copy-ltv-files-to-testv-dir-win: ©-ltv-files-to-testv-dir-win - cp $LTV_DIR_WIN\*.wav scripts\testv - cp $LTV_DIR_WIN\*.met scripts\testv @@ -630,8 +627,7 @@ renderer-pytest-on-merge-request: stage: compare script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" - - *check-commits-behind-count-in-compare-jobs + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/float/check-commits-behind-count-in-compare-jobs.sh - *merge-request-comparison-setup-codec # some helper variables - "|| true" to prevent failures from grep not finding anything @@ -716,7 +712,7 @@ split-rendering-pytest-on-merge-request: script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" - - *check-commits-behind-count-in-compare-jobs + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/float/check-commits-behind-count-in-compare-jobs.sh # some helper variables - "|| true" to prevent failures from grep not finding anything # write to temporary file as workaround for failures observed with piping echo @@ -787,7 +783,7 @@ ivas-pytest-on-merge-request: script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" - - *check-commits-behind-count-in-compare-jobs + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/float/check-commits-behind-count-in-compare-jobs.sh - *merge-request-comparison-setup-codec # some helper variables - "|| true" to prevent failures from grep not finding anything @@ -841,7 +837,7 @@ ivas-interop-on-merge-request: script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" - - *check-commits-behind-count-in-compare-jobs + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/float/check-commits-behind-count-in-compare-jobs.sh - *merge-request-comparison-setup-codec # the next line is dependent on ref-using-main flag in the other tests, but here the flag does not make sense - git checkout $source_branch_commit_sha @@ -890,7 +886,7 @@ evs-pytest-on-merge-request: script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - commits_behind_count="$(bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/get-commits-behind-count.sh)" - - *check-commits-behind-count-in-compare-jobs + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/float/check-commits-behind-count-in-compare-jobs.sh - *merge-request-comparison-setup-codec # some helper variables - "|| true" to prevent failures from grep not finding anything -- GitLab From 271430e357cb65359db16dd97cd29c669ff4283b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Mon, 10 Mar 2025 19:00:09 +0100 Subject: [PATCH 34/43] Move disable-limiter to ivas-codec-ci --- .gitlab-ci.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 26b8b66c4a..e108200c2c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -123,10 +123,6 @@ workflow: - git pull - Pop-Location -.disable-limiter: &disable-limiter -# automatically enable #define DISABLE_LIMITER in options.h, handling both /**/-comment and //-comment - - sed -i.bak -e "s/\/\*[[:space:]]*\(#define[[:space:]]*DISABLE_LIMITER\)[[:space:]]*\*\//\1/g" ./lib_com/options.h - .copy-ltv-files-to-testv-dir-win: ©-ltv-files-to-testv-dir-win - cp $LTV_DIR_WIN\*.wav scripts\testv - cp $LTV_DIR_WIN\*.met scripts\testv @@ -480,7 +476,7 @@ pytest-compare-20ms-and-5ms-rendering: needs: ["build-codec-linux-cmake", "build-codec-linux-make", "build-codec-instrumented-linux", "build-codec-sanitizers-linux"] script: - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/print-common-info.sh - - *disable-limiter + - bash "${CI_PROJECT_DIR}"/ivas-codec-ci/snippets/float/disable-limiter.sh - make clean - make -j ### prepare pytest -- GitLab From 0b9dade8f51b26a1d8a9b4df52524fced89049cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20M=C3=BCller?= Date: Thu, 24 Apr 2025 21:36:46 +0200 Subject: [PATCH 35/43] Pin latest commit on main --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e108200c2c..eead0d128e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ variables: - # note: GitLab cannot reference the variable in the include ref:, we need to use a YAML anchor for this - IVAS_CODEC_CI_REF: &IVAS_CODEC_CI_REF mullerfa/ci-refactor + # note: GitLab cannot reference variables defined by users in the include ref:, we need to use a YAML anchor for this + # see https://docs.gitlab.com/ci/yaml/includes/#use-variables-with-include for more information + IVAS_CODEC_CI_REF: &IVAS_CODEC_CI_REF 4eb4c0dfbdc845280a9994b5f7540f69c737537b include: - local: .gitlab-ci/variables.yml -- GitLab From ad26b635e80208b8ffa0d30742eadf47f41b7968 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Fri, 25 Apr 2025 09:19:24 +0200 Subject: [PATCH 36/43] remove extra underscore --- ci/basop-pages/create_report_pages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/basop-pages/create_report_pages.py b/ci/basop-pages/create_report_pages.py index 339578a795..6cb6602de7 100644 --- a/ci/basop-pages/create_report_pages.py +++ b/ci/basop-pages/create_report_pages.py @@ -37,7 +37,7 @@ Comparing:

Summary page

-

Split comparison summary page

+

Split comparison summary page



-- GitLab From 4b0a1ad2ec96be4568ee19b612b4b4e323881084 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Fri, 25 Apr 2025 13:14:17 +0200 Subject: [PATCH 37/43] increase timeout for stv signal sanitizer tests --- .gitlab-ci/variables.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci/variables.yml b/.gitlab-ci/variables.yml index 50f6f405c0..9e60194a6c 100644 --- a/.gitlab-ci/variables.yml +++ b/.gitlab-ci/variables.yml @@ -26,3 +26,5 @@ variables: SHORT_TEST_SUITE_ENCODER: "tests/codec_be_on_mr_nonselection/test_param_file.py --param_file scripts/config/self_test_basop_encoder.prm" LONG_TEST_SUITE_ENCODER: "tests/codec_be_on_mr_nonselection/test_param_file.py --param_file scripts/config/self_test_ltv_basop_encoder.prm" TEST_SUITE: "" + # note: currently overwrites default value from ci repo + TESTCASE_TIMEOUT_STV_SANITIZERS: 240 -- GitLab From 844963d5b8a0b2e0389ac208feb78d54ae9df3ff Mon Sep 17 00:00:00 2001 From: vaclav Date: Fri, 25 Apr 2025 16:13:58 +0200 Subject: [PATCH 38/43] rename the buffer name 'transport_channels_f' to 'p_data_f' to keep the buffer name consistent between functions calls and functions bodies. --- lib_com/ivas_prot.h | 6 +++--- lib_dec/ivas_ism_param_dec.c | 32 ++++++++++++++++---------------- lib_dec/ivas_mc_param_dec.c | 10 +++++----- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 70ccb39c9b..e0dbc245d7 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -1117,7 +1117,7 @@ void ivas_ism_dec_digest_tc( void ivas_param_ism_dec_digest_tc( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nCldfbSlots, /* i : number of CLDFB slots in transport channels */ - float *transport_channels_f[] /* i : synthesized core-coder transport channels/DirAC output */ + float *p_data_f[] /* i : synthesized core-coder transport channels/DirAC output */ ); void ivas_param_ism_dec_dequant_md( @@ -1134,7 +1134,7 @@ void ivas_ism_param_dec_tc_gain_ajust( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint16_t nSamples, /* i : number of samples to be compensate */ const uint16_t nFadeLength, /* i : length of the crossfade in samples */ - float *transport_channels_f[] /* i : synthesized core-coder transport channels/DirAC output */ + float *p_data_f[] /* i : synthesized core-coder transport channels/DirAC output */ ); #endif void ivas_param_ism_dec_render( @@ -3877,7 +3877,7 @@ void ivas_param_mc_dec_read_BS( void ivas_param_mc_dec_digest_tc( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ const uint8_t nCldfbSlots, /* i : number of CLDFB slots in transport channels */ - float *transport_channels_f[] /* i/o: synthesized core-coder transport channels/DirAC output*/ + float *p_data_f[] /* i/o: synthesized core-coder transport channels/DirAC output*/ ); void ivas_param_mc_dec_prepare_renderer( diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 3387b61371..a5a6f90f02 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -799,9 +799,9 @@ void ivas_ism_dec_digest_tc( *-------------------------------------------------------------------------*/ void ivas_param_ism_dec_digest_tc( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ - const uint16_t nCldfbSlots, /* i : number of CLDFB slots in transport channels */ - float *transport_channels_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const uint16_t nCldfbSlots, /* i : number of CLDFB slots in transport channels */ + float *p_data_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ ) { #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS @@ -837,12 +837,12 @@ void ivas_param_ism_dec_digest_tc( #endif #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS - ivas_ism_param_dec_tc_gain_adjust( st_ivas, output_frame, output_frame / 2, transport_channels_f ); + ivas_ism_param_dec_tc_gain_adjust( st_ivas, output_frame, output_frame / 2, p_data_f ); #else if ( st_ivas->hDecoderConfig->Opt_tsm ) { /*TODO : FhG to check*/ - ivas_ism_param_dec_tc_gain_ajust( st_ivas, output_frame, fade_len, transport_channels_f ); + ivas_ism_param_dec_tc_gain_ajust( st_ivas, output_frame, fade_len, p_data_f ); } #endif @@ -852,7 +852,7 @@ void ivas_param_ism_dec_digest_tc( { for ( slot_idx = 0; slot_idx < nCldfbSlots; slot_idx++ ) { - cldfbAnalysis_ts( &( transport_channels_f[ch][num_freq_bands * slot_idx] ), + cldfbAnalysis_ts( &( p_data_f[ch][num_freq_bands * slot_idx] ), &cldfb_real_buffer[slot_idx * num_freq_bands * n_ch_cldfb + cldfb_ch * num_freq_bands], &cldfb_imag_buffer[slot_idx * num_freq_bands * n_ch_cldfb + cldfb_ch * num_freq_bands], num_freq_bands, st_ivas->cldfbAnaDec[cldfb_ch] ); @@ -869,7 +869,7 @@ void ivas_param_ism_dec_digest_tc( float RealBuffer[CLDFB_NO_CHANNELS_MAX]; float ImagBuffer[CLDFB_NO_CHANNELS_MAX]; - cldfbAnalysis_ts( &( transport_channels_f[ch][hSpatParamRendCom->num_freq_bands * slot_idx] ), RealBuffer, ImagBuffer, hSpatParamRendCom->num_freq_bands, st_ivas->cldfbAnaDec[ch] ); + cldfbAnalysis_ts( &( p_data_f[ch][hSpatParamRendCom->num_freq_bands * slot_idx] ), RealBuffer, ImagBuffer, hSpatParamRendCom->num_freq_bands, st_ivas->cldfbAnaDec[ch] ); mvr2r( RealBuffer, &hParamIsmDec->hParamIsmRendering->Cldfb_RealBuffer_tc[slot_idx * hSpatParamRendCom->num_freq_bands * nchan_transport + ch * hSpatParamRendCom->num_freq_bands], hSpatParamRendCom->num_freq_bands ); mvr2r( ImagBuffer, &hParamIsmDec->hParamIsmRendering->Cldfb_ImagBuffer_tc[slot_idx * hSpatParamRendCom->num_freq_bands * nchan_transport + ch * hSpatParamRendCom->num_freq_bands], hSpatParamRendCom->num_freq_bands ); } @@ -1050,7 +1050,7 @@ void ivas_ism_param_dec_tc_gain_ajust( const uint16_t nSamples, /* i : number of samples to be compensate */ const uint16_t nFadeLength, /* i : length of the crossfade in samples */ #endif - float *transport_channels_f[] /* i : synthesized core-coder transport channels/DirAC output*/ + float *p_data_f[] /* i : synthesized core-coder transport channels/DirAC output*/ ) { @@ -1064,8 +1064,8 @@ void ivas_ism_param_dec_tc_gain_ajust( for ( i = 0; i < nSamples; i++ ) { - ene_tc += transport_channels_f[0][i] * transport_channels_f[0][i] + transport_channels_f[1][i] * transport_channels_f[1][i]; /* L*L + R*R */ - ene_sum += ( transport_channels_f[0][i] + transport_channels_f[1][i] ) * ( transport_channels_f[0][i] + transport_channels_f[1][i] ); /* (L+R)*(L+R) */ + ene_tc += p_data_f[0][i] * p_data_f[0][i] + p_data_f[1][i] * p_data_f[1][i]; /* L*L + R*R */ + ene_sum += ( p_data_f[0][i] + p_data_f[1][i] ) * ( p_data_f[0][i] + p_data_f[1][i] ); /* (L+R)*(L+R) */ } gain = sqrtf( ene_tc / ( ene_sum + EPSILON ) ); if ( st_ivas->hSCE[0]->hCoreCoder[0]->ini_frame > 1 ) @@ -1076,21 +1076,21 @@ void ivas_ism_param_dec_tc_gain_ajust( grad = ( gain - last_gain ) / (float) nFadeLength; /* slope between two consecutive gains, 480 samples length */ for ( i = 0; i < ( nFadeLength ); i++ ) { - transport_channels_f[0][i] *= ( last_gain + i * grad ); - transport_channels_f[1][i] *= ( last_gain + i * grad ); + p_data_f[0][i] *= ( last_gain + i * grad ); + p_data_f[1][i] *= ( last_gain + i * grad ); } for ( ; i < nSamples; i++ ) { - transport_channels_f[0][i] *= gain; - transport_channels_f[1][i] *= gain; + p_data_f[0][i] *= gain; + p_data_f[1][i] *= gain; } } else { for ( i = 0; i < nSamples; i++ ) { - transport_channels_f[0][i] *= gain; - transport_channels_f[1][i] *= gain; + p_data_f[0][i] *= gain; + p_data_f[1][i] *= gain; } } diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index e621fe7152..643781bfcc 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -1325,9 +1325,9 @@ void ivas_param_mc_dec_read_BS( *------------------------------------------------------------------------*/ void ivas_param_mc_dec_digest_tc( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ - const uint8_t nCldfbSlots, /* i : number of CLDFB slots in transport channels */ - float *transport_channels_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ + const uint8_t nCldfbSlots, /* i : number of CLDFB slots in transport channels */ + float *p_data_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ ) { #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS @@ -1359,7 +1359,7 @@ void ivas_param_mc_dec_digest_tc( { for ( slot_idx = 0; slot_idx < nCldfbSlots; slot_idx++ ) { - cldfbAnalysis_ts( &( transport_channels_f[ch][num_freq_bands * slot_idx] ), + cldfbAnalysis_ts( &( p_data_f[ch][num_freq_bands * slot_idx] ), &cldfb_real_buffer[slot_idx * num_freq_bands * n_ch_cldfb + cldfb_ch * num_freq_bands], &cldfb_imag_buffer[slot_idx * num_freq_bands * n_ch_cldfb + cldfb_ch * num_freq_bands], num_freq_bands, st_ivas->cldfbAnaDec[cldfb_ch] ); @@ -1377,7 +1377,7 @@ void ivas_param_mc_dec_digest_tc( /* CLDFB Analysis*/ for ( ch = 0; ch < nchan_transport; ch++ ) { - cldfbAnalysis_ts( &( transport_channels_f[ch][hParamMC->num_freq_bands * slot_idx] ), RealBuffer, ImagBuffer, hParamMC->num_freq_bands, st_ivas->cldfbAnaDec[ch] ); + cldfbAnalysis_ts( &( p_data_f[ch][hParamMC->num_freq_bands * slot_idx] ), RealBuffer, ImagBuffer, hParamMC->num_freq_bands, st_ivas->cldfbAnaDec[ch] ); mvr2r( RealBuffer, &hParamMC->Cldfb_RealBuffer_tc[slot_idx * hParamMC->num_freq_bands * nchan_transport + ch * hParamMC->num_freq_bands], hParamMC->num_freq_bands ); mvr2r( ImagBuffer, &hParamMC->Cldfb_ImagBuffer_tc[slot_idx * hParamMC->num_freq_bands * nchan_transport + ch * hParamMC->num_freq_bands], hParamMC->num_freq_bands ); -- GitLab From 9788022bace97fa8300aff41f8730aa02a4c44fe Mon Sep 17 00:00:00 2001 From: vaclav Date: Sat, 26 Apr 2025 10:50:18 +0200 Subject: [PATCH 39/43] unify *p_tc[] pointers; under UNIFIED_DECODING_PATHS_LEFTOVERS --- lib_dec/ivas_jbm_dec.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index f12ab8c91f..30c685d7c8 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -311,7 +311,7 @@ ivas_error ivas_jbm_dec_tc( ivas_masa_prerender( st_ivas, p_output, output_frame, nchan_remapped ); /* external output */ - if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL && st_ivas->hMasa->config.input_ivas_format == MASA_ISM_FORMAT ) + if ( output_config == IVAS_AUDIO_CONFIG_EXTERNAL && st_ivas->hMasa->config.input_ivas_format == MASA_ISM_FORMAT ) { for ( n = 0; n < st_ivas->nchan_ism; n++ ) { @@ -991,23 +991,30 @@ ivas_error ivas_jbm_dec_render( if ( !st_ivas->hDecoderConfig->Opt_tsm ) { +#ifndef UNIFIED_DECODING_PATHS_LEFTOVERS for ( n = 0; n < st_ivas->hTcBuffer->nchan_buffer_full; n++ ) { p_tc[n] = &p_output[n][st_ivas->hTcBuffer->n_samples_rendered]; } +#endif for ( n = 0; n < MAX_TRANSPORT_CHANNELS + MAX_NUM_OBJECTS; n++ ) { st_ivas->hTcBuffer->tc[n] = p_output[n]; } } +#ifndef UNIFIED_DECODING_PATHS_LEFTOVERS else { +#endif + for ( n = 0; n < st_ivas->hTcBuffer->nchan_buffer_full; n++ ) { p_tc[n] = &st_ivas->hTcBuffer->tc[n][st_ivas->hTcBuffer->n_samples_rendered]; } +#ifndef UNIFIED_DECODING_PATHS_LEFTOVERS } +#endif /*----------------------------------------------------------------* * Update combined orientation access index @@ -1083,7 +1090,11 @@ ivas_error ivas_jbm_dec_render( #endif { /* Convert to Ambisonics */ +#ifdef UNIFIED_DECODING_PATHS_LEFTOVERS + ivas_ism2sba_sf( p_tc, p_output, st_ivas->hIsmRendererData, st_ivas->nchan_transport, *nSamplesRendered, 0, st_ivas->hIntSetup.ambisonics_order ); +#else ivas_ism2sba_sf( st_ivas->hTcBuffer->tc, p_output, st_ivas->hIsmRendererData, st_ivas->nchan_transport, *nSamplesRendered, st_ivas->hTcBuffer->n_samples_rendered, st_ivas->hIntSetup.ambisonics_order ); +#endif } /* Binaural rendering */ @@ -1212,7 +1223,7 @@ ivas_error ivas_jbm_dec_render( return error; } } - else if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) /*EXT output = individual objects + HOA3*/ + else if ( output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) /*EXT output = individual objects + HOA3*/ { if ( ( error = ivas_sba_dec_render( st_ivas, nSamplesAskedLocal, nSamplesRendered, nSamplesAvailableNext, &p_output[st_ivas->nchan_ism] ) ) != IVAS_ERR_OK ) { @@ -1221,7 +1232,11 @@ ivas_error ivas_jbm_dec_render( for ( n = 0; n < st_ivas->nchan_ism; n++ ) { +#ifdef UNIFIED_DECODING_PATHS_LEFTOVERS + mvr2r( p_tc[n], p_output[n], *nSamplesRendered ); +#else mvr2r( st_ivas->hTcBuffer->tc[n] + st_ivas->hTcBuffer->n_samples_rendered, p_output[n], *nSamplesRendered ); +#endif } } else @@ -1243,7 +1258,7 @@ ivas_error ivas_jbm_dec_render( return error; } - if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) + if ( output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) { #ifdef DEBUGGING assert( st_ivas->ism_mode == ISM_MODE_NONE ); @@ -1261,10 +1276,12 @@ ivas_error ivas_jbm_dec_render( } else if ( st_ivas->ivas_format == MC_FORMAT ) { +#ifndef UNIFIED_DECODING_PATHS_LEFTOVERS for ( n = 0; n < st_ivas->hTcBuffer->nchan_buffer_full; n++ ) { p_tc[n] = &st_ivas->hTcBuffer->tc[n][st_ivas->hTcBuffer->n_samples_rendered]; } +#endif if ( st_ivas->mc_mode == MC_MODE_MCT ) { int16_t crendInPlaceRotation = FALSE; @@ -1293,7 +1310,6 @@ ivas_error ivas_jbm_dec_render( { if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig, st_ivas->hCombinedOrientationData, &st_ivas->hIntSetup, st_ivas->hEFAPdata, st_ivas->hTcBuffer, crendInPlaceRotation ? p_output : p_tc, p_output, *nSamplesRendered, output_Fs, 0 ) ) != IVAS_ERR_OK ) - { return error; } -- GitLab From 585248be0e786586c36c283333cc643150e9ac31 Mon Sep 17 00:00:00 2001 From: vaclav Date: Sat, 26 Apr 2025 10:57:17 +0200 Subject: [PATCH 40/43] unify *p_tc[] pointers; under UNIFIED_DECODING_PATHS_LEFTOVERS --- lib_dec/ivas_jbm_dec.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 30c685d7c8..44702c649d 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1375,7 +1375,9 @@ ivas_error ivas_jbm_dec_render( } else if ( st_ivas->mc_mode == MC_MODE_MCMASA ) { +#ifndef UNIFIED_DECODING_PATHS_LEFTOVERS int16_t offset = hSpatParamRendCom->slots_rendered * hSpatParamRendCom->slot_size; +#endif nchan_remapped = st_ivas->nchan_transport; if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC_ROOM || st_ivas->renderer_type == RENDERER_STEREO_PARAMETRIC ) { @@ -1390,7 +1392,11 @@ ivas_error ivas_jbm_dec_render( /* we still need to copy the separate channel if available */ if ( st_ivas->hOutSetup.separateChannelEnabled ) { +#ifdef UNIFIED_DECODING_PATHS_LEFTOVERS + mvr2r( p_tc[LFE_CHANNEL - 1], p_output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); +#else mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, p_output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); +#endif } ivas_mc2sba( st_ivas->hIntSetup, p_output, p_output, *nSamplesRendered, st_ivas->hOutSetup.ambisonics_order, 0.f ); @@ -1411,13 +1417,22 @@ ivas_error ivas_jbm_dec_render( output_config == IVAS_AUDIO_CONFIG_5_1_4 || output_config == IVAS_AUDIO_CONFIG_7_1_4 || output_config == IVAS_AUDIO_CONFIG_5_1_2 || ( output_config == IVAS_AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe > 0 ) ) { +#ifdef UNIFIED_DECODING_PATHS_LEFTOVERS + mvr2r( p_tc[LFE_CHANNEL], p_output[LFE_CHANNEL], *nSamplesRendered ); + mvr2r( p_tc[LFE_CHANNEL - 1], p_output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); +#else mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL] + offset, p_output[LFE_CHANNEL], *nSamplesRendered ); mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, p_output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); +#endif } else if ( output_config == IVAS_AUDIO_CONFIG_LS_CUSTOM && st_ivas->hOutSetup.num_lfe == 0 ) { +#ifdef UNIFIED_DECODING_PATHS_LEFTOVERS + mvr2r( p_tc[LFE_CHANNEL - 1], p_output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); +#else /* Delay the separated channel to sync with the DirAC rendering */ mvr2r( st_ivas->hTcBuffer->tc[LFE_CHANNEL - 1] + offset, p_output[st_ivas->hOutSetup.separateChannelIndex], *nSamplesRendered ); +#endif } } } -- GitLab From 90d1247eb31d76427ba01fc6ff65a56cbbb231dc Mon Sep 17 00:00:00 2001 From: vaclav Date: Sat, 26 Apr 2025 11:02:34 +0200 Subject: [PATCH 41/43] remove unused variable --- lib_dec/ivas_jbm_dec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 44702c649d..a7fa3f0426 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -969,7 +969,9 @@ ivas_error ivas_jbm_dec_render( ivas_error error; float *p_output[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS]; float *p_tc[MAX_TRANSPORT_CHANNELS + MAX_NUM_OBJECTS]; +#ifndef UNIFIED_DECODING_PATHS_LEFTOVERS SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; +#endif int16_t nchan_out_syn_output; push_wmops( "ivas_dec_render" ); @@ -977,7 +979,9 @@ ivas_error ivas_jbm_dec_render( * Initialization of local vars after struct has been set *----------------------------------------------------------------*/ +#ifndef UNIFIED_DECODING_PATHS_LEFTOVERS hSpatParamRendCom = st_ivas->hSpatParamRendCom; +#endif output_Fs = st_ivas->hDecoderConfig->output_Fs; nchan_out = st_ivas->hDecoderConfig->nchan_out; nchan_transport = st_ivas->hTcBuffer->nchan_transport_jbm; -- GitLab From 19736c7f5b31d939b647f08a9d54b9b96d993403 Mon Sep 17 00:00:00 2001 From: vaclav Date: Sat, 26 Apr 2025 12:52:58 +0200 Subject: [PATCH 42/43] fix for ISM to FOA in JBM; within UNIFIED_DECODING_PATHS_LEFTOVERS --- lib_dec/ivas_jbm_dec.c | 2 +- lib_dec/ivas_sba_rendering_internal.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index a7fa3f0426..68e9099896 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1095,7 +1095,7 @@ ivas_error ivas_jbm_dec_render( { /* Convert to Ambisonics */ #ifdef UNIFIED_DECODING_PATHS_LEFTOVERS - ivas_ism2sba_sf( p_tc, p_output, st_ivas->hIsmRendererData, st_ivas->nchan_transport, *nSamplesRendered, 0, st_ivas->hIntSetup.ambisonics_order ); + ivas_ism2sba_sf( p_tc, p_output, st_ivas->hIsmRendererData, st_ivas->nchan_transport, *nSamplesRendered, st_ivas->hTcBuffer->n_samples_rendered, st_ivas->hIntSetup.ambisonics_order ); #else ivas_ism2sba_sf( st_ivas->hTcBuffer->tc, p_output, st_ivas->hIsmRendererData, st_ivas->nchan_transport, *nSamplesRendered, st_ivas->hTcBuffer->n_samples_rendered, st_ivas->hIntSetup.ambisonics_order ); #endif diff --git a/lib_dec/ivas_sba_rendering_internal.c b/lib_dec/ivas_sba_rendering_internal.c index 1861186abc..1aece93bb9 100644 --- a/lib_dec/ivas_sba_rendering_internal.c +++ b/lib_dec/ivas_sba_rendering_internal.c @@ -376,7 +376,11 @@ void ivas_ism2sba_sf( for ( j = 0; j < sba_num_chans; j++ ) { g2 = hIsmRendererData->interpolator + offset; +#ifdef UNIFIED_DECODING_PATHS_LEFTOVERS + tc = buffer_in[i]; +#else tc = buffer_in[i] + offset; +#endif out = buffer_tmp[j]; gain = hIsmRendererData->gains[i][j]; prev_gain = hIsmRendererData->prev_gains[i][j]; -- GitLab From 01690c33d60c5e9a53bf2104f9f6c90254b1826d Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 30 Apr 2025 10:59:34 +0200 Subject: [PATCH 43/43] update MLD regex to deal with scientific notation --- tests/constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/constants.py b/tests/constants.py index 5fc9b3f50d..794f977b00 100644 --- a/tests/constants.py +++ b/tests/constants.py @@ -22,7 +22,7 @@ DMX_MLD = "DMX_MLD" DMX_SSNR = "DMX_SSNR" # regex patterns for parsing the output from comparisons -> mainly for BASOP ci -MLD_PATTERN = r"MLD: ([\d\.]*)" +MLD_PATTERN = r"MLD: (\d+\.*\d*[eE]*[-+]*\d*)" MAX_DIFF_PATTERN = r"MAX_ABS_DIFF: (\d*)" ODG_PATTERN_PQEVALAUDIO = r"Objective Difference Grade: (-*\d*\.\d*)" ODG_PATTERN = r"(?