From 4871c37f0edf01b868a26bdc6abf1b4da1682742 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Sun, 21 Jun 2026 20:53:13 +0200 Subject: [PATCH] align types for bits_frame_nominal and last_bits_frame_nominal to int_16t --- lib_com/options.h | 1 + lib_dec/stat_dec.h | 22 +++++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index a33f3986f..fb020c8c2 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -163,6 +163,7 @@ /*#define FIX_I4_OL_PITCH*/ /* fix open-loop pitch used for EVS core switching */ #define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */ #define NONBE_1122_KEEP_EVS_MODE_UNCHANGED /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR. */ +#define FIX_FLOAT_1613_LAST_BITS_FRAME_NOMINAL /* FhG: align types for bits_frame_nominal and last_bits_frame_nominal to int_16t */ /* #################### End BE switches ################################## */ diff --git a/lib_dec/stat_dec.h b/lib_dec/stat_dec.h index 35b70e5c7..e90eac715 100644 --- a/lib_dec/stat_dec.h +++ b/lib_dec/stat_dec.h @@ -907,15 +907,19 @@ typedef struct Decoder_State int16_t mdct_sw; /* MDCT switching indicator */ int16_t last_codec_mode; /* last used codec mode */ - uint16_t *bit_stream; /* pointer to bitstream buffer */ - int16_t next_bit_pos; /* position of the next bit to be read from the bitstream */ - int16_t BER_detect; /* flag to signal detected bit error in the bitstream */ - int32_t output_Fs; /* output sampling rate */ - int32_t total_brate; /* total bitrate in kbps of the codec */ - int32_t last_total_brate; /* last total bitrate in kbps of the codec */ - int32_t last_total_brate_ber; /* last total bitrate in kbps of the codec - used only when first frame is lost and BER is detected afterwards */ - int16_t bits_frame_nominal; /* avg bits per frame on active frame */ - int32_t last_bits_frame_nominal; /* last avg bits per frame on active frame */ + uint16_t *bit_stream; /* pointer to bitstream buffer */ + int16_t next_bit_pos; /* position of the next bit to be read from the bitstream */ + int16_t BER_detect; /* flag to signal detected bit error in the bitstream */ + int32_t output_Fs; /* output sampling rate */ + int32_t total_brate; /* total bitrate in kbps of the codec */ + int32_t last_total_brate; /* last total bitrate in kbps of the codec */ + int32_t last_total_brate_ber; /* last total bitrate in kbps of the codec - used only when first frame is lost and BER is detected afterwards */ + int16_t bits_frame_nominal; /* avg bits per frame on active frame */ +#ifdef FIX_FLOAT_1613_LAST_BITS_FRAME_NOMINAL + int16_t last_bits_frame_nominal; /* last avg bits per frame on active frame */ +#else + int32_t last_bits_frame_nominal; /* last avg bits per frame on active frame */ +#endif int16_t flag_ACELP16k; /* flag indicating use of ACELP core at 16kHz internal sampling rate */ int16_t bits_frame_channel; /* bits frame channel */ int16_t side_bits_frame_channel; /* bits frame channel */ -- GitLab