From b1390667c915cfeef18f475c7e72e8046a7c712b Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Sat, 12 Aug 2023 22:59:11 +0200 Subject: [PATCH 1/2] wrap ivas_binaural_cldfb(), ivas_binaural_cldfb_sf() into #ifdef DEBUGGING ... #endif --- lib_com/ivas_prot.h | 2 ++ lib_dec/ivas_binRenderer_internal.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h index 02bdaa5d0b..c4c4095a0e 100755 --- a/lib_com/ivas_prot.h +++ b/lib_com/ivas_prot.h @@ -5393,6 +5393,7 @@ ivas_error ivas_allocate_binaural_hrtf( int16_t allocate_init_flag /* i : Memory allocation flag */ ); +#ifdef DEBUGGING void ivas_binaural_cldfb( Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ float *output_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ @@ -5404,6 +5405,7 @@ void ivas_binaural_cldfb_sf( const int16_t slot_size, /* i : JBM slot size */ float *output_f[] /* i/o: synthesized core-coder transport channels/DirAC output */ ); +#endif void ivas_binRenderer( BINAURAL_RENDERER_HANDLE hBinRenderer, /* i/o: binaural renderer handle */ diff --git a/lib_dec/ivas_binRenderer_internal.c b/lib_dec/ivas_binRenderer_internal.c index ee8b838e94..adf3bf23e3 100644 --- a/lib_dec/ivas_binRenderer_internal.c +++ b/lib_dec/ivas_binRenderer_internal.c @@ -1562,6 +1562,7 @@ void ivas_binaural_add_LFE( } +#ifdef DEBUGGING /*-------------------------------------------------------------------------* * ivas_binaural_cldfb() * @@ -1875,6 +1876,7 @@ void ivas_binaural_cldfb_sf( return; } +#endif /*------------------------------------------------------------------------- -- GitLab From 9be961a10266abc9203177f4c83a3f33b2dba36d Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Sun, 13 Aug 2023 21:36:13 +0200 Subject: [PATCH 2/2] remove get_core_max_num_indices(), correct function name in comment (was: ivas_sba_get_max_md_bits(); actually is: ivas_get_dirac_sba_max_md_bits()), put BS_Reader_Rewind() into #ifdef DEBUGGING ... #endif --- lib_com/bitstream.c | 176 ------------------------------------ lib_com/ivas_dirac_com.c | 2 +- lib_com/prot.h | 6 -- lib_util/bitstream_reader.c | 2 + lib_util/bitstream_reader.h | 2 + 5 files changed, 5 insertions(+), 183 deletions(-) diff --git a/lib_com/bitstream.c b/lib_com/bitstream.c index a85a6f3992..6975167457 100644 --- a/lib_com/bitstream.c +++ b/lib_com/bitstream.c @@ -576,182 +576,6 @@ int16_t get_ivas_max_num_indices( return 2450; } -/*-----------------------------------------------------------------------* - * get_core_max_num_indices() - * - * Get the maximum allowed number of indices in the core coder - *-----------------------------------------------------------------------*/ - -/*! r: maximum number of indices */ -int16_t get_core_max_num_indices( - const int16_t core, /* i : core */ - const int32_t total_brate /* i : total bitrate */ -) -{ - - /* set the maximum number of indices in the core coder */ - if ( core == ACELP_CORE || core == AMR_WB_CORE ) - { - if ( total_brate <= 9600 ) - { - return 60; - } - else if ( total_brate <= IVAS_13k2 ) - { - return 70; - } - else if ( total_brate <= IVAS_16k4 ) - { - return 80; - } - else if ( total_brate <= IVAS_24k4 ) - { - return 100; - } - else if ( total_brate <= IVAS_32k ) - { - return 180; - } - else if ( total_brate <= IVAS_48k ) - { - return 340; - } - else if ( total_brate <= IVAS_80k ) - { - return 450; - } - else if ( total_brate <= IVAS_96k ) - { - return 500; - } - else if ( total_brate <= IVAS_128k ) - { - return 550; - } - else if ( total_brate <= IVAS_160k ) - { - return 600; - } - else if ( total_brate <= IVAS_192k ) - { - return 650; - } - else if ( total_brate <= IVAS_256k ) - { - return 700; - } - else - { - return 800; - } - } - else if ( core == TCX_20_CORE || core == TCX_10_CORE ) - { - if ( total_brate <= 9600 ) - { - return 100; - } - else if ( total_brate <= IVAS_13k2 ) - { - return 150; - } - else if ( total_brate <= IVAS_16k4 ) - { - return 200; - } - else if ( total_brate <= IVAS_24k4 ) - { - return 310; - } - else if ( total_brate <= IVAS_32k ) - { - return 330; - } - else if ( total_brate <= IVAS_48k ) - { - return 340; - } - else if ( total_brate <= IVAS_80k ) - { - return 380; - } - else if ( total_brate <= IVAS_96k ) - { - return 400; - } - else if ( total_brate <= IVAS_128k ) - { - return 460; - } - else if ( total_brate <= IVAS_160k ) - { - return 470; - } - else if ( total_brate <= IVAS_192k ) - { - return 570; - } - else if ( total_brate <= IVAS_256k ) - { - return 680; - } - else - { - return 800; - } - } - else if ( core == HQ_CORE ) - { - if ( total_brate <= 9600 ) - { - return 100; - } - else if ( total_brate <= IVAS_16k4 ) - { - return 200; - } - else if ( total_brate <= IVAS_24k4 ) - { - return 240; - } - else if ( total_brate <= IVAS_32k ) - { - return 300; - } - else if ( total_brate <= IVAS_48k ) - { - return 380; - } - else if ( total_brate <= IVAS_96k ) - { - return 400; - } - else if ( total_brate <= IVAS_128k ) - { - return 450; - } - else if ( total_brate <= IVAS_160k ) - { - return 550; - } - else if ( total_brate <= IVAS_192k ) - { - return 600; - } - else if ( total_brate <= IVAS_256k ) - { - return 700; - } - else - { - return 800; - } - } - else - { - return 50; - } -} /*-----------------------------------------------------------------------* * get_BWE_max_num_indices() diff --git a/lib_com/ivas_dirac_com.c b/lib_com/ivas_dirac_com.c index 7852e8e0fb..605635b634 100644 --- a/lib_com/ivas_dirac_com.c +++ b/lib_com/ivas_dirac_com.c @@ -325,7 +325,7 @@ void ivas_dirac_config_bands( } /*-------------------------------------------------------------------* - * ivas_sba_get_max_md_bits() + * ivas_get_dirac_sba_max_md_bits() * * Return maximum SBA DirAC metadata bit-budget and nominal bit-budget *-------------------------------------------------------------------*/ diff --git a/lib_com/prot.h b/lib_com/prot.h index 9610324886..7d08e5fbbd 100644 --- a/lib_com/prot.h +++ b/lib_com/prot.h @@ -521,12 +521,6 @@ int16_t get_ivas_max_num_indices( const int32_t ivas_total_brate /* i : IVAS total bitrate */ ); -/*! r: maximum number of indices */ -int16_t get_core_max_num_indices( - const int16_t core, /* i : core */ - const int32_t total_brate /* i : total bitrate */ -); - /*! r: maximum number of indices */ int16_t get_BWE_max_num_indices( const int32_t extl_brate /* i : extensiona layer bitrate */ diff --git a/lib_util/bitstream_reader.c b/lib_util/bitstream_reader.c index 999332e863..2e88746c03 100644 --- a/lib_util/bitstream_reader.c +++ b/lib_util/bitstream_reader.c @@ -263,6 +263,7 @@ cleanup: return error; } +#ifdef DEBUGGING ivas_error BS_Reader_Rewind( BS_READER_HANDLE hBsReader ) { if ( hBsReader == NULL ) @@ -277,6 +278,7 @@ ivas_error BS_Reader_Rewind( BS_READER_HANDLE hBsReader ) return hBsReader->rewind( hBsReader->hFormatReader ); } +#endif ivas_error BS_Reader_ReadFrame_short( BS_READER_HANDLE hBsReader, uint16_t *serial, int16_t *num_bits, int16_t *bfi ) { diff --git a/lib_util/bitstream_reader.h b/lib_util/bitstream_reader.h index 2accbbd242..374c19d436 100644 --- a/lib_util/bitstream_reader.h +++ b/lib_util/bitstream_reader.h @@ -58,7 +58,9 @@ typedef struct BS_Reader *BS_READER_HANDLE; ivas_error BS_Reader_Open_filename( BS_READER_HANDLE *phBsReader, const char *filename, BS_READER_FORMAT format ); +#ifdef DEBUGGING ivas_error BS_Reader_Rewind( BS_READER_HANDLE hBsReader ); +#endif ivas_error BS_Reader_ReadFrame_short( BS_READER_HANDLE hBsReader, uint16_t *serial, int16_t *num_bits, int16_t *bfi ); -- GitLab