Loading lib_dec/ivas_corecoder_dec_reconfig.c +6 −7 Original line number Diff line number Diff line Loading @@ -33,11 +33,7 @@ #include "options.h" #include "ivas_cnst.h" #include "ivas_prot.h" #include "ivas_rom_com.h" #include "ivas_stat_enc.h" #include "prot.h" #include <assert.h> #include <math.h> #include <stdint.h> #ifdef DEBUGGING #include "debug.h" Loading Loading @@ -74,9 +70,9 @@ ivas_error ivas_corecoder_dec_reconfig( hDecoderConfig = st_ivas->hDecoderConfig; ivas_total_brate = hDecoderConfig->ivas_total_brate; output_frame = (int16_t) ( hDecoderConfig->output_Fs / FRAMES_PER_SEC ); error = IVAS_ERR_OK; output_frame = (int16_t) ( hDecoderConfig->output_Fs / FRAMES_PER_SEC ); 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 @@ -85,6 +81,7 @@ ivas_error ivas_corecoder_dec_reconfig( { last_mc_mode = MC_MODE_NONE; } /*-----------------------------------------------------------------* * Allocate, initalize, and configure SCE/CPE/MCT handles *-----------------------------------------------------------------*/ Loading Loading @@ -119,6 +116,7 @@ ivas_error ivas_corecoder_dec_reconfig( for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ ) { st_ivas->hCPE[cpe_id]->element_brate = brate_CPE; /* prepare bitstream buffers */ for ( n = 0; n < CPE_CHANNELS; n++ ) { Loading @@ -139,7 +137,6 @@ ivas_error ivas_corecoder_dec_reconfig( nSCE_existing = min( nSCE_old, st_ivas->nSCE ); nCPE_existing = min( nCPE_old, st_ivas->nCPE ); // VE: TBV - try to reuse the CoreCoder /* destroy superfluous core coder elements */ for ( sce_id = st_ivas->nSCE; sce_id < nSCE_old; sce_id++ ) { Loading Loading @@ -192,6 +189,7 @@ ivas_error ivas_corecoder_dec_reconfig( for ( cpe_id = 0; cpe_id < nCPE_existing; cpe_id++ ) { st_ivas->hCPE[cpe_id]->element_brate = brate_CPE; /* prepare bitstream buffers */ for ( n = 0; n < CPE_CHANNELS; n++ ) { Loading Loading @@ -271,7 +269,6 @@ ivas_error ivas_corecoder_dec_reconfig( return error; } // VE: TBV - just reset for now set_f( st_ivas->hCPE[0]->hStereoDft->buff_LBTCX_mem, 0, NS2SA( 16000, STEREO_DFT32MS_OVL_NS ) ); st_ivas->hCPE[0]->hCoreCoder[0] = st_ivas->hSCE[0]->hCoreCoder[0]; /* don't allocate unnecessary core coder, simply point to core coder of SCE element */ Loading Loading @@ -512,10 +509,12 @@ ivas_error ivas_cldfb_dec_reconfig( } } } /* CLDFB Interpolation weights */ if ( st_ivas->sba_mode == SBA_MODE_SPAR && ( numCldfbAnalyses_old != numCldfbAnalyses || numCldfbSyntheses_old != numCldfbSyntheses || nchan_transport_old != st_ivas->nchan_transport ) ) { ivas_spar_get_cldfb_gains( st_ivas->hSpar, st_ivas->cldfbAnaDec[0], st_ivas->cldfbSynDec[0], hDecoderConfig ); } return IVAS_ERR_OK; } lib_enc/ivas_corecoder_enc_reconfig.c +5 −2 Original line number Diff line number Diff line Loading @@ -30,15 +30,14 @@ *******************************************************************************************************/ #include <assert.h> #include <stdint.h> #include "options.h" #include "ivas_cnst.h" #include "prot.h" #include "ivas_prot.h" #include "ivas_stat_enc.h" #ifdef DEBUGGING #include "debug.h" #include <assert.h> #endif #include "wmc_auto.h" Loading Loading @@ -97,6 +96,7 @@ ivas_error ivas_corecoder_enc_reconfig( for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ ) { st_ivas->hCPE[cpe_id]->element_brate = brate_CPE; /* prepare bitstream buffers */ for ( n = 0; n < CPE_CHANNELS; n++ ) { Loading @@ -120,11 +120,13 @@ ivas_error ivas_corecoder_enc_reconfig( nchan_transport_old_real = nchan_transport_old; nchan_transport_real = st_ivas->nchan_transport; /* in SCE+CPE McMASA nchan_transport is still 2, fix the numbers */ if ( hEncoderConfig->ivas_format == MC_FORMAT && last_mc_mode == MC_MODE_MCMASA ) { nchan_transport_old_real = nSCE_old + CPE_CHANNELS * nCPE_old; } if ( hEncoderConfig->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCMASA ) { nchan_transport_real = st_ivas->nSCE + CPE_CHANNELS * st_ivas->nCPE; Loading Loading @@ -282,6 +284,7 @@ ivas_error ivas_corecoder_enc_reconfig( for ( cpe_id = 0; cpe_id < nCPE_existing; cpe_id++ ) { st_ivas->hCPE[cpe_id]->element_brate = brate_CPE; /* prepare bitstream buffers */ for ( n = 0; n < CPE_CHANNELS; n++ ) { Loading Loading
lib_dec/ivas_corecoder_dec_reconfig.c +6 −7 Original line number Diff line number Diff line Loading @@ -33,11 +33,7 @@ #include "options.h" #include "ivas_cnst.h" #include "ivas_prot.h" #include "ivas_rom_com.h" #include "ivas_stat_enc.h" #include "prot.h" #include <assert.h> #include <math.h> #include <stdint.h> #ifdef DEBUGGING #include "debug.h" Loading Loading @@ -74,9 +70,9 @@ ivas_error ivas_corecoder_dec_reconfig( hDecoderConfig = st_ivas->hDecoderConfig; ivas_total_brate = hDecoderConfig->ivas_total_brate; output_frame = (int16_t) ( hDecoderConfig->output_Fs / FRAMES_PER_SEC ); error = IVAS_ERR_OK; output_frame = (int16_t) ( hDecoderConfig->output_Fs / FRAMES_PER_SEC ); 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 @@ -85,6 +81,7 @@ ivas_error ivas_corecoder_dec_reconfig( { last_mc_mode = MC_MODE_NONE; } /*-----------------------------------------------------------------* * Allocate, initalize, and configure SCE/CPE/MCT handles *-----------------------------------------------------------------*/ Loading Loading @@ -119,6 +116,7 @@ ivas_error ivas_corecoder_dec_reconfig( for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ ) { st_ivas->hCPE[cpe_id]->element_brate = brate_CPE; /* prepare bitstream buffers */ for ( n = 0; n < CPE_CHANNELS; n++ ) { Loading @@ -139,7 +137,6 @@ ivas_error ivas_corecoder_dec_reconfig( nSCE_existing = min( nSCE_old, st_ivas->nSCE ); nCPE_existing = min( nCPE_old, st_ivas->nCPE ); // VE: TBV - try to reuse the CoreCoder /* destroy superfluous core coder elements */ for ( sce_id = st_ivas->nSCE; sce_id < nSCE_old; sce_id++ ) { Loading Loading @@ -192,6 +189,7 @@ ivas_error ivas_corecoder_dec_reconfig( for ( cpe_id = 0; cpe_id < nCPE_existing; cpe_id++ ) { st_ivas->hCPE[cpe_id]->element_brate = brate_CPE; /* prepare bitstream buffers */ for ( n = 0; n < CPE_CHANNELS; n++ ) { Loading Loading @@ -271,7 +269,6 @@ ivas_error ivas_corecoder_dec_reconfig( return error; } // VE: TBV - just reset for now set_f( st_ivas->hCPE[0]->hStereoDft->buff_LBTCX_mem, 0, NS2SA( 16000, STEREO_DFT32MS_OVL_NS ) ); st_ivas->hCPE[0]->hCoreCoder[0] = st_ivas->hSCE[0]->hCoreCoder[0]; /* don't allocate unnecessary core coder, simply point to core coder of SCE element */ Loading Loading @@ -512,10 +509,12 @@ ivas_error ivas_cldfb_dec_reconfig( } } } /* CLDFB Interpolation weights */ if ( st_ivas->sba_mode == SBA_MODE_SPAR && ( numCldfbAnalyses_old != numCldfbAnalyses || numCldfbSyntheses_old != numCldfbSyntheses || nchan_transport_old != st_ivas->nchan_transport ) ) { ivas_spar_get_cldfb_gains( st_ivas->hSpar, st_ivas->cldfbAnaDec[0], st_ivas->cldfbSynDec[0], hDecoderConfig ); } return IVAS_ERR_OK; }
lib_enc/ivas_corecoder_enc_reconfig.c +5 −2 Original line number Diff line number Diff line Loading @@ -30,15 +30,14 @@ *******************************************************************************************************/ #include <assert.h> #include <stdint.h> #include "options.h" #include "ivas_cnst.h" #include "prot.h" #include "ivas_prot.h" #include "ivas_stat_enc.h" #ifdef DEBUGGING #include "debug.h" #include <assert.h> #endif #include "wmc_auto.h" Loading Loading @@ -97,6 +96,7 @@ ivas_error ivas_corecoder_enc_reconfig( for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ ) { st_ivas->hCPE[cpe_id]->element_brate = brate_CPE; /* prepare bitstream buffers */ for ( n = 0; n < CPE_CHANNELS; n++ ) { Loading @@ -120,11 +120,13 @@ ivas_error ivas_corecoder_enc_reconfig( nchan_transport_old_real = nchan_transport_old; nchan_transport_real = st_ivas->nchan_transport; /* in SCE+CPE McMASA nchan_transport is still 2, fix the numbers */ if ( hEncoderConfig->ivas_format == MC_FORMAT && last_mc_mode == MC_MODE_MCMASA ) { nchan_transport_old_real = nSCE_old + CPE_CHANNELS * nCPE_old; } if ( hEncoderConfig->ivas_format == MC_FORMAT && st_ivas->mc_mode == MC_MODE_MCMASA ) { nchan_transport_real = st_ivas->nSCE + CPE_CHANNELS * st_ivas->nCPE; Loading Loading @@ -282,6 +284,7 @@ ivas_error ivas_corecoder_enc_reconfig( for ( cpe_id = 0; cpe_id < nCPE_existing; cpe_id++ ) { st_ivas->hCPE[cpe_id]->element_brate = brate_CPE; /* prepare bitstream buffers */ for ( n = 0; n < CPE_CHANNELS; n++ ) { Loading