Loading lib_com/bits_alloc.c +21 −53 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/bitstream.c +0 −4 Original line number Diff line number Diff line Loading @@ -1801,11 +1801,7 @@ ivas_error preview_indices( if ( bit_stream[2] == 0 ) { st_ivas->ivas_format = SBA_FORMAT; #ifndef LBR_SBA st_ivas->sba_mode = ivas_sba_mode_select( total_brate ); #else st_ivas->sba_mode = ivas_sba_mode_select(); #endif } else { Loading lib_com/cnst.h +0 −4 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 Loading @@ -1391,7 +1389,6 @@ enum #define NPARTCLDFB 10 #define NPART_SHAPING 62 #ifdef ERI_FDCNGVQ_LOW_ROM #define FDCNG_VQ_MAX_LEN FD_CNG_maxN_37bits #define FDCNG_VQ_DCT_NSEGM 4 #define FDCNG_VQ_DCT_MINTRUNC 8 Loading @@ -1408,7 +1405,6 @@ typedef enum _DCTTYPE IDCT_T2_XX_21 = 3 } DCTTYPE; #endif #define MSSUBFRLEN 12 #define MSNUMSUBFR 6 Loading lib_com/ivas_cnst.h +0 −10 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 Loading @@ -986,9 +982,7 @@ typedef enum /* Common SPAR metadata constants */ #define IVAS_ACTIVEW_DM_F_SCALE 0.5f #define IVAS_ACTIVEW_DM_F_SCALE_DTX 0.25f #ifdef LBR_SBA #define IVAS_ACTIVEW_DM_F_SCALE_VLBR 0.25f #endif #define IVAS_SPAR_FOA_DFLT_FREQ_PER_CHAN 24000 #define MAX_QUANT_STRATS 3 Loading Loading @@ -1021,11 +1015,7 @@ typedef enum DECX_COEFF } ivas_coeffs_type_t; #ifdef LBR_SBA #define IVAS_SPAR_BR_TABLE_LEN 20 #else #define IVAS_SPAR_BR_TABLE_LEN 18 #endif /* TD decorr */ // VE: not all 16CH are currently supported -> t be revisited later enum Loading lib_com/ivas_cov_smooth.c +2 −18 Original line number Diff line number Diff line Loading @@ -52,14 +52,10 @@ static void ivas_set_up_cov_smoothing( const float max_update_rate, const int16_t min_pool_size, const int16_t nchan_inp /* i : number of input channels */ #ifdef LBR_SBA_EXTRA_COV_SMOOTH , const int32_t ivas_total_brate #endif ) const int32_t ivas_total_brate ) { int16_t j, k; #ifdef LBR_SBA_DM_COV_FIX if ( ivas_total_brate < IVAS_24k4 ) { for ( j = 0; j < pFb->filterbank_num_bands; j++ ) Loading @@ -77,7 +73,6 @@ static void ivas_set_up_cov_smoothing( } hCovState->pSmoothing_factor[j] = update_factor / min_pool_size; #ifdef LBR_SBA_EXTRA_COV_SMOOTH float smooth_fact; if ( ivas_total_brate < IVAS_24k4 ) { Loading @@ -88,9 +83,6 @@ static void ivas_set_up_cov_smoothing( smooth_fact = 0.75; } hCovState->pSmoothing_factor[j] *= ( j + 1 ) * smooth_fact; #else hCovState->pSmoothing_factor[j] *= ( j + 1 ) * 0.75f; #endif if ( hCovState->pSmoothing_factor[j] > max_update_rate ) { Loading @@ -98,9 +90,7 @@ static void ivas_set_up_cov_smoothing( } } } else #endif if ( nchan_inp <= FOA_CHANNELS ) else if ( nchan_inp <= FOA_CHANNELS ) { for ( j = 0; j < pFb->filterbank_num_bands; j++ ) { Loading Loading @@ -159,10 +149,8 @@ ivas_error ivas_spar_covar_smooth_enc_open( const ivas_cov_smooth_cfg_t *cov_smooth_cfg, /* i : SPAR config. handle */ ivas_filterbank_t *pFb, /* i/o: FB handle */ const int16_t nchan_inp /* i : number of input channels */ #ifdef LBR_SBA_EXTRA_COV_SMOOTH , const int32_t ivas_total_brate /* i : IVAS total bitrate */ #endif ) { ivas_cov_smooth_state_t *hCovState; Loading Loading @@ -190,11 +178,7 @@ ivas_error ivas_spar_covar_smooth_enc_open( } } #ifdef LBR_SBA_EXTRA_COV_SMOOTH ivas_set_up_cov_smoothing( hCovState, pFb, cov_smooth_cfg->max_update_rate, cov_smooth_cfg->min_pool_size, nchan_inp, ivas_total_brate ); #else ivas_set_up_cov_smoothing( hCovState, pFb, cov_smooth_cfg->max_update_rate, cov_smooth_cfg->min_pool_size, nchan_inp ); #endif *hCovState_out = hCovState; Loading Loading
lib_com/bits_alloc.c +21 −53 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/bitstream.c +0 −4 Original line number Diff line number Diff line Loading @@ -1801,11 +1801,7 @@ ivas_error preview_indices( if ( bit_stream[2] == 0 ) { st_ivas->ivas_format = SBA_FORMAT; #ifndef LBR_SBA st_ivas->sba_mode = ivas_sba_mode_select( total_brate ); #else st_ivas->sba_mode = ivas_sba_mode_select(); #endif } else { Loading
lib_com/cnst.h +0 −4 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 Loading @@ -1391,7 +1389,6 @@ enum #define NPARTCLDFB 10 #define NPART_SHAPING 62 #ifdef ERI_FDCNGVQ_LOW_ROM #define FDCNG_VQ_MAX_LEN FD_CNG_maxN_37bits #define FDCNG_VQ_DCT_NSEGM 4 #define FDCNG_VQ_DCT_MINTRUNC 8 Loading @@ -1408,7 +1405,6 @@ typedef enum _DCTTYPE IDCT_T2_XX_21 = 3 } DCTTYPE; #endif #define MSSUBFRLEN 12 #define MSNUMSUBFR 6 Loading
lib_com/ivas_cnst.h +0 −10 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 Loading @@ -986,9 +982,7 @@ typedef enum /* Common SPAR metadata constants */ #define IVAS_ACTIVEW_DM_F_SCALE 0.5f #define IVAS_ACTIVEW_DM_F_SCALE_DTX 0.25f #ifdef LBR_SBA #define IVAS_ACTIVEW_DM_F_SCALE_VLBR 0.25f #endif #define IVAS_SPAR_FOA_DFLT_FREQ_PER_CHAN 24000 #define MAX_QUANT_STRATS 3 Loading Loading @@ -1021,11 +1015,7 @@ typedef enum DECX_COEFF } ivas_coeffs_type_t; #ifdef LBR_SBA #define IVAS_SPAR_BR_TABLE_LEN 20 #else #define IVAS_SPAR_BR_TABLE_LEN 18 #endif /* TD decorr */ // VE: not all 16CH are currently supported -> t be revisited later enum Loading
lib_com/ivas_cov_smooth.c +2 −18 Original line number Diff line number Diff line Loading @@ -52,14 +52,10 @@ static void ivas_set_up_cov_smoothing( const float max_update_rate, const int16_t min_pool_size, const int16_t nchan_inp /* i : number of input channels */ #ifdef LBR_SBA_EXTRA_COV_SMOOTH , const int32_t ivas_total_brate #endif ) const int32_t ivas_total_brate ) { int16_t j, k; #ifdef LBR_SBA_DM_COV_FIX if ( ivas_total_brate < IVAS_24k4 ) { for ( j = 0; j < pFb->filterbank_num_bands; j++ ) Loading @@ -77,7 +73,6 @@ static void ivas_set_up_cov_smoothing( } hCovState->pSmoothing_factor[j] = update_factor / min_pool_size; #ifdef LBR_SBA_EXTRA_COV_SMOOTH float smooth_fact; if ( ivas_total_brate < IVAS_24k4 ) { Loading @@ -88,9 +83,6 @@ static void ivas_set_up_cov_smoothing( smooth_fact = 0.75; } hCovState->pSmoothing_factor[j] *= ( j + 1 ) * smooth_fact; #else hCovState->pSmoothing_factor[j] *= ( j + 1 ) * 0.75f; #endif if ( hCovState->pSmoothing_factor[j] > max_update_rate ) { Loading @@ -98,9 +90,7 @@ static void ivas_set_up_cov_smoothing( } } } else #endif if ( nchan_inp <= FOA_CHANNELS ) else if ( nchan_inp <= FOA_CHANNELS ) { for ( j = 0; j < pFb->filterbank_num_bands; j++ ) { Loading Loading @@ -159,10 +149,8 @@ ivas_error ivas_spar_covar_smooth_enc_open( const ivas_cov_smooth_cfg_t *cov_smooth_cfg, /* i : SPAR config. handle */ ivas_filterbank_t *pFb, /* i/o: FB handle */ const int16_t nchan_inp /* i : number of input channels */ #ifdef LBR_SBA_EXTRA_COV_SMOOTH , const int32_t ivas_total_brate /* i : IVAS total bitrate */ #endif ) { ivas_cov_smooth_state_t *hCovState; Loading Loading @@ -190,11 +178,7 @@ ivas_error ivas_spar_covar_smooth_enc_open( } } #ifdef LBR_SBA_EXTRA_COV_SMOOTH ivas_set_up_cov_smoothing( hCovState, pFb, cov_smooth_cfg->max_update_rate, cov_smooth_cfg->min_pool_size, nchan_inp, ivas_total_brate ); #else ivas_set_up_cov_smoothing( hCovState, pFb, cov_smooth_cfg->max_update_rate, cov_smooth_cfg->min_pool_size, nchan_inp ); #endif *hCovState_out = hCovState; Loading