Loading lib_com/bits_alloc.c +0 −32 Original line number Diff line number Diff line Loading @@ -536,9 +536,7 @@ ivas_error config_acelp1( const int16_t tdm_lp_reuse_flag, /* i : LPC reuse flag (can be 1 only with secondary channel */ const int16_t tdm_low_rate_mode, /* i : secondary channel low rate mode flag */ const int16_t idchan, /* i : stereo channel ID */ #ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE const int16_t active_cnt, /* i : Active frame counter */ #endif const int16_t tdm_Pitch_reuse_flag, /* i : primary channel pitch reuse flag*/ const int16_t tdm_LRTD_flag, /* i : LRTD stereo mode flag */ const int16_t GSC_IVAS_mode /* i : GSC IVAS mode */ Loading Loading @@ -756,12 +754,10 @@ ivas_error config_acelp1( bits -= acelp_cfg->mid_lsf_bits; } #ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE else if ( tdm_lp_reuse_flag == 1 && idchan == 1 && active_cnt != 1 ) { bits -= TDM_IC_LSF_PRED_BITS; } #endif /* gain Q bit-budget - part 1 */ if ( ( coder_type != UNVOICED && coder_type != AUDIO && coder_type != INACTIVE && !( core_brate <= ACELP_8k00 && coder_type != TRANSITION ) ) || ( coder_type == INACTIVE && total_brate > MAX_GSC_INACTIVE_BRATE ) ) Loading Loading @@ -1318,7 +1314,6 @@ ivas_error config_acelp1( { if ( idchan > 0 && element_mode == IVAS_CPE_TD ) { #ifdef LSF_RE_USE_SECONDARY_CHANNEL if ( !tdm_lp_reuse_flag ) { acelp_cfg->lsf_bits += bits; /* increase LSF Q bits */ Loading Loading @@ -1348,33 +1343,6 @@ ivas_error config_acelp1( bits -= allocate_unused( core_brate, coder_type, bits, 1, 0, LSFPRM, &acelp_cfg->lsf_bits ); } } #else int16_t nb_prm = 4; if ( tdm_low_rate_mode == 1 ) { nb_prm = 2; } /* First add remaining bits on gains */ if ( !( *uc_two_stage_flag ) ) { bits -= allocate_unused( core_brate, coder_type, bits, nb_prm, 0, GAINSPRM, acelp_cfg->gains_mode ); } /* Then, Increase pitch bit budget */ if ( tdm_Pitch_reuse_flag == 0 && bits > 0 ) { bits -= allocate_unused( core_brate, coder_type, bits, nb_prm, 0, PITCHPRM, acelp_cfg->pitch_bits ); } /* Increase mid-lsf bit budget */ if ( tdm_lp_reuse_flag == 0 && bits > 0 ) { bits -= allocate_unused( core_brate, coder_type, bits, 1, 0, MID_LSFSPRM, &acelp_cfg->mid_lsf_bits ); bits -= allocate_unused( core_brate, coder_type, bits, 1, 0, LSFPRM, &acelp_cfg->lsf_bits ); } #endif #ifdef DEBUGGING if ( idchan > 0 && bits > 0 && ( coder_type > UNVOICED || tdm_low_rate_mode == 0 ) ) { Loading lib_com/cnst.h +0 −2 Original line number Diff line number Diff line Loading @@ -294,9 +294,7 @@ enum IND_ISF_1_2, IND_ISF_1_3, IND_ISF_1_4, #ifdef LSF_RE_USE_SECONDARY_CHANNEL IND_IC_LSF_PRED, #endif IND_GSC_ATTACK, IND_GSC_SWB_SPEECH, IND_NOISE_LEVEL, Loading lib_com/ivas_cnst.h +0 −4 Original line number Diff line number Diff line Loading @@ -791,11 +791,7 @@ enum fea_names #define TDM_LP_REUSE_BITS 1 /* number of bits to code LP reuse flag for secondary channel */ #define TDM_LR_CONTENT_BITS 1 /* number of bits to code flag when the content is LR or not */ #define TDM_SIGNAL_BITS_READ_FROM_THE_END_OF_BS ( TDM_SECONDARY_SIGNALLING + TDM_RATIO_BITS + TDM_LP_REUSE_BITS + TDM_LR_CONTENT_BITS + STEREO_BITS_TCA ) #ifdef LSF_RE_USE_SECONDARY_CHANNEL #ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE #define TDM_IC_LSF_PRED_BITS 1 /* number of bits to code the inter channel LSF prediction mode */ #endif #endif /*----------------------------------------------------------------------------------* Loading lib_com/ivas_prot.h +0 −4 Original line number Diff line number Diff line Loading @@ -1915,14 +1915,12 @@ void tdm_low_rate_dec( const float *lsf_new /* i : ISFs at the end of the frame */ ); #ifdef LSF_RE_USE_SECONDARY_CHANNEL void tdm_SCh_LSF_intra_pred( const int32_t element_brate, /* i : element bitrate */ const float *tdm_lsfQ_PCh, /* i : primary channel LSFs */ float *pred_lsf_SCh /* o : predicted secondary channel LSFs */ ); #ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE void tdm_SCh_lsf_reuse( const int16_t enc_dec, /* i : encoder/decoder flag */ const int32_t element_brate, /* i : element bitrate */ Loading @@ -1932,8 +1930,6 @@ void tdm_SCh_lsf_reuse( const float lsf_wgts[M], /* i : LSF weights */ int16_t *beta_index /* i/o: quantization index */ ); #endif #endif void first_VQstages( const float *const *cb, Loading lib_com/ivas_rom_com.c +0 −16 Original line number Diff line number Diff line Loading @@ -628,7 +628,6 @@ const float tdm_den_ratio_tabl[TDM_NQ+1] = /* 1.0f/(2*LR_ratio*LR_ratio-2*LR_ra 1.2088f, 1.1429f, 1.0902f, 1.0501f, 1.0221f, 1.0000f, 1.0000f, 1.0000f }; #ifdef LSF_RE_USE_SECONDARY_CHANNEL const int16_t tdm_bit_allc_tbl[5][6] = { /* IC -- UC -- GC -- TM --AC */ Loading @@ -638,21 +637,8 @@ const int16_t tdm_bit_allc_tbl[5][6] = { 1650, 6050, 0, 10000, 0, 10000 }, /* IVAS_32k */ { 1650, 6050, 0, 13000, 0, 14000 } /* IVAS_48k */ }; #else const int16_t tdm_bit_allc_tbl[5][6] = { /* IC -- UC -- GC -- TM --AC */ { 1600, 3450, 0, 4400, 0, 5000 }, /* IVAS_13k2 */ { 1600, 3450, 0, 5000, 0, 5000 }, /* IVAS_16k4 */ { 1600, 3450, 0, 6000, 0, 5000 }, /* IVAS_24k4 */ { 1600, 6000, 0, 10000, 0, 10000 }, /* IVAS_32k */ { 1600, 6000, 0, 13000, 0, 14000 } /* IVAS_48k */ }; #endif #ifdef LSF_RE_USE_SECONDARY_CHANNEL /* LSFs Intra-frame prediction tables */ #ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE const float tdm_LSF_MEAN_RE_USE_OUT[M] = { 301.292f, 521.300f, 870.818f, 1340.278f, 1712.099f, 2091.456f, 2488.523f, 2841.096f, 3196.565f, 3593.040f, 3958.366f, 4293.334f, 4710.319f, 5118.806f, 5546.761f, 5918.579f, Loading Loading @@ -693,7 +679,6 @@ const float tdm_RE_USE_adaptive_beta_prd_diag_3[15 + 16 + 15] = 0.2043f, 0.6317f, 0.0543f, 0.1767f, 0.5396f, }; #endif const float tdm_LSF_MEAN_PRED_QNT[M] = { Loading Loading @@ -729,7 +714,6 @@ const float tdm_PRED_QNT_fixed_beta_prd_diag_3[15 + 16 + 15] = 0.1709f, 0.6372f, 0.1060f, 0.1193f, 0.6574f, }; #endif const int16_t fast_FCB_bits_2sfr[] = {8, 14, 18, 20, 24, 128/*stop value*/}; Loading Loading
lib_com/bits_alloc.c +0 −32 Original line number Diff line number Diff line Loading @@ -536,9 +536,7 @@ ivas_error config_acelp1( const int16_t tdm_lp_reuse_flag, /* i : LPC reuse flag (can be 1 only with secondary channel */ const int16_t tdm_low_rate_mode, /* i : secondary channel low rate mode flag */ const int16_t idchan, /* i : stereo channel ID */ #ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE const int16_t active_cnt, /* i : Active frame counter */ #endif const int16_t tdm_Pitch_reuse_flag, /* i : primary channel pitch reuse flag*/ const int16_t tdm_LRTD_flag, /* i : LRTD stereo mode flag */ const int16_t GSC_IVAS_mode /* i : GSC IVAS mode */ Loading Loading @@ -756,12 +754,10 @@ ivas_error config_acelp1( bits -= acelp_cfg->mid_lsf_bits; } #ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE else if ( tdm_lp_reuse_flag == 1 && idchan == 1 && active_cnt != 1 ) { bits -= TDM_IC_LSF_PRED_BITS; } #endif /* gain Q bit-budget - part 1 */ if ( ( coder_type != UNVOICED && coder_type != AUDIO && coder_type != INACTIVE && !( core_brate <= ACELP_8k00 && coder_type != TRANSITION ) ) || ( coder_type == INACTIVE && total_brate > MAX_GSC_INACTIVE_BRATE ) ) Loading Loading @@ -1318,7 +1314,6 @@ ivas_error config_acelp1( { if ( idchan > 0 && element_mode == IVAS_CPE_TD ) { #ifdef LSF_RE_USE_SECONDARY_CHANNEL if ( !tdm_lp_reuse_flag ) { acelp_cfg->lsf_bits += bits; /* increase LSF Q bits */ Loading Loading @@ -1348,33 +1343,6 @@ ivas_error config_acelp1( bits -= allocate_unused( core_brate, coder_type, bits, 1, 0, LSFPRM, &acelp_cfg->lsf_bits ); } } #else int16_t nb_prm = 4; if ( tdm_low_rate_mode == 1 ) { nb_prm = 2; } /* First add remaining bits on gains */ if ( !( *uc_two_stage_flag ) ) { bits -= allocate_unused( core_brate, coder_type, bits, nb_prm, 0, GAINSPRM, acelp_cfg->gains_mode ); } /* Then, Increase pitch bit budget */ if ( tdm_Pitch_reuse_flag == 0 && bits > 0 ) { bits -= allocate_unused( core_brate, coder_type, bits, nb_prm, 0, PITCHPRM, acelp_cfg->pitch_bits ); } /* Increase mid-lsf bit budget */ if ( tdm_lp_reuse_flag == 0 && bits > 0 ) { bits -= allocate_unused( core_brate, coder_type, bits, 1, 0, MID_LSFSPRM, &acelp_cfg->mid_lsf_bits ); bits -= allocate_unused( core_brate, coder_type, bits, 1, 0, LSFPRM, &acelp_cfg->lsf_bits ); } #endif #ifdef DEBUGGING if ( idchan > 0 && bits > 0 && ( coder_type > UNVOICED || tdm_low_rate_mode == 0 ) ) { Loading
lib_com/cnst.h +0 −2 Original line number Diff line number Diff line Loading @@ -294,9 +294,7 @@ enum IND_ISF_1_2, IND_ISF_1_3, IND_ISF_1_4, #ifdef LSF_RE_USE_SECONDARY_CHANNEL IND_IC_LSF_PRED, #endif IND_GSC_ATTACK, IND_GSC_SWB_SPEECH, IND_NOISE_LEVEL, Loading
lib_com/ivas_cnst.h +0 −4 Original line number Diff line number Diff line Loading @@ -791,11 +791,7 @@ enum fea_names #define TDM_LP_REUSE_BITS 1 /* number of bits to code LP reuse flag for secondary channel */ #define TDM_LR_CONTENT_BITS 1 /* number of bits to code flag when the content is LR or not */ #define TDM_SIGNAL_BITS_READ_FROM_THE_END_OF_BS ( TDM_SECONDARY_SIGNALLING + TDM_RATIO_BITS + TDM_LP_REUSE_BITS + TDM_LR_CONTENT_BITS + STEREO_BITS_TCA ) #ifdef LSF_RE_USE_SECONDARY_CHANNEL #ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE #define TDM_IC_LSF_PRED_BITS 1 /* number of bits to code the inter channel LSF prediction mode */ #endif #endif /*----------------------------------------------------------------------------------* Loading
lib_com/ivas_prot.h +0 −4 Original line number Diff line number Diff line Loading @@ -1915,14 +1915,12 @@ void tdm_low_rate_dec( const float *lsf_new /* i : ISFs at the end of the frame */ ); #ifdef LSF_RE_USE_SECONDARY_CHANNEL void tdm_SCh_LSF_intra_pred( const int32_t element_brate, /* i : element bitrate */ const float *tdm_lsfQ_PCh, /* i : primary channel LSFs */ float *pred_lsf_SCh /* o : predicted secondary channel LSFs */ ); #ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE void tdm_SCh_lsf_reuse( const int16_t enc_dec, /* i : encoder/decoder flag */ const int32_t element_brate, /* i : element bitrate */ Loading @@ -1932,8 +1930,6 @@ void tdm_SCh_lsf_reuse( const float lsf_wgts[M], /* i : LSF weights */ int16_t *beta_index /* i/o: quantization index */ ); #endif #endif void first_VQstages( const float *const *cb, Loading
lib_com/ivas_rom_com.c +0 −16 Original line number Diff line number Diff line Loading @@ -628,7 +628,6 @@ const float tdm_den_ratio_tabl[TDM_NQ+1] = /* 1.0f/(2*LR_ratio*LR_ratio-2*LR_ra 1.2088f, 1.1429f, 1.0902f, 1.0501f, 1.0221f, 1.0000f, 1.0000f, 1.0000f }; #ifdef LSF_RE_USE_SECONDARY_CHANNEL const int16_t tdm_bit_allc_tbl[5][6] = { /* IC -- UC -- GC -- TM --AC */ Loading @@ -638,21 +637,8 @@ const int16_t tdm_bit_allc_tbl[5][6] = { 1650, 6050, 0, 10000, 0, 10000 }, /* IVAS_32k */ { 1650, 6050, 0, 13000, 0, 14000 } /* IVAS_48k */ }; #else const int16_t tdm_bit_allc_tbl[5][6] = { /* IC -- UC -- GC -- TM --AC */ { 1600, 3450, 0, 4400, 0, 5000 }, /* IVAS_13k2 */ { 1600, 3450, 0, 5000, 0, 5000 }, /* IVAS_16k4 */ { 1600, 3450, 0, 6000, 0, 5000 }, /* IVAS_24k4 */ { 1600, 6000, 0, 10000, 0, 10000 }, /* IVAS_32k */ { 1600, 6000, 0, 13000, 0, 14000 } /* IVAS_48k */ }; #endif #ifdef LSF_RE_USE_SECONDARY_CHANNEL /* LSFs Intra-frame prediction tables */ #ifdef LSF_RE_USE_SECONDARY_CHANNEL_REUSEMODE const float tdm_LSF_MEAN_RE_USE_OUT[M] = { 301.292f, 521.300f, 870.818f, 1340.278f, 1712.099f, 2091.456f, 2488.523f, 2841.096f, 3196.565f, 3593.040f, 3958.366f, 4293.334f, 4710.319f, 5118.806f, 5546.761f, 5918.579f, Loading Loading @@ -693,7 +679,6 @@ const float tdm_RE_USE_adaptive_beta_prd_diag_3[15 + 16 + 15] = 0.2043f, 0.6317f, 0.0543f, 0.1767f, 0.5396f, }; #endif const float tdm_LSF_MEAN_PRED_QNT[M] = { Loading Loading @@ -729,7 +714,6 @@ const float tdm_PRED_QNT_fixed_beta_prd_diag_3[15 + 16 + 15] = 0.1709f, 0.6372f, 0.1060f, 0.1193f, 0.6574f, }; #endif const int16_t fast_FCB_bits_2sfr[] = {8, 14, 18, 20, 24, 128/*stop value*/}; Loading