From b4c7d3925fa76b096117c5edb26e50eb99034e56 Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 26 Feb 2024 14:19:44 +0100 Subject: [PATCH] issue 992: remove unused enumerator member IVAS_FILTER_ORDER_2; under FIX_992_REMOVE_IVAS_FILTER_ORDER_2 --- lib_com/ivas_cnst.h | 2 ++ lib_com/ivas_filters.c | 6 ++++++ lib_com/ivas_lfe_com.c | 2 ++ lib_com/ivas_rom_com.c | 3 ++- lib_com/ivas_rom_com.h | 2 ++ lib_com/options.h | 2 +- 6 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index db4e1a7c5b..13606c4de1 100755 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -1442,7 +1442,9 @@ typedef enum typedef enum { IVAS_FILTER_ORDER_1 = 1, +#ifndef FIX_992_REMOVE_IVAS_FILTER_ORDER_2 IVAS_FILTER_ORDER_2 = 2, +#endif IVAS_FILTER_ORDER_4 = 4, } ivas_filter_order; diff --git a/lib_com/ivas_filters.c b/lib_com/ivas_filters.c index fcb871ff34..4aa02c25ec 100644 --- a/lib_com/ivas_filters.c +++ b/lib_com/ivas_filters.c @@ -62,7 +62,11 @@ void ivas_filters_init( int16_t i; filter_state->order = order; +#ifdef FIX_992_REMOVE_IVAS_FILTER_ORDER_2 + if ( order == IVAS_FILTER_ORDER_1 ) +#else if ( order == IVAS_FILTER_ORDER_2 || order == IVAS_FILTER_ORDER_1 ) +#endif { filter_state->filt_len = order + 1; @@ -116,7 +120,9 @@ void ivas_filter_process( switch ( filter_state->order ) { case IVAS_FILTER_ORDER_1: +#ifndef FIX_992_REMOVE_IVAS_FILTER_ORDER_2 case IVAS_FILTER_ORDER_2: +#endif ivas_iir_2_filter( filter_state, pIn_Out, length, IVAS_FILTER_STAGE_0 ); break; case IVAS_FILTER_ORDER_4: diff --git a/lib_com/ivas_lfe_com.c b/lib_com/ivas_lfe_com.c index 83c94551e0..dc39f8f3b7 100644 --- a/lib_com/ivas_lfe_com.c +++ b/lib_com/ivas_lfe_com.c @@ -60,6 +60,7 @@ void ivas_lfe_lpf_select_filt_coeff( { switch ( order ) { +#ifndef FIX_992_REMOVE_IVAS_FILTER_ORDER_2 case IVAS_FILTER_ORDER_2: switch ( sampling_rate ) { @@ -76,6 +77,7 @@ void ivas_lfe_lpf_select_filt_coeff( break; } break; +#endif case IVAS_FILTER_ORDER_4: switch ( sampling_rate ) { diff --git a/lib_com/ivas_rom_com.c b/lib_com/ivas_rom_com.c index 8ab2c86821..0235224a69 100644 --- a/lib_com/ivas_rom_com.c +++ b/lib_com/ivas_rom_com.c @@ -3140,6 +3140,7 @@ const float ivas_lpf_4_butter_48k_sos[IVAS_BIQUAD_FILT_LEN << 2] = 1.00000000471366f, 1.f , -1.98677297369091f, 0.987060670205863f }; +#ifndef FIX_992_REMOVE_IVAS_FILTER_ORDER_2 const float ivas_lpf_2_butter_16k[IVAS_BIQUAD_FILT_LEN << 1] = { 0.000628720643081143f, 0.00125744128616229f, 0.000628720643081143f, 1.f, -1.92783286977036f, 0.930347752342683f @@ -3154,7 +3155,7 @@ const float ivas_lpf_2_butter_48k[IVAS_BIQUAD_FILT_LEN << 1] = { 7.15317998432330e-05f, 0.000143063599686466f, 7.15317998432330e-05f, 1.f, -1.97593552482925f, 0.976221652028620f }; - +#endif const ivas_lfe_freq_models ivas_str_lfe_freq_models = { { 16384, 14924, 13463, 12003, 10542, 9082, 7622, 6161, diff --git a/lib_com/ivas_rom_com.h b/lib_com/ivas_rom_com.h index 2cfecaefb3..8115822ff9 100644 --- a/lib_com/ivas_rom_com.h +++ b/lib_com/ivas_rom_com.h @@ -348,9 +348,11 @@ extern const int16_t Param_ISM_band_grouping[MAX_PARAM_ISM_NBANDS + 1]; extern const float ivas_lpf_4_butter_16k_sos[IVAS_BIQUAD_FILT_LEN << 2]; extern const float ivas_lpf_4_butter_32k_sos[IVAS_BIQUAD_FILT_LEN << 2]; extern const float ivas_lpf_4_butter_48k_sos[IVAS_BIQUAD_FILT_LEN << 2]; +#ifndef FIX_992_REMOVE_IVAS_FILTER_ORDER_2 extern const float ivas_lpf_2_butter_16k[IVAS_BIQUAD_FILT_LEN << 1]; extern const float ivas_lpf_2_butter_32k[IVAS_BIQUAD_FILT_LEN << 1]; extern const float ivas_lpf_2_butter_48k[IVAS_BIQUAD_FILT_LEN << 1]; +#endif extern const float ivas_lfe_window_coeff_48k[IVAS_LFE_FADE_LEN_48K]; extern const float ivas_lfe_window_coeff_32k[IVAS_LFE_FADE_LEN_32K]; diff --git a/lib_com/options.h b/lib_com/options.h index f79b346839..a83fc873da 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -164,7 +164,7 @@ #define FIX_1001_ARI_HM_OVERFLOW /* FhG: fix for undef behaviour in in the harmonic TCX model arithmetic coder */ #define FIX_901_PARAMMC_DEAD_CODE /* FhG: issue 901: remove dead ParamMC code */ #define FIX_1008_EXTORIENT_TARGET_INTERPOLATION /* FhG: issue #1008, external orientation init was wrong for 5ms */ - +#define FIX_992_REMOVE_IVAS_FILTER_ORDER_2 /* VA: issue 992: remove unused enumerator member IVAS_FILTER_ORDER_2 */ /* #################### End BE switches ################################## */ -- GitLab