Loading lib_com/lsf_tools_fx.c +0 −164 Original line number Diff line number Diff line Loading @@ -2962,91 +2962,6 @@ void lsf_syn_mem_backup_fx( return; } #ifndef CLEANUP_VBR_CAM_ENC /*-------------------------------------------------------------------* * lsf_syn_mem_backup_fx() * * *--------------------------------------------------------------------*/ void lsf_syn_mem_backup_ivas_fx( Encoder_State *st_fx, /* i: state structure */ Word16 *btilt_code_fx, /* i: tilt code Q15 */ Word32 *gc_threshold_fx, /* i: Q16 */ Word16 *clip_var_bck_fx, /* o: Q(2.56), Q14, Q7, Q0, Q14, Q14 */ Word16 *next_force_sf_bck_fx, /* o: */ Word16 *lsp_new, /* i: LSP vector to quantize Q15 */ Word16 *lsp_mid, /* i: mid-frame LSP vector Q15 */ Word16 *clip_var, /* o: pitch clipping state var Q(2.56) */ Word16 *mem_AR, /* o: quantizer memory for AR model Q(2.56) */ Word16 *mem_MA, /* o: quantizer memory for AR model Q(2.56) */ Word16 *lsp_new_bck, /* o: LSP vector to quantize- backup Q15 */ Word16 *lsp_mid_bck, /* o: mid-frame LSP vector - backup Q15 */ Word32 *Bin_E, /* o: FFT Bin energy 128 *2 sets Q_new + Q_SCALE - 2 */ Word32 *Bin_E_old, /* o: FFT Bin energy 128 sets Q_new + Q_SCALE - 2 */ Word16 *mem_syn_bck, /* o: synthesis filter memory ( 15 - st_fx->hLPDmem->e_mem_syn ) */ Word16 *mem_w0_bck, /* o: memory of the weighting filter ( 15 - st_fx->hLPDmem->e_mem_syn ) */ Word16 *streaklimit, /* Q15 */ Word16 *pstreaklen ) { Word16 i; LPD_state_HANDLE hLPDmem = st_fx->hLPDmem; *clip_var = st_fx->clip_var_fx[0]; move16(); FOR( i = 0; i < M; i++ ) { mem_AR[i] = st_fx->mem_AR_fx[i]; // Q2.56 move16(); mem_MA[i] = st_fx->mem_MA_fx[i]; // Q2.56 move16(); lsp_new_bck[i] = lsp_new[i]; // Q15 move16(); lsp_mid_bck[i] = lsp_mid[i]; // Q15 move16(); } *streaklimit = st_fx->streaklimit_fx; // Q15 move16(); *pstreaklen = st_fx->pstreaklen; move16(); FOR( i = 0; i < L_FFT; i++ ) { Bin_E[i] = st_fx->Bin_E_fx[i]; // Q_new + Q_SCALE - 2 move32(); } FOR( i = 0; i < ( L_FFT / 2 ); i++ ) { Bin_E_old[i] = st_fx->Bin_E_old_fx[i]; // Q_new + Q_SCALE - 2 move32(); } /* back-up memories */ FOR( i = 0; i < M; i++ ) { mem_syn_bck[i] = hLPDmem->mem_syn[i]; // Q( st_fx->hLPDmem->q_mem_syn ) move16(); } *mem_w0_bck = hLPDmem->mem_w0; // Q( st_fx->hLPDmem->q_mem_syn ) move16(); *btilt_code_fx = hLPDmem->tilt_code; // Q15 move16(); *gc_threshold_fx = hLPDmem->gc_threshold; // Q16 move16(); Copy( st_fx->clip_var_fx, clip_var_bck_fx, 6 ); *next_force_sf_bck_fx = st_fx->next_force_safety_net; move16(); return; } #endif void lsf_update_memory( Word16 narrowband, /* i : narrowband flag */ Loading Loading @@ -3191,85 +3106,6 @@ void lsf_syn_mem_restore_fx( return; } #ifndef CLEANUP_VBR_CAM_ENC void lsf_syn_mem_restore_ivas_fx( Encoder_State *st_fx, /* o: state structure */ Word16 btilt_code_fx, /* i: Q15 */ Word32 gc_threshold_fx, /* i: Q16 */ Word16 *clip_var_bck_fx, /* i: Q(2.56), Q14, Q7, Q0, Q14, Q14 */ Word16 next_force_sf_bck_fx, /* i: */ Word16 *lsp_new, /* o: LSP vector to quantize Q15 */ Word16 *lsp_mid, /* o: mid-frame LSP vector Q15 */ Word16 clip_var, /* i: pitch clipping state var Q(2.56), Q14, Q7, Q0, Q14, Q14 */ Word16 *mem_AR, /* i: quantizer memory for AR model 2.56 */ Word16 *mem_MA, /* i: quantizer memory for MA model 2.56 */ Word16 *lsp_new_bck, /* i: LSP vector to quantize- backup Q15 */ Word16 *lsp_mid_bck, /* i: mid-frame LSP vector - backup Q15 */ Word32 *Bin_E, /* i: FFT Bin energy 128 *2 sets Q_new + Q_SCALE - 2 */ Word32 *Bin_E_old, /* i: FFT Bin energy 128 sets Q_new + Q_SCALE - 2 */ Word16 *mem_syn_bck, /* i: synthesis filter memory Q(15 - st_fx->hLPDmem->e_mem_syn ) */ Word16 mem_w0_bck, /* i: memory of the weighting filter Q(15 - st_fx->hLPDmem->e_mem_syn ) */ Word16 streaklimit, /* i:LSF quantizer Q15 */ Word16 pstreaklen /* i:LSF quantizer */ ) { Word16 i; LPD_state_HANDLE hLPDmem = st_fx->hLPDmem; /* restore lsf memories */ st_fx->clip_var_fx[0] = clip_var; move16(); FOR( i = 0; i < M; i++ ) { st_fx->mem_AR_fx[i] = mem_AR[i]; // 2.56 move16(); st_fx->mem_MA_fx[i] = mem_MA[i]; // 2.56 move16(); lsp_new[i] = lsp_new_bck[i]; // Q15 move16(); lsp_mid[i] = lsp_mid_bck[i]; // Q15 move16(); } st_fx->streaklimit_fx = streaklimit; // Q15 move16(); st_fx->pstreaklen = pstreaklen; move16(); FOR( i = 0; i < L_FFT; i++ ) { st_fx->Bin_E_fx[i] = Bin_E[i]; // Q_new + Q_SCALE - 2 move16(); } FOR( i = 0; i < ( L_FFT / 2 ); i++ ) { st_fx->Bin_E_old_fx[i] = Bin_E_old[i]; // Q_new + Q_SCALE - 2 move32(); } /* restoring memories */ hLPDmem->mem_w0 = mem_w0_bck; // Q( st_fx->hLPDmem->q_mem_syn ) move16(); FOR( i = 0; i < M; i++ ) { hLPDmem->mem_syn[i] = mem_syn_bck[i]; // Q( st_fx->hLPDmem->q_mem_syn ) move16(); } move16(); hLPDmem->tilt_code = btilt_code_fx; // Q15 move32(); hLPDmem->gc_threshold = gc_threshold_fx; // Q16 Copy( clip_var_bck_fx, st_fx->clip_var_fx, 6 ); st_fx->next_force_safety_net = next_force_sf_bck_fx; move16(); return; } #endif /* Returns: codebook index */ Word16 tcxlpc_get_cdk( Loading lib_com/options.h +0 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,6 @@ #define FIX_1872_REMOVE_UNUSED_PSNOISEGEN_ISAR /* Dolby: Remove unused psNoiseGen from ISAR */ #define FIX_1478_UNINIT_ON_BFI /* VA: Fix issue 1478 where a vector is partly un-initialized during bfi */ #define FIX_1486_INIT_OUTPUT_POINTERS /* FhG: always initialize pointers in renderer flush */ #define CLEANUP_VBR_CAM_ENC /* VA: basop issue 2299: Remove unused core-encoder VBR and CAM code */ #define FIX_1494_SET_SPLITBFI_UNUSED /* Dolby: Fix issue 1494, remove unused function setting BFI flag in ISAR renderer */ #define FIX_1479_MSAN_SPAR_UNINITIALIZED_VALUE /* Dolby: Fix for issue 1479, MSAN error due to uninitialized value in SPAR */ #define HARM_LSF_ENC /* VA: basop issue 2301: Remove duplicated code in LSF quantizer */ Loading lib_com/prot_fx.h +0 −51 Original line number Diff line number Diff line Loading @@ -906,28 +906,6 @@ void lsf_syn_mem_restore_fx( Word16 pstreaklen /* i:LSF quantizer */ ); #ifndef CLEANUP_VBR_CAM_ENC void lsf_syn_mem_restore_ivas_fx( Encoder_State *st_fx, /* o: state structure */ Word16 btilt_code_fx, /* i: Q15 */ Word32 gc_threshold_fx, /* i: Q16 */ Word16 *clip_var_bck_fx, /* i: Q(2.56), Q14, Q7, Q0, Q14, Q14 */ Word16 next_force_sf_bck_fx, /* i: */ Word16 *lsp_new, /* o: LSP vector to quantize Q15 */ Word16 *lsp_mid, /* o: mid-frame LSP vector Q15 */ Word16 clip_var, /* i: pitch clipping state var Q(2.56), Q14, Q7, Q0, Q14, Q14 */ Word16 *mem_AR, /* i: quantizer memory for AR model 2.56 */ Word16 *mem_MA, /* i: quantizer memory for MA model 2.56 */ Word16 *lsp_new_bck, /* i: LSP vector to quantize- backup Q15 */ Word16 *lsp_mid_bck, /* i: mid-frame LSP vector - backup Q15 */ Word32 *Bin_E, /* i: FFT Bin energy 128 *2 sets Q_new + Q_SCALE - 2 */ Word32 *Bin_E_old, /* i: FFT Bin energy 128 sets Q_new + Q_SCALE - 2 */ Word16 *mem_syn_bck, /* i: synthesis filter memory Q(15 - st_fx->hLPDmem->e_mem_syn ) */ Word16 mem_w0_bck, /* i: memory of the weighting filter Q(15 - st_fx->hLPDmem->e_mem_syn ) */ Word16 streaklimit, /* i:LSF quantizer Q15 */ Word16 pstreaklen /* i:LSF quantizer */ ); #endif void lsf_update_memory( Word16 narrowband, /* i : narrowband flag */ const Word16 qisf[], /* i : quantized xSF coefficients */ Loading Loading @@ -3824,14 +3802,6 @@ void nelp_encoder_fx( Word16 *qIn1, Word16 reduce_gains ); #ifndef CLEANUP_VBR_CAM_ENC void nelp_encoder_ivas_fx( Encoder_State *st_fx, /* i/o: encoder state */ Word16 *in_fx, /* i : residual signal */ Word16 *exc_fx, /* o : NELP quantized excitation signal */ Word16 *qIn1, Word16 reduce_gains ); #endif void swb_bwe_enc_lr_fx( Encoder_State *st_fx, /* i/o: encoder state structure */ const Word32 L_m_core[], /* i : lowband synthesis */ Loading Loading @@ -10603,27 +10573,6 @@ Word16 ari_decode_14bits_sign_ivas( Word16 *res, Tastat *s ); #ifndef CLEANUP_VBR_CAM_ENC void lsf_syn_mem_backup_ivas_fx( Encoder_State *st_fx, /* i: state structure */ Word16 *btilt_code_fx, /* i: tilt code Q15 */ Word32 *gc_threshold_fx, /* i: Q16 */ Word16 *clip_var_bck_fx, /* o: Q(2.56), Q14, Q7, Q0, Q14, Q14 */ Word16 *next_force_sf_bck_fx, /* o: */ Word16 *lsp_new, /* i: LSP vector to quantize Q15 */ Word16 *lsp_mid, /* i: mid-frame LSP vector Q15 */ Word16 *clip_var, /* o: pitch clipping state var Q(2.56) */ Word16 *mem_AR, /* o: quantizer memory for AR model Q(2.56) */ Word16 *mem_MA, /* o: quantizer memory for AR model Q(2.56) */ Word16 *lsp_new_bck, /* o: LSP vector to quantize- backup Q15 */ Word16 *lsp_mid_bck, /* o: mid-frame LSP vector - backup Q15 */ Word32 *Bin_E, /* o: FFT Bin energy 128 *2 sets Q_new + Q_SCALE - 2 */ Word32 *Bin_E_old, /* o: FFT Bin energy 128 sets Q_new + Q_SCALE - 2 */ Word16 *mem_syn_bck, /* o: synthesis filter memory ( 15 - st_fx->hLPDmem->e_mem_syn ) */ Word16 *mem_w0_bck, /* o: memory of the weighting filter ( 15 - st_fx->hLPDmem->e_mem_syn ) */ Word16 *streaklimit, /* Q15 */ Word16 *pstreaklen ); #endif ivas_error config_acelp1_fx( const Word16 enc_dec, /* i : encoder/decoder flag */ const Word32 total_brate, /* i : total bitrate */ Loading lib_enc/acelp_core_enc_fx.c +0 −128 Original line number Diff line number Diff line Loading @@ -708,20 +708,10 @@ ivas_error acelp_core_enc_ivas_fx( Word32 int_fs; Word16 nb_bits; /* parameters handling */ #ifndef CLEANUP_VBR_CAM_ENC /* SC-VBR - back-up memories for LSF quantizer and synthesis filter */ Word16 pstreaklen; #endif Word16 sid_bw = -1; move16(); #ifndef CLEANUP_VBR_CAM_ENC Word16 next_force_sf_bck; #endif Word16 uc_two_stage_flag; Word16 position; #ifndef CLEANUP_VBR_CAM_ENC Word16 ppp_mode, nelp_mode; #endif Word16 tdm_lp_reuse_flag, tdm_low_rate_mode, tdm_Pitch_reuse_flag; /* bitstream */ Loading @@ -736,22 +726,12 @@ ivas_error acelp_core_enc_ivas_fx( Word16 tmp_noise_fx; /* NB post-filter long-term noise energy*/ Word16 old_bwe_exc_fx[( PIT16k_MAX + ( L_FRAME16k + 1 ) + L_SUBFR16k ) * 2]; /* excitation buffer Q_new */ Word16 *bwe_exc_fx; /* excitation for SWB TBE Q_new */ #ifndef CLEANUP_VBR_CAM_ENC Word16 mem_MA_fx[M], mem_AR_fx[M], lsp_new_bck_fx[M], /*lsf_new_bck_fx[M],*/ lsp_mid_bck_fx[M], mem_syn_bck_fx[M]; Word32 Bin_E_fx[L_FFT], Bin_E_old_fx[L_FFT / 2]; Word16 clip_var_fx, mem_w0_bck_fx, streaklimit_fx; #endif set16_fx( old_bwe_exc_fx, 0, ( PIT16k_MAX + ( L_FRAME16k + 1 ) + L_SUBFR16k ) * 2 ); set16_fx( old_exc_fx, 0, L_EXC ); set16_fx( Aq, 0, NB_SUBFR16k * ( M + 1 ) ); set16_fx( syn_fx, 0, L_FRAME16k ); #ifndef CLEANUP_VBR_CAM_ENC Word16 tilt_code_bck_fx; Word32 gc_threshold_bck_fx; Word16 clip_var_bck_fx[6]; #endif Word32 q_env_fx[NUM_ENV_CNG]; set32_fx( q_env_fx, 0, NUM_ENV_CNG ); set16_fx( exc2_fx, 0, L_FRAME16k ); Loading Loading @@ -874,34 +854,6 @@ ivas_error acelp_core_enc_ivas_fx( position = -1; move16(); #ifndef CLEANUP_VBR_CAM_ENC /* SC-VBR temporary variables */ pstreaklen = 0; move16(); clip_var_fx = 0; move16(); mem_w0_bck_fx = 0; move16(); streaklimit_fx = 0; move16(); /* channel-aware mode */ reset_rf_indices_fx( st ); /* VBR modes */ IF( st->Opt_SC_VBR ) { ppp_mode = st->hSC_VBR->ppp_mode; nelp_mode = st->hSC_VBR->nelp_mode; } ELSE { ppp_mode = 0; nelp_mode = 0; } move16(); move16(); #endif test(); /* TD stereo */ Loading Loading @@ -1167,15 +1119,7 @@ ivas_error acelp_core_enc_ivas_fx( uc_two_stage_flag = 0; move16(); #ifndef CLEANUP_VBR_CAM_ENC test(); IF( !nelp_mode && !ppp_mode ) { #endif config_acelp1_fx( ENC, st->total_brate, st->core_brate, st->core, st->extl, st->extl_brate, st->L_frame, st->GSC_noisy_speech, &( st->acelp_cfg ), hBstr->nb_bits_tot, st->coder_type, st->inactive_coder_type_flag, tc_subfr, 0, &nb_bits, unbits, st->element_mode, &uc_two_stage_flag, tdm_lp_reuse_flag, tdm_low_rate_mode, st->idchan, tdm_Pitch_reuse_flag, st->tdm_LRTD_flag, st->GSC_IVAS_mode ); #ifndef CLEANUP_VBR_CAM_ENC } #endif /*-----------------------------------------------------------------* * After inactive period, use the most up-to-date ISPs Loading Loading @@ -1212,10 +1156,6 @@ ivas_error acelp_core_enc_ivas_fx( * A[z] calculation *-----------------------------------------------------------------*/ #ifndef CLEANUP_VBR_CAM_ENC /* SC-VBR & channel-aware mode - back-up memories for LSF quantizer and synthesis filter */ lsf_syn_mem_backup_ivas_fx( st, &tilt_code_bck_fx, &gc_threshold_bck_fx, clip_var_bck_fx, &next_force_sf_bck, lsp_new, lsp_mid, &clip_var_fx, mem_AR_fx, mem_MA_fx, lsp_new_bck_fx, lsp_mid_bck_fx, Bin_E_fx, Bin_E_old_fx, mem_syn_bck_fx, &mem_w0_bck_fx, &streaklimit_fx, &pstreaklen ); #endif IF( !tdm_lp_reuse_flag ) { #ifdef HARM_LSF_ENC Loading Loading @@ -1341,13 +1281,6 @@ ivas_error acelp_core_enc_ivas_fx( encod_gen_2sbfr_fx( st, inp, Aw, Aq, res_fx, syn_fx, exc_fx, exc2_fx, pitch_buf, voice_factors_fx, bwe_exc_fx, tdm_Pitch_reuse_flag, tdm_Pri_pitch_buf_fx, Q_new, 0 ); } } #ifndef CLEANUP_VBR_CAM_ENC ELSE IF( nelp_mode ) { /* SC-VBR - NELP frames */ encod_nelp_ivas_fx( st, inp, Aw, Aq, res_fx, syn_fx, &tmp_noise_fx, exc_fx, exc2_fx, pitch_buf, voice_factors_fx, bwe_exc_fx, Q_new, 0 ); } #endif ELSE IF( EQ_16( st->coder_type, UNVOICED ) ) { /* UNVOICED frames (Gauss. excitation) */ Loading @@ -1357,40 +1290,6 @@ ivas_error acelp_core_enc_ivas_fx( { encod_tran_fx( st, inp, Aw, Aq, Es_pred_fx, res_fx, syn_fx, exc_fx, exc2_fx, pitch_buf, voice_factors_fx, bwe_exc_fx, tc_subfr, position, unbits, 0, Q_new ); } #ifndef CLEANUP_VBR_CAM_ENC ELSE IF( ppp_mode ) { /* SC-VBR - PPP frames */ IF( ( error = encod_ppp_ivas_fx( st, inp, Aw, Aq, res_fx, syn_fx, exc_fx, exc2_fx, pitch_buf, voice_factors_fx, bwe_exc_fx, Q_new, 0 ) ) != IVAS_ERR_OK ) { return error; } IF( st->hSC_VBR->bump_up ) /* PPP failed, bump up */ { /* restore memories of LSF quantizer and synthesis filter */ lsf_syn_mem_restore_ivas_fx( st, tilt_code_bck_fx, gc_threshold_bck_fx, clip_var_bck_fx, next_force_sf_bck, lsp_new, lsp_mid, clip_var_fx, mem_AR_fx, mem_MA_fx, lsp_new_bck_fx, lsp_mid_bck_fx, Bin_E_fx, Bin_E_old_fx, mem_syn_bck_fx, mem_w0_bck_fx, streaklimit_fx, pstreaklen ); /* Configure ACELP bit allocation */ config_acelp1_fx( ENC, st->total_brate, st->core_brate, st->core, st->extl, st->extl_brate, st->L_frame, -1, &( st->acelp_cfg ), hBstr->nb_bits_tot, st->coder_type, st->inactive_coder_type_flag, tc_subfr, 0, &nb_bits, unbits, 0, &uc_two_stage_flag, 0, 0, st->idchan, tdm_Pitch_reuse_flag, st->tdm_LRTD_flag, st->GSC_IVAS_mode ); /* redo LSF quantization */ #ifdef HARM_LSF_ENC lsf_enc_fx( st, lsf_new_fx, lsp_new, lsp_mid, Aq, tdm_low_rate_mode, 0, NULL, Q_new ); #else lsf_enc_ivas_fx( st, lsf_new_fx, lsp_new, lsp_mid, Aq, tdm_low_rate_mode, 0, NULL, Q_new ); #endif /* recalculation of LP residual (filtering through A[z] filter) */ calc_residu_fx( st, inp, res_fx, Aq ); st->hTdCngEnc->burst_ho_cnt = 0; move16(); /* VOICED frames in SC-VBR */ encod_gen_voic_fx( st, inp, Aw, Aq, Es_pred_fx, res_fx, syn_fx, exc_fx, exc2_fx, pitch_buf, voice_factors_fx, bwe_exc_fx, unbits, tdm_Pitch_reuse_flag, tdm_Pri_pitch_buf_fx, 0, Q_new ); } } #endif ELSE IF( EQ_16( st->coder_type, AUDIO ) || ( st->coder_type == INACTIVE && st->inactive_coder_type_flag ) ) { /* AUDIO and INACTIVE frames (coded by GSC technology) */ Loading Loading @@ -1456,12 +1355,7 @@ ivas_error acelp_core_enc_ivas_fx( test(); test(); test(); #ifdef CLEANUP_VBR_CAM_ENC IF( !( EQ_16( st->idchan, 1 ) && EQ_16( st->element_mode, IVAS_CPE_TD ) ) && !( EQ_16( st->element_mode, IVAS_SCE ) && tdm_low_rate_mode ) ) #else test(); IF( !( EQ_16( st->idchan, 1 ) && EQ_16( st->element_mode, IVAS_CPE_TD ) ) && NE_16( nelp_mode, 1 ) && !( EQ_16( st->element_mode, IVAS_SCE ) && tdm_low_rate_mode ) ) #endif { /* exc2 buffer is needed only for updating of Aq[] which is needed for core switching */ Copy( exc_fx, exc2_fx, st->L_frame ); // Q_new Loading Loading @@ -1525,13 +1419,7 @@ ivas_error acelp_core_enc_ivas_fx( test(); test(); test(); #ifdef CLEANUP_VBR_CAM_ENC IF( ( ( EQ_16( st->extl, SWB_TBE ) || EQ_16( st->extl, WB_TBE ) || EQ_16( st->extl, FB_TBE ) ) && NE_16( st->last_extl, SWB_TBE ) && NE_16( st->last_extl, WB_TBE ) && NE_16( st->last_extl, FB_TBE ) ) || ( EQ_16( st->idchan, 1 ) && EQ_16( st->element_mode, IVAS_CPE_TD ) && !st->tdm_LRTD_flag ) ) #else test(); test(); IF( ( EQ_16( st->last_Opt_SC_VBR, 1 ) && st->Opt_SC_VBR == 0 ) || ( ( EQ_16( st->extl, SWB_TBE ) || EQ_16( st->extl, WB_TBE ) || EQ_16( st->extl, FB_TBE ) ) && NE_16( st->last_extl, SWB_TBE ) && NE_16( st->last_extl, WB_TBE ) && NE_16( st->last_extl, FB_TBE ) ) || ( EQ_16( st->idchan, 1 ) && EQ_16( st->element_mode, IVAS_CPE_TD ) && !st->tdm_LRTD_flag ) ) #endif { st->hBWE_TD->bwe_non_lin_prev_scale_fx = 0; move16(); Loading @@ -1542,12 +1430,7 @@ ivas_error acelp_core_enc_ivas_fx( test(); test(); test(); #ifdef CLEANUP_VBR_CAM_ENC IF( 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 ) ) #else test(); 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 ) ) ) #endif { /* 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->hBWE_TD->prev_Q_bwe_exc, 16 ) ) ) ); // prev_Q_bwe_exc Loading Loading @@ -1626,17 +1509,6 @@ ivas_error acelp_core_enc_ivas_fx( } } #ifndef CLEANUP_VBR_CAM_ENC /* SC-VBR update of average data rate */ IF( EQ_16( st->vad_flag, 1 ) ) { /* reset in case of bitrate switching in EVS */ if ( st->hSC_VBR != NULL ) { update_average_rate_fx( st->hSC_VBR, st->core_brate ); } } #endif pop_wmops(); return error; Loading lib_enc/enc_nelp_fx.c +0 −142 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
lib_com/lsf_tools_fx.c +0 −164 Original line number Diff line number Diff line Loading @@ -2962,91 +2962,6 @@ void lsf_syn_mem_backup_fx( return; } #ifndef CLEANUP_VBR_CAM_ENC /*-------------------------------------------------------------------* * lsf_syn_mem_backup_fx() * * *--------------------------------------------------------------------*/ void lsf_syn_mem_backup_ivas_fx( Encoder_State *st_fx, /* i: state structure */ Word16 *btilt_code_fx, /* i: tilt code Q15 */ Word32 *gc_threshold_fx, /* i: Q16 */ Word16 *clip_var_bck_fx, /* o: Q(2.56), Q14, Q7, Q0, Q14, Q14 */ Word16 *next_force_sf_bck_fx, /* o: */ Word16 *lsp_new, /* i: LSP vector to quantize Q15 */ Word16 *lsp_mid, /* i: mid-frame LSP vector Q15 */ Word16 *clip_var, /* o: pitch clipping state var Q(2.56) */ Word16 *mem_AR, /* o: quantizer memory for AR model Q(2.56) */ Word16 *mem_MA, /* o: quantizer memory for AR model Q(2.56) */ Word16 *lsp_new_bck, /* o: LSP vector to quantize- backup Q15 */ Word16 *lsp_mid_bck, /* o: mid-frame LSP vector - backup Q15 */ Word32 *Bin_E, /* o: FFT Bin energy 128 *2 sets Q_new + Q_SCALE - 2 */ Word32 *Bin_E_old, /* o: FFT Bin energy 128 sets Q_new + Q_SCALE - 2 */ Word16 *mem_syn_bck, /* o: synthesis filter memory ( 15 - st_fx->hLPDmem->e_mem_syn ) */ Word16 *mem_w0_bck, /* o: memory of the weighting filter ( 15 - st_fx->hLPDmem->e_mem_syn ) */ Word16 *streaklimit, /* Q15 */ Word16 *pstreaklen ) { Word16 i; LPD_state_HANDLE hLPDmem = st_fx->hLPDmem; *clip_var = st_fx->clip_var_fx[0]; move16(); FOR( i = 0; i < M; i++ ) { mem_AR[i] = st_fx->mem_AR_fx[i]; // Q2.56 move16(); mem_MA[i] = st_fx->mem_MA_fx[i]; // Q2.56 move16(); lsp_new_bck[i] = lsp_new[i]; // Q15 move16(); lsp_mid_bck[i] = lsp_mid[i]; // Q15 move16(); } *streaklimit = st_fx->streaklimit_fx; // Q15 move16(); *pstreaklen = st_fx->pstreaklen; move16(); FOR( i = 0; i < L_FFT; i++ ) { Bin_E[i] = st_fx->Bin_E_fx[i]; // Q_new + Q_SCALE - 2 move32(); } FOR( i = 0; i < ( L_FFT / 2 ); i++ ) { Bin_E_old[i] = st_fx->Bin_E_old_fx[i]; // Q_new + Q_SCALE - 2 move32(); } /* back-up memories */ FOR( i = 0; i < M; i++ ) { mem_syn_bck[i] = hLPDmem->mem_syn[i]; // Q( st_fx->hLPDmem->q_mem_syn ) move16(); } *mem_w0_bck = hLPDmem->mem_w0; // Q( st_fx->hLPDmem->q_mem_syn ) move16(); *btilt_code_fx = hLPDmem->tilt_code; // Q15 move16(); *gc_threshold_fx = hLPDmem->gc_threshold; // Q16 move16(); Copy( st_fx->clip_var_fx, clip_var_bck_fx, 6 ); *next_force_sf_bck_fx = st_fx->next_force_safety_net; move16(); return; } #endif void lsf_update_memory( Word16 narrowband, /* i : narrowband flag */ Loading Loading @@ -3191,85 +3106,6 @@ void lsf_syn_mem_restore_fx( return; } #ifndef CLEANUP_VBR_CAM_ENC void lsf_syn_mem_restore_ivas_fx( Encoder_State *st_fx, /* o: state structure */ Word16 btilt_code_fx, /* i: Q15 */ Word32 gc_threshold_fx, /* i: Q16 */ Word16 *clip_var_bck_fx, /* i: Q(2.56), Q14, Q7, Q0, Q14, Q14 */ Word16 next_force_sf_bck_fx, /* i: */ Word16 *lsp_new, /* o: LSP vector to quantize Q15 */ Word16 *lsp_mid, /* o: mid-frame LSP vector Q15 */ Word16 clip_var, /* i: pitch clipping state var Q(2.56), Q14, Q7, Q0, Q14, Q14 */ Word16 *mem_AR, /* i: quantizer memory for AR model 2.56 */ Word16 *mem_MA, /* i: quantizer memory for MA model 2.56 */ Word16 *lsp_new_bck, /* i: LSP vector to quantize- backup Q15 */ Word16 *lsp_mid_bck, /* i: mid-frame LSP vector - backup Q15 */ Word32 *Bin_E, /* i: FFT Bin energy 128 *2 sets Q_new + Q_SCALE - 2 */ Word32 *Bin_E_old, /* i: FFT Bin energy 128 sets Q_new + Q_SCALE - 2 */ Word16 *mem_syn_bck, /* i: synthesis filter memory Q(15 - st_fx->hLPDmem->e_mem_syn ) */ Word16 mem_w0_bck, /* i: memory of the weighting filter Q(15 - st_fx->hLPDmem->e_mem_syn ) */ Word16 streaklimit, /* i:LSF quantizer Q15 */ Word16 pstreaklen /* i:LSF quantizer */ ) { Word16 i; LPD_state_HANDLE hLPDmem = st_fx->hLPDmem; /* restore lsf memories */ st_fx->clip_var_fx[0] = clip_var; move16(); FOR( i = 0; i < M; i++ ) { st_fx->mem_AR_fx[i] = mem_AR[i]; // 2.56 move16(); st_fx->mem_MA_fx[i] = mem_MA[i]; // 2.56 move16(); lsp_new[i] = lsp_new_bck[i]; // Q15 move16(); lsp_mid[i] = lsp_mid_bck[i]; // Q15 move16(); } st_fx->streaklimit_fx = streaklimit; // Q15 move16(); st_fx->pstreaklen = pstreaklen; move16(); FOR( i = 0; i < L_FFT; i++ ) { st_fx->Bin_E_fx[i] = Bin_E[i]; // Q_new + Q_SCALE - 2 move16(); } FOR( i = 0; i < ( L_FFT / 2 ); i++ ) { st_fx->Bin_E_old_fx[i] = Bin_E_old[i]; // Q_new + Q_SCALE - 2 move32(); } /* restoring memories */ hLPDmem->mem_w0 = mem_w0_bck; // Q( st_fx->hLPDmem->q_mem_syn ) move16(); FOR( i = 0; i < M; i++ ) { hLPDmem->mem_syn[i] = mem_syn_bck[i]; // Q( st_fx->hLPDmem->q_mem_syn ) move16(); } move16(); hLPDmem->tilt_code = btilt_code_fx; // Q15 move32(); hLPDmem->gc_threshold = gc_threshold_fx; // Q16 Copy( clip_var_bck_fx, st_fx->clip_var_fx, 6 ); st_fx->next_force_safety_net = next_force_sf_bck_fx; move16(); return; } #endif /* Returns: codebook index */ Word16 tcxlpc_get_cdk( Loading
lib_com/options.h +0 −1 Original line number Diff line number Diff line Loading @@ -90,7 +90,6 @@ #define FIX_1872_REMOVE_UNUSED_PSNOISEGEN_ISAR /* Dolby: Remove unused psNoiseGen from ISAR */ #define FIX_1478_UNINIT_ON_BFI /* VA: Fix issue 1478 where a vector is partly un-initialized during bfi */ #define FIX_1486_INIT_OUTPUT_POINTERS /* FhG: always initialize pointers in renderer flush */ #define CLEANUP_VBR_CAM_ENC /* VA: basop issue 2299: Remove unused core-encoder VBR and CAM code */ #define FIX_1494_SET_SPLITBFI_UNUSED /* Dolby: Fix issue 1494, remove unused function setting BFI flag in ISAR renderer */ #define FIX_1479_MSAN_SPAR_UNINITIALIZED_VALUE /* Dolby: Fix for issue 1479, MSAN error due to uninitialized value in SPAR */ #define HARM_LSF_ENC /* VA: basop issue 2301: Remove duplicated code in LSF quantizer */ Loading
lib_com/prot_fx.h +0 −51 Original line number Diff line number Diff line Loading @@ -906,28 +906,6 @@ void lsf_syn_mem_restore_fx( Word16 pstreaklen /* i:LSF quantizer */ ); #ifndef CLEANUP_VBR_CAM_ENC void lsf_syn_mem_restore_ivas_fx( Encoder_State *st_fx, /* o: state structure */ Word16 btilt_code_fx, /* i: Q15 */ Word32 gc_threshold_fx, /* i: Q16 */ Word16 *clip_var_bck_fx, /* i: Q(2.56), Q14, Q7, Q0, Q14, Q14 */ Word16 next_force_sf_bck_fx, /* i: */ Word16 *lsp_new, /* o: LSP vector to quantize Q15 */ Word16 *lsp_mid, /* o: mid-frame LSP vector Q15 */ Word16 clip_var, /* i: pitch clipping state var Q(2.56), Q14, Q7, Q0, Q14, Q14 */ Word16 *mem_AR, /* i: quantizer memory for AR model 2.56 */ Word16 *mem_MA, /* i: quantizer memory for MA model 2.56 */ Word16 *lsp_new_bck, /* i: LSP vector to quantize- backup Q15 */ Word16 *lsp_mid_bck, /* i: mid-frame LSP vector - backup Q15 */ Word32 *Bin_E, /* i: FFT Bin energy 128 *2 sets Q_new + Q_SCALE - 2 */ Word32 *Bin_E_old, /* i: FFT Bin energy 128 sets Q_new + Q_SCALE - 2 */ Word16 *mem_syn_bck, /* i: synthesis filter memory Q(15 - st_fx->hLPDmem->e_mem_syn ) */ Word16 mem_w0_bck, /* i: memory of the weighting filter Q(15 - st_fx->hLPDmem->e_mem_syn ) */ Word16 streaklimit, /* i:LSF quantizer Q15 */ Word16 pstreaklen /* i:LSF quantizer */ ); #endif void lsf_update_memory( Word16 narrowband, /* i : narrowband flag */ const Word16 qisf[], /* i : quantized xSF coefficients */ Loading Loading @@ -3824,14 +3802,6 @@ void nelp_encoder_fx( Word16 *qIn1, Word16 reduce_gains ); #ifndef CLEANUP_VBR_CAM_ENC void nelp_encoder_ivas_fx( Encoder_State *st_fx, /* i/o: encoder state */ Word16 *in_fx, /* i : residual signal */ Word16 *exc_fx, /* o : NELP quantized excitation signal */ Word16 *qIn1, Word16 reduce_gains ); #endif void swb_bwe_enc_lr_fx( Encoder_State *st_fx, /* i/o: encoder state structure */ const Word32 L_m_core[], /* i : lowband synthesis */ Loading Loading @@ -10603,27 +10573,6 @@ Word16 ari_decode_14bits_sign_ivas( Word16 *res, Tastat *s ); #ifndef CLEANUP_VBR_CAM_ENC void lsf_syn_mem_backup_ivas_fx( Encoder_State *st_fx, /* i: state structure */ Word16 *btilt_code_fx, /* i: tilt code Q15 */ Word32 *gc_threshold_fx, /* i: Q16 */ Word16 *clip_var_bck_fx, /* o: Q(2.56), Q14, Q7, Q0, Q14, Q14 */ Word16 *next_force_sf_bck_fx, /* o: */ Word16 *lsp_new, /* i: LSP vector to quantize Q15 */ Word16 *lsp_mid, /* i: mid-frame LSP vector Q15 */ Word16 *clip_var, /* o: pitch clipping state var Q(2.56) */ Word16 *mem_AR, /* o: quantizer memory for AR model Q(2.56) */ Word16 *mem_MA, /* o: quantizer memory for AR model Q(2.56) */ Word16 *lsp_new_bck, /* o: LSP vector to quantize- backup Q15 */ Word16 *lsp_mid_bck, /* o: mid-frame LSP vector - backup Q15 */ Word32 *Bin_E, /* o: FFT Bin energy 128 *2 sets Q_new + Q_SCALE - 2 */ Word32 *Bin_E_old, /* o: FFT Bin energy 128 sets Q_new + Q_SCALE - 2 */ Word16 *mem_syn_bck, /* o: synthesis filter memory ( 15 - st_fx->hLPDmem->e_mem_syn ) */ Word16 *mem_w0_bck, /* o: memory of the weighting filter ( 15 - st_fx->hLPDmem->e_mem_syn ) */ Word16 *streaklimit, /* Q15 */ Word16 *pstreaklen ); #endif ivas_error config_acelp1_fx( const Word16 enc_dec, /* i : encoder/decoder flag */ const Word32 total_brate, /* i : total bitrate */ Loading
lib_enc/acelp_core_enc_fx.c +0 −128 Original line number Diff line number Diff line Loading @@ -708,20 +708,10 @@ ivas_error acelp_core_enc_ivas_fx( Word32 int_fs; Word16 nb_bits; /* parameters handling */ #ifndef CLEANUP_VBR_CAM_ENC /* SC-VBR - back-up memories for LSF quantizer and synthesis filter */ Word16 pstreaklen; #endif Word16 sid_bw = -1; move16(); #ifndef CLEANUP_VBR_CAM_ENC Word16 next_force_sf_bck; #endif Word16 uc_two_stage_flag; Word16 position; #ifndef CLEANUP_VBR_CAM_ENC Word16 ppp_mode, nelp_mode; #endif Word16 tdm_lp_reuse_flag, tdm_low_rate_mode, tdm_Pitch_reuse_flag; /* bitstream */ Loading @@ -736,22 +726,12 @@ ivas_error acelp_core_enc_ivas_fx( Word16 tmp_noise_fx; /* NB post-filter long-term noise energy*/ Word16 old_bwe_exc_fx[( PIT16k_MAX + ( L_FRAME16k + 1 ) + L_SUBFR16k ) * 2]; /* excitation buffer Q_new */ Word16 *bwe_exc_fx; /* excitation for SWB TBE Q_new */ #ifndef CLEANUP_VBR_CAM_ENC Word16 mem_MA_fx[M], mem_AR_fx[M], lsp_new_bck_fx[M], /*lsf_new_bck_fx[M],*/ lsp_mid_bck_fx[M], mem_syn_bck_fx[M]; Word32 Bin_E_fx[L_FFT], Bin_E_old_fx[L_FFT / 2]; Word16 clip_var_fx, mem_w0_bck_fx, streaklimit_fx; #endif set16_fx( old_bwe_exc_fx, 0, ( PIT16k_MAX + ( L_FRAME16k + 1 ) + L_SUBFR16k ) * 2 ); set16_fx( old_exc_fx, 0, L_EXC ); set16_fx( Aq, 0, NB_SUBFR16k * ( M + 1 ) ); set16_fx( syn_fx, 0, L_FRAME16k ); #ifndef CLEANUP_VBR_CAM_ENC Word16 tilt_code_bck_fx; Word32 gc_threshold_bck_fx; Word16 clip_var_bck_fx[6]; #endif Word32 q_env_fx[NUM_ENV_CNG]; set32_fx( q_env_fx, 0, NUM_ENV_CNG ); set16_fx( exc2_fx, 0, L_FRAME16k ); Loading Loading @@ -874,34 +854,6 @@ ivas_error acelp_core_enc_ivas_fx( position = -1; move16(); #ifndef CLEANUP_VBR_CAM_ENC /* SC-VBR temporary variables */ pstreaklen = 0; move16(); clip_var_fx = 0; move16(); mem_w0_bck_fx = 0; move16(); streaklimit_fx = 0; move16(); /* channel-aware mode */ reset_rf_indices_fx( st ); /* VBR modes */ IF( st->Opt_SC_VBR ) { ppp_mode = st->hSC_VBR->ppp_mode; nelp_mode = st->hSC_VBR->nelp_mode; } ELSE { ppp_mode = 0; nelp_mode = 0; } move16(); move16(); #endif test(); /* TD stereo */ Loading Loading @@ -1167,15 +1119,7 @@ ivas_error acelp_core_enc_ivas_fx( uc_two_stage_flag = 0; move16(); #ifndef CLEANUP_VBR_CAM_ENC test(); IF( !nelp_mode && !ppp_mode ) { #endif config_acelp1_fx( ENC, st->total_brate, st->core_brate, st->core, st->extl, st->extl_brate, st->L_frame, st->GSC_noisy_speech, &( st->acelp_cfg ), hBstr->nb_bits_tot, st->coder_type, st->inactive_coder_type_flag, tc_subfr, 0, &nb_bits, unbits, st->element_mode, &uc_two_stage_flag, tdm_lp_reuse_flag, tdm_low_rate_mode, st->idchan, tdm_Pitch_reuse_flag, st->tdm_LRTD_flag, st->GSC_IVAS_mode ); #ifndef CLEANUP_VBR_CAM_ENC } #endif /*-----------------------------------------------------------------* * After inactive period, use the most up-to-date ISPs Loading Loading @@ -1212,10 +1156,6 @@ ivas_error acelp_core_enc_ivas_fx( * A[z] calculation *-----------------------------------------------------------------*/ #ifndef CLEANUP_VBR_CAM_ENC /* SC-VBR & channel-aware mode - back-up memories for LSF quantizer and synthesis filter */ lsf_syn_mem_backup_ivas_fx( st, &tilt_code_bck_fx, &gc_threshold_bck_fx, clip_var_bck_fx, &next_force_sf_bck, lsp_new, lsp_mid, &clip_var_fx, mem_AR_fx, mem_MA_fx, lsp_new_bck_fx, lsp_mid_bck_fx, Bin_E_fx, Bin_E_old_fx, mem_syn_bck_fx, &mem_w0_bck_fx, &streaklimit_fx, &pstreaklen ); #endif IF( !tdm_lp_reuse_flag ) { #ifdef HARM_LSF_ENC Loading Loading @@ -1341,13 +1281,6 @@ ivas_error acelp_core_enc_ivas_fx( encod_gen_2sbfr_fx( st, inp, Aw, Aq, res_fx, syn_fx, exc_fx, exc2_fx, pitch_buf, voice_factors_fx, bwe_exc_fx, tdm_Pitch_reuse_flag, tdm_Pri_pitch_buf_fx, Q_new, 0 ); } } #ifndef CLEANUP_VBR_CAM_ENC ELSE IF( nelp_mode ) { /* SC-VBR - NELP frames */ encod_nelp_ivas_fx( st, inp, Aw, Aq, res_fx, syn_fx, &tmp_noise_fx, exc_fx, exc2_fx, pitch_buf, voice_factors_fx, bwe_exc_fx, Q_new, 0 ); } #endif ELSE IF( EQ_16( st->coder_type, UNVOICED ) ) { /* UNVOICED frames (Gauss. excitation) */ Loading @@ -1357,40 +1290,6 @@ ivas_error acelp_core_enc_ivas_fx( { encod_tran_fx( st, inp, Aw, Aq, Es_pred_fx, res_fx, syn_fx, exc_fx, exc2_fx, pitch_buf, voice_factors_fx, bwe_exc_fx, tc_subfr, position, unbits, 0, Q_new ); } #ifndef CLEANUP_VBR_CAM_ENC ELSE IF( ppp_mode ) { /* SC-VBR - PPP frames */ IF( ( error = encod_ppp_ivas_fx( st, inp, Aw, Aq, res_fx, syn_fx, exc_fx, exc2_fx, pitch_buf, voice_factors_fx, bwe_exc_fx, Q_new, 0 ) ) != IVAS_ERR_OK ) { return error; } IF( st->hSC_VBR->bump_up ) /* PPP failed, bump up */ { /* restore memories of LSF quantizer and synthesis filter */ lsf_syn_mem_restore_ivas_fx( st, tilt_code_bck_fx, gc_threshold_bck_fx, clip_var_bck_fx, next_force_sf_bck, lsp_new, lsp_mid, clip_var_fx, mem_AR_fx, mem_MA_fx, lsp_new_bck_fx, lsp_mid_bck_fx, Bin_E_fx, Bin_E_old_fx, mem_syn_bck_fx, mem_w0_bck_fx, streaklimit_fx, pstreaklen ); /* Configure ACELP bit allocation */ config_acelp1_fx( ENC, st->total_brate, st->core_brate, st->core, st->extl, st->extl_brate, st->L_frame, -1, &( st->acelp_cfg ), hBstr->nb_bits_tot, st->coder_type, st->inactive_coder_type_flag, tc_subfr, 0, &nb_bits, unbits, 0, &uc_two_stage_flag, 0, 0, st->idchan, tdm_Pitch_reuse_flag, st->tdm_LRTD_flag, st->GSC_IVAS_mode ); /* redo LSF quantization */ #ifdef HARM_LSF_ENC lsf_enc_fx( st, lsf_new_fx, lsp_new, lsp_mid, Aq, tdm_low_rate_mode, 0, NULL, Q_new ); #else lsf_enc_ivas_fx( st, lsf_new_fx, lsp_new, lsp_mid, Aq, tdm_low_rate_mode, 0, NULL, Q_new ); #endif /* recalculation of LP residual (filtering through A[z] filter) */ calc_residu_fx( st, inp, res_fx, Aq ); st->hTdCngEnc->burst_ho_cnt = 0; move16(); /* VOICED frames in SC-VBR */ encod_gen_voic_fx( st, inp, Aw, Aq, Es_pred_fx, res_fx, syn_fx, exc_fx, exc2_fx, pitch_buf, voice_factors_fx, bwe_exc_fx, unbits, tdm_Pitch_reuse_flag, tdm_Pri_pitch_buf_fx, 0, Q_new ); } } #endif ELSE IF( EQ_16( st->coder_type, AUDIO ) || ( st->coder_type == INACTIVE && st->inactive_coder_type_flag ) ) { /* AUDIO and INACTIVE frames (coded by GSC technology) */ Loading Loading @@ -1456,12 +1355,7 @@ ivas_error acelp_core_enc_ivas_fx( test(); test(); test(); #ifdef CLEANUP_VBR_CAM_ENC IF( !( EQ_16( st->idchan, 1 ) && EQ_16( st->element_mode, IVAS_CPE_TD ) ) && !( EQ_16( st->element_mode, IVAS_SCE ) && tdm_low_rate_mode ) ) #else test(); IF( !( EQ_16( st->idchan, 1 ) && EQ_16( st->element_mode, IVAS_CPE_TD ) ) && NE_16( nelp_mode, 1 ) && !( EQ_16( st->element_mode, IVAS_SCE ) && tdm_low_rate_mode ) ) #endif { /* exc2 buffer is needed only for updating of Aq[] which is needed for core switching */ Copy( exc_fx, exc2_fx, st->L_frame ); // Q_new Loading Loading @@ -1525,13 +1419,7 @@ ivas_error acelp_core_enc_ivas_fx( test(); test(); test(); #ifdef CLEANUP_VBR_CAM_ENC IF( ( ( EQ_16( st->extl, SWB_TBE ) || EQ_16( st->extl, WB_TBE ) || EQ_16( st->extl, FB_TBE ) ) && NE_16( st->last_extl, SWB_TBE ) && NE_16( st->last_extl, WB_TBE ) && NE_16( st->last_extl, FB_TBE ) ) || ( EQ_16( st->idchan, 1 ) && EQ_16( st->element_mode, IVAS_CPE_TD ) && !st->tdm_LRTD_flag ) ) #else test(); test(); IF( ( EQ_16( st->last_Opt_SC_VBR, 1 ) && st->Opt_SC_VBR == 0 ) || ( ( EQ_16( st->extl, SWB_TBE ) || EQ_16( st->extl, WB_TBE ) || EQ_16( st->extl, FB_TBE ) ) && NE_16( st->last_extl, SWB_TBE ) && NE_16( st->last_extl, WB_TBE ) && NE_16( st->last_extl, FB_TBE ) ) || ( EQ_16( st->idchan, 1 ) && EQ_16( st->element_mode, IVAS_CPE_TD ) && !st->tdm_LRTD_flag ) ) #endif { st->hBWE_TD->bwe_non_lin_prev_scale_fx = 0; move16(); Loading @@ -1542,12 +1430,7 @@ ivas_error acelp_core_enc_ivas_fx( test(); test(); test(); #ifdef CLEANUP_VBR_CAM_ENC IF( 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 ) ) #else test(); 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 ) ) ) #endif { /* 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->hBWE_TD->prev_Q_bwe_exc, 16 ) ) ) ); // prev_Q_bwe_exc Loading Loading @@ -1626,17 +1509,6 @@ ivas_error acelp_core_enc_ivas_fx( } } #ifndef CLEANUP_VBR_CAM_ENC /* SC-VBR update of average data rate */ IF( EQ_16( st->vad_flag, 1 ) ) { /* reset in case of bitrate switching in EVS */ if ( st->hSC_VBR != NULL ) { update_average_rate_fx( st->hSC_VBR, st->core_brate ); } } #endif pop_wmops(); return error; Loading
lib_enc/enc_nelp_fx.c +0 −142 File changed.Preview size limit exceeded, changes collapsed. Show changes