From 17e116c917760be2cdd07f802e667d8fff0b8ea7 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 12 Jun 2025 10:19:09 +0200 Subject: [PATCH 1/2] remove extra frame argument under DBG_BITSTRREAM_ANALYSIS and make the debugging code explicitly dependent on DEBUGGING --- apps/encoder.c | 7 +-- lib_com/bitstream.c | 63 +++++++++--------------- lib_com/prot_fx.h | 14 +++--- lib_enc/ivas_corecoder_enc_reconfig_fx.c | 8 +-- lib_enc/ivas_init_enc_fx.c | 2 +- lib_enc/ivas_qmetadata_enc_fx.c | 10 ++-- lib_enc/ivas_spar_md_enc_fx.c | 2 +- lib_enc/lib_enc.h | 8 --- lib_enc/lib_enc_fx.c | 13 +---- lib_enc/prot_fx_enc.h | 4 -- lib_enc/stat_enc.h | 2 +- 11 files changed, 46 insertions(+), 87 deletions(-) diff --git a/apps/encoder.c b/apps/encoder.c index 0d557ede8..af9554589 100644 --- a/apps/encoder.c +++ b/apps/encoder.c @@ -758,12 +758,7 @@ int main( } /* *** Encode one frame *** */ - if ( ( error = IVAS_ENC_EncodeFrameToSerial( hIvasEnc, pcmBuf, pcmBufSize, bitStream, &numBits -#ifdef DBG_BITSTREAM_ANALYSIS - , - frame -#endif - ) ) != IVAS_ERR_OK ) + if ( ( error = IVAS_ENC_EncodeFrameToSerial( hIvasEnc, pcmBuf, pcmBufSize, bitStream, &numBits ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nencodeFrame failed: %s\n\n", IVAS_ENC_GetErrorMessage( error ) ); goto cleanup; diff --git a/lib_com/bitstream.c b/lib_com/bitstream.c index 8ebfd6fa7..9a164636b 100644 --- a/lib_com/bitstream.c +++ b/lib_com/bitstream.c @@ -48,9 +48,12 @@ #include "wmc_auto.h" #include "ivas_prot_fx.h" #include "prot_fx_enc.h" -#ifdef DBG_BITSTREAM_ANALYSIS +#ifdef DEBUGGING +#include "debug.h" +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) #include #endif +#endif #define STEP_MAX_NUM_INDICES 100 /* increase the maximum number of allowed indices in the list by this amount */ @@ -201,7 +204,7 @@ ivas_error ind_list_realloc( { new_ind_list[i].id = old_ind_list[i].id; new_ind_list[i].value = old_ind_list[i].value; -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( new_ind_list[i].function_name, old_ind_list[i].function_name, 100 ); #endif move16(); @@ -215,7 +218,7 @@ ivas_error ind_list_realloc( FOR( ; i < max_num_indices; i++ ) { new_ind_list[i].nb_bits = -1; -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) sprintf( new_ind_list[i].function_name, "RESET in ind_list_realloc" ); #endif move16(); @@ -808,7 +811,7 @@ void move_indices( new_ind_list[i].value = old_ind_list[i].value; new_ind_list[i].nb_bits = old_ind_list[i].nb_bits; -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( new_ind_list[i].function_name, old_ind_list[i].function_name, 100 ); #endif old_ind_list[i].nb_bits = -1; @@ -821,12 +824,12 @@ void move_indices( new_ind_list[i].id = old_ind_list[i].id; new_ind_list[i].value = old_ind_list[i].value; new_ind_list[i].nb_bits = old_ind_list[i].nb_bits; -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( new_ind_list[i].function_name, old_ind_list[i].function_name, 100 ); #endif old_ind_list[i].nb_bits = -1; -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) sprintf( old_ind_list[i].function_name, "RESET in move_indices" ); #endif } @@ -897,7 +900,7 @@ ivas_error check_ind_list_limits( return error; } -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) const char *named_indices_table[] = { "IND_IVAS_FORMAT", "IND_SMODE_OMASA", @@ -2817,7 +2820,7 @@ ivas_error push_indice( hBstr->ind_list[j].id = hBstr->ind_list[j - 1].id; hBstr->ind_list[j].nb_bits = hBstr->ind_list[j - 1].nb_bits; hBstr->ind_list[j].value = hBstr->ind_list[j - 1].value; -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( hBstr->ind_list[j].function_name, hBstr->ind_list[j - 1].function_name, 100 ); #endif move16(); @@ -2831,7 +2834,7 @@ ivas_error push_indice( hBstr->ind_list[i].id = id; hBstr->ind_list[i].value = value; hBstr->ind_list[i].nb_bits = nb_bits; -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( hBstr->ind_list[i].function_name, named_indices_table[id], 100 ); #endif move16(); @@ -2852,12 +2855,12 @@ ivas_error push_indice( * * Push a new indice into the buffer at the next position *-------------------------------------------------------------------*/ -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) ivas_error push_next_indice_( #else ivas_error push_next_indice( #endif -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) const char *caller, #endif BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ @@ -2897,7 +2900,7 @@ ivas_error push_next_indice( move16(); move16(); -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( hBstr->ind_list[hBstr->nb_ind_tot].function_name, caller, 100 ); #endif @@ -2914,12 +2917,12 @@ ivas_error push_next_indice( * push_next_bits() * Push a bit buffer into the buffer at the next position *-------------------------------------------------------------------*/ -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) ivas_error push_next_bits_( #else ivas_error push_next_bits( #endif -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) const char *caller, #endif BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ @@ -2965,7 +2968,7 @@ ivas_error push_next_bits( ptr->value = code; ptr->nb_bits = 16; ptr->id = prev_id; -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( ptr->function_name, caller, 100 ); #endif hBstr->nb_ind_tot = add( hBstr->nb_ind_tot, 1 ); @@ -2989,7 +2992,7 @@ ivas_error push_next_bits( ptr->value = bits[i]; ptr->nb_bits = 1; ptr->id = prev_id; -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( ptr->function_name, caller, 100 ); #endif hBstr->nb_ind_tot = add( hBstr->nb_ind_tot, 1 ); @@ -3066,7 +3069,7 @@ UWord16 delete_indice( hBstr->ind_list[j].id = hBstr->ind_list[i].id; hBstr->ind_list[j].value = hBstr->ind_list[i].value; hBstr->ind_list[j].nb_bits = hBstr->ind_list[i].nb_bits; -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( hBstr->ind_list[j].function_name, hBstr->ind_list[i].function_name, 100 ); #endif } @@ -3080,7 +3083,7 @@ UWord16 delete_indice( { /* reset the shifted indices at the end of the list */ hBstr->ind_list[j].nb_bits = -1; -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) sprintf( hBstr->ind_list[j].function_name, "RESET in delete_indice" ); #endif } @@ -3319,10 +3322,6 @@ static ivas_error write_indices_element_fx( UWord16 **pt_stream, /* i : pointer to bitstream buffer */ const Word16 is_SCE, /* i : flag to distingusih SCE and CPE */ const Word16 element_id /* i : id of the SCE or CPE */ -#ifdef DBG_BITSTREAM_ANALYSIS - , - int32_t frame -#endif ) { Word16 ch; @@ -3429,7 +3428,7 @@ static ivas_error write_indices_element_fx( } } -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) if ( is_SCE ) /* EVS and SCE */ { static FILE *f1 = 0; @@ -3539,10 +3538,6 @@ ivas_error write_indices_ivas_fx( Encoder_Struct *st_ivas, /* i/o: encoder state structure */ UWord16 *bit_stream, /* i/o: output bitstream */ UWord16 *num_bits /* i : number of indices written to output */ -#ifdef DBG_BITSTREAM_ANALYSIS - , - int32_t frame -#endif ) { Word16 i, n; @@ -3566,22 +3561,12 @@ ivas_error write_indices_ivas_fx( FOR( n = 0; n < st_ivas->nSCE; n++ ) { - write_indices_element_fx( st_ivas, &pt_stream, 1, n -#ifdef DBG_BITSTREAM_ANALYSIS - , - frame -#endif - ); + write_indices_element_fx( st_ivas, &pt_stream, 1, n ); } FOR( n = 0; n < st_ivas->nCPE; n++ ) { - write_indices_element_fx( st_ivas, &pt_stream, 0, n -#ifdef DBG_BITSTREAM_ANALYSIS - , - frame -#endif - ); + write_indices_element_fx( st_ivas, &pt_stream, 0, n ); } *num_bits = (UWord16) ( pt_stream - bit_stream ); diff --git a/lib_com/prot_fx.h b/lib_com/prot_fx.h index 666484359..9950ac9bd 100644 --- a/lib_com/prot_fx.h +++ b/lib_com/prot_fx.h @@ -10638,17 +10638,17 @@ ivas_error config_acelp1_fx( const Word16 GSC_IVAS_mode /* i : GSC IVAS mode */ ); -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) #define push_next_indice( ... ) push_next_indice_( __func__, __VA_ARGS__ ) #define push_next_bits( ... ) push_next_bits_( __func__, __VA_ARGS__ ); #endif -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) ivas_error push_next_indice_( #else ivas_error push_next_indice( #endif -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) const char *caller, #endif BSTR_ENC_HANDLE hBstr, @@ -10656,12 +10656,12 @@ ivas_error push_next_indice( Word16 nb_bits /* i : number of bits used to quantize the indice */ ); -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) ivas_error push_next_bits_( #else ivas_error push_next_bits( #endif -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) const char *caller, #endif BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ @@ -10986,7 +10986,7 @@ ivas_error push_indice( ); ivas_error push_next_indice_( -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) const char *caller, #endif BSTR_ENC_HANDLE hBstr, @@ -10995,7 +10995,7 @@ ivas_error push_next_indice_( ); ivas_error push_next_bits_( -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) const char *caller, #endif BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ diff --git a/lib_enc/ivas_corecoder_enc_reconfig_fx.c b/lib_enc/ivas_corecoder_enc_reconfig_fx.c index 6a2748e1c..40ee8b95b 100644 --- a/lib_enc/ivas_corecoder_enc_reconfig_fx.c +++ b/lib_enc/ivas_corecoder_enc_reconfig_fx.c @@ -39,7 +39,7 @@ #include "ivas_prot_fx.h" #include "math.h" #include "wmc_auto.h" -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) #include #endif /*-------------------------------------------------------------------* @@ -196,7 +196,7 @@ ivas_error ivas_corecoder_enc_reconfig_fx( move16(); temp_ind_list[i].nb_bits = hBstr->ind_list[i].nb_bits; /* Q0 */ move16(); -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( temp_ind_list[i].function_name, hBstr->ind_list[i].function_name, 100 ); #endif hBstr->ind_list[i].nb_bits = -1; /* Q0 */ @@ -552,7 +552,7 @@ ivas_error ivas_corecoder_enc_reconfig_fx( move16(); st_ivas->hSCE[0]->hCoreCoder[0]->hBstr->ind_list[i].nb_bits = temp_ind_list[i].nb_bits; /* Q0 */ move16(); -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( st_ivas->hSCE[0]->hCoreCoder[0]->hBstr->ind_list[i].function_name, temp_ind_list[i].function_name, 100 ); #endif } @@ -579,7 +579,7 @@ ivas_error ivas_corecoder_enc_reconfig_fx( move16(); st_ivas->hCPE[0]->hCoreCoder[0]->hBstr->ind_list[i].nb_bits = temp_ind_list[i].nb_bits; /* Q0 */ move16(); -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( st_ivas->hCPE[0]->hCoreCoder[0]->hBstr->ind_list[i].function_name, temp_ind_list[i].function_name, 100 ); #endif } diff --git a/lib_enc/ivas_init_enc_fx.c b/lib_enc/ivas_init_enc_fx.c index 2285acc0c..bfaf80fc6 100644 --- a/lib_enc/ivas_init_enc_fx.c +++ b/lib_enc/ivas_init_enc_fx.c @@ -41,7 +41,7 @@ #include "wmc_auto.h" #include "ivas_prot_fx.h" #include "prot_fx_enc.h" -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) #include #endif diff --git a/lib_enc/ivas_qmetadata_enc_fx.c b/lib_enc/ivas_qmetadata_enc_fx.c index 15adcee9c..34af5a727 100644 --- a/lib_enc/ivas_qmetadata_enc_fx.c +++ b/lib_enc/ivas_qmetadata_enc_fx.c @@ -43,7 +43,7 @@ #include "basop_util.h" #include "ivas_rom_com_fx.h" -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) #include #endif @@ -1191,7 +1191,7 @@ void reset_metadata_spatial_fx( { hMetaData->ind_list[i].nb_bits = -1; move16(); -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) sprintf( hMetaData->ind_list[i].function_name, "RESET in reset_metadata_spatial" ); #endif } @@ -1200,12 +1200,12 @@ void reset_metadata_spatial_fx( { hMetaData->ind_list[j].value = hMetaData->ind_list[i].value; hMetaData->ind_list[j].nb_bits = hMetaData->ind_list[i].nb_bits; -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( hMetaData->ind_list[j].function_name, hMetaData->ind_list[i].function_name, 100 ); #endif hMetaData->nb_bits_tot = add( hMetaData->nb_bits_tot, hMetaData->ind_list[j].nb_bits ); hMetaData->ind_list[i].nb_bits = -1; -#ifdef BISTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) sprintf( hMetaData->ind_list[i].function_name, "RESET in reset_metadata_spatial" ); #endif move16(); @@ -2015,7 +2015,7 @@ void restore_metadata_buffer_fx( { hMetaData->ind_list[i].nb_bits = -1; move16(); -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) sprintf( hMetaData->ind_list[i].function_name, "RESET in restore_metadata_buffer" ); #endif } diff --git a/lib_enc/ivas_spar_md_enc_fx.c b/lib_enc/ivas_spar_md_enc_fx.c index a293b870a..1a2f5aff0 100644 --- a/lib_enc/ivas_spar_md_enc_fx.c +++ b/lib_enc/ivas_spar_md_enc_fx.c @@ -439,7 +439,7 @@ static void write_metadata_buffer_fx( FOR( i = 0; i < hMetaData_tmp->nb_ind_tot; i++ ) { -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) push_next_indice_( hMetaData_tmp->ind_list[i].function_name, hMetaData, hMetaData_tmp->ind_list[i].value, hMetaData_tmp->ind_list[i].nb_bits ); #else push_next_indice( hMetaData, hMetaData_tmp->ind_list[i].value, hMetaData_tmp->ind_list[i].nb_bits ); diff --git a/lib_enc/lib_enc.h b/lib_enc/lib_enc.h index 16fc9fe4b..8cf6be1cd 100644 --- a/lib_enc/lib_enc.h +++ b/lib_enc/lib_enc.h @@ -302,10 +302,6 @@ ivas_error IVAS_ENC_EncodeFrameToSerial( Word16 inputBufferSize, /* i : total number of samples in the input buffer. Related function: IVAS_ENC_GetInputBufferSize() */ UWord16 *outputBitStream, /* o : pointer to serial output bitstream. The array must already be allocated and be of size at least IVAS_MAX_BITS_PER_FRAME */ UWord16 *numOutBits /* o : number of bits written to output bitstream. Each bit is stored as a single uint16_t value */ -#ifdef DBG_BITSTREAM_ANALYSIS - , - int32_t frame -#endif ); /*! r: error code */ @@ -315,10 +311,6 @@ ivas_error IVAS_ENC_EncodeFrameToCompact( const Word16 inputBufferSize, /* i : total number of samples in the input buffer. Related function: IVAS_ENC_GetInputBufferSize() */ UWord8 *outputBitStream, /* o : pointer to compact output bitstream. The array must already be allocated. */ UWord16 *numOutBits /* o : number of bits written to output bitstream */ -#ifdef DBG_BITSTREAM_ANALYSIS - , - int32_t frame -#endif ); /* Setter functions - apply changes to encoder configuration */ diff --git a/lib_enc/lib_enc_fx.c b/lib_enc/lib_enc_fx.c index 6c105228f..a7592e2ca 100644 --- a/lib_enc/lib_enc_fx.c +++ b/lib_enc/lib_enc_fx.c @@ -1279,10 +1279,6 @@ ivas_error IVAS_ENC_EncodeFrameToSerial( Word16 inputBufferSize, /* i : total number of samples in the input buffer. Related function: IVAS_ENC_GetInputBufferSize() Q0*/ UWord16 *outputBitStream, /* o : pointer to serial output bitstream. The array must already be allocated and be of size at least IVAS_MAX_BITS_PER_FRAME Q0*/ UWord16 *numOutBits /* o : number of bits written to output bitstream. Each bit is stored as a single uint16_t value Q0*/ -#ifdef DBG_BITSTREAM_ANALYSIS - , - int32_t frame -#endif ) { Encoder_Struct *st_ivas; @@ -1406,7 +1402,7 @@ ivas_error IVAS_ENC_EncodeFrameToSerial( st_ivas->ind_list[i].nb_bits = -1; move16(); } -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) for ( i = 0; i < st_ivas->ivas_max_num_indices; i++ ) { memset( st_ivas->ind_list[i].function_name, 'A', 100 * sizeof( char ) ); @@ -1517,12 +1513,7 @@ ivas_error IVAS_ENC_EncodeFrameToSerial( /* write indices into bitstream buffer */ { - write_indices_ivas_fx( st_ivas, outputBitStream, numOutBits -#ifdef DBG_BITSTREAM_ANALYSIS - , - frame -#endif - ); + write_indices_ivas_fx( st_ivas, outputBitStream, numOutBits ); } /* Reset switching flag before next call - can be set to "true" by some setters */ hIvasEnc->switchingActive = false; diff --git a/lib_enc/prot_fx_enc.h b/lib_enc/prot_fx_enc.h index 992087413..8631a3f51 100644 --- a/lib_enc/prot_fx_enc.h +++ b/lib_enc/prot_fx_enc.h @@ -4839,9 +4839,5 @@ ivas_error write_indices_ivas_fx( Encoder_Struct *st_ivas, /* i/o: encoder state structure */ UWord16 *bit_stream, /* i/o: output bitstream */ UWord16 *num_bits /* i : number of indices written to output */ -#ifdef DBG_BITSTREAM_ANALYSIS - , - int32_t frame -#endif ); #endif diff --git a/lib_enc/stat_enc.h b/lib_enc/stat_enc.h index 85261a3a7..3839e3ec5 100644 --- a/lib_enc/stat_enc.h +++ b/lib_enc/stat_enc.h @@ -54,7 +54,7 @@ typedef struct Word16 id; /* id of the indice */ UWord16 value; /* value of the quantized indice */ Word16 nb_bits; /* number of bits used for the quantization of the indice */ -#ifdef DBG_BITSTREAM_ANALYSIS +#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) char function_name[100]; #endif } Indice, *INDICE_HANDLE; -- GitLab From 876dfec07bfe91091fd33aa7d98feb6547ce82b5 Mon Sep 17 00:00:00 2001 From: Dominik Weckbecker Date: Thu, 26 Jun 2025 11:34:44 +0200 Subject: [PATCH 2/2] simplify function headers --- lib_com/bitstream.c | 10 +++------- lib_com/prot_fx.h | 8 ++------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/lib_com/bitstream.c b/lib_com/bitstream.c index 9a164636b..ed82754b5 100644 --- a/lib_com/bitstream.c +++ b/lib_com/bitstream.c @@ -50,7 +50,7 @@ #include "prot_fx_enc.h" #ifdef DEBUGGING #include "debug.h" -#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) +#ifdef DBG_BITSTREAM_ANALYSIS #include #endif #endif @@ -2857,11 +2857,9 @@ ivas_error push_indice( *-------------------------------------------------------------------*/ #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) ivas_error push_next_indice_( + const char *caller, #else ivas_error push_next_indice( -#endif -#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) - const char *caller, #endif BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ UWord16 value, /* i : value of the quantized indice */ @@ -2919,11 +2917,9 @@ ivas_error push_next_indice( *-------------------------------------------------------------------*/ #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) ivas_error push_next_bits_( + const char *caller, #else ivas_error push_next_bits( -#endif -#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) - const char *caller, #endif BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ const UWord16 bits[], /* i : bit buffer to pack, sequence of single bits */ diff --git a/lib_com/prot_fx.h b/lib_com/prot_fx.h index 9950ac9bd..9675c6ce5 100644 --- a/lib_com/prot_fx.h +++ b/lib_com/prot_fx.h @@ -10645,11 +10645,9 @@ ivas_error config_acelp1_fx( #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) ivas_error push_next_indice_( + const char *caller, #else ivas_error push_next_indice( -#endif -#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) - const char *caller, #endif BSTR_ENC_HANDLE hBstr, UWord16 value, /* i : value of the quantized indice */ @@ -10658,11 +10656,9 @@ ivas_error push_next_indice( #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) ivas_error push_next_bits_( + const char *caller, #else ivas_error push_next_bits( -#endif -#if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) - const char *caller, #endif BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ const UWord16 bits[], /* i : bit buffer to pack, sequence of single bits */ -- GitLab