From 22797817d774fd8cf3b75d41e849bd1c4ae9cca9 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Tue, 5 Mar 2024 13:52:13 +0100 Subject: [PATCH 01/17] fix for #1021, fix ISM renderer, always use the correct renderer to determine if the TC buffer sub frame info needs to be updated, use the correct number of objects --- lib_com/ivas_prot.h | 3 +++ lib_com/options.h | 1 + lib_dec/ivas_ism_renderer.c | 14 ++++++++++++-- lib_dec/ivas_jbm_dec.c | 12 ++++++++++++ lib_dec/ivas_osba_dec.c | 4 ++++ 5 files changed, 32 insertions(+), 2 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index e80b23aa15..6afc081227 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -5223,6 +5223,9 @@ void ivas_ism_renderer_close( void ivas_ism_render_sf( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ +#ifdef NONBE_FIX_1021_ISM_BRIR_RS_FLUSH + const RENDERER_TYPE renderer_type, /* i : current renderer type */ +#endif float *output_f[], /* i/o: core-coder transport channels/object output */ const int16_t n_samples_to_render /* i : output frame length per channel */ ); diff --git a/lib_com/options.h b/lib_com/options.h index b9333b1ff6..386221aa08 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -171,6 +171,7 @@ #define NONBE_FIX_1004_USAN_DTX_MASA_NO_DIRS /* Nokia: fix USAN error caused by non-setting of correctly the number of MASA directions in DTX */ #define NONBE_FIX_1014_1015_1016_OSBA_JBM_STEREO /* FhG: issues #1014, #1015, #1016: fix tc buffer info update in the discrete ism renderer */ #define NONBE_FIX_987_PARAMC_BINAURAL_REVERB_RENDERING /* FhG: issue 987: solution b: downmix HOA3 to stereo a input for the reverberator */ +#define NONBE_FIX_1021_ISM_BRIR_RS_FLUSH /* FhG: issue #1021: fix ISM with JBM and RS renderer flushing*/ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/ivas_ism_renderer.c b/lib_dec/ivas_ism_renderer.c index 6f5a2d90eb..09d6fd0e62 100644 --- a/lib_dec/ivas_ism_renderer.c +++ b/lib_dec/ivas_ism_renderer.c @@ -140,7 +140,10 @@ void ivas_ism_renderer_close( *-------------------------------------------------------------------------*/ void ivas_ism_render_sf( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ +#ifdef NONBE_FIX_1021_ISM_BRIR_RS_FLUSH + const RENDERER_TYPE renderer_type, /* i: current renderer type */ +#endif float *output_f[], /* i/o: core-coder transport channels/object output */ const int16_t n_samples_to_render /* i : output frame length per channel */ ) @@ -172,12 +175,15 @@ void ivas_ism_render_sf( assert( slots_to_render == 0 ); assert( last_sf <= st_ivas->hTcBuffer->nb_subframes ); #endif - +#ifdef NONBE_FIX_1021_ISM_BRIR_RS_FLUSH + num_objects = st_ivas->nchan_ism; +#else num_objects = st_ivas->nchan_transport; if ( st_ivas->ivas_format == SBA_ISM_FORMAT ) { num_objects = st_ivas->nchan_ism; } +#endif nchan_out_woLFE = st_ivas->hIntSetup.nchan_out_woLFE; @@ -283,7 +289,11 @@ void ivas_ism_render_sf( #ifdef NONBE_FIX_1014_1015_1016_OSBA_JBM_STEREO /* update rendered subframe and slots info for all cases apart from a following crend call, the update will then happen in the crend call*/ +#ifdef NONBE_FIX_1021_ISM_BRIR_RS_FLUSH + if ( renderer_type != RENDERER_BINAURAL_MIXER_CONV_ROOM ) +#else if ( st_ivas->renderer_type != RENDERER_BINAURAL_MIXER_CONV_ROOM ) +#endif #else if ( st_ivas->renderer_type == RENDERER_TD_PANNING ) #endif diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 128754273c..224b862af0 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1093,7 +1093,11 @@ ivas_error ivas_jbm_dec_render( if ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) { /* Convert to CICPxx; used also for ISM->CICP19->binaural_room rendering */ +#ifdef NONBE_FIX_1021_ISM_BRIR_RS_FLUSH + ivas_ism_render_sf( st_ivas, st_ivas->renderer_type, p_output, *nSamplesRendered ); +#else ivas_ism_render_sf( st_ivas, p_output, *nSamplesRendered ); +#endif } else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX ) { @@ -1235,7 +1239,11 @@ ivas_error ivas_jbm_dec_render( } /* render objects */ +#ifdef NONBE_FIX_1021_ISM_BRIR_RS_FLUSH + ivas_ism_render_sf( st_ivas, st_ivas->renderer_type, p_output, *nSamplesRendered ); +#else ivas_ism_render_sf( st_ivas, p_output, *nSamplesRendered ); +#endif /* add already rendered SBA part */ for ( n = 0; n < nchan_out; n++ ) @@ -1644,7 +1652,11 @@ ivas_error ivas_jbm_dec_flush_renderer( /* Convert to CICPxx; used also for ISM->CICP19->binaural_room rendering */ set_f( st_ivas->hIsmRendererData->interpolator, 1.0f, hTcBuffer->n_samples_granularity ); +#ifdef NONBE_FIX_1021_ISM_BRIR_RS_FLUSH + ivas_ism_render_sf( st_ivas, renderer_type_old, p_output, hTcBuffer->n_samples_granularity ); +#else ivas_ism_render_sf( st_ivas, p_output, hTcBuffer->n_samples_granularity ); +#endif #if defined SPLIT_REND_WITH_HEAD_ROT if ( ( error = ivas_rend_crendProcessSubframe( st_ivas->hCrendWrapper, IVAS_AUDIO_CONFIG_7_1_4, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_IR, st_ivas->hDecoderConfig, NULL, diff --git a/lib_dec/ivas_osba_dec.c b/lib_dec/ivas_osba_dec.c index 6585db587e..65e05f78be 100644 --- a/lib_dec/ivas_osba_dec.c +++ b/lib_dec/ivas_osba_dec.c @@ -284,7 +284,11 @@ ivas_error ivas_osba_render_sf( if ( st_ivas->renderer_type != RENDERER_BINAURAL_FASTCONV_ROOM ) { +#ifdef NONBE_FIX_1021_ISM_BRIR_RS_FLUSH + ivas_ism_render_sf( st_ivas, st_ivas->renderer_type, p_output_ism, *nSamplesRendered ); +#else ivas_ism_render_sf( st_ivas, p_output_ism, *nSamplesRendered ); +#endif } for ( n = 0; n < st_ivas->hDecoderConfig->nchan_out; n++ ) -- GitLab From 5c3588cc985f04e852ec8d1eba27a902109f7f7d Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 6 Mar 2024 12:12:40 +0100 Subject: [PATCH 02/17] issue 1022: remove unused function ivas_param_ism_dec(); under FIX_1022_REMOVE_PARAMISM_DEC --- lib_com/ivas_prot.h | 2 ++ lib_com/options.h | 1 + lib_dec/ivas_ism_param_dec.c | 14 +++++++++----- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index e80b23aa15..dab1f1036f 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -1097,11 +1097,13 @@ void ivas_param_ism_dec_close( const AUDIO_CONFIG output_config /* i : output audio configuration */ ); +#ifndef FIX_1022_REMOVE_PARAMISM_DEC void ivas_param_ism_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ ); +#endif void ivas_ism_dec_digest_tc( Decoder_Struct *st_ivas /* i/o: IVAS decoder structure */ ); diff --git a/lib_com/options.h b/lib_com/options.h index 52901ec9c4..32ee53a784 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -159,6 +159,7 @@ #define FIX_998_UNUSED_FUNCTION /* FhG: issue 998: delete unused funtion ivas_dirac_dec_get_response_split_order */ #define FIX_1009_ISM_NONDIEGETIC_PANNING /* FhG: issue #1009: use correct object buffer for ISM1 non-diegetic pan */ #define FIX_993_REMOVE_SBA_GET_ORDER /* VA: issue 993: remove unused function ivas_sba_get_order() */ +#define FIX_1022_REMOVE_PARAMISM_DEC /* VA: issue 1022: remove unused function ivas_param_ism_dec() */ /* #################### End BE switches ################################## */ diff --git a/lib_dec/ivas_ism_param_dec.c b/lib_dec/ivas_ism_param_dec.c index 9d1e179c8b..9337ccb08a 100644 --- a/lib_dec/ivas_ism_param_dec.c +++ b/lib_dec/ivas_ism_param_dec.c @@ -324,7 +324,7 @@ static void ivas_param_ism_render_slot( return; } - +#ifndef FIX_1022_REMOVE_PARAMISM_DEC static void ivas_param_ism_rendering( PARAM_ISM_DEC_HANDLE hParamIsmDec, SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom, @@ -361,7 +361,7 @@ static void ivas_param_ism_rendering( return; } - +#endif static ivas_error ivas_param_ism_rendering_init( PARAM_ISM_RENDERING_HANDLE hParamIsmRendering, @@ -729,7 +729,7 @@ void ivas_param_ism_dec_close( return; } - +#ifndef FIX_1022_REMOVE_PARAMISM_DEC /*-------------------------------------------------------------------------* * ivas_param_ism_dec() * @@ -973,7 +973,7 @@ void ivas_param_ism_dec( return; } - +#endif /*-------------------------------------------------------------------------* * ivas_ism_dec_digest_tc() @@ -1121,7 +1121,7 @@ void ivas_param_ism_dec_digest_tc( nchan_out_woLFE = st_ivas->hIntSetup.nchan_out_woLFE; } - push_wmops( "ivas_param_ism_dec" ); + 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 ); @@ -1533,8 +1533,10 @@ void ivas_param_ism_params_to_masa_param_mapping( st_ivas->hISMDTX.dtx_flag = 1; } +#ifndef FIX_1022_REMOVE_PARAMISM_DEC if ( st_ivas->nchan_ism > 1 ) { +#endif if ( st_ivas->hISMDTX.dtx_flag ) { float energy_ratio; @@ -1598,6 +1600,7 @@ void ivas_param_ism_params_to_masa_param_mapping( } } } +#ifndef FIX_1022_REMOVE_PARAMISM_DEC } else { @@ -1617,6 +1620,7 @@ void ivas_param_ism_params_to_masa_param_mapping( } } } +#endif return; } -- GitLab From a5474b69444093e86f513ecb173910a99e51cbe0 Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 6 Mar 2024 12:21:52 +0100 Subject: [PATCH 03/17] issue 1023: remove unused function ivas_param_mc_dec(); under FIX_1023_REMOVE_PARAMMC_DEC --- lib_com/ivas_prot.h | 2 ++ lib_com/options.h | 1 + lib_dec/ivas_mc_param_dec.c | 7 +++++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index e80b23aa15..f2c04bf479 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -3876,11 +3876,13 @@ void ivas_param_mc_dec_render( float *output_f[] /* o : rendered time signal */ ); +#ifndef FIX_1023_REMOVE_PARAMMC_DEC void ivas_param_mc_dec( Decoder_Struct *st_ivas, /* i/o: IVAS decoder handle */ float *output_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ ); +#endif /*! r: number of cldfb synthesis instances */ int16_t param_mc_get_num_cldfb_syntheses( Decoder_Struct *st_ivas /* i : IVAS decoder structure */ diff --git a/lib_com/options.h b/lib_com/options.h index 52901ec9c4..ac87228cde 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -159,6 +159,7 @@ #define FIX_998_UNUSED_FUNCTION /* FhG: issue 998: delete unused funtion ivas_dirac_dec_get_response_split_order */ #define FIX_1009_ISM_NONDIEGETIC_PANNING /* FhG: issue #1009: use correct object buffer for ISM1 non-diegetic pan */ #define FIX_993_REMOVE_SBA_GET_ORDER /* VA: issue 993: remove unused function ivas_sba_get_order() */ +#define FIX_1023_REMOVE_PARAMMC_DEC /* VA: issue 1023: remove unused function ivas_param_mc_dec() */ /* #################### End BE switches ################################## */ diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index 70f01eb927..7e9577a1a0 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -1471,9 +1471,9 @@ void ivas_param_mc_dec_digest_tc( /*------------------------------------------------------------------------- - * ivas_param_mc_dec() + * ivas_param_mc_dec_render() * - * Parametric MC decoding process + * Parametric MC rendering process *------------------------------------------------------------------------*/ void ivas_param_mc_dec_render( @@ -1809,6 +1809,8 @@ void ivas_param_mc_dec_render( return; } + +#ifndef FIX_1023_REMOVE_PARAMMC_DEC /*------------------------------------------------------------------------- * ivas_param_mc_dec() * @@ -1848,6 +1850,7 @@ void ivas_param_mc_dec( pop_wmops(); return; } +#endif /*------------------------------------------------------------------------- * param_mc_dec_init() -- GitLab From 334abdb36158636a7faf35b7ddf8cdf3dc5e0b10 Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 6 Mar 2024 12:39:41 +0100 Subject: [PATCH 04/17] issue 1024: remove unused function ivas_param_mc_get_mono_stereo_mixing_matrices(); under FIX_1024_REMOVE_PARAMMC_MIXING_MAT --- lib_com/options.h | 1 + lib_dec/ivas_mc_param_dec.c | 10 ++++++++-- lib_dec/ivas_out_setup_conversion.c | 8 ++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 52901ec9c4..6567112375 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -159,6 +159,7 @@ #define FIX_998_UNUSED_FUNCTION /* FhG: issue 998: delete unused funtion ivas_dirac_dec_get_response_split_order */ #define FIX_1009_ISM_NONDIEGETIC_PANNING /* FhG: issue #1009: use correct object buffer for ISM1 non-diegetic pan */ #define FIX_993_REMOVE_SBA_GET_ORDER /* VA: issue 993: remove unused function ivas_sba_get_order() */ +#define FIX_1024_REMOVE_PARAMMC_MIXING_MAT /* VA: issue 1024: remove unused function ivas_param_mc_get_mono_stereo_mixing_matrices() */ /* #################### End BE switches ################################## */ diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index 70f01eb927..3ac207849c 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -88,8 +88,10 @@ static void ivas_param_mc_dequantize_cov( PARAM_MC_DEC_HANDLE hDirAC, float *ild static void ivas_param_mc_get_mixing_matrices( PARAM_MC_DEC_HANDLE hParamMC, IVAS_OUTPUT_SETUP *hSynthesisOutputSetup, float Cx_in[PARAM_MC_MAX_PARAMETER_BANDS][PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_TRANSPORT_CHANS], float *mixing_matrix[], float *mixing_matrix_res[], const int16_t nY_int, const PARAM_MC_SYNTHESIS_CONF synth_conf, const int16_t nX, const int16_t nY ); +#ifndef FIX_1024_REMOVE_PARAMMC_MIXING_MAT static void ivas_param_mc_get_mono_stereo_mixing_matrices( PARAM_MC_DEC_HANDLE hParamMC, float Cx_in[PARAM_MC_MAX_PARAMETER_BANDS][PARAM_MC_MAX_TRANSPORT_CHANS * PARAM_MC_MAX_TRANSPORT_CHANS], float *mixing_matrix[], float *mixing_matrix_res[], const int16_t nY_intern, const int16_t nX, const int16_t nY_cov ); +#endif static void param_mc_update_mixing_matrices( PARAM_MC_DEC_HANDLE hParamMC, float *mixing_matrix[], float *mixing_matrix_res[], const uint16_t nX, const uint16_t nY ); static void ivas_param_mc_dec_compute_interpolator( const uint16_t bAttackPresent, const uint16_t attackPos, const uint16_t interp_length, float *interpolator ); @@ -1454,15 +1456,19 @@ void ivas_param_mc_dec_digest_tc( } +#ifndef FIX_1024_REMOVE_PARAMMC_MIXING_MAT if ( hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO ) { ivas_param_mc_get_mono_stereo_mixing_matrices( hParamMC, cx, hParamMC->h_output_synthesis_cov_state.mixing_matrix, hParamMC->h_output_synthesis_cov_state.mixing_matrix_res, nchan_out_transport, nchan_transport, nchan_out_cov ); } else { +#endif /* generate mixing matrices */ ivas_param_mc_get_mixing_matrices( hParamMC, hSynthesisOutputSetup, cx, hParamMC->h_output_synthesis_cov_state.mixing_matrix, hParamMC->h_output_synthesis_cov_state.mixing_matrix_res, nchan_out_transport, hParamMC->synthesis_conf, nchan_transport, nchan_out_cov ); +#ifndef FIX_1024_REMOVE_PARAMMC_MIXING_MAT } +#endif pop_wmops(); @@ -2445,7 +2451,7 @@ static void ivas_param_mc_get_mixing_matrices( return; } - +#ifndef FIX_1024_REMOVE_PARAMMC_MIXING_MAT /*------------------------------------------------------------------------- * ivas_param_mc_get_mono_stereo_mixing_matrices() * @@ -2566,7 +2572,7 @@ static void ivas_param_mc_get_mono_stereo_mixing_matrices( return; } - +#endif /*------------------------------------------------------------------------- * param_mc_update_mixing_matrices() diff --git a/lib_dec/ivas_out_setup_conversion.c b/lib_dec/ivas_out_setup_conversion.c index 75015f7aeb..b66e02e1ee 100644 --- a/lib_dec/ivas_out_setup_conversion.c +++ b/lib_dec/ivas_out_setup_conversion.c @@ -973,7 +973,11 @@ void ivas_ls_setup_conversion_process_mdct_param_mc( set_zero( Nrqq, MAX_OUTPUT_CHANNELS ); set_zero( target_ch_ener, MAX_OUTPUT_CHANNELS ); +#ifdef FIX_1024_REMOVE_PARAMMC_MIXING_MAT + /* Step 1.2, get target channel energies for the transported format, Nrqq calculation */ +#else /* Step 1.2, get target channel energies for the transported format as in ivas_param_mc_get_mono_stereo_mixing_matrices(), Nrqq calculation */ +#endif ild_q = hParamMC->icld_q + bandIdx * hParamMC->hMetadataPMC->ild_mapping_conf->ild_map_size_lfe; for ( chInIdx = 0; chInIdx < nchan_transport_format; chInIdx++ ) @@ -991,7 +995,11 @@ void ivas_ls_setup_conversion_process_mdct_param_mc( Nrqq[hParamMC->hMetadataPMC->ild_mapping_conf->ild_index[chInIdx]] = powf( 10.0f, ild_q[chInIdx] / 10.0f ) * hParamMC->hMetadataPMC->ild_factors[chInIdx] * ref_ener; } +#ifdef FIX_1024_REMOVE_PARAMMC_MIXING_MAT + /* Step 1.3 get target Cy (with dmx matrix from CICPX to MONO/STEREO saved in hParamMC) */ +#else /* Step 1.3 get target Cy like in ivas_param_mc_get_mono_stereo_mixing_matrices() (with dmx matrix from CICPX to MONO/STEREO saved in hParamMC) */ +#endif for ( chOutIdx = 0; chOutIdx < nchan_out; chOutIdx++ ) { for ( i = 0; i < nchan_transport_format; i++ ) -- GitLab From 67ef955e48ab432c50c8333cbdece7948c3fc4c3 Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Thu, 7 Mar 2024 09:33:31 +0100 Subject: [PATCH 05/17] #fix for #1021, address formal comment --- lib_com/ivas_prot.h | 2 +- lib_dec/ivas_ism_renderer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 6afc081227..9e27f96fcf 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -5224,7 +5224,7 @@ void ivas_ism_renderer_close( void ivas_ism_render_sf( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ #ifdef NONBE_FIX_1021_ISM_BRIR_RS_FLUSH - const RENDERER_TYPE renderer_type, /* i : current renderer type */ + const RENDERER_TYPE renderer_type, /* i : active renderer type */ #endif float *output_f[], /* i/o: core-coder transport channels/object output */ const int16_t n_samples_to_render /* i : output frame length per channel */ diff --git a/lib_dec/ivas_ism_renderer.c b/lib_dec/ivas_ism_renderer.c index 09d6fd0e62..6f176ca0ca 100644 --- a/lib_dec/ivas_ism_renderer.c +++ b/lib_dec/ivas_ism_renderer.c @@ -142,7 +142,7 @@ void ivas_ism_renderer_close( void ivas_ism_render_sf( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ #ifdef NONBE_FIX_1021_ISM_BRIR_RS_FLUSH - const RENDERER_TYPE renderer_type, /* i: current renderer type */ + const RENDERER_TYPE renderer_type, /* i : active renderer type */ #endif float *output_f[], /* i/o: core-coder transport channels/object output */ const int16_t n_samples_to_render /* i : output frame length per channel */ -- GitLab From feebfe33cc4fe83b29eab34ad3f8ff4d324f35d2 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Tue, 12 Mar 2024 13:56:32 +0100 Subject: [PATCH 06/17] remove unused function from audiofile.py --- scripts/pyaudio3dtools/audiofile.py | 32 ----------------------------- 1 file changed, 32 deletions(-) diff --git a/scripts/pyaudio3dtools/audiofile.py b/scripts/pyaudio3dtools/audiofile.py index d3153e21db..e614bfbd49 100644 --- a/scripts/pyaudio3dtools/audiofile.py +++ b/scripts/pyaudio3dtools/audiofile.py @@ -36,7 +36,6 @@ import shutil import struct import subprocess as sp import warnings -from importlib import import_module from tempfile import TemporaryDirectory from typing import Optional, Tuple @@ -662,37 +661,6 @@ def loudnessinfo( return measured_loudness, scale_factor -def print_plot_play(x: np.ndarray, fs: int, text: Optional[str] = "") -> None: - """1. Prints information about an audio signal, 2. plots the waveform, and 3. Creates player - - Parameters - ---------- - x: np array - Input signal - fs: int - Input sampling rate - text: Optional[str] = '' - text to print - Returns - ------- - None - - """ - - plt = import_module("matplotlib.pyplot") - ipd = import_module("IPython.display") - - print("%s fs = %d, x.shape = %s, x.dtype = %s" % (text, fs, x.shape, x.dtype)) - plt.figure(figsize=(8, 2)) - plt.plot(x, color="gray") - plt.xlim([0, x.shape[0]]) - plt.xlabel("Time (samples)") - plt.ylabel("Amplitude") - plt.tight_layout() - plt.show() - ipd.display(ipd.Audio(data=x, rate=fs)) - - def get_wav_file_info(filename: str) -> dict: """ Get the format information from a WAV file. -- GitLab From 3ae50cb0ef76baac7f4aa7f8ff4b14c8be1284b6 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Tue, 12 Mar 2024 14:01:30 +0100 Subject: [PATCH 07/17] fix unused imports and redundant f-strings --- ci/complexity_measurements/mergeNewsletterRam.py | 1 - ci/complexity_measurements/mergeNewsletterRom.py | 1 - scripts/batch_comp_audio.py | 3 +-- scripts/mem_analysis.py | 3 --- scripts/prepare_combined_format_inputs.py | 3 +-- scripts/pyaudio3dtools/__init__.py | 1 - scripts/pyaudio3dtools/audio3dtools.py | 5 +---- scripts/pyivastest/IvasBaseClass.py | 1 - scripts/pyivastest/IvasModeCollector.py | 2 -- scripts/pyivastest/IvasModeRunner.py | 2 -- scripts/pyivastest/__init__.py | 10 ---------- scripts/self_test.py | 2 -- tests/codec_be_on_mr_nonselection/test_param_file.py | 4 ++-- tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py | 6 +++--- tests/codec_be_on_mr_selection/__init__.py | 2 +- tests/conftest.py | 3 +-- tests/create_short_testvectors.py | 2 +- tests/cut_pcm.py | 3 +-- tests/hrtf_binary_loading/constants.py | 2 +- tests/hrtf_binary_loading/test_codec_ROM_vs_file.py | 1 - tests/hrtf_binary_loading/utils.py | 5 ++--- tests/scale_pcm.py | 2 -- tests/split_rendering/constants.py | 8 -------- tests/split_rendering/utils.py | 2 +- tests/test_26444.py | 1 - tests/test_param_file_ltv.py | 4 ++-- 26 files changed, 18 insertions(+), 61 deletions(-) diff --git a/ci/complexity_measurements/mergeNewsletterRam.py b/ci/complexity_measurements/mergeNewsletterRam.py index 40b5f75c59..d578b51c56 100755 --- a/ci/complexity_measurements/mergeNewsletterRam.py +++ b/ci/complexity_measurements/mergeNewsletterRam.py @@ -29,7 +29,6 @@ # accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and # the United Nations Convention on Contracts on the International Sales of Goods. import csv -import re import sys newsletterFilename = "" diff --git a/ci/complexity_measurements/mergeNewsletterRom.py b/ci/complexity_measurements/mergeNewsletterRom.py index 0e75f26f58..b46e6c5570 100755 --- a/ci/complexity_measurements/mergeNewsletterRom.py +++ b/ci/complexity_measurements/mergeNewsletterRom.py @@ -29,7 +29,6 @@ # accordance with the laws of the Federal Republic of Germany excluding its conflict of law rules and # the United Nations Convention on Contracts on the International Sales of Goods. import csv -import re import sys newsletterFilename = "" diff --git a/scripts/batch_comp_audio.py b/scripts/batch_comp_audio.py index 6854f41f30..ce1f380c56 100755 --- a/scripts/batch_comp_audio.py +++ b/scripts/batch_comp_audio.py @@ -33,7 +33,6 @@ import argparse import concurrent.futures import os -import pathlib import re import shutil import subprocess @@ -132,7 +131,7 @@ def main(args): if num_files_diff > 0: print(f"{num_files_diff} files differ/don't exist") else: - print(f"All files are bitexact") + print("All files are bitexact") def compare_files(f, fol1, fol2, outputs_dict, tool): diff --git a/scripts/mem_analysis.py b/scripts/mem_analysis.py index e3f3d8afe4..18d1e3a554 100644 --- a/scripts/mem_analysis.py +++ b/scripts/mem_analysis.py @@ -1,10 +1,7 @@ #!/usr/bin/env python3 import argparse -import csv import os -import struct -import sys import matplotlib.pyplot as plt import numpy as np diff --git a/scripts/prepare_combined_format_inputs.py b/scripts/prepare_combined_format_inputs.py index c081b75bb1..bb406a30b6 100755 --- a/scripts/prepare_combined_format_inputs.py +++ b/scripts/prepare_combined_format_inputs.py @@ -33,8 +33,7 @@ __license__ = """ import os import shutil -import numpy as np -from pyaudio3dtools import audioarray, audiofile +from pyaudio3dtools import audiofile def main(): diff --git a/scripts/pyaudio3dtools/__init__.py b/scripts/pyaudio3dtools/__init__.py index ccf53c51e1..3df489f582 100644 --- a/scripts/pyaudio3dtools/__init__.py +++ b/scripts/pyaudio3dtools/__init__.py @@ -40,4 +40,3 @@ Imports functions class """ -from . import audioarray, audiofile, spatialaudioformat diff --git a/scripts/pyaudio3dtools/audio3dtools.py b/scripts/pyaudio3dtools/audio3dtools.py index 0fec5c6ce9..22c26e28e8 100755 --- a/scripts/pyaudio3dtools/audio3dtools.py +++ b/scripts/pyaudio3dtools/audio3dtools.py @@ -30,11 +30,8 @@ the United Nations Convention on Contracts on the International Sales of Goods. """ -import argparse import logging -import os -from pyaudio3dtools import audiofile, spatialaudioformat main_logger = logging.getLogger("__main__") logger = main_logger.getChild(__name__) @@ -43,7 +40,7 @@ logger.setLevel(logging.DEBUG) def main(): print( - f"These scripts have been deprecated! Please check out and use the latest version from https://forge.3gpp.org/rep/ivas-codec-pc/ivas-processing-scripts.git" + "These scripts have been deprecated! Please check out and use the latest version from https://forge.3gpp.org/rep/ivas-codec-pc/ivas-processing-scripts.git" ) diff --git a/scripts/pyivastest/IvasBaseClass.py b/scripts/pyivastest/IvasBaseClass.py index bad578f753..c7c734c5c9 100644 --- a/scripts/pyivastest/IvasBaseClass.py +++ b/scripts/pyivastest/IvasBaseClass.py @@ -30,7 +30,6 @@ the United Nations Convention on Contracts on the International Sales of Goods. """ -import filecmp import json import logging import logging.handlers diff --git a/scripts/pyivastest/IvasModeCollector.py b/scripts/pyivastest/IvasModeCollector.py index 3255dc3a8a..90274544dc 100644 --- a/scripts/pyivastest/IvasModeCollector.py +++ b/scripts/pyivastest/IvasModeCollector.py @@ -34,8 +34,6 @@ import json import logging import os import os.path -import platform -import re from copy import deepcopy from pyivastest import IvasBaseClass, constants diff --git a/scripts/pyivastest/IvasModeRunner.py b/scripts/pyivastest/IvasModeRunner.py index 27f013ee8d..41dd4d20ab 100644 --- a/scripts/pyivastest/IvasModeRunner.py +++ b/scripts/pyivastest/IvasModeRunner.py @@ -35,8 +35,6 @@ import json import logging import logging.handlers import os -import platform -import re import subprocess import threading import time diff --git a/scripts/pyivastest/__init__.py b/scripts/pyivastest/__init__.py index 5ab768973f..71ab3180d3 100644 --- a/scripts/pyivastest/__init__.py +++ b/scripts/pyivastest/__init__.py @@ -40,13 +40,3 @@ Imports functions class """ -from . import ( - IvasBaseClass, - IvasModeAnalyzer, - IvasModeCollector, - IvasModeRunner, - IvasScriptsCommon, - IvasSvnBuilder, - constants, - ivas_svn, -) diff --git a/scripts/self_test.py b/scripts/self_test.py index c41e199939..714366bcf1 100755 --- a/scripts/self_test.py +++ b/scripts/self_test.py @@ -32,8 +32,6 @@ import errno -import multiprocessing -import operator import os import platform import re diff --git a/tests/codec_be_on_mr_nonselection/test_param_file.py b/tests/codec_be_on_mr_nonselection/test_param_file.py index 459964a186..9a1405c27e 100644 --- a/tests/codec_be_on_mr_nonselection/test_param_file.py +++ b/tests/codec_be_on_mr_nonselection/test_param_file.py @@ -357,9 +357,9 @@ def test_param_file_tests( metadata_differs = True except FileNotFoundError: if not dut_metadata_file.exists(): - print(f"DUT output metadata missing for expected file: " + md_file) + print("DUT output metadata missing for expected file: " + md_file) if not ref_metadata_file.exists(): - print(f"REF output metadata missing for expected file: " + md_file) + print("REF output metadata missing for expected file: " + md_file) metadata_differs = True if get_mld and get_mld_lim > 0: diff --git a/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py b/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py index 4f4c1a3271..5782982e9d 100644 --- a/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py +++ b/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py @@ -542,15 +542,15 @@ def sba_enc( if gain_flag != -1: short_tag_ext += f"_Gain{gain_flag}" if SID == 1: - short_tag_ext += f"_SID" + short_tag_ext += "_SID" if pca: - short_tag_ext += f"_pca" + short_tag_ext += "_pca" # to avoid conflicting names in case of parallel test execution, differentiate all cases long_tag_ext = "" if gain_flag != -1: long_tag_ext += f"_Gain{gain_flag}" if SID == 1: - long_tag_ext += f"_SID" + long_tag_ext += "_SID" dut_pkt_file = f"{dut_out_dir}/{tag_out}{long_tag_ext}.192" ref_pkt_file = f"{ref_out_dir}/{tag_out}{short_tag_ext}.192" ref_pkt_file_dutenc = f"{ref_out_dir}/{tag_out}{short_tag_ext}_dutenc.192" diff --git a/tests/codec_be_on_mr_selection/__init__.py b/tests/codec_be_on_mr_selection/__init__.py index 2ee63a30a5..bf530e5ebc 100644 --- a/tests/codec_be_on_mr_selection/__init__.py +++ b/tests/codec_be_on_mr_selection/__init__.py @@ -174,7 +174,7 @@ def run_check( if not is_ref_creation: if compare_bitstream: if not is_be_to_ref(dut_bitstream): - pytest.fail(f"Bitstream file differs from reference") + pytest.fail("Bitstream file differs from reference") dut_bitstream_to_decoder = dut_bitstream if error_pattern is not None: diff --git a/tests/conftest.py b/tests/conftest.py index bbe16f4715..da56b79c05 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -37,10 +37,9 @@ import os from tests import testconfig import pytest import platform -import tempfile import textwrap from pathlib import Path -from subprocess import STDOUT, CalledProcessError, TimeoutExpired, run +from subprocess import TimeoutExpired, run from typing import Optional, Union logger = logging.getLogger(__name__) diff --git a/tests/create_short_testvectors.py b/tests/create_short_testvectors.py index d80a328c14..e51f018f45 100755 --- a/tests/create_short_testvectors.py +++ b/tests/create_short_testvectors.py @@ -67,7 +67,7 @@ def collect_files(file_ids): for f in TEST_VECTOR_DIR.iterdir() if f.suffix == ".wav" and any([id in f.name for id in file_ids]) - and not "_cut" in f.name + and "_cut" not in f.name ] return files diff --git a/tests/cut_pcm.py b/tests/cut_pcm.py index 644a2ba1bc..2abc86b624 100755 --- a/tests/cut_pcm.py +++ b/tests/cut_pcm.py @@ -47,7 +47,6 @@ import platform import sys from pathlib import Path -import numpy as np HERE = Path(__file__).parent.resolve() SCRIPTS_DIR = str(HERE.joinpath("../scripts").resolve()) @@ -81,7 +80,7 @@ def cut_samples( ) if sample_rate is None and not str(in_file).endswith(".wav"): - raise ValueError(f"For non-wav files, samplerate must be explicitly given") + raise ValueError("For non-wav files, samplerate must be explicitly given") elif sample_rate is None: # set to default of pyaudio3dtools.audiofile.readfile -> for wav files it will be ignored anyway sample_rate = 48000 diff --git a/tests/hrtf_binary_loading/constants.py b/tests/hrtf_binary_loading/constants.py index 1524e9bf57..e2f8523106 100644 --- a/tests/hrtf_binary_loading/constants.py +++ b/tests/hrtf_binary_loading/constants.py @@ -33,7 +33,7 @@ import re from pathlib import Path -from tests.renderer.constants import OUTPUT_FORMATS_BINAURAL, SCRIPTS_DIR, TESTV_DIR +from tests.renderer.constants import SCRIPTS_DIR, TESTV_DIR TESTS_DIR = Path(__file__).parent diff --git a/tests/hrtf_binary_loading/test_codec_ROM_vs_file.py b/tests/hrtf_binary_loading/test_codec_ROM_vs_file.py index c66792c653..26a5e269d3 100644 --- a/tests/hrtf_binary_loading/test_codec_ROM_vs_file.py +++ b/tests/hrtf_binary_loading/test_codec_ROM_vs_file.py @@ -37,7 +37,6 @@ from tests.hrtf_binary_loading.utils import * from .constants import ( HRTF_TAGS, MC_BITRATE_FOR_FORMAT, - HRTF_TAG_DIFF_FROM_ROM, HRTF_TAG_SAME_AS_ROM, ) diff --git a/tests/hrtf_binary_loading/utils.py b/tests/hrtf_binary_loading/utils.py index 85d55a34d3..af150defb2 100644 --- a/tests/hrtf_binary_loading/utils.py +++ b/tests/hrtf_binary_loading/utils.py @@ -33,12 +33,11 @@ import os import sys import uuid -from typing import Dict, Optional +from typing import Optional import pytest -from tests.renderer.compare_audio import compare_audio_arrays -from tests.renderer.utils import check_BE, run_cmd, run_renderer, test_info +from tests.renderer.utils import check_BE, run_cmd, run_renderer from .constants import * diff --git a/tests/scale_pcm.py b/tests/scale_pcm.py index 614e8cef3f..356cdd90e1 100755 --- a/tests/scale_pcm.py +++ b/tests/scale_pcm.py @@ -10,9 +10,7 @@ sys.path.append(os.path.join(os.path.dirname(THIS_PATH), "../scripts")) import concurrent.futures -import numpy as np import pyaudio3dtools -import pyivastest def scale_folder(folder, factor): diff --git a/tests/split_rendering/constants.py b/tests/split_rendering/constants.py index 623d569376..73346c2980 100644 --- a/tests/split_rendering/constants.py +++ b/tests/split_rendering/constants.py @@ -32,14 +32,6 @@ from pathlib import Path -from tests.renderer.constants import ( - BIN_SUFFIX_MERGETARGET, - CUSTOM_LS_TO_TEST, - FORMAT_TO_FILE_COMPARETEST, - FORMAT_TO_FILE_SMOKETEST, - FORMAT_TO_METADATA_FILES, - METADATA_SCENES_TO_TEST, -) """ Set up paths """ TESTS_DIR = Path(__file__).parent diff --git a/tests/split_rendering/utils.py b/tests/split_rendering/utils.py index 3b37109e91..d5a27662f2 100644 --- a/tests/split_rendering/utils.py +++ b/tests/split_rendering/utils.py @@ -38,7 +38,7 @@ from typing import Tuple import numpy as np import pytest -from tests.renderer.utils import check_BE, run_cmd, test_info +from tests.renderer.utils import check_BE, run_cmd from tests.split_rendering.constants import * sys.path.append(SCRIPTS_DIR) diff --git a/tests/test_26444.py b/tests/test_26444.py index 3bcef2567a..c413be81e4 100644 --- a/tests/test_26444.py +++ b/tests/test_26444.py @@ -35,7 +35,6 @@ Execute tests specified via a parameter file. import filecmp import os import subprocess -from pathlib import Path import pytest diff --git a/tests/test_param_file_ltv.py b/tests/test_param_file_ltv.py index 44c6a388f8..41dfeae30e 100644 --- a/tests/test_param_file_ltv.py +++ b/tests/test_param_file_ltv.py @@ -355,9 +355,9 @@ def test_param_file_tests( metadata_differs = True except FileNotFoundError: if not dut_metadata_file.exists(): - print(f"DUT output metadata missing for expected file: " + md_file) + print("DUT output metadata missing for expected file: " + md_file) if not ref_metadata_file.exists(): - print(f"REF output metadata missing for expected file: " + md_file) + print("REF output metadata missing for expected file: " + md_file) metadata_differs = True if output_differs or metadata_differs: -- GitLab From 628460cbe4d69d90016ba988387903cbf21e96cb Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Tue, 12 Mar 2024 14:09:59 +0100 Subject: [PATCH 08/17] remove leftover debugging line --- tests/renderer/utils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/renderer/utils.py b/tests/renderer/utils.py index 52d1ccf19e..a538df7ee8 100644 --- a/tests/renderer/utils.py +++ b/tests/renderer/utils.py @@ -55,7 +55,6 @@ def test_info(request): def run_cmd(cmd, env=None): logging.info(f"\nRunning command\n{' '.join(cmd)}\n") - cmdJoin = " ".join(cmd) try: sp.run(cmd, check=True, capture_output=True, text=True, env=env) except sp.CalledProcessError as e: -- GitLab From 84bf1c5e26686a5204aaf0cacf06aa02d4a79712 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Wed, 13 Mar 2024 10:26:02 +0100 Subject: [PATCH 09/17] [revert] incorrectly removed imports --- scripts/pyivastest/__init__.py | 10 ++++++++++ tests/hrtf_binary_loading/constants.py | 2 +- tests/hrtf_binary_loading/test_codec_ROM_vs_file.py | 1 + tests/hrtf_binary_loading/utils.py | 2 +- tests/split_rendering/constants.py | 8 ++++++++ tests/split_rendering/utils.py | 2 +- 6 files changed, 22 insertions(+), 3 deletions(-) diff --git a/scripts/pyivastest/__init__.py b/scripts/pyivastest/__init__.py index 71ab3180d3..5ab768973f 100644 --- a/scripts/pyivastest/__init__.py +++ b/scripts/pyivastest/__init__.py @@ -40,3 +40,13 @@ Imports functions class """ +from . import ( + IvasBaseClass, + IvasModeAnalyzer, + IvasModeCollector, + IvasModeRunner, + IvasScriptsCommon, + IvasSvnBuilder, + constants, + ivas_svn, +) diff --git a/tests/hrtf_binary_loading/constants.py b/tests/hrtf_binary_loading/constants.py index e2f8523106..1524e9bf57 100644 --- a/tests/hrtf_binary_loading/constants.py +++ b/tests/hrtf_binary_loading/constants.py @@ -33,7 +33,7 @@ import re from pathlib import Path -from tests.renderer.constants import SCRIPTS_DIR, TESTV_DIR +from tests.renderer.constants import OUTPUT_FORMATS_BINAURAL, SCRIPTS_DIR, TESTV_DIR TESTS_DIR = Path(__file__).parent diff --git a/tests/hrtf_binary_loading/test_codec_ROM_vs_file.py b/tests/hrtf_binary_loading/test_codec_ROM_vs_file.py index 26a5e269d3..c66792c653 100644 --- a/tests/hrtf_binary_loading/test_codec_ROM_vs_file.py +++ b/tests/hrtf_binary_loading/test_codec_ROM_vs_file.py @@ -37,6 +37,7 @@ from tests.hrtf_binary_loading.utils import * from .constants import ( HRTF_TAGS, MC_BITRATE_FOR_FORMAT, + HRTF_TAG_DIFF_FROM_ROM, HRTF_TAG_SAME_AS_ROM, ) diff --git a/tests/hrtf_binary_loading/utils.py b/tests/hrtf_binary_loading/utils.py index af150defb2..c1b34c57cd 100644 --- a/tests/hrtf_binary_loading/utils.py +++ b/tests/hrtf_binary_loading/utils.py @@ -37,7 +37,7 @@ from typing import Optional import pytest -from tests.renderer.utils import check_BE, run_cmd, run_renderer +from tests.renderer.utils import check_BE, run_cmd, run_renderer, test_info from .constants import * diff --git a/tests/split_rendering/constants.py b/tests/split_rendering/constants.py index 73346c2980..623d569376 100644 --- a/tests/split_rendering/constants.py +++ b/tests/split_rendering/constants.py @@ -32,6 +32,14 @@ from pathlib import Path +from tests.renderer.constants import ( + BIN_SUFFIX_MERGETARGET, + CUSTOM_LS_TO_TEST, + FORMAT_TO_FILE_COMPARETEST, + FORMAT_TO_FILE_SMOKETEST, + FORMAT_TO_METADATA_FILES, + METADATA_SCENES_TO_TEST, +) """ Set up paths """ TESTS_DIR = Path(__file__).parent diff --git a/tests/split_rendering/utils.py b/tests/split_rendering/utils.py index d5a27662f2..3b37109e91 100644 --- a/tests/split_rendering/utils.py +++ b/tests/split_rendering/utils.py @@ -38,7 +38,7 @@ from typing import Tuple import numpy as np import pytest -from tests.renderer.utils import check_BE, run_cmd +from tests.renderer.utils import check_BE, run_cmd, test_info from tests.split_rendering.constants import * sys.path.append(SCRIPTS_DIR) -- GitLab From 50e695f134149a6bd795e81eca4cae32fc999f70 Mon Sep 17 00:00:00 2001 From: knj Date: Fri, 15 Mar 2024 15:41:09 +0100 Subject: [PATCH 10/17] record maximum absolute diff as property in XML report --- tests/cmp_pcm.py | 21 +++++++++++++------ tests/codec_be_on_mr_nonselection/__init__.py | 2 ++ .../test_masa_enc_dec.py | 20 ++++++++++++------ .../test_param_file.py | 10 ++++++--- .../test_sba_bs_dec_plc.py | 10 ++++++--- .../test_sba_bs_enc.py | 10 ++++++--- tests/conftest.py | 3 +-- tests/test_param_file_ltv.py | 5 +++++ 8 files changed, 58 insertions(+), 23 deletions(-) diff --git a/tests/cmp_pcm.py b/tests/cmp_pcm.py index 13a1c1ba5a..45cdf5b832 100755 --- a/tests/cmp_pcm.py +++ b/tests/cmp_pcm.py @@ -49,21 +49,30 @@ def cmp_pcm(file1, file2, out_config, fs, get_mld=False, mld_lim=0) -> (int, str s1, s2, fs, per_frame=False, get_mld=get_mld ) - if cmp_result["bitexact"]: - return 0, "SUCCESS: Files are bitexact" - else: + output_differs = 0 + reason = "SUCCESS: Files are bitexact" + + if not cmp_result["bitexact"]: diff_msg = f"MAXIMUM ABS DIFF ==> {cmp_result['max_abs_diff']} at sample num {cmp_result['max_abs_diff_pos_sample']} (assuming {nchannels} channels)" first_msg = f"First diff found at sample num {cmp_result['first_diff_pos_sample']} in channel {cmp_result['first_diff_pos_channel']}, frame {cmp_result['first_diff_pos_frame']} (assuming {nchannels} channels, {fs} sampling rate)" print(diff_msg) print(first_msg) + + reason = f"Non-BE - MAXIMUM ABS DIFF: {cmp_result['max_abs_diff']}" + output_differs = 1 + if get_mld: mld_msg = f"MLD: {cmp_result['MLD']}" + reason += " - " + mld_msg print(mld_msg) + if cmp_result["MLD"] <= mld_lim: - return 0, f"MLD: {cmp_result['MLD']} <= {mld_lim}" + output_differs = 0 + reason += f" <= {mld_lim}" else: - return 1, f"MLD: {cmp_result['MLD']} > {mld_lim}" - return 1, "Non-BE" + reason += f" > {mld_lim}" + + return output_differs, reason if __name__ == "__main__": diff --git a/tests/codec_be_on_mr_nonselection/__init__.py b/tests/codec_be_on_mr_nonselection/__init__.py index e69de29bb2..aba85788e7 100644 --- a/tests/codec_be_on_mr_nonselection/__init__.py +++ b/tests/codec_be_on_mr_nonselection/__init__.py @@ -0,0 +1,2 @@ +MLD_PATTERN = r"MLD: ([\d\.]*)" +MAX_DIFF_PATTERN = r"MAXIMUM ABS DIFF: (\d*)" diff --git a/tests/codec_be_on_mr_nonselection/test_masa_enc_dec.py b/tests/codec_be_on_mr_nonselection/test_masa_enc_dec.py index 75b01db382..470f2618d0 100644 --- a/tests/codec_be_on_mr_nonselection/test_masa_enc_dec.py +++ b/tests/codec_be_on_mr_nonselection/test_masa_enc_dec.py @@ -35,6 +35,7 @@ __doc__ = """ import errno import os +import re from filecmp import cmp from typing import Optional @@ -43,6 +44,8 @@ import pytest from tests.cmp_pcm import cmp_pcm from tests.conftest import DecoderFrontend, EncoderFrontend +from . import MLD_PATTERN, MAX_DIFF_PATTERN + # params # output_mode_list = ['MONO', 'STEREO', '5_1', '7_1', '5_1_2', '5_1_4', '7_1_4', 'FOA', 'HOA2', 'HOA3', 'BINAURAL', 'BINAURAL_ROOM', 'EXT'] output_mode_list = ["BINAURAL", "EXT"] @@ -216,11 +219,13 @@ def test_masa_enc_dec( mld_lim=get_mld_lim, ) if get_mld: - mld = 0 - if "MLD" in reason: - mld = float(reason.split(":")[1].split()[0]) + mld = re.search(MLD_PATTERN, reason).groups(1)[0] record_property("MLD", mld) + search_result = re.search(MAX_DIFF_PATTERN, reason) + max_diff = search_result.groups(1)[0] + record_property("MAXIMUM ABS DIFF", max_diff) + if get_mld and get_mld_lim > 0: if pcmcmp_res != 0: pytest.fail(reason) @@ -248,10 +253,13 @@ def test_masa_enc_dec( mld_lim=get_mld_lim, ) if get_mld: - mld = 0 - if "MLD" in reason: - mld = float(reason.split(":")[1].split()[0]) + mld = re.search(MLD_PATTERN, reason).groups(1)[0] record_property("MLD", mld) + + search_result = re.search(MAX_DIFF_PATTERN, reason) + max_diff = search_result.groups(1)[0] + record_property("MAXIMUM ABS DIFF", max_diff) + # Report compare result if cmp_result != 0: pytest.fail(reason) diff --git a/tests/codec_be_on_mr_nonselection/test_param_file.py b/tests/codec_be_on_mr_nonselection/test_param_file.py index 459964a186..e51bd2defa 100644 --- a/tests/codec_be_on_mr_nonselection/test_param_file.py +++ b/tests/codec_be_on_mr_nonselection/test_param_file.py @@ -35,6 +35,7 @@ Execute tests specified via a parameter file. import errno import filecmp import os +import re import platform from pathlib import Path from subprocess import run @@ -45,6 +46,7 @@ from tests.cmp_pcm import cmp_pcm from tests.conftest import DecoderFrontend, EncoderFrontend from tests.cut_pcm import cut_samples from tests.testconfig import PARAM_FILE +from . import MLD_PATTERN, MAX_DIFF_PATTERN VALID_DEC_OUTPUT_CONF = [ "MONO", @@ -342,11 +344,13 @@ def test_param_file_tests( md_out_files = get_expected_md_files(ref_output_file, enc_split, output_config) if get_mld: - mld = 0 - if "MLD" in reason: - mld = float(reason.split(":")[1].split()[0]) + mld = re.search(MLD_PATTERN, reason).groups(1)[0] record_property("MLD", mld) + search_result = re.search(MAX_DIFF_PATTERN, reason) + max_diff = search_result.groups(1)[0] + record_property("MAXIMUM ABS DIFF", max_diff) + metadata_differs = False for md_file in md_out_files: dut_metadata_file = Path(f"{dut_base_path}/param_file/dec/{md_file}") diff --git a/tests/codec_be_on_mr_nonselection/test_sba_bs_dec_plc.py b/tests/codec_be_on_mr_nonselection/test_sba_bs_dec_plc.py index 11a8aeca04..11b0cfc4c0 100644 --- a/tests/codec_be_on_mr_nonselection/test_sba_bs_dec_plc.py +++ b/tests/codec_be_on_mr_nonselection/test_sba_bs_dec_plc.py @@ -34,11 +34,13 @@ __doc__ = """ import errno import os +import re import pytest from tests.cmp_pcm import cmp_pcm from tests.conftest import DecoderFrontend +from . import MLD_PATTERN, MAX_DIFF_PATTERN # params tag_list = ["stvFOA"] @@ -209,11 +211,13 @@ def sba_dec_plc( mld_lim=get_mld_lim, ) if get_mld: - mld = 0 - if "MLD" in reason: - mld = float(reason.split(":")[1].split()[0]) + mld = re.search(MLD_PATTERN, reason).groups(1)[0] record_property("MLD", mld) + search_result = re.search(MAX_DIFF_PATTERN, reason) + max_diff = search_result.groups(1)[0] + record_property("MAXIMUM ABS DIFF", max_diff) + # report compare result if cmp_result != 0: pytest.fail(reason) diff --git a/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py b/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py index 4f4c1a3271..3298665eb0 100644 --- a/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py +++ b/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py @@ -35,6 +35,7 @@ __doc__ = """ import errno import os +import re import pytest from cut_bs import cut_from_start @@ -42,6 +43,7 @@ from cut_bs import cut_from_start from tests.cmp_pcm import cmp_pcm from tests.conftest import DecoderFrontend, EncoderFrontend from tests.cut_pcm import cut_samples +from . import MLD_PATTERN, MAX_DIFF_PATTERN # params @@ -727,11 +729,13 @@ def sba_dec( mld_lim=get_mld_lim, ) if get_mld: - mld = 0 - if "MLD" in reason: - mld = float(reason.split(":")[1].split()[0]) + mld = re.search(MLD_PATTERN, reason).groups(1)[0] record_property("MLD", mld) + search_result = re.search(MAX_DIFF_PATTERN, reason) + max_diff = search_result.groups(1)[0] + record_property("MAXIMUM ABS DIFF", max_diff) + # report compare result if cmp_result != 0: pytest.fail(reason) diff --git a/tests/conftest.py b/tests/conftest.py index 37b5281403..07004cad09 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -37,10 +37,9 @@ import os from tests import testconfig import pytest import platform -import tempfile import textwrap from pathlib import Path -from subprocess import STDOUT, CalledProcessError, TimeoutExpired, run +from subprocess import TimeoutExpired, run from typing import Optional, Union logger = logging.getLogger(__name__) diff --git a/tests/test_param_file_ltv.py b/tests/test_param_file_ltv.py index 44c6a388f8..15ce69b177 100644 --- a/tests/test_param_file_ltv.py +++ b/tests/test_param_file_ltv.py @@ -35,6 +35,7 @@ Execute tests specified via a parameter file. import errno import filecmp import os +import re import platform from pathlib import Path from subprocess import run @@ -345,6 +346,10 @@ def test_param_file_tests( mld = float(reason.split(":")[1].split()[0]) record_property("MLD", mld) + search_result = re.search(MAX_DIFF_PATTERN, reason) + max_diff = search_result.groups(1)[0] + record_property("MAXIMUM ABS DIFF", max_diff) + metadata_differs = False for md_file in md_out_files: dut_metadata_file = Path(f"{dut_base_path}/param_file/dec/{md_file}") -- GitLab From 1ff71bb0403a23b8417e711ae0543332d9f8a6fa Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Mon, 18 Mar 2024 11:23:57 +0100 Subject: [PATCH 11/17] fix for #1021, fix compile error caused by the merge from main and the resolving of a conflict --- lib_dec/ivas_ism_renderer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib_dec/ivas_ism_renderer.c b/lib_dec/ivas_ism_renderer.c index e5aa0b4745..0b54e6c7fe 100644 --- a/lib_dec/ivas_ism_renderer.c +++ b/lib_dec/ivas_ism_renderer.c @@ -292,7 +292,8 @@ void ivas_ism_render_sf( if ( renderer_type != RENDERER_BINAURAL_MIXER_CONV_ROOM ) #else if ( st_ivas->renderer_type != RENDERER_BINAURAL_MIXER_CONV_ROOM ) -#endif { +#endif + { st_ivas->hTcBuffer->subframes_rendered += 1; st_ivas->hTcBuffer->slots_rendered += st_ivas->hTcBuffer->subframe_nbslots[subframe_idx]; } -- GitLab From 1886d26fc6d3d89715c2a27d7de6862c3163594a Mon Sep 17 00:00:00 2001 From: Stefan Bayer Date: Mon, 18 Mar 2024 11:33:08 +0100 Subject: [PATCH 12/17] fix for #1021, clang-format --- lib_dec/ivas_ism_renderer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_dec/ivas_ism_renderer.c b/lib_dec/ivas_ism_renderer.c index 0b54e6c7fe..33e05a0e6a 100644 --- a/lib_dec/ivas_ism_renderer.c +++ b/lib_dec/ivas_ism_renderer.c @@ -292,8 +292,8 @@ void ivas_ism_render_sf( if ( renderer_type != RENDERER_BINAURAL_MIXER_CONV_ROOM ) #else if ( st_ivas->renderer_type != RENDERER_BINAURAL_MIXER_CONV_ROOM ) -#endif - { +#endif + { st_ivas->hTcBuffer->subframes_rendered += 1; st_ivas->hTcBuffer->slots_rendered += st_ivas->hTcBuffer->subframe_nbslots[subframe_idx]; } -- GitLab From 8b5f1bee8455cc4b850c7a53e3977c9c0345b6cc Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 18 Mar 2024 14:16:59 +0100 Subject: [PATCH 13/17] fix for no failures --- .../codec_be_on_mr_nonselection/test_masa_enc_dec.py | 12 ++++++++---- tests/codec_be_on_mr_nonselection/test_param_file.py | 6 ++++-- .../test_sba_bs_dec_plc.py | 6 ++++-- tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py | 6 ++++-- tests/test_param_file_ltv.py | 11 ++++++----- 5 files changed, 26 insertions(+), 15 deletions(-) diff --git a/tests/codec_be_on_mr_nonselection/test_masa_enc_dec.py b/tests/codec_be_on_mr_nonselection/test_masa_enc_dec.py index 470f2618d0..9dc8ce9e6d 100644 --- a/tests/codec_be_on_mr_nonselection/test_masa_enc_dec.py +++ b/tests/codec_be_on_mr_nonselection/test_masa_enc_dec.py @@ -222,8 +222,10 @@ def test_masa_enc_dec( mld = re.search(MLD_PATTERN, reason).groups(1)[0] record_property("MLD", mld) - search_result = re.search(MAX_DIFF_PATTERN, reason) - max_diff = search_result.groups(1)[0] + max_diff = 0 + if pcmcmp_res: + search_result = re.search(MAX_DIFF_PATTERN, reason) + max_diff = search_result.groups(1)[0] record_property("MAXIMUM ABS DIFF", max_diff) if get_mld and get_mld_lim > 0: @@ -256,8 +258,10 @@ def test_masa_enc_dec( mld = re.search(MLD_PATTERN, reason).groups(1)[0] record_property("MLD", mld) - search_result = re.search(MAX_DIFF_PATTERN, reason) - max_diff = search_result.groups(1)[0] + max_diff = 0 + if pcmcmp_res: + search_result = re.search(MAX_DIFF_PATTERN, reason) + max_diff = search_result.groups(1)[0] record_property("MAXIMUM ABS DIFF", max_diff) # Report compare result diff --git a/tests/codec_be_on_mr_nonselection/test_param_file.py b/tests/codec_be_on_mr_nonselection/test_param_file.py index e51bd2defa..f206caed4e 100644 --- a/tests/codec_be_on_mr_nonselection/test_param_file.py +++ b/tests/codec_be_on_mr_nonselection/test_param_file.py @@ -347,8 +347,10 @@ def test_param_file_tests( mld = re.search(MLD_PATTERN, reason).groups(1)[0] record_property("MLD", mld) - search_result = re.search(MAX_DIFF_PATTERN, reason) - max_diff = search_result.groups(1)[0] + max_diff =0 + if output_differs: + search_result = re.search(MAX_DIFF_PATTERN, reason) + max_diff = search_result.groups(1)[0] record_property("MAXIMUM ABS DIFF", max_diff) metadata_differs = False diff --git a/tests/codec_be_on_mr_nonselection/test_sba_bs_dec_plc.py b/tests/codec_be_on_mr_nonselection/test_sba_bs_dec_plc.py index 11b0cfc4c0..5b52b9bd2f 100644 --- a/tests/codec_be_on_mr_nonselection/test_sba_bs_dec_plc.py +++ b/tests/codec_be_on_mr_nonselection/test_sba_bs_dec_plc.py @@ -214,8 +214,10 @@ def sba_dec_plc( mld = re.search(MLD_PATTERN, reason).groups(1)[0] record_property("MLD", mld) - search_result = re.search(MAX_DIFF_PATTERN, reason) - max_diff = search_result.groups(1)[0] + max_diff = 0 + if cmp_result: + search_result = re.search(MAX_DIFF_PATTERN, reason) + max_diff = search_result.groups(1)[0] record_property("MAXIMUM ABS DIFF", max_diff) # report compare result diff --git a/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py b/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py index 3298665eb0..47eb8a3d42 100644 --- a/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py +++ b/tests/codec_be_on_mr_nonselection/test_sba_bs_enc.py @@ -732,8 +732,10 @@ def sba_dec( mld = re.search(MLD_PATTERN, reason).groups(1)[0] record_property("MLD", mld) - search_result = re.search(MAX_DIFF_PATTERN, reason) - max_diff = search_result.groups(1)[0] + max_diff = 0 + if cmp_result: + search_result = re.search(MAX_DIFF_PATTERN, reason) + max_diff = search_result.groups(1)[0] record_property("MAXIMUM ABS DIFF", max_diff) # report compare result diff --git a/tests/test_param_file_ltv.py b/tests/test_param_file_ltv.py index 15ce69b177..a32ceb2412 100644 --- a/tests/test_param_file_ltv.py +++ b/tests/test_param_file_ltv.py @@ -45,6 +45,7 @@ import pytest from tests.cmp_pcm import cmp_pcm from tests.conftest import DecoderFrontend, EncoderFrontend from tests.cut_pcm import cut_samples +from .codec_be_on_mr_nonselection import MLD_PATTERN, MAX_DIFF_PATTERN # from tests.testconfig import PARAM_FILE @@ -341,13 +342,13 @@ def test_param_file_tests( md_out_files = get_expected_md_files(ref_output_file, enc_split, output_config) if get_mld: - mld = 0 - if "MLD" in reason: - mld = float(reason.split(":")[1].split()[0]) + mld = re.search(MLD_PATTERN, reason).groups(1)[0] record_property("MLD", mld) - search_result = re.search(MAX_DIFF_PATTERN, reason) - max_diff = search_result.groups(1)[0] + max_diff = 0 + if output_differs: + search_result = re.search(MAX_DIFF_PATTERN, reason) + max_diff = search_result.groups(1)[0] record_property("MAXIMUM ABS DIFF", max_diff) metadata_differs = False -- GitLab From fa428a2c31c646f49000508087b68b728023e96e Mon Sep 17 00:00:00 2001 From: knj Date: Mon, 18 Mar 2024 16:01:04 +0100 Subject: [PATCH 14/17] fix mld value from cmp_pcm and add parsing of more than 1 property --- scripts/parse_mld_xml.py | 25 ++++++++++++++++--------- tests/cmp_pcm.py | 20 ++++++++++---------- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/scripts/parse_mld_xml.py b/scripts/parse_mld_xml.py index fb1dc8e73a..088789903d 100644 --- a/scripts/parse_mld_xml.py +++ b/scripts/parse_mld_xml.py @@ -7,6 +7,9 @@ from xml.etree import ElementTree Parse a junit report and create a MLD summary report. """ +PROPERTIES = ["MLD", "MAXIMUM ABS DIFF"] + + # Main routine if __name__ == "__main__": parser = argparse.ArgumentParser( @@ -32,9 +35,12 @@ if __name__ == "__main__": testcases = tree.findall(".//testcase") with open(csv_file, "w") as outfile: + headerline = ";".join(["testcase"] + PROPERTIES) + "\n" + outfile.write(headerline) + for testcase in testcases: - if testcase.find(".//skipped") == None: - if testcase.get("file") == None: + if testcase.find(".//skipped") is None: + if testcase.get("file") is None: fulltestname = ( testcase.get("classname").replace(".", "/") + ".py::" @@ -42,10 +48,11 @@ if __name__ == "__main__": ) else: fulltestname = testcase.get("file") + "::" + testcase.get("name") - if testcase.find(".//property") == None: - mld_val = None - else: - mld_val = testcase.find(".//property").get( - "value" - ) # Currently MLD is the only set property. If more are added updates are needed here. - outfile.write(fulltestname + ";" + str(mld_val) + "\n") + + properties_found = { + p.get("name"): p.get("value") + for p in testcase.findall(".//property") + } + properties_values = [str(properties_found.get(p)) for p in PROPERTIES] + outline = ";".join([fulltestname] + properties_values) + "\n" + outfile.write(outline) diff --git a/tests/cmp_pcm.py b/tests/cmp_pcm.py index 45cdf5b832..c7df4b800d 100755 --- a/tests/cmp_pcm.py +++ b/tests/cmp_pcm.py @@ -61,16 +61,16 @@ def cmp_pcm(file1, file2, out_config, fs, get_mld=False, mld_lim=0) -> (int, str reason = f"Non-BE - MAXIMUM ABS DIFF: {cmp_result['max_abs_diff']}" output_differs = 1 - if get_mld: - mld_msg = f"MLD: {cmp_result['MLD']}" - reason += " - " + mld_msg - print(mld_msg) - - if cmp_result["MLD"] <= mld_lim: - output_differs = 0 - reason += f" <= {mld_lim}" - else: - reason += f" > {mld_lim}" + if get_mld: + mld_msg = f"MLD: {cmp_result['MLD']}" + reason += " - " + mld_msg + print(mld_msg) + + if cmp_result["MLD"] <= mld_lim: + output_differs = 0 + reason += f" <= {mld_lim}" + else: + reason += f" > {mld_lim}" return output_differs, reason -- GitLab From b8b8ce08f4b8bd450852e1be2b034d1a1c44f9a8 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 19 Mar 2024 08:23:37 +0100 Subject: [PATCH 15/17] revert unintended MSVC project changes --- Workspace_msvc/encoder.vcxproj | 180 +++++++ Workspace_msvc/lib_debug.vcxproj | 123 +++++ Workspace_msvc/lib_dec.vcxproj.filters | 572 ++++++++++++++++++++++ Workspace_msvc/lib_enc.vcxproj.filters | 629 +++++++++++++++++++++++++ Workspace_msvc/lib_lc3plus.vcxproj | 185 ++++++++ 5 files changed, 1689 insertions(+) create mode 100644 Workspace_msvc/encoder.vcxproj create mode 100644 Workspace_msvc/lib_debug.vcxproj create mode 100644 Workspace_msvc/lib_dec.vcxproj.filters create mode 100644 Workspace_msvc/lib_enc.vcxproj.filters create mode 100644 Workspace_msvc/lib_lc3plus.vcxproj diff --git a/Workspace_msvc/encoder.vcxproj b/Workspace_msvc/encoder.vcxproj new file mode 100644 index 0000000000..309dc15253 --- /dev/null +++ b/Workspace_msvc/encoder.vcxproj @@ -0,0 +1,180 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + encoder + {B3FC9DFC-7268-8660-7C0D-B60BAF02C554} + encoder + 10.0.17763.0 + + + + Application + v141 + false + MultiByte + + + Application + v141 + false + MultiByte + + + + + + + + + + + + + + + <_ProjectFileVersion>15.0.27428.2015 + + + ..\ + .\Debug_$(ProjectName)\ + false + false + IVAS_cod + + + ..\ + .\Release_$(ProjectName)\ + false + false + IVAS_cod + + + + + + + $(IntDir)$(ProjectName).tlb + + + + Disabled + ..\lib_enc;..\lib_com;..\lib_util;..\lib_debug;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;WIN32;$(Macros);%(PreprocessorDefinitions) + + EnableFastChecks + MultiThreadedDebug + false + + + $(IntDir)$(ProjectName).pdb + Level4 + true + OldStyle + Default + %(DisableSpecificWarnings) + false + + + _DEBUG;%(PreprocessorDefinitions) + 0x0c0c + + + + $(OutDir)$(TargetName).exe + true + + false + true + $(IntDir)$(ProjectName).pdb + Console + + false + + MachineX86 + + + + + + + + + + + $(IntDir)$(ProjectName).tlb + + + + MaxSpeed + AnySuitable + false + Neither + false + false + ..\lib_enc;..\lib_com;..\lib_util;..\lib_debug;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;$(Macros);%(PreprocessorDefinitions) + true + + Default + MultiThreaded + true + Precise + false + + + $(IntDir)$(ProjectName).pdb + Level4 + true + + Default + %(DisableSpecificWarnings) + false + + + NDEBUG;%(PreprocessorDefinitions) + 0x0c0c + + + $(OutDir)$(TargetName).exe + true + + false + $(IntDir)$(ProjectName).pdb + Console + false + + MachineX86 + + + + + + + + {824da4cf-06f0-45c9-929a-8792f0e19c3e} + false + + + {2fa8f384-0775-f3b7-f8c3-85209222fc70} + false + + + + + + + + + + + \ No newline at end of file diff --git a/Workspace_msvc/lib_debug.vcxproj b/Workspace_msvc/lib_debug.vcxproj new file mode 100644 index 0000000000..5e986bb167 --- /dev/null +++ b/Workspace_msvc/lib_debug.vcxproj @@ -0,0 +1,123 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {54509728-928B-44D9-A118-A6F92F08B34F} + debug + 10.0.17763.0 + + + + StaticLibrary + v141 + MultiByte + + + StaticLibrary + v141 + MultiByte + true + + + + + + + + + + + + + <_ProjectFileVersion>15.0.27428.2015 + + + .\Debug_$(ProjectName)\ + .\Debug_$(ProjectName)\ + libivasdebug + + + .\Release_$(ProjectName)\ + .\Release_$(ProjectName)\ + libivasdebug + + + + + + + Disabled + ..\lib_com;..\lib_debug;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;$(Macros);%(PreprocessorDefinitions) + false + + EnableFastChecks + MultiThreadedDebug + false + $(IntDir)$(ProjectName).pdb + Level4 + OldStyle + Default + %(DisableSpecificWarnings) + false + + + $(OutDir)$(TargetName).lib + + + + + + + + MaxSpeed + AnySuitable + false + false + ..\lib_com;..\lib_debug;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_WARNINGS;$(Macros);%(PreprocessorDefinitions) + true + + Default + MultiThreaded + true + $(IntDir)$(ProjectName).pdb + Level4 + + Default + %(DisableSpecificWarnings) + false + + + $(OutDir)$(TargetName).lib + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Workspace_msvc/lib_dec.vcxproj.filters b/Workspace_msvc/lib_dec.vcxproj.filters new file mode 100644 index 0000000000..8eddbb60a0 --- /dev/null +++ b/Workspace_msvc/lib_dec.vcxproj.filters @@ -0,0 +1,572 @@ + + + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_ivas_c + + + decoder_evs_c + + + decoder_evs_c + + + decoder_evs_c + + + decoder_evs_c + + + decoder_evs_c + + + decoder_evs_c + + + decoder_evs_c + + + decoder_evs_c + + + decoder_evs_c + + + decoder_evs_c + + + decoder_evs_c + + + decoder_evs_c + + + decoder_evs_c + + + decoder_evs_c + + + decoder_evs_c + + + decoder_evs_c + + + decoder_evs_c + + + decoder_evs_c + + + decoder_evs_c + + + decoder_evs_c + + + decoder_evs_c + + + decoder_evs_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + decoder_all_c + + + + + + decoder_h + + + decoder_h + + + decoder_h + + + decoder_h + + + decoder_h + + + decoder_h + + + decoder_h + + + decoder_h + + + decoder_h + + + decoder_h + + + decoder_h + + + decoder_h + + + + + + {f63b6db2-97ec-4d8d-be9c-e798ac8bb645} + + + {0853864e-7de7-411d-975b-5045652f22c3} + + + {e29aae34-aeeb-45dd-a986-61b39890c5bb} + + + {c33b80b3-67ce-466b-91c0-4adfc9efcb5c} + + + \ No newline at end of file diff --git a/Workspace_msvc/lib_enc.vcxproj.filters b/Workspace_msvc/lib_enc.vcxproj.filters new file mode 100644 index 0000000000..e74f441c4c --- /dev/null +++ b/Workspace_msvc/lib_enc.vcxproj.filters @@ -0,0 +1,629 @@ + + + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_evs_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_all_c + + + enc_evs_c + + + enc_evs_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_all_c + + + enc_evs_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + enc_ivas_c + + + + + enc_h + + + enc_h + + + enc_h + + + enc_h + + + + + + {b7ee0526-8b79-4554-a3ec-04e51d38475f} + + + {dabed049-70a2-48f2-9da6-3b81a3664033} + + + {5717f1cb-c593-400b-b23a-45c422fd95c8} + + + {6cccabbe-510f-43d3-90e1-8ed5ea3837d7} + + + \ No newline at end of file diff --git a/Workspace_msvc/lib_lc3plus.vcxproj b/Workspace_msvc/lib_lc3plus.vcxproj new file mode 100644 index 0000000000..a2e45cb609 --- /dev/null +++ b/Workspace_msvc/lib_lc3plus.vcxproj @@ -0,0 +1,185 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {95030B82-70CD-4C6B-84D4-61096035BEA2} + Win32Proj + LC3_FL + 10.0.17763.0 + + + + StaticLibrary + true + v141 + Unicode + + + StaticLibrary + false + v141 + true + Unicode + + + + + + + + + + + + + + + liblc3plus + .\Debug_$(ProjectName)\ + .\Debug_$(ProjectName)\ + + + LC3plus + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\Obj\ + + + + + + Level3 + ..\lib_com;%(AdditionalIncludeDirectories) + Disabled + MultiThreadedDebug + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + 4305;4244;4996 + OldStyle + false + false + + + Console + true + + + + + Level3 + + + ..\lib_com;%(AdditionalIncludeDirectories) + MaxSpeed + MultiThreaded + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + 4244;4305;4996 + false + + + Console + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- GitLab From 9415752b93ca7ba1fd8bfe6d16e0dfedb19ad925 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 19 Mar 2024 08:25:06 +0100 Subject: [PATCH 16/17] revert unintended MSVC project changes --- Workspace_msvc/lib_rend.vcxproj.filters | 221 ++++++++++++++++++++++++ 1 file changed, 221 insertions(+) create mode 100644 Workspace_msvc/lib_rend.vcxproj.filters diff --git a/Workspace_msvc/lib_rend.vcxproj.filters b/Workspace_msvc/lib_rend.vcxproj.filters new file mode 100644 index 0000000000..942c63712f --- /dev/null +++ b/Workspace_msvc/lib_rend.vcxproj.filters @@ -0,0 +1,221 @@ + + + + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + rend_c + + + + + + rend_h + + + rend_h + + + rend_h + + + rend_h + + + rend_h + + + rend_h + + + rend_h + + + rend_h + + + rend_h + + + rend_h + + + rend_h + + + + + {54449ece-ef29-44b5-9512-ed8f555851a8} + + + {672b0eb6-cce8-425c-8bf2-aba4b45639bb} + + + \ No newline at end of file -- GitLab From aaf0aa591edc7d6b48af83590cf924f3126cbbf6 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Tue, 19 Mar 2024 15:44:57 +0100 Subject: [PATCH 17/17] Remove obsolete parse_mld.py and add sorting of results in parse_mld_xml.py --- scripts/parse_mld.py | 32 ---------------------------- scripts/parse_mld_xml.py | 46 +++++++++++++++++++++++----------------- 2 files changed, 26 insertions(+), 52 deletions(-) delete mode 100644 scripts/parse_mld.py diff --git a/scripts/parse_mld.py b/scripts/parse_mld.py deleted file mode 100644 index b999e83903..0000000000 --- a/scripts/parse_mld.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/python3 - -import argparse -import re - -# Main routine -if __name__ == "__main__": - parser = argparse.ArgumentParser( - description="Parse HTML report to extract MLD values" - ) - parser.add_argument( - "html_report", type=str, help="HTML report input file, e.g. report.html" - ) - parser.add_argument("csv_file", type=str, help="Output CSV file, e.g. output.csv") - args = parser.parse_args() - html_report = args.html_report - csv_file = args.csv_file - - mld = {} - - with open(html_report, "r") as infile: - for line in infile.readlines(): - if "col-name" in line: - test_name = re.search("\[(.*)\]", line).group(1) - mld[test_name] = 0.0 - if "MLD" in line: - mld_val = float(line.split()[1]) - mld[test_name] = mld_val - - with open(csv_file, "w") as outfile: - for test_name in mld: - outfile.write(test_name + ";" + str(mld[test_name]) + "\n") diff --git a/scripts/parse_mld_xml.py b/scripts/parse_mld_xml.py index 088789903d..84acf4fbba 100644 --- a/scripts/parse_mld_xml.py +++ b/scripts/parse_mld_xml.py @@ -4,7 +4,7 @@ import argparse from xml.etree import ElementTree """ -Parse a junit report and create a MLD summary report. +Parse a junit report and create an MLD summary report. """ PROPERTIES = ["MLD", "MAXIMUM ABS DIFF"] @@ -33,26 +33,32 @@ if __name__ == "__main__": ) testcases = tree.findall(".//testcase") + + results_unsorted = {} + + for testcase in testcases: + if testcase.find(".//skipped") is None: + if testcase.get("file") is None: + fulltestname = ( + testcase.get("classname").replace(".", "/") + + ".py::" + + testcase.get("name") + ) + else: + fulltestname = testcase.get("file") + "::" + testcase.get("name") + + properties_found = { + p.get("name"): p.get("value") + for p in testcase.findall(".//property") + } + properties_values = [str(properties_found.get(p)) for p in PROPERTIES] + outline = ";".join([fulltestname] + properties_values) + "\n" + results_unsorted[fulltestname] = outline + + results_sorted = dict(sorted(results_unsorted.items())) with open(csv_file, "w") as outfile: headerline = ";".join(["testcase"] + PROPERTIES) + "\n" outfile.write(headerline) - - for testcase in testcases: - if testcase.find(".//skipped") is None: - if testcase.get("file") is None: - fulltestname = ( - testcase.get("classname").replace(".", "/") - + ".py::" - + testcase.get("name") - ) - else: - fulltestname = testcase.get("file") + "::" + testcase.get("name") - - properties_found = { - p.get("name"): p.get("value") - for p in testcase.findall(".//property") - } - properties_values = [str(properties_found.get(p)) for p in PROPERTIES] - outline = ";".join([fulltestname] + properties_values) + "\n" - outfile.write(outline) + for test in results_sorted: + outfile.write(results_sorted[test]) -- GitLab