From 67e0c650504a0bdd6255a2dbbab4f888392c9010 Mon Sep 17 00:00:00 2001 From: Vidhya V P <100825@ittiam.com> Date: Wed, 30 Aug 2023 14:54:40 +0530 Subject: [PATCH 01/14] Removing unused functions --- lib_com/ivas_prot.h | 4 ++-- lib_com/options.h | 2 +- lib_dec/ivas_qmetadata_dec.c | 8 ++++---- lib_enc/ivas_qmetadata_enc.c | 16 ++++++++-------- lib_enc/ivas_sba_enc.c | 3 ++- 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index a9fba371ab..da364a4317 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -110,12 +110,12 @@ ivas_error mct_enc_reconfigure( ivas_error ivas_sba_enc_reconfigure( Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ ); - +#ifndef REMOVE_UNUSED_FUNCTION /*! r: maximum SBA metadata bit-budget */ int16_t ivas_sba_get_max_md_bits( Encoder_Struct *st_ivas /* i/o: IVAS encoder structure */ ); - +#endif void destroy_sce_enc( SCE_ENC_HANDLE hSCE /* i/o: SCE encoder structure */ ); diff --git a/lib_com/options.h b/lib_com/options.h index be3261f808..7e26136def 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -167,7 +167,7 @@ #define FIX_718_JBM_MD_UDPATE /* Fhg: fix issue #718, wrong setting of the update flag in the TD obj renderer in the JBM path */ #define FIX_719_CRASH_IN_CLEANUP /* VA: issue 719: fix Decoder crash after call to goto to cleanup */ - +#define REMOVE_UNUSED_FUNCTION /* Dlb: Remove functions that are unhit/unused */ /* ################## End BE DEVELOPMENT switches ######################### */ diff --git a/lib_dec/ivas_qmetadata_dec.c b/lib_dec/ivas_qmetadata_dec.c index d5ef4c81c0..4dc446eaa4 100644 --- a/lib_dec/ivas_qmetadata_dec.c +++ b/lib_dec/ivas_qmetadata_dec.c @@ -89,9 +89,9 @@ static int16_t ivas_diffuseness_huff_ec_decode( const uint16_t *bitstream, int16 static int16_t read_GR_min_removed_data( uint16_t *bitstream, int16_t *p_bit_pos, const int16_t *no_cv_vec, const int16_t no_data, int16_t *decoded_idx, const int16_t no_symb ); static int16_t decode_fixed_rate_composed_index_coherence( uint16_t *bitstream, int16_t *p_bit_pos, const int16_t no_bands, int16_t *no_cv_vec, uint16_t *decoded_index, const int16_t no_symb ); - +#ifndef REMOVE_UNUSED_FUNCTION static int16_t ivas_qmetadata_entropy_decode_diffuseness_hr( uint16_t *bitstream, int16_t *index, IVAS_QDIRECTION *q_direction, uint16_t *diffuseness_index_max_ec_frame ); - +#endif static int16_t ivas_qmetadata_entropy_decode_diffuseness_hr_512( uint16_t *bitstream, int16_t *index, IVAS_QDIRECTION *q_direction ); static int16_t ivas_qmetadata_raw_decode_dir_512( IVAS_QDIRECTION *q_direction, uint16_t *bitstream, int16_t *index, const int16_t nbands, const int16_t start_band, const SPHERICAL_GRID_DATA *sph_grid16 ); @@ -1576,7 +1576,7 @@ static int16_t ivas_qmetadata_entropy_decode_diffuseness( return ( index_start - *index ); } - +#ifndef REMOVE_UNUSED_FUNCTION /*-------------------------------------------------------------------* * ivas_qmetadata_entropy_decode_diffuseness_hr() * @@ -1657,7 +1657,7 @@ static int16_t ivas_qmetadata_entropy_decode_diffuseness_hr( return ( index_start - *index ); } - +#endif /*-------------------------------------------------------------------* * ivas_qmetadata_entropy_decode_diffuseness_hr_512() * diff --git a/lib_enc/ivas_qmetadata_enc.c b/lib_enc/ivas_qmetadata_enc.c index 9969669b93..d3a4a948eb 100644 --- a/lib_enc/ivas_qmetadata_enc.c +++ b/lib_enc/ivas_qmetadata_enc.c @@ -116,17 +116,17 @@ static int16_t write_2dir_info( BSTR_ENC_HANDLE hMetaData, uint8_t *twoDirBands, static void transform_azimuth_dir2( IVAS_QMETADATA_HANDLE hQMetaData, int16_t *dir2_bands ); static int16_t calc_var_azi( const IVAS_QDIRECTION *q_direction, const int16_t diffuseness_index_max_ec_frame, const float avg_azimuth, float *avg_azimuth_out ); - +#ifndef REMOVE_UNUSED_FUNCTION static void ivas_qmetadata_quantize_diffuseness_nrg_ratios_hr( IVAS_QMETADATA_HANDLE hQMetaData, int16_t *needed_bits, int16_t *nbits_diff, int16_t *dfRatioBits, const int16_t bits_dir_hr ); - +#endif static int16_t ivas_qmetadata_entropy_encode_diffuseness_hr( BSTR_ENC_HANDLE hMetaData, IVAS_QDIRECTION *q_direction, uint16_t *diffuseness_index_max_ec_frame ); static void ivas_qmetadata_quantize_diffuseness_nrg_ratios_hr_512( IVAS_QMETADATA_HANDLE hQMetaData, int16_t *needed_bits, const int16_t bits_dir_hr, BSTR_ENC_HANDLE hMetaData ); static int16_t encode_surround_coherence_hr( IVAS_QMETADATA *hQMetaData, BSTR_ENC_HANDLE hMetaData ); - +#ifndef REMOVE_UNUSED_FUNCTION static void ivas_qmetadata_reorder_2dir_bands_hr( IVAS_QMETADATA_HANDLE hQMetaData ); - +#endif static int16_t ivas_qmetadata_quantize_coherence_hr_512( IVAS_QMETADATA *hQMetaData, const int16_t idx_d, const int16_t all_coherence_zero, BSTR_ENC_HANDLE hMetaData, const int16_t bits_coh ); static int16_t write_stream_dct_coeffs_omasa( int16_t *q_idx, const int16_t len_stream, BSTR_ENC_HANDLE hMetaData, const int16_t first_line, const int16_t low_bitrate_mode ); @@ -1366,7 +1366,7 @@ int16_t quantize_direction2D( return idx_sph; } - +#ifndef REMOVE_UNUSED_FUNCTION /*------------------------------------------------------------------------- * ivas_qmetadata_quantize_diffuseness_nrg_ratios() * @@ -1511,7 +1511,7 @@ static void ivas_qmetadata_quantize_diffuseness_nrg_ratios_hr( return; } - +#endif static void ivas_qmetadata_quantize_diffuseness_nrg_ratios_hr_512( IVAS_QMETADATA_HANDLE hQMetaData, int16_t *needed_bits, @@ -5835,7 +5835,7 @@ static void ivas_qmetadata_reorder_2dir_bands( return; } - +#ifndef REMOVE_UNUSED_FUNCTION /*-------------------------------------------------------------------* * ivas_qmetadata_reorder_2dir_bands_hr() * @@ -5893,7 +5893,7 @@ static void ivas_qmetadata_reorder_2dir_bands_hr( return; } - +#endif /*-------------------------------------------------------------------* * write_2dir_info() diff --git a/lib_enc/ivas_sba_enc.c b/lib_enc/ivas_sba_enc.c index 318bc90ddd..0f69bba817 100644 --- a/lib_enc/ivas_sba_enc.c +++ b/lib_enc/ivas_sba_enc.c @@ -261,7 +261,7 @@ ivas_error ivas_sba_enc_reconfigure( return error; } - +#ifndef REMOVE_UNUSED_FUNCTION /*-------------------------------------------------------------------* * ivas_sba_get_max_md_bits() * @@ -293,3 +293,4 @@ int16_t ivas_sba_get_max_md_bits( return max_md_bits; } +#endif \ No newline at end of file -- GitLab From 99e9518bf1b4abd5c1925ff9095224a9fac01749 Mon Sep 17 00:00:00 2001 From: Vidhya V P <100825@ittiam.com> Date: Tue, 5 Sep 2023 16:42:00 +0530 Subject: [PATCH 02/14] Cleaned up the unused function ivas_sba_mtx_mult() --- lib_com/ivas_prot.h | 6 ++++-- lib_dec/ivas_dec.c | 9 +++++++-- lib_dec/ivas_jbm_dec.c | 19 +++++++++++------- lib_dec/ivas_sba_dec.c | 7 ++++++- lib_dec/ivas_sba_rendering_internal.c | 28 ++++++++++++++++++--------- 5 files changed, 48 insertions(+), 21 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 4f52a9812e..fed2131622 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -4137,8 +4137,10 @@ ivas_error ivas_sba_linear_renderer( const int16_t nchan_in, /* i : number of input ambisonics channels */ const int16_t nchan_ism, const AUDIO_CONFIG output_config, /* i : output audio configuration */ - const IVAS_OUTPUT_SETUP output_setup, /* i : output format setup */ - const float hoa_dec_mtx[] /* i : HOA decoding mtx */ + const IVAS_OUTPUT_SETUP output_setup /* i : output format setup */ +#ifndef REMOVE_UNUSED_FUNCTION + ,const float hoa_dec_mtx[] /* i : HOA decoding mtx */ +#endif ); void ivas_sba_mix_matrix_determiner( diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index 8d41109c07..6a5f246ad0 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -52,7 +52,7 @@ *--------------------------------------------------------------------------*/ ivas_error ivas_dec( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ #if defined SPLIT_REND_WITH_HEAD_ROT const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ @@ -465,7 +465,12 @@ ivas_error ivas_dec( { if ( ( error = ivas_sba_linear_renderer( p_output, output_frame, nchan_remapped, 0, - output_config, st_ivas->hOutSetup, st_ivas->hoa_dec_mtx ) ) != IVAS_ERR_OK ) + output_config, st_ivas->hOutSetup +#ifndef REMOVE_UNUSED_FUNCTION + , + st_ivas->hoa_dec_mtx +#endif + ) ) != IVAS_ERR_OK ) { return error; } diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 1fe58874a0..fe066ff82e 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -769,10 +769,10 @@ ivas_error ivas_jbm_dec_feed_tc_to_renderer( *--------------------------------------------------------------------------*/ ivas_error ivas_jbm_dec_render( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - const uint16_t nSamplesAsked, /* i : number of samples wanted */ - uint16_t *nSamplesRendered, /* o : number of samples rendered */ - uint16_t *nSamplesAvailableNext, /* o : number of samples still available in the rendering pipeline */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + const uint16_t nSamplesAsked, /* i : number of samples wanted */ + uint16_t *nSamplesRendered, /* o : number of samples rendered */ + uint16_t *nSamplesAvailableNext, /* o : number of samples still available in the rendering pipeline */ #if defined SPLIT_REND_WITH_HEAD_ROT const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ @@ -951,7 +951,12 @@ ivas_error ivas_jbm_dec_render( if ( ( error = ivas_sba_linear_renderer( p_output, *nSamplesRendered, nchan_remapped, 0, - output_config, st_ivas->hOutSetup, st_ivas->hoa_dec_mtx ) ) != IVAS_ERR_OK ) + output_config, st_ivas->hOutSetup +#ifndef REMOVE_UNUSED_FUNCTION + , + st_ivas->hoa_dec_mtx +#endif + ) ) != IVAS_ERR_OK ) { return error; } @@ -1224,8 +1229,8 @@ ivas_error ivas_jbm_dec_flush_renderer( const ISM_MODE ism_mode_old, /* i : old ISM mode */ uint16_t *nSamplesRendered, /* o : number of samples flushed */ #if defined SPLIT_REND_WITH_HEAD_ROT - const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ - void *data /* o : output synthesis signal */ + const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ + void *data /* o : output synthesis signal */ #else int16_t *data /* o : output synthesis signal */ #endif diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 29136f5a93..aacce6e614 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -732,7 +732,12 @@ void ivas_sba_dec_render( { ivas_sba_linear_renderer( output_f, *nSamplesRendered, st_ivas->hIntSetup.nchan_out_woLFE, 0, - st_ivas->hDecoderConfig->output_config, st_ivas->hOutSetup, st_ivas->hoa_dec_mtx ); + st_ivas->hDecoderConfig->output_config, st_ivas->hOutSetup +#ifndef REMOVE_UNUSED_FUNCTION + , + st_ivas->hoa_dec_mtx +#endif + ); } if ( st_ivas->hDirAC != NULL && hSpar->slots_rendered == hSpar->num_slots ) diff --git a/lib_dec/ivas_sba_rendering_internal.c b/lib_dec/ivas_sba_rendering_internal.c index aef59a576e..395f283c5a 100644 --- a/lib_dec/ivas_sba_rendering_internal.c +++ b/lib_dec/ivas_sba_rendering_internal.c @@ -431,7 +431,12 @@ ivas_error ivas_sba_upmixer_renderer( output_f[ch] = output[ch]; } - if ( ( error = ivas_sba_linear_renderer( output_f, output_frame, st_ivas->hIntSetup.nchan_out_woLFE, st_ivas->nchan_ism, output_config, st_ivas->hOutSetup, st_ivas->hoa_dec_mtx ) ) != IVAS_ERR_OK ) + if ( ( error = ivas_sba_linear_renderer( output_f, output_frame, st_ivas->hIntSetup.nchan_out_woLFE, st_ivas->nchan_ism, output_config, st_ivas->hOutSetup +#ifndef REMOVE_UNUSED_FUNCTION + , + st_ivas->hoa_dec_mtx +#endif + ) ) != IVAS_ERR_OK ) { return error; } @@ -441,7 +446,7 @@ ivas_error ivas_sba_upmixer_renderer( return IVAS_ERR_OK; } - +#ifndef REMOVE_UNUSED_FUNCTION /*-------------------------------------------------------------------* * ivas_sba_mtx_mult() * @@ -501,7 +506,7 @@ static void ivas_sba_mtx_mult( return; } - +#endif /*-------------------------------------------------------------------* * ivas_sba_linear_renderer() * @@ -509,13 +514,16 @@ static void ivas_sba_mtx_mult( *-------------------------------------------------------------------*/ ivas_error ivas_sba_linear_renderer( - float *output_f[], /* i/o: synthesized core-coder transport channels/DirAC output */ - const int16_t output_frame, /* i : output frame length per channel */ - const int16_t nchan_in, /* i : number of input ambisonics channels */ + float *output_f[], /* i/o: synthesized core-coder transport channels/DirAC output */ + const int16_t output_frame, /* i : output frame length per channel */ + const int16_t nchan_in, /* i : number of input ambisonics channels */ const int16_t nchan_ism, - const AUDIO_CONFIG output_config, /* i : output audio configuration */ - const IVAS_OUTPUT_SETUP output_setup, /* i : output format setup */ - const float hoa_dec_mtx[] /* i : HOA decoding mtx */ + const AUDIO_CONFIG output_config, /* i : output audio configuration */ + const IVAS_OUTPUT_SETUP output_setup /* i : output format setup */ +#ifndef REMOVE_UNUSED_FUNCTION + , + const float hoa_dec_mtx[] /* i : HOA decoding mtx */ +#endif ) { int16_t i; @@ -565,6 +573,7 @@ ivas_error ivas_sba_linear_renderer( } } break; +#ifndef REMOVE_UNUSED_FUNCTION case AUDIO_CONFIG_5_1: case AUDIO_CONFIG_7_1: case AUDIO_CONFIG_5_1_2: @@ -573,6 +582,7 @@ ivas_error ivas_sba_linear_renderer( case AUDIO_CONFIG_LS_CUSTOM: ivas_sba_mtx_mult( output_f, output_frame, nchan_hoa, output_setup, hoa_dec_mtx ); break; +#endif case AUDIO_CONFIG_FOA: /* Ambisonics output, order: 1 */ case AUDIO_CONFIG_HOA2: /* Ambisonics output, order: 2 */ case AUDIO_CONFIG_HOA3: /* Ambisonics output, order: 3 */ -- GitLab From e11d009d4f46acc9bfd70af9ecff7c34035d8c33 Mon Sep 17 00:00:00 2001 From: Vidhya V P <100825@ittiam.com> Date: Tue, 5 Sep 2023 17:48:13 +0530 Subject: [PATCH 03/14] clang formatting fix --- lib_dec/ivas_dec.c | 2 +- lib_dec/ivas_jbm_dec.c | 12 ++++++------ lib_dec/ivas_sba_rendering_internal.c | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib_dec/ivas_dec.c b/lib_dec/ivas_dec.c index 6a5f246ad0..e91659dfe3 100644 --- a/lib_dec/ivas_dec.c +++ b/lib_dec/ivas_dec.c @@ -52,7 +52,7 @@ *--------------------------------------------------------------------------*/ ivas_error ivas_dec( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ #if defined SPLIT_REND_WITH_HEAD_ROT const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index fe066ff82e..cf46eecead 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -769,10 +769,10 @@ ivas_error ivas_jbm_dec_feed_tc_to_renderer( *--------------------------------------------------------------------------*/ ivas_error ivas_jbm_dec_render( - Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ - const uint16_t nSamplesAsked, /* i : number of samples wanted */ - uint16_t *nSamplesRendered, /* o : number of samples rendered */ - uint16_t *nSamplesAvailableNext, /* o : number of samples still available in the rendering pipeline */ + Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ + const uint16_t nSamplesAsked, /* i : number of samples wanted */ + uint16_t *nSamplesRendered, /* o : number of samples rendered */ + uint16_t *nSamplesAvailableNext, /* o : number of samples still available in the rendering pipeline */ #if defined SPLIT_REND_WITH_HEAD_ROT const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ void *data /* o : output synthesis signal */ @@ -1229,8 +1229,8 @@ ivas_error ivas_jbm_dec_flush_renderer( const ISM_MODE ism_mode_old, /* i : old ISM mode */ uint16_t *nSamplesRendered, /* o : number of samples flushed */ #if defined SPLIT_REND_WITH_HEAD_ROT - const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ - void *data /* o : output synthesis signal */ + const PCM_RESOLUTION pcm_resolution, /* i : type for the decoded PCM resolution */ + void *data /* o : output synthesis signal */ #else int16_t *data /* o : output synthesis signal */ #endif diff --git a/lib_dec/ivas_sba_rendering_internal.c b/lib_dec/ivas_sba_rendering_internal.c index 395f283c5a..684acd9387 100644 --- a/lib_dec/ivas_sba_rendering_internal.c +++ b/lib_dec/ivas_sba_rendering_internal.c @@ -514,9 +514,9 @@ static void ivas_sba_mtx_mult( *-------------------------------------------------------------------*/ ivas_error ivas_sba_linear_renderer( - float *output_f[], /* i/o: synthesized core-coder transport channels/DirAC output */ - const int16_t output_frame, /* i : output frame length per channel */ - const int16_t nchan_in, /* i : number of input ambisonics channels */ + float *output_f[], /* i/o: synthesized core-coder transport channels/DirAC output */ + const int16_t output_frame, /* i : output frame length per channel */ + const int16_t nchan_in, /* i : number of input ambisonics channels */ const int16_t nchan_ism, const AUDIO_CONFIG output_config, /* i : output audio configuration */ const IVAS_OUTPUT_SETUP output_setup /* i : output format setup */ -- GitLab From 0bb60cf8884c5f14eeab33747246cf36956233f2 Mon Sep 17 00:00:00 2001 From: Vidhya V P <100825@ittiam.com> Date: Wed, 20 Sep 2023 11:29:32 +0530 Subject: [PATCH 04/14] Resolving compilation warnings --- lib_dec/ivas_sba_dec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib_dec/ivas_sba_dec.c b/lib_dec/ivas_sba_dec.c index 5d9688d32e..64adaefe78 100755 --- a/lib_dec/ivas_sba_dec.c +++ b/lib_dec/ivas_sba_dec.c @@ -703,8 +703,9 @@ ivas_error ivas_sba_dec_render( SPAR_DEC_HANDLE hSpar; SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom; float *output_f_local[MAX_OUTPUT_CHANNELS]; +#ifndef REMOVE_UNUSED_FUNCTION ivas_error error; - +#endif hSpar = st_ivas->hSpar; hSpatParamRendCom = st_ivas->hSpatParamRendCom; nchan_internal = ivas_sba_get_nchan_metadata( st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); -- GitLab From 8319cce9fcd7ffda233b1c5f41236a0027fb9190 Mon Sep 17 00:00:00 2001 From: Vidhya V P <100825@ittiam.com> Date: Wed, 20 Sep 2023 14:49:28 +0530 Subject: [PATCH 05/14] Removing lines that has no possibility of getting hit --- lib_com/ivas_fb_mixer.c | 8 ++++++-- lib_com/ivas_prot.h | 2 ++ lib_com/ivas_spar_com.c | 6 ++++-- lib_dec/ivas_agc_dec.c | 5 ++++- lib_dec/ivas_dirac_dec.c | 3 ++- lib_dec/ivas_lfe_dec.c | 10 ++++++++-- lib_dec/ivas_sba_rendering_internal.c | 4 +++- lib_dec/ivas_spar_md_dec.c | 6 ++++++ lib_enc/ivas_spar_encoder.c | 10 +++++++++- lib_enc/ivas_spar_md_enc.c | 6 ++++++ 10 files changed, 50 insertions(+), 10 deletions(-) diff --git a/lib_com/ivas_fb_mixer.c b/lib_com/ivas_fb_mixer.c index d51f88943c..2099d01f9b 100644 --- a/lib_com/ivas_fb_mixer.c +++ b/lib_com/ivas_fb_mixer.c @@ -727,18 +727,21 @@ void ivas_fb_mixer_process( void ivas_fb_mixer_get_in_out_mapping( const IVAS_FB_CFG *fb_cfg, /* i : FB config. handle */ +#ifndef REMOVE_UNUSED_FUNCTION const int16_t nchan_transport, /* i : number of transport channels */ const int16_t enc_dec_flag, /* i : encoder or decoder flag */ const int16_t *order, /* i : downmix order */ +#endif int16_t in_out_mixer_map[IVAS_MAX_FB_MIXER_OUT_CH][IVAS_MAX_SPAR_FB_MIXER_IN_CH] /* i/o: mixing mapping */ ) { int16_t i, j; set_s( (int16_t *) in_out_mixer_map, 0, IVAS_MAX_FB_MIXER_OUT_CH * IVAS_MAX_SPAR_FB_MIXER_IN_CH ); - +#ifndef REMOVE_UNUSED_FUNCTION if ( enc_dec_flag == ENC ) { +#endif if ( fb_cfg->active_w_mixing ) { for ( i = 0; i < fb_cfg->num_out_chans; i++ ) @@ -757,6 +760,7 @@ void ivas_fb_mixer_get_in_out_mapping( in_out_mixer_map[i][0] = 1; } } +#ifndef REMOVE_UNUSED_FUNCTION } else { @@ -788,7 +792,7 @@ void ivas_fb_mixer_get_in_out_mapping( } } } - +#endif return; } diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index f5d62d916c..f0b2e4a158 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -6030,9 +6030,11 @@ void ivas_fb_mixer_process( void ivas_fb_mixer_get_in_out_mapping( const IVAS_FB_CFG *fb_cfg, /* i : FB config. handle */ +#ifndef REMOVE_UNUSED_FUNCTION const int16_t nchan_transport, /* i : number of transport channels */ const int16_t enc_dec_flag, /* i : encoder or decoder flag */ const int16_t *order, /* i : downmix order */ +#endif int16_t in_out_mixer_map[IVAS_MAX_FB_MIXER_OUT_CH][IVAS_MAX_SPAR_FB_MIXER_IN_CH] /* i/o: mixing mapping */ ); diff --git a/lib_com/ivas_spar_com.c b/lib_com/ivas_spar_com.c index 45472ea441..438796eaf0 100644 --- a/lib_com/ivas_spar_com.c +++ b/lib_com/ivas_spar_com.c @@ -430,18 +430,20 @@ int16_t ivas_get_sba_num_TCs( ) { int16_t table_idx, nchan_transport; - +#ifndef REMOVE_UNUSED_FUNCTION if ( ivas_total_brate == IVAS_SID_5k2 ) { nchan_transport = 1; } else { +#endif table_idx = ivas_get_spar_table_idx( ivas_total_brate, sba_order, SPAR_CONFIG_BW, NULL, NULL ); nchan_transport = ivas_spar_br_table_consts[table_idx].nchan_transport; +#ifndef REMOVE_UNUSED_FUNCTION } - +#endif return nchan_transport; } diff --git a/lib_dec/ivas_agc_dec.c b/lib_dec/ivas_agc_dec.c index 56a679de59..c1ddd8c05d 100644 --- a/lib_dec/ivas_agc_dec.c +++ b/lib_dec/ivas_agc_dec.c @@ -255,6 +255,7 @@ void ivas_agc_read_bits( /* read AGC parameters */ if ( AGC_flag == 1 ) { +#ifndef REMOVE_UNUSED_FUNCTION if ( n_channels > 1 ) { for ( i = 0; i < n_channels; i++ ) @@ -264,9 +265,11 @@ void ivas_agc_read_bits( } else { +#endif per_ch_bit[0] = 1; +#ifndef REMOVE_UNUSED_FUNCTION } - +#endif assert( AGC_BITS_PER_CH == ( pState->agc_com.betaE + 1 ) ); for ( i = 0; i < n_channels; i++ ) { diff --git a/lib_dec/ivas_dirac_dec.c b/lib_dec/ivas_dirac_dec.c index eeb582bc22..7b9c749546 100644 --- a/lib_dec/ivas_dirac_dec.c +++ b/lib_dec/ivas_dirac_dec.c @@ -312,11 +312,12 @@ static ivas_error ivas_dirac_rend_config( /* Directional and diffuses components in SHD */ /* Diffuseness components up to 1st order */ hDirACRend->num_outputs_diff = ( min( hDirACRend->hOutSetup.ambisonics_order, 1 ) + 1 ) * ( min( hDirACRend->hOutSetup.ambisonics_order, 1 ) + 1 ); +#ifndef REMOVE_UNUSED_FUNCTION if ( ( st_ivas->ivas_format == SBA_FORMAT ) && ( ivas_total_brate >= IVAS_96k ) && ( hDirACRend->hOutSetup.ambisonics_order > 1 ) && ( nchan_transport < 4 ) ) { hDirACRend->num_outputs_diff += 2; /* Add 2nd-order planar components for HRs */ } - +#endif hDirACRend->num_outputs_dir = ivas_sba_get_nchan( hDirACRend->hOutSetup.ambisonics_order, 0 ); } else if ( hDirACRend->synthesisConf == DIRAC_SYNTHESIS_PSD_SHD ) diff --git a/lib_dec/ivas_lfe_dec.c b/lib_dec/ivas_lfe_dec.c index 5c250286ee..aae237d8e5 100644 --- a/lib_dec/ivas_lfe_dec.c +++ b/lib_dec/ivas_lfe_dec.c @@ -357,7 +357,9 @@ ivas_error ivas_create_lfe_dec( { float low_pass_delay_dec_out, block_offset_s; int16_t filt_order, output_frame; +#ifndef REMOVE_UNUSED_FUNCTION const float *filt_coeff; +#endif LFE_DEC_HANDLE hLFE; float lfe_addl_delay_s; int16_t i, j; @@ -402,7 +404,7 @@ ivas_error ivas_create_lfe_dec( hLFE->lfe_block_delay_s = ( IVAS_LFE_FADE_NS / 1000000000.f ) + ivas_lfe_lpf_delay[IVAS_FILTER_ORDER_4 - 3]; block_offset_s = BLOCK_OFFSET_MS * 0.001f; - +#ifndef REMOVE_UNUSED_FUNCTION if ( ( block_offset_s - hLFE->lfe_block_delay_s ) >= ivas_lfe_lpf_delay[IVAS_FILTER_ORDER_4 - 3] ) { filt_order = IVAS_FILTER_ORDER_4; @@ -415,8 +417,10 @@ ivas_error ivas_create_lfe_dec( } else { +#endif filt_order = 0; low_pass_delay_dec_out = 0; +#ifndef REMOVE_UNUSED_FUNCTION } if ( filt_order > 0 ) @@ -427,9 +431,11 @@ ivas_error ivas_create_lfe_dec( } else { +#endif hLFE->filter_state.order = filt_order; +#ifndef REMOVE_UNUSED_FUNCTION } - +#endif hLFE->lfe_block_delay_s = hLFE->lfe_block_delay_s + low_pass_delay_dec_out; hLFE->lfe_prior_buf_len = NS2SA( output_Fs, IVAS_LFE_FADE_NS ); diff --git a/lib_dec/ivas_sba_rendering_internal.c b/lib_dec/ivas_sba_rendering_internal.c index 590683141b..fac59eb2b1 100644 --- a/lib_dec/ivas_sba_rendering_internal.c +++ b/lib_dec/ivas_sba_rendering_internal.c @@ -602,7 +602,9 @@ ivas_error ivas_sba_linear_renderer( ) { int16_t i; +#ifndef REMOVE_UNUSED_FUNCTION float dmx_l; +#endif int16_t nchan_hoa; ivas_error error; @@ -622,6 +624,7 @@ ivas_error ivas_sba_linear_renderer( switch ( output_config ) { +#ifndef REMOVE_UNUSED_FUNCTION case IVAS_AUDIO_CONFIG_MONO: /* If stereo DMX, MONO = W = Cardioids L + R*/ if ( nchan_in == 2 ) @@ -648,7 +651,6 @@ ivas_error ivas_sba_linear_renderer( } } break; -#ifndef REMOVE_UNUSED_FUNCTION case IVAS_AUDIO_CONFIG_5_1: case IVAS_AUDIO_CONFIG_7_1: case IVAS_AUDIO_CONFIG_5_1_2: diff --git a/lib_dec/ivas_spar_md_dec.c b/lib_dec/ivas_spar_md_dec.c index b7ede322b3..04e7ce8b4b 100644 --- a/lib_dec/ivas_spar_md_dec.c +++ b/lib_dec/ivas_spar_md_dec.c @@ -2285,7 +2285,9 @@ static void ivas_parse_parameter_bitstream_dtx( int16_t idx; float pr_min_max[2]; int16_t pr_q_lvls, pr, pd, pd_q_lvls, pr_pd_bits; +#ifndef REMOVE_UNUSED_FUNCTION int16_t pr_q_lvls1, pr_q_lvls2, pr_idx1, pr_idx2, pr_pr_bits; +#endif int16_t zero_pad_bits, sid_bits_len; sid_bits_len = st0->next_bit_pos; @@ -2309,8 +2311,10 @@ static void ivas_parse_parameter_bitstream_dtx( if ( pr_idx_1 != 0 || pd_idx_1 != 0 || pr_idx_2 != 0 || pd_idx_2 != 0 ) { +#ifndef REMOVE_UNUSED_FUNCTION if ( pr_idx_1 == 0 || pr_idx_2 == 0 ) { +#endif pr_q_lvls = dtx_pr_real_q_levels[ndm - 1][pd_idx_1 - 1]; if ( ( j + 1 ) > ndec ) @@ -2342,6 +2346,7 @@ static void ivas_parse_parameter_bitstream_dtx( } pSpar_md->band_coeffs_idx[i].pred_index_re[pd_idx_1 - 1] = pr; +#ifndef REMOVE_UNUSED_FUNCTION } else { @@ -2366,6 +2371,7 @@ static void ivas_parse_parameter_bitstream_dtx( pSpar_md->band_coeffs_idx[i].pred_index_re[pr_idx_1 - 1] = pr_idx1; pSpar_md->band_coeffs_idx[i].pred_index_re[pr_idx_2 - 1] = pr_idx2; } +#endif } } } diff --git a/lib_enc/ivas_spar_encoder.c b/lib_enc/ivas_spar_encoder.c index f39e70dfea..3c9f650390 100644 --- a/lib_enc/ivas_spar_encoder.c +++ b/lib_enc/ivas_spar_encoder.c @@ -792,7 +792,15 @@ static ivas_error ivas_spar_enc_process( * FB mixer *-----------------------------------------------------------------------------------------*/ - ivas_fb_mixer_get_in_out_mapping( hSpar->hFbMixer->fb_cfg, nchan_transport, ENC, remix_order_set[hSpar->hMdEnc->spar_md_cfg.remix_unmix_order], in_out_mixer_map ); + ivas_fb_mixer_get_in_out_mapping( hSpar->hFbMixer->fb_cfg, +#ifndef REMOVE_UNUSED_FUNCTION + nchan_transport, + + ENC, + + remix_order_set[hSpar->hMdEnc->spar_md_cfg.remix_unmix_order], +#endif + in_out_mixer_map ); #ifdef DEBUG_SBA_MD_DUMP { diff --git a/lib_enc/ivas_spar_md_enc.c b/lib_enc/ivas_spar_md_enc.c index 8b21c62a6b..5318f3d56f 100644 --- a/lib_enc/ivas_spar_md_enc.c +++ b/lib_enc/ivas_spar_md_enc.c @@ -1719,8 +1719,10 @@ static void ivas_write_parameter_bitstream_dtx( if ( pr_idx_1 != 0 || pd_idx_1 != 0 || pr_idx_2 != 0 || pd_idx_2 != 0 ) { +#ifndef REMOVE_UNUSED_FUNCTION if ( pr_idx_1 == 0 || pr_idx_2 == 0 ) { +#endif pr_q_lvls = dtx_pr_real_q_levels[ndm - 1][pd_idx_1 - 1]; pr = pSpar_md->band_coeffs_idx[i].pred_index_re[pd_idx_1 - 1]; @@ -1748,9 +1750,11 @@ static void ivas_write_parameter_bitstream_dtx( value = (uint16_t) ( pr * pd_q_lvls + pd ); push_next_indice( hMetaData, value, pr_pd_bits ); +#ifndef REMOVE_UNUSED_FUNCTION } else { +#endif int16_t pr_q_lvls1, pr_q_lvls2; int16_t pr_idx1, pr_idx2, pr_pr_bits; @@ -1774,7 +1778,9 @@ static void ivas_write_parameter_bitstream_dtx( pr_pr_bits = ivas_get_bits_to_encode( pr_q_lvls1 * pr_q_lvls2 ); push_next_indice( hMetaData, value, pr_pr_bits ); +#ifndef REMOVE_UNUSED_FUNCTION } +#endif } } } -- GitLab From ac1e0101682072b0a9e0131c0a512702510fb14f Mon Sep 17 00:00:00 2001 From: Vidhya V P <100825@ittiam.com> Date: Wed, 20 Sep 2023 15:24:05 +0530 Subject: [PATCH 06/14] Minor correction --- lib_enc/ivas_spar_md_enc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib_enc/ivas_spar_md_enc.c b/lib_enc/ivas_spar_md_enc.c index 5318f3d56f..d8348c5f67 100644 --- a/lib_enc/ivas_spar_md_enc.c +++ b/lib_enc/ivas_spar_md_enc.c @@ -1754,7 +1754,6 @@ static void ivas_write_parameter_bitstream_dtx( } else { -#endif int16_t pr_q_lvls1, pr_q_lvls2; int16_t pr_idx1, pr_idx2, pr_pr_bits; @@ -1778,7 +1777,6 @@ static void ivas_write_parameter_bitstream_dtx( pr_pr_bits = ivas_get_bits_to_encode( pr_q_lvls1 * pr_q_lvls2 ); push_next_indice( hMetaData, value, pr_pr_bits ); -#ifndef REMOVE_UNUSED_FUNCTION } #endif } -- GitLab From 68d8c2549ecdbd3c328f60a1839da42b0455db3a Mon Sep 17 00:00:00 2001 From: Vidhya V P <100825@ittiam.com> Date: Wed, 20 Sep 2023 15:57:19 +0530 Subject: [PATCH 07/14] Clang formatting fix --- lib_com/ivas_fb_mixer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib_com/ivas_fb_mixer.c b/lib_com/ivas_fb_mixer.c index 2099d01f9b..2b11a08405 100644 --- a/lib_com/ivas_fb_mixer.c +++ b/lib_com/ivas_fb_mixer.c @@ -726,11 +726,11 @@ void ivas_fb_mixer_process( *-----------------------------------------------------------------------------------------*/ void ivas_fb_mixer_get_in_out_mapping( - const IVAS_FB_CFG *fb_cfg, /* i : FB config. handle */ + const IVAS_FB_CFG *fb_cfg, /* i : FB config. handle */ #ifndef REMOVE_UNUSED_FUNCTION - const int16_t nchan_transport, /* i : number of transport channels */ - const int16_t enc_dec_flag, /* i : encoder or decoder flag */ - const int16_t *order, /* i : downmix order */ + const int16_t nchan_transport, /* i : number of transport channels */ + const int16_t enc_dec_flag, /* i : encoder or decoder flag */ + const int16_t *order, /* i : downmix order */ #endif int16_t in_out_mixer_map[IVAS_MAX_FB_MIXER_OUT_CH][IVAS_MAX_SPAR_FB_MIXER_IN_CH] /* i/o: mixing mapping */ ) -- GitLab From 4bac07c630e4bde47040852e0dfbb8401ca4168c Mon Sep 17 00:00:00 2001 From: Vidhya V P <100825@ittiam.com> Date: Thu, 21 Sep 2023 10:44:36 +0530 Subject: [PATCH 08/14] Added test cases for SBA SID and SBA JBM conditions. --- scripts/config/self_test.prm | 5 +++++ .../test_sba_bs_enc.py | 17 ++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/scripts/config/self_test.prm b/scripts/config/self_test.prm index 62a3cd044b..dbe2abf131 100644 --- a/scripts/config/self_test.prm +++ b/scripts/config/self_test.prm @@ -1254,6 +1254,11 @@ networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 ../IVAS_dec -Tracefile tracefile_dec -VOIP HOA3 32 netsimoutput testv/stv3OA32c.wav_SBA_80000_32-32_HOA3_JBM5.tst +// SBA at 13.2 kbps, 48kHz in, 48kHz out, BINAURAL out, JBM Prof 5 +../IVAS_cod -sba 1 13200 48 testv/stvFOA48c.wav bit +networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 +../IVAS_dec -Tracefile tracefile_dec -VOIP BINAURAL 48 netsimoutput testv/stvFOA32c.wav_SBA_13200_48-48_BINAURAL_JBM5.tst + // Multi-channel 5_1 at 384 kbps, 48kHz in, 48kHz out, 7_1_4 out, JBM Prof 5 ../IVAS_cod -mc 5_1 384000 48 testv/stv51MC48c.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 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 3b05399784..3c36b8257d 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 @@ -57,7 +57,7 @@ dict_bw_tag = {'SWB': '_ForceSWB', 'WB': '_ForceWB'} ivas_br_FOA = ['13200','16400','32000','64000', '96000', '160000', '256000', '384000', '512000','sw_24k4_256k.bin'] ivas_br_HOA2 = ['256000', '384000', '512000'] ivas_br_HOA3 = ['256000', '384000', '512000'] - +SID_list = [0, 1] sample_rate_list = ['48', '32', '16'] bypass_list = [1, 2] gain_list = [0, 1] @@ -152,6 +152,7 @@ def test_bypass_enc( @pytest.mark.parametrize("tag", tag_list) @pytest.mark.parametrize("fs", sample_rate_list) @pytest.mark.parametrize("gain_flag", gain_list) +@pytest.mark.parametrize("SID", SID_list) def test_sba_enc_system( dut_encoder_frontend: EncoderFrontend, dut_decoder_frontend: DecoderFrontend, @@ -168,18 +169,20 @@ def test_sba_enc_system( tag, fs, gain_flag, + SID, ): - SID = 0 + if dtx == '1' and ivas_br not in ['13200','16400','24400','32000','64000']: # skip high bitrates for DTX until DTX issue is resolved pytest.skip() + if SID == 1: + if ivas_br not in ['13200','16400','64000'] or fs == '16' or gain_flag == 1 or dtx == '0': + pytest.skip() + else: + if ivas_br in ['13200','16400']: + pytest.skip() if ivas_br == 'sw_24k4_256k.bin' and gain_flag != 1: pytest.skip() - if ivas_br == '13200' or ivas_br == '16400': - if dtx == '1' and gain_flag == 0 and fs != '16': - SID = 1 - else: - pytest.skip() if gain_flag == 1 and ivas_br not in ['13200','16400','24400','32000']: pytest.skip() tag = tag + fs + 'c' -- GitLab From 68e4ebd9faa9c88db2f599323aeae0fb68c0f443 Mon Sep 17 00:00:00 2001 From: Vidhya V P <100825@ittiam.com> Date: Fri, 22 Sep 2023 14:17:14 +0530 Subject: [PATCH 09/14] Resolving the pipeline errors --- lib_dec/ivas_masa_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index 37cff3347e..eccc7fb82c 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -1587,7 +1587,7 @@ void ivas_spar_param_to_masa_param_mapping( for ( slot_idx = 0; slot_idx < hSpar->subframe_nbslots[subframe]; slot_idx++ ) { sf = hSpar->render_to_md_map[slot_idx + slot_idx_start] / JBM_CLDFB_SLOTS_IN_SUBFRAME; - if ( subframe < SPAR_META_DELAY_SUBFRAMES ) + if ( ( subframe < SPAR_META_DELAY_SUBFRAMES ) && (sf < 2 ) ) { mixer_mat_index = sf + MAX_PARAM_SPATIAL_SUBFRAMES - SPAR_META_DELAY_SUBFRAMES + 1; for ( band = 0; band < SPAR_DIRAC_SPLIT_START_BAND; band++ ) -- GitLab From a3c92b3c0a977fdd93e40b532d249765c034132d Mon Sep 17 00:00:00 2001 From: Vidhya V P <100825@ittiam.com> Date: Fri, 22 Sep 2023 14:57:39 +0530 Subject: [PATCH 10/14] Resolving USAN error --- lib_dec/jbm_jb4_jmf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/jbm_jb4_jmf.c b/lib_dec/jbm_jb4_jmf.c index 85e9980e6e..4f445f0169 100644 --- a/lib_dec/jbm_jb4_jmf.c +++ b/lib_dec/jbm_jb4_jmf.c @@ -206,7 +206,7 @@ int16_t JB4_JMF_PushPacket( return 0; } - rtpTimeDiff = rtpTimeStamp - h->lastRtpTimeStamp; + rtpTimeDiff = (int32_t)(rtpTimeStamp - h->lastRtpTimeStamp); sysTimeDiff = sysTime - h->lastSysTime; offset = sysTime - rtpTimeStamp; -- GitLab From b12abb9723eea8728f6a98e5f70198d412e6318a Mon Sep 17 00:00:00 2001 From: Vidhya V P <100825@ittiam.com> Date: Fri, 22 Sep 2023 15:15:15 +0530 Subject: [PATCH 11/14] Clang formatting fix --- lib_dec/ivas_masa_dec.c | 2 +- lib_dec/jbm_jb4_jmf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index eccc7fb82c..a84b189230 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -1587,7 +1587,7 @@ void ivas_spar_param_to_masa_param_mapping( for ( slot_idx = 0; slot_idx < hSpar->subframe_nbslots[subframe]; slot_idx++ ) { sf = hSpar->render_to_md_map[slot_idx + slot_idx_start] / JBM_CLDFB_SLOTS_IN_SUBFRAME; - if ( ( subframe < SPAR_META_DELAY_SUBFRAMES ) && (sf < 2 ) ) + if ( ( subframe < SPAR_META_DELAY_SUBFRAMES ) && ( sf < 2 ) ) { mixer_mat_index = sf + MAX_PARAM_SPATIAL_SUBFRAMES - SPAR_META_DELAY_SUBFRAMES + 1; for ( band = 0; band < SPAR_DIRAC_SPLIT_START_BAND; band++ ) diff --git a/lib_dec/jbm_jb4_jmf.c b/lib_dec/jbm_jb4_jmf.c index 4f445f0169..5d7dfa2e6c 100644 --- a/lib_dec/jbm_jb4_jmf.c +++ b/lib_dec/jbm_jb4_jmf.c @@ -206,7 +206,7 @@ int16_t JB4_JMF_PushPacket( return 0; } - rtpTimeDiff = (int32_t)(rtpTimeStamp - h->lastRtpTimeStamp); + rtpTimeDiff = (int32_t) ( rtpTimeStamp - h->lastRtpTimeStamp ); sysTimeDiff = sysTime - h->lastSysTime; offset = sysTime - rtpTimeStamp; -- GitLab From 3ee1d7a57f49667ae8de4c1f9ceb478be136bf76 Mon Sep 17 00:00:00 2001 From: Vidhya V P <100825@ittiam.com> Date: Wed, 27 Sep 2023 18:09:01 +0530 Subject: [PATCH 12/14] Removing the testcase that caused failure , also the fix --- lib_dec/ivas_masa_dec.c | 2 +- lib_dec/jbm_jb4_jmf.c | 2 +- scripts/config/self_test.prm | 5 ----- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/lib_dec/ivas_masa_dec.c b/lib_dec/ivas_masa_dec.c index a84b189230..37cff3347e 100644 --- a/lib_dec/ivas_masa_dec.c +++ b/lib_dec/ivas_masa_dec.c @@ -1587,7 +1587,7 @@ void ivas_spar_param_to_masa_param_mapping( for ( slot_idx = 0; slot_idx < hSpar->subframe_nbslots[subframe]; slot_idx++ ) { sf = hSpar->render_to_md_map[slot_idx + slot_idx_start] / JBM_CLDFB_SLOTS_IN_SUBFRAME; - if ( ( subframe < SPAR_META_DELAY_SUBFRAMES ) && ( sf < 2 ) ) + if ( subframe < SPAR_META_DELAY_SUBFRAMES ) { mixer_mat_index = sf + MAX_PARAM_SPATIAL_SUBFRAMES - SPAR_META_DELAY_SUBFRAMES + 1; for ( band = 0; band < SPAR_DIRAC_SPLIT_START_BAND; band++ ) diff --git a/lib_dec/jbm_jb4_jmf.c b/lib_dec/jbm_jb4_jmf.c index 5d7dfa2e6c..4a35338589 100644 --- a/lib_dec/jbm_jb4_jmf.c +++ b/lib_dec/jbm_jb4_jmf.c @@ -206,7 +206,7 @@ int16_t JB4_JMF_PushPacket( return 0; } - rtpTimeDiff = (int32_t) ( rtpTimeStamp - h->lastRtpTimeStamp ); + rtpTimeDiff = rtpTimeStamp - h->lastRtpTimeStamp ; sysTimeDiff = sysTime - h->lastSysTime; offset = sysTime - rtpTimeStamp; diff --git a/scripts/config/self_test.prm b/scripts/config/self_test.prm index dbe2abf131..62a3cd044b 100644 --- a/scripts/config/self_test.prm +++ b/scripts/config/self_test.prm @@ -1254,11 +1254,6 @@ networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 ../IVAS_dec -Tracefile tracefile_dec -VOIP HOA3 32 netsimoutput testv/stv3OA32c.wav_SBA_80000_32-32_HOA3_JBM5.tst -// SBA at 13.2 kbps, 48kHz in, 48kHz out, BINAURAL out, JBM Prof 5 -../IVAS_cod -sba 1 13200 48 testv/stvFOA48c.wav bit -networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -../IVAS_dec -Tracefile tracefile_dec -VOIP BINAURAL 48 netsimoutput testv/stvFOA32c.wav_SBA_13200_48-48_BINAURAL_JBM5.tst - // Multi-channel 5_1 at 384 kbps, 48kHz in, 48kHz out, 7_1_4 out, JBM Prof 5 ../IVAS_cod -mc 5_1 384000 48 testv/stv51MC48c.wav bit networkSimulator_g192 ../scripts/dly_error_profiles/dly_error_profile_5.dat bit netsimoutput tracefile_sim 2 0 -- GitLab From 27c70335c32bac1712610ad6370a00349ce596bc Mon Sep 17 00:00:00 2001 From: Vidhya V P <100825@ittiam.com> Date: Wed, 27 Sep 2023 18:15:25 +0530 Subject: [PATCH 13/14] Clang fix --- lib_dec/jbm_jb4_jmf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/jbm_jb4_jmf.c b/lib_dec/jbm_jb4_jmf.c index 4a35338589..85e9980e6e 100644 --- a/lib_dec/jbm_jb4_jmf.c +++ b/lib_dec/jbm_jb4_jmf.c @@ -206,7 +206,7 @@ int16_t JB4_JMF_PushPacket( return 0; } - rtpTimeDiff = rtpTimeStamp - h->lastRtpTimeStamp ; + rtpTimeDiff = rtpTimeStamp - h->lastRtpTimeStamp; sysTimeDiff = sysTime - h->lastSysTime; offset = sysTime - rtpTimeStamp; -- GitLab From e09baf50bebd4e37b01393c0fc470794aec98f29 Mon Sep 17 00:00:00 2001 From: azmill Date: Fri, 29 Sep 2023 14:10:02 +1000 Subject: [PATCH 14/14] Reverting test changes --- .../test_sba_bs_enc.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) 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 a17b613a70..d175e1583d 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 @@ -67,9 +67,8 @@ ivas_br_FOA = [ ] ivas_br_HOA2 = ["256000", "384000", "512000"] ivas_br_HOA3 = ["256000", "384000", "512000"] -SID_list = [0, 1] -sample_rate_list = ["48", "32", "16"] +sample_rate_list = ["48", "32", "16"] bypass_list = [1, 2] gain_list = [0, 1] @@ -163,7 +162,6 @@ def test_bypass_enc( @pytest.mark.parametrize("tag", tag_list) @pytest.mark.parametrize("fs", sample_rate_list) @pytest.mark.parametrize("gain_flag", gain_list) -@pytest.mark.parametrize("SID", SID_list) def test_sba_enc_system( dut_encoder_frontend: EncoderFrontend, dut_decoder_frontend: DecoderFrontend, @@ -180,20 +178,18 @@ def test_sba_enc_system( tag, fs, gain_flag, - SID, ): - + SID = 0 if dtx == "1" and ivas_br not in ["13200", "16400", "24400", "32000", "64000"]: # skip high bitrates for DTX until DTX issue is resolved pytest.skip() - if SID == 1: - if ivas_br not in ["13200","16400","64000"] or fs == "16" or gain_flag == 1 or dtx == "0": - pytest.skip() - else: - if ivas_br in ["13200","16400"]: - pytest.skip() if ivas_br == "sw_24k4_256k.bin" and gain_flag != 1: pytest.skip() + if ivas_br == "13200" or ivas_br == "16400": + if dtx == "1" and gain_flag == 0 and fs != "16": + SID = 1 + else: + pytest.skip() if gain_flag == 1 and ivas_br not in ["13200", "16400", "24400", "32000"]: pytest.skip() tag = tag + fs + "c" -- GitLab