Loading lib_com/ivas_mcmasa_com.c +1 −1 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ void ivas_mcmasa_set_separate_channel_mode( return; } #ifndef MCMASA_BITRATE_SWITCHING #ifndef MC_BITRATE_SWITCHING /*--------------------------------------------------------------------------* * ivas_mcmasa_mono_brate() * Loading lib_com/ivas_prot.h +5 −5 Original line number Diff line number Diff line Loading @@ -128,7 +128,7 @@ ivas_error ivas_corecoder_enc_reconfig( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ const int16_t nSCE_old, /* i : number of SCEs in previous frame */ const int16_t nCPE_old, /* i : number of CPEs in previous frame */ #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING const int16_t nchan_transport_old, /* i : number of TCs in previous frame */ const int32_t brate_SCE, /* i : bitrate to be set for the SCEs */ const int32_t brate_CPE, /* i : bitrate to be set for the CPEs */ Loading Loading @@ -340,7 +340,7 @@ void ivas_mct_dec_close( #ifdef CORECODER_BITRATE_SWITCHING ivas_error ivas_corecoder_dec_reconfig( #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t nSCE_old, /* i : number of SCEs in previous frame */ int16_t nCPE_old, /* i : number of CPEs in previous frame */ Loading Loading @@ -4795,7 +4795,7 @@ void ivas_mcmasa_enc_close( const int32_t input_Fs /* i : input sampling rate */ ); #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING ivas_error ivas_mcmasa_enc_reconfig( Encoder_Struct *st_ivas /* i/o: IVAS encoder handle */ ); Loading @@ -4817,7 +4817,7 @@ void ivas_mcmasa_set_separate_channel_mode( const int32_t ivas_total_brate /* i : Total bitrate of IVAS */ ); #ifndef MCMASA_BITRATE_SWITCHING #ifndef MC_BITRATE_SWITCHING /*! r: McMASA SCE bitrate */ int32_t ivas_mcmasa_mono_brate( const int32_t ivas_total_brate /* i : IVAS total bitrate */ Loading Loading @@ -4856,7 +4856,7 @@ void ivas_mcmasa_param_est_enc( const int16_t nchan_inp /* i : Number of input channels */ ); #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING void ivas_mcmasa_dmx_modify( const int16_t n_samples, /* i : input frame length in samples */ float dmx[][L_FRAME48k + NS2SA( 48000, IVAS_FB_ENC_DELAY_NS )], /* i/o: downmix signal to be transformed into another format */ Loading lib_com/options.h +1 −3 Original line number Diff line number Diff line Loading @@ -159,9 +159,7 @@ #define CORECODER_BITRATE_SWITCHING /* Issue 133: support bitrate switching in core-coder */ #define MC_BITRATE_SWITCHING /* Issue 116: support bitrate switching in MC format */ #ifdef MC_BITRATE_SWITCHING #define MCMASA_BITRATE_SWITCHING /* Issue 116: support bitrate switching in MC format: sub-part of McMASA modes */ #endif /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading lib_com/swb_tbe_com.c +1 −1 Original line number Diff line number Diff line Loading @@ -1891,7 +1891,7 @@ void tbe_celp_exc( return; } #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING assert( bwe_exc != NULL && "BWE excitation is NULL" ); #endif Loading lib_dec/ivas_corecoder_dec_reconfig.c +14 −14 Original line number Diff line number Diff line Loading @@ -50,11 +50,11 @@ /*-------------------------------------------------------------------* * ivas_corecoder_dec_reconfig() * * Allocate, initalize, and configure SCE/CPE/MCT handles in case of bitrate switching * Allocate, initialize, and configure SCE/CPE/MCT handles in case of bitrate switching *-------------------------------------------------------------------*/ ivas_error ivas_corecoder_dec_reconfig( #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t nSCE_old, /* i : number of SCEs in previous frame */ int16_t nCPE_old, /* i : number of CPEs in previous frame */ Loading @@ -74,7 +74,7 @@ ivas_error ivas_corecoder_dec_reconfig( int16_t n, sce_id, cpe_id, output_frame; int16_t nSCE_existing, nCPE_existing; int32_t ivas_total_brate; #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING MC_MODE last_mc_mode; #endif DECODER_CONFIG_HANDLE hDecoderConfig; Loading @@ -89,7 +89,7 @@ ivas_error ivas_corecoder_dec_reconfig( error = IVAS_ERR_OK; output_frame = (int16_t) ( hDecoderConfig->output_Fs / FRAMES_PER_SEC ); #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING if ( st_ivas->ivas_format == MC_FORMAT ) { last_mc_mode = ivas_mc_mode_select( ivas_mc_map_output_config_to_mc_ls_setup( st_ivas->transport_config ), st_ivas->hDecoderConfig->last_ivas_total_brate ); /* NB: this assumes that LS config remains the same between frames */ Loading @@ -104,7 +104,7 @@ ivas_error ivas_corecoder_dec_reconfig( *-----------------------------------------------------------------*/ /* remove dummy CPE element for DFT stereo-like upmix */ #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING if ( ( st_ivas->ivas_format == SBA_FORMAT && sba_dirac_stereo_flag_old && !st_ivas->sba_dirac_stereo_flag ) || ( st_ivas->ivas_format == MC_FORMAT && last_mc_mode == MC_MODE_MCMASA && sba_dirac_stereo_flag_old && !st_ivas->sba_dirac_stereo_flag ) ) #else Loading @@ -126,7 +126,7 @@ ivas_error ivas_corecoder_dec_reconfig( } } #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING if ( st_ivas->nchan_transport == nchan_transport_old && st_ivas->nSCE == nSCE_old && st_ivas->nCPE == nCPE_old ) #else if ( st_ivas->nchan_transport == nchan_transport_old ) Loading @@ -134,7 +134,7 @@ ivas_error ivas_corecoder_dec_reconfig( { for ( sce_id = 0; sce_id < st_ivas->nSCE; sce_id++ ) { #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING st_ivas->hSCE[sce_id]->element_brate = brate_SCE; #else st_ivas->hSCE[sce_id]->element_brate = ivas_total_brate / st_ivas->nchan_transport; Loading @@ -144,7 +144,7 @@ ivas_error ivas_corecoder_dec_reconfig( for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ ) { #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING st_ivas->hCPE[cpe_id]->element_brate = brate_CPE; #else st_ivas->hCPE[cpe_id]->element_brate = ( ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS; Loading Loading @@ -183,7 +183,7 @@ ivas_error ivas_corecoder_dec_reconfig( st_ivas->hCPE[cpe_id] = NULL; } #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING /* the CPE-internal settings depend from ivas_format and mc_mode, so clean-up when switching between mc_modes */ if ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode != last_mc_mode && ( st_ivas->mc_mode == MC_MODE_MCMASA || last_mc_mode == MC_MODE_MCMASA ) ) { Loading @@ -210,7 +210,7 @@ ivas_error ivas_corecoder_dec_reconfig( for ( sce_id = 0; sce_id < nSCE_existing; sce_id++ ) { #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING st_ivas->hSCE[sce_id]->element_brate = brate_SCE; #else st_ivas->hSCE[sce_id]->element_brate = ivas_total_brate / st_ivas->nchan_transport; Loading @@ -219,7 +219,7 @@ ivas_error ivas_corecoder_dec_reconfig( } for ( ; sce_id < st_ivas->nSCE; sce_id++ ) { #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING if ( ( error = create_sce_dec( st_ivas, sce_id, brate_SCE ) ) != IVAS_ERR_OK ) #else if ( ( error = create_sce_dec( st_ivas, sce_id, ivas_total_brate / st_ivas->nchan_transport ) ) != IVAS_ERR_OK ) Loading @@ -231,7 +231,7 @@ ivas_error ivas_corecoder_dec_reconfig( for ( cpe_id = 0; cpe_id < nCPE_existing; cpe_id++ ) { #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING st_ivas->hCPE[cpe_id]->element_brate = brate_CPE; #else st_ivas->hCPE[cpe_id]->element_brate = ( ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS; Loading @@ -244,7 +244,7 @@ ivas_error ivas_corecoder_dec_reconfig( } for ( ; cpe_id < st_ivas->nCPE; cpe_id++ ) { #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING if ( ( error = create_cpe_dec( st_ivas, cpe_id, brate_CPE ) ) != IVAS_ERR_OK ) #else if ( ( error = create_cpe_dec( st_ivas, cpe_id, ( ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS ) ) != IVAS_ERR_OK ) Loading Loading @@ -301,7 +301,7 @@ ivas_error ivas_corecoder_dec_reconfig( } /* create dummy CPE element for DFT stereo-like upmix */ #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING if ( ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->sba_dirac_stereo_flag && !sba_dirac_stereo_flag_old ) || ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCMASA && st_ivas->sba_dirac_stereo_flag && !sba_dirac_stereo_flag_old ) ) #else Loading Loading
lib_com/ivas_mcmasa_com.c +1 −1 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ void ivas_mcmasa_set_separate_channel_mode( return; } #ifndef MCMASA_BITRATE_SWITCHING #ifndef MC_BITRATE_SWITCHING /*--------------------------------------------------------------------------* * ivas_mcmasa_mono_brate() * Loading
lib_com/ivas_prot.h +5 −5 Original line number Diff line number Diff line Loading @@ -128,7 +128,7 @@ ivas_error ivas_corecoder_enc_reconfig( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ const int16_t nSCE_old, /* i : number of SCEs in previous frame */ const int16_t nCPE_old, /* i : number of CPEs in previous frame */ #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING const int16_t nchan_transport_old, /* i : number of TCs in previous frame */ const int32_t brate_SCE, /* i : bitrate to be set for the SCEs */ const int32_t brate_CPE, /* i : bitrate to be set for the CPEs */ Loading Loading @@ -340,7 +340,7 @@ void ivas_mct_dec_close( #ifdef CORECODER_BITRATE_SWITCHING ivas_error ivas_corecoder_dec_reconfig( #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t nSCE_old, /* i : number of SCEs in previous frame */ int16_t nCPE_old, /* i : number of CPEs in previous frame */ Loading Loading @@ -4795,7 +4795,7 @@ void ivas_mcmasa_enc_close( const int32_t input_Fs /* i : input sampling rate */ ); #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING ivas_error ivas_mcmasa_enc_reconfig( Encoder_Struct *st_ivas /* i/o: IVAS encoder handle */ ); Loading @@ -4817,7 +4817,7 @@ void ivas_mcmasa_set_separate_channel_mode( const int32_t ivas_total_brate /* i : Total bitrate of IVAS */ ); #ifndef MCMASA_BITRATE_SWITCHING #ifndef MC_BITRATE_SWITCHING /*! r: McMASA SCE bitrate */ int32_t ivas_mcmasa_mono_brate( const int32_t ivas_total_brate /* i : IVAS total bitrate */ Loading Loading @@ -4856,7 +4856,7 @@ void ivas_mcmasa_param_est_enc( const int16_t nchan_inp /* i : Number of input channels */ ); #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING void ivas_mcmasa_dmx_modify( const int16_t n_samples, /* i : input frame length in samples */ float dmx[][L_FRAME48k + NS2SA( 48000, IVAS_FB_ENC_DELAY_NS )], /* i/o: downmix signal to be transformed into another format */ Loading
lib_com/options.h +1 −3 Original line number Diff line number Diff line Loading @@ -159,9 +159,7 @@ #define CORECODER_BITRATE_SWITCHING /* Issue 133: support bitrate switching in core-coder */ #define MC_BITRATE_SWITCHING /* Issue 116: support bitrate switching in MC format */ #ifdef MC_BITRATE_SWITCHING #define MCMASA_BITRATE_SWITCHING /* Issue 116: support bitrate switching in MC format: sub-part of McMASA modes */ #endif /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading
lib_com/swb_tbe_com.c +1 −1 Original line number Diff line number Diff line Loading @@ -1891,7 +1891,7 @@ void tbe_celp_exc( return; } #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING assert( bwe_exc != NULL && "BWE excitation is NULL" ); #endif Loading
lib_dec/ivas_corecoder_dec_reconfig.c +14 −14 Original line number Diff line number Diff line Loading @@ -50,11 +50,11 @@ /*-------------------------------------------------------------------* * ivas_corecoder_dec_reconfig() * * Allocate, initalize, and configure SCE/CPE/MCT handles in case of bitrate switching * Allocate, initialize, and configure SCE/CPE/MCT handles in case of bitrate switching *-------------------------------------------------------------------*/ ivas_error ivas_corecoder_dec_reconfig( #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure */ const int16_t nSCE_old, /* i : number of SCEs in previous frame */ int16_t nCPE_old, /* i : number of CPEs in previous frame */ Loading @@ -74,7 +74,7 @@ ivas_error ivas_corecoder_dec_reconfig( int16_t n, sce_id, cpe_id, output_frame; int16_t nSCE_existing, nCPE_existing; int32_t ivas_total_brate; #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING MC_MODE last_mc_mode; #endif DECODER_CONFIG_HANDLE hDecoderConfig; Loading @@ -89,7 +89,7 @@ ivas_error ivas_corecoder_dec_reconfig( error = IVAS_ERR_OK; output_frame = (int16_t) ( hDecoderConfig->output_Fs / FRAMES_PER_SEC ); #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING if ( st_ivas->ivas_format == MC_FORMAT ) { last_mc_mode = ivas_mc_mode_select( ivas_mc_map_output_config_to_mc_ls_setup( st_ivas->transport_config ), st_ivas->hDecoderConfig->last_ivas_total_brate ); /* NB: this assumes that LS config remains the same between frames */ Loading @@ -104,7 +104,7 @@ ivas_error ivas_corecoder_dec_reconfig( *-----------------------------------------------------------------*/ /* remove dummy CPE element for DFT stereo-like upmix */ #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING if ( ( st_ivas->ivas_format == SBA_FORMAT && sba_dirac_stereo_flag_old && !st_ivas->sba_dirac_stereo_flag ) || ( st_ivas->ivas_format == MC_FORMAT && last_mc_mode == MC_MODE_MCMASA && sba_dirac_stereo_flag_old && !st_ivas->sba_dirac_stereo_flag ) ) #else Loading @@ -126,7 +126,7 @@ ivas_error ivas_corecoder_dec_reconfig( } } #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING if ( st_ivas->nchan_transport == nchan_transport_old && st_ivas->nSCE == nSCE_old && st_ivas->nCPE == nCPE_old ) #else if ( st_ivas->nchan_transport == nchan_transport_old ) Loading @@ -134,7 +134,7 @@ ivas_error ivas_corecoder_dec_reconfig( { for ( sce_id = 0; sce_id < st_ivas->nSCE; sce_id++ ) { #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING st_ivas->hSCE[sce_id]->element_brate = brate_SCE; #else st_ivas->hSCE[sce_id]->element_brate = ivas_total_brate / st_ivas->nchan_transport; Loading @@ -144,7 +144,7 @@ ivas_error ivas_corecoder_dec_reconfig( for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ ) { #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING st_ivas->hCPE[cpe_id]->element_brate = brate_CPE; #else st_ivas->hCPE[cpe_id]->element_brate = ( ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS; Loading Loading @@ -183,7 +183,7 @@ ivas_error ivas_corecoder_dec_reconfig( st_ivas->hCPE[cpe_id] = NULL; } #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING /* the CPE-internal settings depend from ivas_format and mc_mode, so clean-up when switching between mc_modes */ if ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode != last_mc_mode && ( st_ivas->mc_mode == MC_MODE_MCMASA || last_mc_mode == MC_MODE_MCMASA ) ) { Loading @@ -210,7 +210,7 @@ ivas_error ivas_corecoder_dec_reconfig( for ( sce_id = 0; sce_id < nSCE_existing; sce_id++ ) { #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING st_ivas->hSCE[sce_id]->element_brate = brate_SCE; #else st_ivas->hSCE[sce_id]->element_brate = ivas_total_brate / st_ivas->nchan_transport; Loading @@ -219,7 +219,7 @@ ivas_error ivas_corecoder_dec_reconfig( } for ( ; sce_id < st_ivas->nSCE; sce_id++ ) { #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING if ( ( error = create_sce_dec( st_ivas, sce_id, brate_SCE ) ) != IVAS_ERR_OK ) #else if ( ( error = create_sce_dec( st_ivas, sce_id, ivas_total_brate / st_ivas->nchan_transport ) ) != IVAS_ERR_OK ) Loading @@ -231,7 +231,7 @@ ivas_error ivas_corecoder_dec_reconfig( for ( cpe_id = 0; cpe_id < nCPE_existing; cpe_id++ ) { #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING st_ivas->hCPE[cpe_id]->element_brate = brate_CPE; #else st_ivas->hCPE[cpe_id]->element_brate = ( ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS; Loading @@ -244,7 +244,7 @@ ivas_error ivas_corecoder_dec_reconfig( } for ( ; cpe_id < st_ivas->nCPE; cpe_id++ ) { #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING if ( ( error = create_cpe_dec( st_ivas, cpe_id, brate_CPE ) ) != IVAS_ERR_OK ) #else if ( ( error = create_cpe_dec( st_ivas, cpe_id, ( ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS ) ) != IVAS_ERR_OK ) Loading Loading @@ -301,7 +301,7 @@ ivas_error ivas_corecoder_dec_reconfig( } /* create dummy CPE element for DFT stereo-like upmix */ #ifdef MCMASA_BITRATE_SWITCHING #ifdef MC_BITRATE_SWITCHING if ( ( st_ivas->ivas_format == SBA_FORMAT && st_ivas->sba_dirac_stereo_flag && !sba_dirac_stereo_flag_old ) || ( st_ivas->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCMASA && st_ivas->sba_dirac_stereo_flag && !sba_dirac_stereo_flag_old ) ) #else Loading