Loading lib_enc/acelp_core_enc_fx.c +2 −2 Original line number Diff line number Diff line Loading @@ -1509,9 +1509,9 @@ ivas_error acelp_core_enc_ivas_fx( IF( !st->Opt_SC_VBR && ( st->idchan == 0 || NE_16( st->element_mode, IVAS_CPE_TD ) || ( EQ_16( st->idchan, 1 ) && EQ_16( st->element_mode, IVAS_CPE_TD ) && st->tdm_LRTD_flag ) ) ) { /* Apply a non linearity to the SHB excitation */ Copy_Scale_sig_16_32_no_sat( st->hBWE_TD->old_bwe_exc_extended_fx, bwe_exc_extended_fx, NL_BUFF_OFFSET, ( sub( shl( Q_new, 1 ), sub( st->prev_Q_bwe_exc, 16 ) ) ) ); // prev_Q_bwe_exc Copy_Scale_sig_16_32_no_sat( st->hBWE_TD->old_bwe_exc_extended_fx, bwe_exc_extended_fx, NL_BUFF_OFFSET, ( sub( shl( Q_new, 1 ), sub( st->hBWE_TD->prev_Q_bwe_exc, 16 ) ) ) ); // prev_Q_bwe_exc non_linearity_ivas_fx( bwe_exc_fx, bwe_exc_extended_fx + NL_BUFF_OFFSET, L_FRAME32k, &st->hBWE_TD->bwe_non_lin_prev_scale_fx, Q_new, st->coder_type, voice_factors_fx, st->L_frame ); Copy_Scale_sig_32_16( bwe_exc_extended_fx + L_FRAME32k, st->hBWE_TD->old_bwe_exc_extended_fx, NL_BUFF_OFFSET, negate( sub( shl( Q_new, 1 ), sub( st->prev_Q_bwe_exc, 16 ) ) ) ); // prev_Q_bwe_exc Copy_Scale_sig_32_16( bwe_exc_extended_fx + L_FRAME32k, st->hBWE_TD->old_bwe_exc_extended_fx, NL_BUFF_OFFSET, negate( sub( shl( Q_new, 1 ), sub( st->hBWE_TD->prev_Q_bwe_exc, 16 ) ) ) ); // prev_Q_bwe_exc } test(); Loading lib_enc/amr_wb_enc_fx.c +6 −5 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ void amr_wb_enc_fx( Encoder_State *st, /* i/o: encoder state structure */ const Word16 input_sp[], /* i : input signal Q0*/ Word32 *mem_hp20_in_fx, /* i/o: hp20 filter memory Qx*/ const Word16 n_samples /* i : number of input samples Q0*/ ) { Loading Loading @@ -109,7 +110,7 @@ void amr_wb_enc_fx( move16(); st->coder_type = GENERIC; move16(); input_frame = st->input_frame_fx; input_frame = extract_l( Mult_32_16( st->input_Fs, 0x0290 ) ); move16(); /* frame length of the input signal */ st->extl = -1; move16(); Loading Loading @@ -183,7 +184,7 @@ void amr_wb_enc_fx( st->input_fx[i] = 0; move16(); } hp20( st->input_fx, 1, input_frame, st->mem_hp20_in_fx, st->input_Fs ); hp20( st->input_fx, 1, input_frame, mem_hp20_in_fx, st->input_Fs ); /*-----------------------------------------------------------------* * switching from ACELP@16k core to AMR-WB IO mode Loading lib_enc/core_enc_ol_fx.c +3 −3 Original line number Diff line number Diff line Loading @@ -256,7 +256,7 @@ void core_encode_openloop_fx( /* reset TBE buffers previous frame frame wasn't ACELP*/ IF( st->last_core != ACELP_CORE ) { TBEreset_enc_fx( st, st->bwidth ); TBEreset_enc_fx( st->hBWE_TD, st->last_core, st->bwidth ); } Loading Loading @@ -700,7 +700,7 @@ void core_encode_openloop_fx( test(); test(); IF( rf_PLC_Mode == 0 && hRF->rf_gain_tcx[1] != 0 && ( ( st->transientDetection.transientDetector.bIsAttackPresent != 0 && LT_16( hRF->rf_gain_tcx[0], mult_r( hRF->rf_gain_tcx[1], 31785 /*0.97f Q15*/ ) ) ) || ( ( st->hTranDet->transientDetector.bIsAttackPresent != 0 && LT_16( hRF->rf_gain_tcx[0], mult_r( hRF->rf_gain_tcx[1], 31785 /*0.97f Q15*/ ) ) ) || LT_16( hRF->rf_gain_tcx[0], mult_r( hRF->rf_gain_tcx[1], 29491 /*0.90f Q15*/ ) ) ) ) { TD_mode = 0; Loading Loading @@ -900,7 +900,7 @@ void core_acelp_tcx20_switching_fx( st->pit_fr2, st->pit_max, st->pit_res_max, &st->transientDetection, st->hTranDet, 0, A_q_tcx, M ); Loading lib_enc/core_enc_switch_fx.c +2 −2 Original line number Diff line number Diff line Loading @@ -173,7 +173,7 @@ void core_coder_mode_switch_fx( ( EQ_16( st->bwidth, FB ) && NE_16( st->last_extl, FB_TBE ) ) ) { /* reset TBE buffers as previous frame wasn't using TBE */ TBEreset_enc_fx( st, st->bwidth ); TBEreset_enc_fx( st->hBWE_TD, st->last_core, st->bwidth ); } ELSE { Loading Loading @@ -418,7 +418,7 @@ void core_coder_mode_switch_ivas_fx( ( EQ_16( st->bwidth, SWB ) && NE_16( st->last_extl, SWB_TBE ) ) || ( EQ_16( st->bwidth, FB ) && NE_16( st->last_extl, FB_TBE ) ) ) { TBEreset_enc_fx( st, st->bwidth ); TBEreset_enc_fx( st->hBWE_TD, st->last_core, st->bwidth ); } ELSE { Loading lib_enc/core_switching_enc_fx.c +2 −9 Original line number Diff line number Diff line Loading @@ -45,8 +45,6 @@ void core_switching_pre_enc_fx( { IF( hLPDmem != NULL ) { st_fx->mem_deemph_fx = hLPDmem->syn[M]; move16(); Copy( hLPDmem->mem_syn2, hLPDmem->mem_syn1_fx, M ); /*hLPDmem->q_mem_syn*/ } Loading Loading @@ -200,7 +198,6 @@ void core_switching_pre_enc_fx( lsf2lsp_fx( st_fx->lsf_old_fx, st_fx->lsp_old_fx, M, INT_FS_FX ); } st_fx->mem_deemph_fx = 0; /* Reset ACELP parameters */ IF( hLPDmem != NULL ) { Loading Loading @@ -485,7 +482,7 @@ void core_switching_post_enc_fx( } ELSE IF( EQ_16( st_fx->last_core, TCX_20_CORE ) || EQ_16( st_fx->last_core, TCX_10_CORE ) ) { TBEreset_enc_fx( st_fx, st_fx->bwidth ); TBEreset_enc_fx( st_fx->hBWE_TD, st_fx->last_core, st_fx->bwidth ); } test(); test(); Loading Loading @@ -660,8 +657,6 @@ void core_switching_pre_enc_ivas_fx( { IF( hLPDmem != NULL ) { st_fx->mem_deemph_fx = hLPDmem->syn[M]; move16(); Copy( hLPDmem->mem_syn2, hLPDmem->mem_syn1_fx, M ); } Loading Loading @@ -818,8 +813,6 @@ void core_switching_pre_enc_ivas_fx( lsf2lsp_fx( st_fx->lsf_old_fx, st_fx->lsp_old_fx, M, INT_FS_FX ); } st_fx->mem_deemph_fx = 0; move16(); /* Reset ACELP parameters */ IF( hLPDmem != NULL ) { Loading Loading @@ -1159,7 +1152,7 @@ void core_switching_post_enc_ivas_fx( } ELSE IF( EQ_16( st->last_core, TCX_20_CORE ) || EQ_16( st->last_core, TCX_10_CORE ) ) { TBEreset_enc_fx( st, st->bwidth ); TBEreset_enc_fx( st->hBWE_TD, st->last_core, st->bwidth ); } test(); Loading Loading
lib_enc/acelp_core_enc_fx.c +2 −2 Original line number Diff line number Diff line Loading @@ -1509,9 +1509,9 @@ ivas_error acelp_core_enc_ivas_fx( IF( !st->Opt_SC_VBR && ( st->idchan == 0 || NE_16( st->element_mode, IVAS_CPE_TD ) || ( EQ_16( st->idchan, 1 ) && EQ_16( st->element_mode, IVAS_CPE_TD ) && st->tdm_LRTD_flag ) ) ) { /* Apply a non linearity to the SHB excitation */ Copy_Scale_sig_16_32_no_sat( st->hBWE_TD->old_bwe_exc_extended_fx, bwe_exc_extended_fx, NL_BUFF_OFFSET, ( sub( shl( Q_new, 1 ), sub( st->prev_Q_bwe_exc, 16 ) ) ) ); // prev_Q_bwe_exc Copy_Scale_sig_16_32_no_sat( st->hBWE_TD->old_bwe_exc_extended_fx, bwe_exc_extended_fx, NL_BUFF_OFFSET, ( sub( shl( Q_new, 1 ), sub( st->hBWE_TD->prev_Q_bwe_exc, 16 ) ) ) ); // prev_Q_bwe_exc non_linearity_ivas_fx( bwe_exc_fx, bwe_exc_extended_fx + NL_BUFF_OFFSET, L_FRAME32k, &st->hBWE_TD->bwe_non_lin_prev_scale_fx, Q_new, st->coder_type, voice_factors_fx, st->L_frame ); Copy_Scale_sig_32_16( bwe_exc_extended_fx + L_FRAME32k, st->hBWE_TD->old_bwe_exc_extended_fx, NL_BUFF_OFFSET, negate( sub( shl( Q_new, 1 ), sub( st->prev_Q_bwe_exc, 16 ) ) ) ); // prev_Q_bwe_exc Copy_Scale_sig_32_16( bwe_exc_extended_fx + L_FRAME32k, st->hBWE_TD->old_bwe_exc_extended_fx, NL_BUFF_OFFSET, negate( sub( shl( Q_new, 1 ), sub( st->hBWE_TD->prev_Q_bwe_exc, 16 ) ) ) ); // prev_Q_bwe_exc } test(); Loading
lib_enc/amr_wb_enc_fx.c +6 −5 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ void amr_wb_enc_fx( Encoder_State *st, /* i/o: encoder state structure */ const Word16 input_sp[], /* i : input signal Q0*/ Word32 *mem_hp20_in_fx, /* i/o: hp20 filter memory Qx*/ const Word16 n_samples /* i : number of input samples Q0*/ ) { Loading Loading @@ -109,7 +110,7 @@ void amr_wb_enc_fx( move16(); st->coder_type = GENERIC; move16(); input_frame = st->input_frame_fx; input_frame = extract_l( Mult_32_16( st->input_Fs, 0x0290 ) ); move16(); /* frame length of the input signal */ st->extl = -1; move16(); Loading Loading @@ -183,7 +184,7 @@ void amr_wb_enc_fx( st->input_fx[i] = 0; move16(); } hp20( st->input_fx, 1, input_frame, st->mem_hp20_in_fx, st->input_Fs ); hp20( st->input_fx, 1, input_frame, mem_hp20_in_fx, st->input_Fs ); /*-----------------------------------------------------------------* * switching from ACELP@16k core to AMR-WB IO mode Loading
lib_enc/core_enc_ol_fx.c +3 −3 Original line number Diff line number Diff line Loading @@ -256,7 +256,7 @@ void core_encode_openloop_fx( /* reset TBE buffers previous frame frame wasn't ACELP*/ IF( st->last_core != ACELP_CORE ) { TBEreset_enc_fx( st, st->bwidth ); TBEreset_enc_fx( st->hBWE_TD, st->last_core, st->bwidth ); } Loading Loading @@ -700,7 +700,7 @@ void core_encode_openloop_fx( test(); test(); IF( rf_PLC_Mode == 0 && hRF->rf_gain_tcx[1] != 0 && ( ( st->transientDetection.transientDetector.bIsAttackPresent != 0 && LT_16( hRF->rf_gain_tcx[0], mult_r( hRF->rf_gain_tcx[1], 31785 /*0.97f Q15*/ ) ) ) || ( ( st->hTranDet->transientDetector.bIsAttackPresent != 0 && LT_16( hRF->rf_gain_tcx[0], mult_r( hRF->rf_gain_tcx[1], 31785 /*0.97f Q15*/ ) ) ) || LT_16( hRF->rf_gain_tcx[0], mult_r( hRF->rf_gain_tcx[1], 29491 /*0.90f Q15*/ ) ) ) ) { TD_mode = 0; Loading Loading @@ -900,7 +900,7 @@ void core_acelp_tcx20_switching_fx( st->pit_fr2, st->pit_max, st->pit_res_max, &st->transientDetection, st->hTranDet, 0, A_q_tcx, M ); Loading
lib_enc/core_enc_switch_fx.c +2 −2 Original line number Diff line number Diff line Loading @@ -173,7 +173,7 @@ void core_coder_mode_switch_fx( ( EQ_16( st->bwidth, FB ) && NE_16( st->last_extl, FB_TBE ) ) ) { /* reset TBE buffers as previous frame wasn't using TBE */ TBEreset_enc_fx( st, st->bwidth ); TBEreset_enc_fx( st->hBWE_TD, st->last_core, st->bwidth ); } ELSE { Loading Loading @@ -418,7 +418,7 @@ void core_coder_mode_switch_ivas_fx( ( EQ_16( st->bwidth, SWB ) && NE_16( st->last_extl, SWB_TBE ) ) || ( EQ_16( st->bwidth, FB ) && NE_16( st->last_extl, FB_TBE ) ) ) { TBEreset_enc_fx( st, st->bwidth ); TBEreset_enc_fx( st->hBWE_TD, st->last_core, st->bwidth ); } ELSE { Loading
lib_enc/core_switching_enc_fx.c +2 −9 Original line number Diff line number Diff line Loading @@ -45,8 +45,6 @@ void core_switching_pre_enc_fx( { IF( hLPDmem != NULL ) { st_fx->mem_deemph_fx = hLPDmem->syn[M]; move16(); Copy( hLPDmem->mem_syn2, hLPDmem->mem_syn1_fx, M ); /*hLPDmem->q_mem_syn*/ } Loading Loading @@ -200,7 +198,6 @@ void core_switching_pre_enc_fx( lsf2lsp_fx( st_fx->lsf_old_fx, st_fx->lsp_old_fx, M, INT_FS_FX ); } st_fx->mem_deemph_fx = 0; /* Reset ACELP parameters */ IF( hLPDmem != NULL ) { Loading Loading @@ -485,7 +482,7 @@ void core_switching_post_enc_fx( } ELSE IF( EQ_16( st_fx->last_core, TCX_20_CORE ) || EQ_16( st_fx->last_core, TCX_10_CORE ) ) { TBEreset_enc_fx( st_fx, st_fx->bwidth ); TBEreset_enc_fx( st_fx->hBWE_TD, st_fx->last_core, st_fx->bwidth ); } test(); test(); Loading Loading @@ -660,8 +657,6 @@ void core_switching_pre_enc_ivas_fx( { IF( hLPDmem != NULL ) { st_fx->mem_deemph_fx = hLPDmem->syn[M]; move16(); Copy( hLPDmem->mem_syn2, hLPDmem->mem_syn1_fx, M ); } Loading Loading @@ -818,8 +813,6 @@ void core_switching_pre_enc_ivas_fx( lsf2lsp_fx( st_fx->lsf_old_fx, st_fx->lsp_old_fx, M, INT_FS_FX ); } st_fx->mem_deemph_fx = 0; move16(); /* Reset ACELP parameters */ IF( hLPDmem != NULL ) { Loading Loading @@ -1159,7 +1152,7 @@ void core_switching_post_enc_ivas_fx( } ELSE IF( EQ_16( st->last_core, TCX_20_CORE ) || EQ_16( st->last_core, TCX_10_CORE ) ) { TBEreset_enc_fx( st, st->bwidth ); TBEreset_enc_fx( st->hBWE_TD, st->last_core, st->bwidth ); } test(); Loading