Loading lib_dec/core_dec_init.c +2 −4 Original line number Diff line number Diff line Loading @@ -74,8 +74,7 @@ void open_decoder_LPD( st->fscale_old = st->fscale; } st->sr_core = getCoreSamplerateMode2( st->element_mode, total_brate, bwidth, st->flag_ACELP16k, st->rf_flag, st->is_ism_format ); st->sr_core = getCoreSamplerateMode2( st->element_mode, total_brate, bwidth, st->flag_ACELP16k, st->rf_flag, st->is_ism_format ); st->fscale = sr2fscale( st->sr_core ); fscaleFB = sr2fscale( st->output_Fs ); Loading @@ -94,8 +93,7 @@ void open_decoder_LPD( } } st->tcxonly = getTcxonly( st->element_mode, total_brate, MCT_flag, st->is_ism_format ); st->tcxonly = getTcxonly( st->element_mode, total_brate, MCT_flag, st->is_ism_format ); /* the TD TCX PLC in MODE1 still runs with 80ms subframes */ if ( ( st->element_mode == EVS_MONO && st->L_frame == L_FRAME16k && total_brate <= ACELP_32k ) || ( st->element_mode > EVS_MONO && st->L_frame == L_FRAME16k && total_brate <= MAX_ACELP_BRATE ) || ( st->tcxonly && ( st->sr_core == 32000 || st->sr_core == 16000 ) ) ) Loading lib_dec/core_dec_switch.c +1 −2 Original line number Diff line number Diff line Loading @@ -72,8 +72,7 @@ void mode_switch_decoder_LPD( { bSwitchFromAmrwbIO = 1; } sr_core = getCoreSamplerateMode2( st->element_mode, total_brate, bwidth, st->flag_ACELP16k, st->rf_flag, st->is_ism_format ); sr_core = getCoreSamplerateMode2( st->element_mode, total_brate, bwidth, st->flag_ACELP16k, st->rf_flag, st->is_ism_format ); fscale = sr2fscale( sr_core ); /* set number of coded lines */ Loading lib_dec/ivas_mct_core_dec.c +1 −2 Original line number Diff line number Diff line Loading @@ -233,8 +233,7 @@ void ivas_mct_core_dec( { st = sts[ch]; if ( sts[ch]->mct_chan_mode == MCT_CHAN_MODE_IGNORE ) /*indicates LFE */ if ( sts[ch]->mct_chan_mode == MCT_CHAN_MODE_IGNORE ) /*indicates LFE */ { continue; } Loading lib_dec/ivas_mct_dec.c +13 −15 Original line number Diff line number Diff line Loading @@ -358,9 +358,9 @@ ivas_error create_mct_dec( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->mct_chan_mode = MCT_CHAN_MODE_REGULAR; } } /* in case we have an uneven number of transport channels, indicate last channel ID as inactive */ if ( ( hMCT->nchan_out_woLFE ) % 2 ) if ( hMCT->nchan_out_woLFE % 2 ) { st_ivas->hCPE[st_ivas->nCPE - 1]->hCoreCoder[1]->mct_chan_mode = MCT_CHAN_MODE_IGNORE; } Loading Loading @@ -403,6 +403,7 @@ ivas_error create_mct_dec( *-----------------------------------------------------------------*/ hMCT->currBlockDataCnt = 0; /*Initialize bits required to signal channel-pair index*/ hMCT->bitsChannelPairIndex = max( 1, (int16_t) ( floor( ( log( hMCT->nchan_out_woLFE * ( hMCT->nchan_out_woLFE - 1 ) / 2 - 1 ) / log( 2. ) ) ) + 1 ) ); Loading Loading @@ -468,13 +469,13 @@ ivas_error mct_dec_reconfigure( } /* in case we have an uneven number of transport channels, indicate last channel ID as inactive */ if ( ( hMCT->nchan_out_woLFE ) % 2 ) if ( hMCT->nchan_out_woLFE % 2 ) { st_ivas->hCPE[st_ivas->nCPE - 1]->hCoreCoder[1]->mct_chan_mode = MCT_CHAN_MODE_IGNORE; } cp_bitrate = st_ivas->hDecoderConfig->ivas_total_brate / hMCT->nchan_out_woLFE * CPE_CHANNELS; /* set correct nominal bitrates and igf config already here, otherwise we * run into a number of problems */ for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ ) Loading @@ -486,8 +487,7 @@ ivas_error mct_dec_reconfigure( st->total_brate = st_ivas->hCPE[cpe_id]->element_brate; if ( !( ( st->mct_chan_mode == MCT_CHAN_MODE_IGNORE ) ) ) if ( st->mct_chan_mode != MCT_CHAN_MODE_IGNORE ) { st->bits_frame_nominal = (int16_t) ( st_ivas->hCPE[cpe_id]->element_brate / FRAMES_PER_SEC ); st->igf = getIgfPresent( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->bwidth, st->rf_flag ); Loading Loading @@ -524,6 +524,7 @@ ivas_error mct_dec_reconfigure( } } } initMdctStereoDecData( hMCT->hBlockData[n]->hStereoMdct, st_ivas->hCPE[0]->hCoreCoder[0]->igf, st_ivas->hCPE[0]->hCoreCoder[0]->hIGFDec->igfData.igfInfo.grid, cp_bitrate, st_ivas->hCPE[0]->hCoreCoder[0]->bwidth ); hMCT->hBlockData[n]->hStereoMdct->use_itd = 0; } Loading Loading @@ -744,6 +745,7 @@ static ivas_error ivas_mc_dec_reconfig( st_ivas->hTcBuffer->slots_rendered = st_ivas->hDirAC->slots_rendered; mvs2s( st_ivas->hDirAC->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); } /* JBM: when granularity goes down (e.g. MCT with CREND -> ParamMC with binaural fastconv render what still fits in the new granularity */ tc_granularity_new = ivas_jbm_dec_get_render_granularity( st_ivas->renderer_type, st_ivas->hDecoderConfig->output_Fs ); Loading Loading @@ -815,7 +817,6 @@ static ivas_error ivas_mc_dec_reconfig( st_ivas->nchan_transport = MC_PARAMUPMIX_MAX_TRANSPORT_CHANS; if ( last_mc_mode != MC_MODE_PARAMUPMIX ) /* This should always be the case, only supporting one bitrate currently */ { /*De-allocate handles for other MC modes*/ if ( st_ivas->hParamMC != NULL ) Loading Loading @@ -843,10 +844,12 @@ static ivas_error ivas_mc_dec_reconfig( return error; } } #ifdef DEBUGGING else { assert( 0 ); } #endif } else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) { Loading Loading @@ -910,7 +913,7 @@ static ivas_error ivas_mc_dec_reconfig( return error; } /* ls conversion */ /* LS conversion */ if ( st_ivas->hLsSetUpConversion != NULL ) { ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); Loading Loading @@ -1077,7 +1080,6 @@ static ivas_error ivas_mc_dec_reconfig( return error; } set_zero( st_ivas->hLFE->prevsynth_buf, LFE_PLC_BUFLEN ); set_zero( st_ivas->hLFE->prior_out_buffer, L_FRAME48k ); } Loading Loading @@ -1129,6 +1131,7 @@ static ivas_error ivas_mc_dec_reconfig( { ivas_binRenderer_close( &st_ivas->hBinRenderer ); } if ( ( st_ivas->hCrendWrapper != NULL ) && ( st_ivas->hCrendWrapper->hCrend != NULL ) && ( st_ivas->renderer_type != RENDERER_BINAURAL_MIXER_CONV && st_ivas->renderer_type != RENDERER_BINAURAL_MIXER_CONV_ROOM && ( st_ivas->renderer_type != RENDERER_BINAURAL_OBJECTS_TD || st_ivas->hIntSetup.output_config != AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) ) { ivas_rend_closeCrend( &( st_ivas->hCrendWrapper ) ); Loading Loading @@ -1203,12 +1206,7 @@ static ivas_error ivas_mc_dec_reconfig( } else if ( st_ivas->hCrendWrapper == NULL && ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) ) { if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hDecoderConfig->output_config, st_ivas->hRenderConfig, st_ivas->hSetOfHRTF, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hDecoderConfig->output_config, st_ivas->hRenderConfig, st_ivas->hSetOfHRTF, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; } Loading lib_dec/ivas_tcx_core_dec.c +2 −4 Original line number Diff line number Diff line Loading @@ -73,8 +73,7 @@ void stereo_tcx_init_dec( st->core_brate = st->total_brate; /*sampling rate*/ st->sr_core = getCoreSamplerateMode2( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->bwidth, st->flag_ACELP16k, st->rf_flag, st->is_ism_format ); st->sr_core = getCoreSamplerateMode2( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->bwidth, st->flag_ACELP16k, st->rf_flag, st->is_ism_format ); st->fscale = sr2fscale( st->sr_core ); /*frame size*/ Loading Loading @@ -108,8 +107,7 @@ void stereo_tcx_init_dec( if ( st->element_mode == IVAS_SCE ) { st->tcxonly = getTcxonly( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, MCT_flag, st->is_ism_format ); st->tcxonly = getTcxonly( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, MCT_flag, st->is_ism_format ); /* LPC quantization */ if ( st->sr_core <= INT_FS_16k && st->tcxonly == 0 ) Loading Loading
lib_dec/core_dec_init.c +2 −4 Original line number Diff line number Diff line Loading @@ -74,8 +74,7 @@ void open_decoder_LPD( st->fscale_old = st->fscale; } st->sr_core = getCoreSamplerateMode2( st->element_mode, total_brate, bwidth, st->flag_ACELP16k, st->rf_flag, st->is_ism_format ); st->sr_core = getCoreSamplerateMode2( st->element_mode, total_brate, bwidth, st->flag_ACELP16k, st->rf_flag, st->is_ism_format ); st->fscale = sr2fscale( st->sr_core ); fscaleFB = sr2fscale( st->output_Fs ); Loading @@ -94,8 +93,7 @@ void open_decoder_LPD( } } st->tcxonly = getTcxonly( st->element_mode, total_brate, MCT_flag, st->is_ism_format ); st->tcxonly = getTcxonly( st->element_mode, total_brate, MCT_flag, st->is_ism_format ); /* the TD TCX PLC in MODE1 still runs with 80ms subframes */ if ( ( st->element_mode == EVS_MONO && st->L_frame == L_FRAME16k && total_brate <= ACELP_32k ) || ( st->element_mode > EVS_MONO && st->L_frame == L_FRAME16k && total_brate <= MAX_ACELP_BRATE ) || ( st->tcxonly && ( st->sr_core == 32000 || st->sr_core == 16000 ) ) ) Loading
lib_dec/core_dec_switch.c +1 −2 Original line number Diff line number Diff line Loading @@ -72,8 +72,7 @@ void mode_switch_decoder_LPD( { bSwitchFromAmrwbIO = 1; } sr_core = getCoreSamplerateMode2( st->element_mode, total_brate, bwidth, st->flag_ACELP16k, st->rf_flag, st->is_ism_format ); sr_core = getCoreSamplerateMode2( st->element_mode, total_brate, bwidth, st->flag_ACELP16k, st->rf_flag, st->is_ism_format ); fscale = sr2fscale( sr_core ); /* set number of coded lines */ Loading
lib_dec/ivas_mct_core_dec.c +1 −2 Original line number Diff line number Diff line Loading @@ -233,8 +233,7 @@ void ivas_mct_core_dec( { st = sts[ch]; if ( sts[ch]->mct_chan_mode == MCT_CHAN_MODE_IGNORE ) /*indicates LFE */ if ( sts[ch]->mct_chan_mode == MCT_CHAN_MODE_IGNORE ) /*indicates LFE */ { continue; } Loading
lib_dec/ivas_mct_dec.c +13 −15 Original line number Diff line number Diff line Loading @@ -358,9 +358,9 @@ ivas_error create_mct_dec( st_ivas->hCPE[cpe_id]->hCoreCoder[n]->mct_chan_mode = MCT_CHAN_MODE_REGULAR; } } /* in case we have an uneven number of transport channels, indicate last channel ID as inactive */ if ( ( hMCT->nchan_out_woLFE ) % 2 ) if ( hMCT->nchan_out_woLFE % 2 ) { st_ivas->hCPE[st_ivas->nCPE - 1]->hCoreCoder[1]->mct_chan_mode = MCT_CHAN_MODE_IGNORE; } Loading Loading @@ -403,6 +403,7 @@ ivas_error create_mct_dec( *-----------------------------------------------------------------*/ hMCT->currBlockDataCnt = 0; /*Initialize bits required to signal channel-pair index*/ hMCT->bitsChannelPairIndex = max( 1, (int16_t) ( floor( ( log( hMCT->nchan_out_woLFE * ( hMCT->nchan_out_woLFE - 1 ) / 2 - 1 ) / log( 2. ) ) ) + 1 ) ); Loading Loading @@ -468,13 +469,13 @@ ivas_error mct_dec_reconfigure( } /* in case we have an uneven number of transport channels, indicate last channel ID as inactive */ if ( ( hMCT->nchan_out_woLFE ) % 2 ) if ( hMCT->nchan_out_woLFE % 2 ) { st_ivas->hCPE[st_ivas->nCPE - 1]->hCoreCoder[1]->mct_chan_mode = MCT_CHAN_MODE_IGNORE; } cp_bitrate = st_ivas->hDecoderConfig->ivas_total_brate / hMCT->nchan_out_woLFE * CPE_CHANNELS; /* set correct nominal bitrates and igf config already here, otherwise we * run into a number of problems */ for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ ) Loading @@ -486,8 +487,7 @@ ivas_error mct_dec_reconfigure( st->total_brate = st_ivas->hCPE[cpe_id]->element_brate; if ( !( ( st->mct_chan_mode == MCT_CHAN_MODE_IGNORE ) ) ) if ( st->mct_chan_mode != MCT_CHAN_MODE_IGNORE ) { st->bits_frame_nominal = (int16_t) ( st_ivas->hCPE[cpe_id]->element_brate / FRAMES_PER_SEC ); st->igf = getIgfPresent( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->bwidth, st->rf_flag ); Loading Loading @@ -524,6 +524,7 @@ ivas_error mct_dec_reconfigure( } } } initMdctStereoDecData( hMCT->hBlockData[n]->hStereoMdct, st_ivas->hCPE[0]->hCoreCoder[0]->igf, st_ivas->hCPE[0]->hCoreCoder[0]->hIGFDec->igfData.igfInfo.grid, cp_bitrate, st_ivas->hCPE[0]->hCoreCoder[0]->bwidth ); hMCT->hBlockData[n]->hStereoMdct->use_itd = 0; } Loading Loading @@ -744,6 +745,7 @@ static ivas_error ivas_mc_dec_reconfig( st_ivas->hTcBuffer->slots_rendered = st_ivas->hDirAC->slots_rendered; mvs2s( st_ivas->hDirAC->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, MAX_JBM_SUBFRAMES_5MS ); } /* JBM: when granularity goes down (e.g. MCT with CREND -> ParamMC with binaural fastconv render what still fits in the new granularity */ tc_granularity_new = ivas_jbm_dec_get_render_granularity( st_ivas->renderer_type, st_ivas->hDecoderConfig->output_Fs ); Loading Loading @@ -815,7 +817,6 @@ static ivas_error ivas_mc_dec_reconfig( st_ivas->nchan_transport = MC_PARAMUPMIX_MAX_TRANSPORT_CHANS; if ( last_mc_mode != MC_MODE_PARAMUPMIX ) /* This should always be the case, only supporting one bitrate currently */ { /*De-allocate handles for other MC modes*/ if ( st_ivas->hParamMC != NULL ) Loading Loading @@ -843,10 +844,12 @@ static ivas_error ivas_mc_dec_reconfig( return error; } } #ifdef DEBUGGING else { assert( 0 ); } #endif } else if ( st_ivas->mc_mode == MC_MODE_PARAMMC ) { Loading Loading @@ -910,7 +913,7 @@ static ivas_error ivas_mc_dec_reconfig( return error; } /* ls conversion */ /* LS conversion */ if ( st_ivas->hLsSetUpConversion != NULL ) { ivas_ls_setup_conversion_close( &st_ivas->hLsSetUpConversion ); Loading Loading @@ -1077,7 +1080,6 @@ static ivas_error ivas_mc_dec_reconfig( return error; } set_zero( st_ivas->hLFE->prevsynth_buf, LFE_PLC_BUFLEN ); set_zero( st_ivas->hLFE->prior_out_buffer, L_FRAME48k ); } Loading Loading @@ -1129,6 +1131,7 @@ static ivas_error ivas_mc_dec_reconfig( { ivas_binRenderer_close( &st_ivas->hBinRenderer ); } if ( ( st_ivas->hCrendWrapper != NULL ) && ( st_ivas->hCrendWrapper->hCrend != NULL ) && ( st_ivas->renderer_type != RENDERER_BINAURAL_MIXER_CONV && st_ivas->renderer_type != RENDERER_BINAURAL_MIXER_CONV_ROOM && ( st_ivas->renderer_type != RENDERER_BINAURAL_OBJECTS_TD || st_ivas->hIntSetup.output_config != AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) ) { ivas_rend_closeCrend( &( st_ivas->hCrendWrapper ) ); Loading Loading @@ -1203,12 +1206,7 @@ static ivas_error ivas_mc_dec_reconfig( } else if ( st_ivas->hCrendWrapper == NULL && ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) ) { if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hDecoderConfig->output_config, st_ivas->hRenderConfig, st_ivas->hSetOfHRTF, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) if ( ( error = ivas_rend_openCrend( &( st_ivas->hCrendWrapper ), st_ivas->intern_config, st_ivas->hDecoderConfig->output_config, st_ivas->hRenderConfig, st_ivas->hSetOfHRTF, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; } Loading
lib_dec/ivas_tcx_core_dec.c +2 −4 Original line number Diff line number Diff line Loading @@ -73,8 +73,7 @@ void stereo_tcx_init_dec( st->core_brate = st->total_brate; /*sampling rate*/ st->sr_core = getCoreSamplerateMode2( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->bwidth, st->flag_ACELP16k, st->rf_flag, st->is_ism_format ); st->sr_core = getCoreSamplerateMode2( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->bwidth, st->flag_ACELP16k, st->rf_flag, st->is_ism_format ); st->fscale = sr2fscale( st->sr_core ); /*frame size*/ Loading Loading @@ -108,8 +107,7 @@ void stereo_tcx_init_dec( if ( st->element_mode == IVAS_SCE ) { st->tcxonly = getTcxonly( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, MCT_flag, st->is_ism_format ); st->tcxonly = getTcxonly( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, MCT_flag, st->is_ism_format ); /* LPC quantization */ if ( st->sr_core <= INT_FS_16k && st->tcxonly == 0 ) Loading