Loading lib_dec/FEC_HQ_core_fx.c +0 −88 Original line number Diff line number Diff line Loading @@ -2062,91 +2062,3 @@ void save_synthesis_hq_fec_fx( } return; } #ifdef ADD_IVAS_HQ_CODE_FEC /*-------------------------------------------------------------------------- * save_synthesis_hq_fec() * * Save synthesis for HQ FEC *-------------------------------------------------------------------------*/ void save_synthesis_hq_fec( Decoder_State *st, /* i/o: decoder state structure */ const float *output, /* i : decoded synthesis */ const int16_t output_frame, /* i : decoded synthesis */ CPE_DEC_HANDLE hCPE /* i : CPE decoder structure */ ) { int16_t post_hq_delay; switch ( st->element_mode ) { case EVS_MONO: post_hq_delay = NS2SA( st->output_Fs, POST_HQ_DELAY_NS ); break; case IVAS_SCE: post_hq_delay = NS2SA( st->output_Fs, DELAY_CLDFB_NS ); break; case IVAS_CPE_DFT: if ( hCPE->nchan_out == 1 && hCPE->hStereoDft->hConfig->res_cod_mode == STEREO_DFT_RES_COD_OFF ) { post_hq_delay = NS2SA( st->output_Fs, DELAY_CLDFB_NS ); } else { post_hq_delay = 0; } break; default: post_hq_delay = 0; break; } if ( ( st->codec_mode == MODE1 && st->hTcxDec != NULL ) && ( ( st->core == ACELP_CORE && !( st->bfi == 1 && st->con_tcx == 1 ) ) || st->core == HQ_CORE ) ) { mvr2r( st->hTcxDec->synth_history + output_frame, st->hTcxDec->synth_history, output_frame - post_hq_delay + NS2SA( st->output_Fs, PH_ECU_MEM_NS ) ); mvr2r( output, st->hTcxDec->old_synthFB + output_frame - post_hq_delay, output_frame ); if ( st->element_mode == EVS_MONO ) { /* reset the remaining buffer, which is read in TCX concealment the necessary samples to fill this buffer are not available for all cases, the impact on the output is limited */ set_f( st->hTcxDec->old_synthFB + 2 * output_frame - post_hq_delay, 0.f, post_hq_delay ); if ( output_frame >= L_FRAME16k ) { mvr2r( st->prev_synth_buffer, st->hTcxDec->old_synthFB + 2 * output_frame - NS2SA( st->output_Fs, DELAY_BWE_TOTAL_NS ), NS2SA( st->output_Fs, DELAY_BWE_TOTAL_NS - DELAY_CLDFB_NS ) ); } else { mvr2r( st->hHQ_core->old_out + NS2SA( st->output_Fs, N_ZERO_MDCT_NS ), st->hTcxDec->old_synthFB + 2 * output_frame, NS2SA( st->output_Fs, PH_ECU_LOOKAHEAD_NS ) ); } if ( st->core != ACELP_CORE ) { if ( output_frame >= L_FRAME16k ) { mvr2r( st->delay_buf_out, st->hTcxDec->old_synthFB + 2 * output_frame - NS2SA( st->output_Fs, DELAY_CLDFB_NS ), NS2SA( st->output_Fs, DELAY_CLDFB_NS ) ); mvr2r( st->hHQ_core->old_out + NS2SA( st->output_Fs, N_ZERO_MDCT_NS ), st->hTcxDec->old_synthFB + 2 * output_frame, NS2SA( st->output_Fs, PH_ECU_LOOKAHEAD_NS ) ); } else { mvr2r( st->delay_buf_out, st->hTcxDec->old_synthFB + 2 * output_frame - NS2SA( st->output_Fs, DELAY_BWE_TOTAL_NS ), NS2SA( st->output_Fs, DELAY_CLDFB_NS ) ); mvr2r( st->hHQ_core->old_out + NS2SA( st->output_Fs, N_ZERO_MDCT_NS ), st->hTcxDec->old_synthFB + 2 * output_frame - NS2SA( st->output_Fs, DELAY_BWE_TOTAL_NS - DELAY_CLDFB_NS ), NS2SA( st->output_Fs, PH_ECU_LOOKAHEAD_NS ) ); } } } else { if ( st->core != ACELP_CORE ) { mvr2r( st->delay_buf_out, st->hTcxDec->old_synthFB + 2 * output_frame - post_hq_delay, post_hq_delay ); mvr2r( st->hHQ_core->old_out + NS2SA( st->output_Fs, N_ZERO_MDCT_NS ), st->hTcxDec->old_synthFB + 2 * output_frame, NS2SA( st->output_Fs, PH_ECU_LOOKAHEAD_NS ) ); } } } return; } #endif Loading
lib_dec/FEC_HQ_core_fx.c +0 −88 Original line number Diff line number Diff line Loading @@ -2062,91 +2062,3 @@ void save_synthesis_hq_fec_fx( } return; } #ifdef ADD_IVAS_HQ_CODE_FEC /*-------------------------------------------------------------------------- * save_synthesis_hq_fec() * * Save synthesis for HQ FEC *-------------------------------------------------------------------------*/ void save_synthesis_hq_fec( Decoder_State *st, /* i/o: decoder state structure */ const float *output, /* i : decoded synthesis */ const int16_t output_frame, /* i : decoded synthesis */ CPE_DEC_HANDLE hCPE /* i : CPE decoder structure */ ) { int16_t post_hq_delay; switch ( st->element_mode ) { case EVS_MONO: post_hq_delay = NS2SA( st->output_Fs, POST_HQ_DELAY_NS ); break; case IVAS_SCE: post_hq_delay = NS2SA( st->output_Fs, DELAY_CLDFB_NS ); break; case IVAS_CPE_DFT: if ( hCPE->nchan_out == 1 && hCPE->hStereoDft->hConfig->res_cod_mode == STEREO_DFT_RES_COD_OFF ) { post_hq_delay = NS2SA( st->output_Fs, DELAY_CLDFB_NS ); } else { post_hq_delay = 0; } break; default: post_hq_delay = 0; break; } if ( ( st->codec_mode == MODE1 && st->hTcxDec != NULL ) && ( ( st->core == ACELP_CORE && !( st->bfi == 1 && st->con_tcx == 1 ) ) || st->core == HQ_CORE ) ) { mvr2r( st->hTcxDec->synth_history + output_frame, st->hTcxDec->synth_history, output_frame - post_hq_delay + NS2SA( st->output_Fs, PH_ECU_MEM_NS ) ); mvr2r( output, st->hTcxDec->old_synthFB + output_frame - post_hq_delay, output_frame ); if ( st->element_mode == EVS_MONO ) { /* reset the remaining buffer, which is read in TCX concealment the necessary samples to fill this buffer are not available for all cases, the impact on the output is limited */ set_f( st->hTcxDec->old_synthFB + 2 * output_frame - post_hq_delay, 0.f, post_hq_delay ); if ( output_frame >= L_FRAME16k ) { mvr2r( st->prev_synth_buffer, st->hTcxDec->old_synthFB + 2 * output_frame - NS2SA( st->output_Fs, DELAY_BWE_TOTAL_NS ), NS2SA( st->output_Fs, DELAY_BWE_TOTAL_NS - DELAY_CLDFB_NS ) ); } else { mvr2r( st->hHQ_core->old_out + NS2SA( st->output_Fs, N_ZERO_MDCT_NS ), st->hTcxDec->old_synthFB + 2 * output_frame, NS2SA( st->output_Fs, PH_ECU_LOOKAHEAD_NS ) ); } if ( st->core != ACELP_CORE ) { if ( output_frame >= L_FRAME16k ) { mvr2r( st->delay_buf_out, st->hTcxDec->old_synthFB + 2 * output_frame - NS2SA( st->output_Fs, DELAY_CLDFB_NS ), NS2SA( st->output_Fs, DELAY_CLDFB_NS ) ); mvr2r( st->hHQ_core->old_out + NS2SA( st->output_Fs, N_ZERO_MDCT_NS ), st->hTcxDec->old_synthFB + 2 * output_frame, NS2SA( st->output_Fs, PH_ECU_LOOKAHEAD_NS ) ); } else { mvr2r( st->delay_buf_out, st->hTcxDec->old_synthFB + 2 * output_frame - NS2SA( st->output_Fs, DELAY_BWE_TOTAL_NS ), NS2SA( st->output_Fs, DELAY_CLDFB_NS ) ); mvr2r( st->hHQ_core->old_out + NS2SA( st->output_Fs, N_ZERO_MDCT_NS ), st->hTcxDec->old_synthFB + 2 * output_frame - NS2SA( st->output_Fs, DELAY_BWE_TOTAL_NS - DELAY_CLDFB_NS ), NS2SA( st->output_Fs, PH_ECU_LOOKAHEAD_NS ) ); } } } else { if ( st->core != ACELP_CORE ) { mvr2r( st->delay_buf_out, st->hTcxDec->old_synthFB + 2 * output_frame - post_hq_delay, post_hq_delay ); mvr2r( st->hHQ_core->old_out + NS2SA( st->output_Fs, N_ZERO_MDCT_NS ), st->hTcxDec->old_synthFB + 2 * output_frame, NS2SA( st->output_Fs, PH_ECU_LOOKAHEAD_NS ) ); } } } return; } #endif