Loading lib_enc/ivas_stereo_td_enc.c +11 −3 Original line number Diff line number Diff line Loading @@ -614,6 +614,10 @@ void tdm_configure_enc( &( hStereoTD->tdm_low_rate_mode ), sts[1]->coder_type, tdm_ratio_bit_alloc_idx, hStereoTD->tdm_Pitch_reuse_flag, sts[0]->bwidth, sts[1]->bwidth, sts[0]->flag_ACELP16k, hStereoTD->tdm_LRTD_flag, mod_ct, hStereoTD->tdm_inst_ratio_idx ); /* After bit rates are allocated to primary and secondary channel, post adjustment of GSC special mode if needed Basically, the GSC special IVAS mode is not used if the bitrate is lower than 9k2 or low_rate_mode is selected for the secondary channel */ if ( sts[0]->GSC_IVAS_mode > 0 && sts[0]->total_brate <= STEREO_GSC_BIT_RATE_ALLOC ) { sts[0]->GSC_IVAS_mode = 0; Loading @@ -622,7 +626,9 @@ void tdm_configure_enc( { sts[1]->GSC_IVAS_mode = 0; } /* Get back from GENERIC to UNVOICED at low bit rate when the unmodified coder type is UNVOICED */ if ( sts[0]->coder_type == GENERIC && loc_coder_tyape_raw0 == UNVOICED ) { if ( sts[0]->total_brate <= MAX_UNVOICED_BRATE ) Loading @@ -635,19 +641,21 @@ void tdm_configure_enc( * Bitstream writing *----------------------------------------------------------------*/ /* transmit the ratio index */ /* transmit the ratio index in case of out of phase signal*/ if ( tdm_SM_or_LRTD_Pri && hStereoTD->tdm_LRTD_flag == 0 ) { push_indice( &hStereoTD->tdm_hBstr_tmp, IND_STEREO_TD_ALPHA, tdm_ratio_idx_SM, TDM_RATIO_BITS ); } else { /* transmit the ratio index which is used for bit allocation for LRTD case */ if ( hStereoTD->tdm_LRTD_flag == 1 ) { push_indice( &hStereoTD->tdm_hBstr_tmp, IND_STEREO_TD_ALPHA, hStereoTD->tdm_inst_ratio_idx, TDM_RATIO_BITS ); } else { /* transmit the ratio index which is used for bit allocation and mixing/un-mixing normal TD case */ push_indice( &hStereoTD->tdm_hBstr_tmp, IND_STEREO_TD_ALPHA, tdm_ratio_idx, TDM_RATIO_BITS ); } } Loading @@ -666,7 +674,7 @@ void tdm_configure_enc( /* LRTD flag */ push_indice( &hStereoTD->tdm_hBstr_tmp, IND_STEREO_LRTD_FLAG, hStereoTD->tdm_LRTD_flag, TDM_LR_CONTENT_BITS ); /* Stereo ICA parameters */ /* Stereo ICA parameters in case of normal TD */ if ( hStereoTD->tdm_LRTD_flag == 0 ) { push_indice( &hStereoTD->tdm_hBstr_tmp, IND_STEREO_REFCHAN, hCPE->hStereoTCA->refChanIndx, STEREO_BITS_TCA_CHAN ); Loading Loading
lib_enc/ivas_stereo_td_enc.c +11 −3 Original line number Diff line number Diff line Loading @@ -614,6 +614,10 @@ void tdm_configure_enc( &( hStereoTD->tdm_low_rate_mode ), sts[1]->coder_type, tdm_ratio_bit_alloc_idx, hStereoTD->tdm_Pitch_reuse_flag, sts[0]->bwidth, sts[1]->bwidth, sts[0]->flag_ACELP16k, hStereoTD->tdm_LRTD_flag, mod_ct, hStereoTD->tdm_inst_ratio_idx ); /* After bit rates are allocated to primary and secondary channel, post adjustment of GSC special mode if needed Basically, the GSC special IVAS mode is not used if the bitrate is lower than 9k2 or low_rate_mode is selected for the secondary channel */ if ( sts[0]->GSC_IVAS_mode > 0 && sts[0]->total_brate <= STEREO_GSC_BIT_RATE_ALLOC ) { sts[0]->GSC_IVAS_mode = 0; Loading @@ -622,7 +626,9 @@ void tdm_configure_enc( { sts[1]->GSC_IVAS_mode = 0; } /* Get back from GENERIC to UNVOICED at low bit rate when the unmodified coder type is UNVOICED */ if ( sts[0]->coder_type == GENERIC && loc_coder_tyape_raw0 == UNVOICED ) { if ( sts[0]->total_brate <= MAX_UNVOICED_BRATE ) Loading @@ -635,19 +641,21 @@ void tdm_configure_enc( * Bitstream writing *----------------------------------------------------------------*/ /* transmit the ratio index */ /* transmit the ratio index in case of out of phase signal*/ if ( tdm_SM_or_LRTD_Pri && hStereoTD->tdm_LRTD_flag == 0 ) { push_indice( &hStereoTD->tdm_hBstr_tmp, IND_STEREO_TD_ALPHA, tdm_ratio_idx_SM, TDM_RATIO_BITS ); } else { /* transmit the ratio index which is used for bit allocation for LRTD case */ if ( hStereoTD->tdm_LRTD_flag == 1 ) { push_indice( &hStereoTD->tdm_hBstr_tmp, IND_STEREO_TD_ALPHA, hStereoTD->tdm_inst_ratio_idx, TDM_RATIO_BITS ); } else { /* transmit the ratio index which is used for bit allocation and mixing/un-mixing normal TD case */ push_indice( &hStereoTD->tdm_hBstr_tmp, IND_STEREO_TD_ALPHA, tdm_ratio_idx, TDM_RATIO_BITS ); } } Loading @@ -666,7 +674,7 @@ void tdm_configure_enc( /* LRTD flag */ push_indice( &hStereoTD->tdm_hBstr_tmp, IND_STEREO_LRTD_FLAG, hStereoTD->tdm_LRTD_flag, TDM_LR_CONTENT_BITS ); /* Stereo ICA parameters */ /* Stereo ICA parameters in case of normal TD */ if ( hStereoTD->tdm_LRTD_flag == 0 ) { push_indice( &hStereoTD->tdm_hBstr_tmp, IND_STEREO_REFCHAN, hCPE->hStereoTCA->refChanIndx, STEREO_BITS_TCA_CHAN ); Loading