From efc78713c3cbb3a50bdc7f74079a0ce64ec20253 Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 7 May 2025 11:10:23 +0200 Subject: [PATCH] port FIX_993_REMOVE_SBA_GET_ORDER --- lib_com/ivas_prot.h | 3 ++- lib_com/ivas_sba_config.c | 8 ++++++-- lib_com/options.h | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 118dd45a1..586bdf8f3 100644 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -3529,13 +3529,14 @@ ivas_error ivas_cldfb_dec_reconfig( int16_t numCldfbAnalyses_old, /* i : number of CLDFB analysis instances in previous frame */ const int16_t numCldfbSyntheses_old /* i : number of CLDFB synthesis instances in previous frame */ ); - +#ifndef FIX_993_REMOVE_SBA_GET_ORDER /*! r: Ambisonic (SBA) order */ int16_t ivas_sba_get_order( const int16_t nb_channels, /* i : Number of ambisonic channels */ const int16_t sba_planar /* i : SBA planar flag */ ); +#endif /*! r: Ambisonic (SBA) order used for analysis and coding */ int16_t ivas_sba_get_analysis_order( const int32_t ivas_total_brate, /* i : IVAS total bitrate */ diff --git a/lib_com/ivas_sba_config.c b/lib_com/ivas_sba_config.c index 64edc48f2..6a985e53e 100644 --- a/lib_com/ivas_sba_config.c +++ b/lib_com/ivas_sba_config.c @@ -64,6 +64,7 @@ void ivas_sba_config( int16_t *element_mode /* o : element mode of the core coder */ ) { +#ifndef FIX_993_REMOVE_SBA_GET_ORDER if ( ( sba_order < 0 ) && ( nb_channels < 0 ) ) { assert( 0 && "Either order or number of channels must be positive" ); @@ -77,6 +78,9 @@ void ivas_sba_config( nb_channels = ivas_sba_get_nchan( sba_order, sba_planar ); } else +#else + if ( nb_channels > 0 ) +#endif { if ( sba_planar ) { @@ -117,7 +121,7 @@ void ivas_sba_config( return; } - +#ifndef FIX_993_REMOVE_SBA_GET_ORDER /*-------------------------------------------------------------------* * ivas_sba_get_order() * @@ -147,7 +151,7 @@ int16_t ivas_sba_get_order( return ( sba_order ); } - +#endif /*-------------------------------------------------------------------* * ivas_sba_get_analysis_order() diff --git a/lib_com/options.h b/lib_com/options.h index 2d952edea..904288e13 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -188,6 +188,7 @@ #define NONBE_FIX_968_ISM_BRIR_WITH_HEADROTATION_5MS_FIX /* FhG : issue #968: differences between 5ms and 20ms rendering for discrete ISM with BRIR and head rotation*/ #define FIX_969_USAN_IGF_ARITH /* FhG: issue 969: fix USAN error in igf_sce_dec; same issue as #962 */ #define FIX_959_MASA_LINEAR_REND /* VA: issue 959: remove unused calling of ivas_sba_linear_renderer() in MASA rendering */ +#define FIX_993_REMOVE_SBA_GET_ORDER /* VA: issue 993: remove unused function ivas_sba_get_order() */ /* #################### End BASOP porting switches ############################ */ -- GitLab