Loading lib_com/options.h +5 −6 Original line number Diff line number Diff line Loading @@ -85,18 +85,17 @@ #define USE_EVS_FUNC_LP // -> BE for IVAS, but condition seems missing compared to float for rf condition //#define USE_EVS_Est_tilt2_FUNC #ifdef USE_EVS_FUNC_LP //#define USE_EVS_FUNC_LP_GAIN /* (BE) Deactivate gain Q function as they are identical to EVS, except for a couple of lines now added */ // Keep deactivated as they are only replaced in generic so far #endif //#define USE_EVS_FUNC_FT_T // replacing the 32 bits find target with the EVS find target for transition //#define USE_EVS_FUNC_FT_G // replacing the 32 bits find target with the EVS find target for generic //#define TRY_SHIFT_ACELP // Adding similar mecanism as shift for EVS, allows to use only 1 bit headroom instead of 2 #define TRY_SHIFT_ACELP // Adding similar mecanism as shift for EVS, allows to use only 1 bit headroom instead of 2 #define USE_EVS_FUNC_FT_G // replacing the 32 bits find target with the EVS find target for generic #ifdef TRY_SHIFT_ACELP //#define TRY_SHIFT_ACELP_T #define USE_EVS_Est_tilt2_FUNC #endif #endif Loading lib_enc/acelp_core_enc_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -1368,7 +1368,7 @@ ivas_error acelp_core_enc_ivas_fx( } ELSE IF( EQ_16( st->coder_type, TRANSITION ) ) { #ifdef TRY_SHIFT_ACELP #if 0//def TRY_SHIFT_ACELP encod_tran_ivas_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, shift, Q_new ); #else encod_tran_ivas_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 ); Loading lib_enc/enc_gen_voic_fx.c +9 −9 Original line number Diff line number Diff line Loading @@ -558,21 +558,19 @@ void encod_gen_voic_ivas_fx( find_targets_fx( speech_fx, hLPDmem->mem_syn, i_subfr_fx, &hLPDmem->mem_w0, p_Aq_fx, res_fx, L_SUBFR, p_Aw_fx, st_fx->preemph_fac, xn_fx, cn_fx, h1_fx ); #endif #if !defined TRY_SHIFT_ACELP || !defined USE_EVS_FUNC_FT_G #if !defined TRY_SHIFT_ACELP && !defined USE_EVS_FUNC_FT_G q_h1 = sub( 14, norm_s( h1_fx[0] ) ); Copy_Scale_sig( h1_fx, h2_fx, L_SUBFR, sub( 11, q_h1 ) ); /*Q11*/ #ifdef TRY_SHIFT_ACELP Scale_sig( h1_fx, L_SUBFR, add( sub( 14, q_h1 ), shift ) ); /* set h1[] in Q14 with scaling for convolution Q14*/ #endif #elif defined TRY_SHIFT_ACELP && !defined USE_EVS_FUNC_FT_G q_h1 = sub( 14, norm_s( h1_fx[0] ) ); Copy_Scale_sig( h1_fx, h2_fx, L_SUBFR, sub( 11, q_h1 ) + shift); /*Q11*/ #else Copy_Scale_sig( h1_fx, h2_fx, L_SUBFR, -2 ); /*Q11*/ Scale_sig( h1_fx, L_SUBFR, add( 1, shift ) ); /* set h1[] in Q14 with scaling for convolution Q(14+shift)*/ #endif /* scaling of xn[] to limit dynamic at 12 bits */ Scale_sig( xn_fx, L_SUBFR, shift ); #ifdef TRY_SHIFT_ACELP Scale_sig( h1_fx, L_SUBFR, sub( 14, q_h1 ) ); /* set h1[] in Q14 with scaling for convolution Q14*/ #endif #ifndef USE_EVS_FUNC_FT_G *pt_pitch_fx = pit_encode_ivas_fx( hBstr, st_fx->acelp_cfg.pitch_bits, st_fx->core_brate, 0, L_frame, st_fx->coder_type, &pitch_limit_flag, i_subfr_fx, exc_fx, L_SUBFR, st_fx->pitch, &T0_min_fx, &T0_max_fx, &T0_fx, &T0_frac_fx, h1_fx, xn_fx, tdm_Pitch_reuse_flag, tdm_Pri_pitch_buf, Q_new ); /* Q6 */ Loading Loading @@ -607,8 +605,10 @@ void encod_gen_voic_ivas_fx( /*-----------------------------------------------------------------* * LP filtering of the adaptive excitation, codebook target computation *-----------------------------------------------------------------*/ #ifndef TRY_SHIFT_ACELP #if !defined TRY_SHIFT_ACELP && !defined USE_EVS_FUNC_FT_G Scale_sig( h1_fx, L_SUBFR, sub( 14, q_h1 ) ); /* set h1[] in Q14 with scaling for convolution Q14*/ #elif !defined USE_EVS_FUNC_FT_G Scale_sig( h1_fx, L_SUBFR, sub( 14, q_h1 ) + shift ); /* set h1[] in Q14 with scaling for convolution Q14*/ #endif #ifndef USE_EVS_FUNC_LP lp_select = lp_filt_exc_enc_ivas_fx( MODE1, st_fx->coder_type, i_subfr_fx, exc_fx, h1_fx, Loading Loading @@ -695,7 +695,7 @@ void encod_gen_voic_ivas_fx( Lgcode = L_shl_o( gain_code_fx, Q_new, &Overflow ); /* scaled gain_code with Qnew -> Q16*/ gcode16 = round_fx_o( Lgcode, &Overflow ); /* Q0 */ #ifdef USE_EVS_Est_tilt2_FUNC #if defined USE_EVS_Est_tilt2_FUNC && defined TRY_SHIFT_ACELP hLPDmem->tilt_code = Est_tilt2(&exc_fx[i_subfr_fx], gain_pit_fx, code_fx, Lgcode, &voice_fac_fx, shift); /* Q15 */ #else hLPDmem->tilt_code = est_tilt_ivas_fx( &exc_fx[i_subfr_fx], gain_pit_fx, code_fx, gain_code_fx, &voice_fac_fx, Q_new, L_SUBFR, 0 ); /* Q15 */ Loading lib_enc/gain_enc_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -466,7 +466,7 @@ void gain_enc_mless_fx( qua_table = gain_qua_mless_6b_fx; if ( element_mode > EVS_MONO ) { #ifdef USE_EVS_FUNC_FT_G #ifdef USE_EVS_FUNC_LP qua_table = gain_qua_mless_6b_stereo_fx; #endif } Loading Loading
lib_com/options.h +5 −6 Original line number Diff line number Diff line Loading @@ -85,18 +85,17 @@ #define USE_EVS_FUNC_LP // -> BE for IVAS, but condition seems missing compared to float for rf condition //#define USE_EVS_Est_tilt2_FUNC #ifdef USE_EVS_FUNC_LP //#define USE_EVS_FUNC_LP_GAIN /* (BE) Deactivate gain Q function as they are identical to EVS, except for a couple of lines now added */ // Keep deactivated as they are only replaced in generic so far #endif //#define USE_EVS_FUNC_FT_T // replacing the 32 bits find target with the EVS find target for transition //#define USE_EVS_FUNC_FT_G // replacing the 32 bits find target with the EVS find target for generic //#define TRY_SHIFT_ACELP // Adding similar mecanism as shift for EVS, allows to use only 1 bit headroom instead of 2 #define TRY_SHIFT_ACELP // Adding similar mecanism as shift for EVS, allows to use only 1 bit headroom instead of 2 #define USE_EVS_FUNC_FT_G // replacing the 32 bits find target with the EVS find target for generic #ifdef TRY_SHIFT_ACELP //#define TRY_SHIFT_ACELP_T #define USE_EVS_Est_tilt2_FUNC #endif #endif Loading
lib_enc/acelp_core_enc_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -1368,7 +1368,7 @@ ivas_error acelp_core_enc_ivas_fx( } ELSE IF( EQ_16( st->coder_type, TRANSITION ) ) { #ifdef TRY_SHIFT_ACELP #if 0//def TRY_SHIFT_ACELP encod_tran_ivas_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, shift, Q_new ); #else encod_tran_ivas_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 ); Loading
lib_enc/enc_gen_voic_fx.c +9 −9 Original line number Diff line number Diff line Loading @@ -558,21 +558,19 @@ void encod_gen_voic_ivas_fx( find_targets_fx( speech_fx, hLPDmem->mem_syn, i_subfr_fx, &hLPDmem->mem_w0, p_Aq_fx, res_fx, L_SUBFR, p_Aw_fx, st_fx->preemph_fac, xn_fx, cn_fx, h1_fx ); #endif #if !defined TRY_SHIFT_ACELP || !defined USE_EVS_FUNC_FT_G #if !defined TRY_SHIFT_ACELP && !defined USE_EVS_FUNC_FT_G q_h1 = sub( 14, norm_s( h1_fx[0] ) ); Copy_Scale_sig( h1_fx, h2_fx, L_SUBFR, sub( 11, q_h1 ) ); /*Q11*/ #ifdef TRY_SHIFT_ACELP Scale_sig( h1_fx, L_SUBFR, add( sub( 14, q_h1 ), shift ) ); /* set h1[] in Q14 with scaling for convolution Q14*/ #endif #elif defined TRY_SHIFT_ACELP && !defined USE_EVS_FUNC_FT_G q_h1 = sub( 14, norm_s( h1_fx[0] ) ); Copy_Scale_sig( h1_fx, h2_fx, L_SUBFR, sub( 11, q_h1 ) + shift); /*Q11*/ #else Copy_Scale_sig( h1_fx, h2_fx, L_SUBFR, -2 ); /*Q11*/ Scale_sig( h1_fx, L_SUBFR, add( 1, shift ) ); /* set h1[] in Q14 with scaling for convolution Q(14+shift)*/ #endif /* scaling of xn[] to limit dynamic at 12 bits */ Scale_sig( xn_fx, L_SUBFR, shift ); #ifdef TRY_SHIFT_ACELP Scale_sig( h1_fx, L_SUBFR, sub( 14, q_h1 ) ); /* set h1[] in Q14 with scaling for convolution Q14*/ #endif #ifndef USE_EVS_FUNC_FT_G *pt_pitch_fx = pit_encode_ivas_fx( hBstr, st_fx->acelp_cfg.pitch_bits, st_fx->core_brate, 0, L_frame, st_fx->coder_type, &pitch_limit_flag, i_subfr_fx, exc_fx, L_SUBFR, st_fx->pitch, &T0_min_fx, &T0_max_fx, &T0_fx, &T0_frac_fx, h1_fx, xn_fx, tdm_Pitch_reuse_flag, tdm_Pri_pitch_buf, Q_new ); /* Q6 */ Loading Loading @@ -607,8 +605,10 @@ void encod_gen_voic_ivas_fx( /*-----------------------------------------------------------------* * LP filtering of the adaptive excitation, codebook target computation *-----------------------------------------------------------------*/ #ifndef TRY_SHIFT_ACELP #if !defined TRY_SHIFT_ACELP && !defined USE_EVS_FUNC_FT_G Scale_sig( h1_fx, L_SUBFR, sub( 14, q_h1 ) ); /* set h1[] in Q14 with scaling for convolution Q14*/ #elif !defined USE_EVS_FUNC_FT_G Scale_sig( h1_fx, L_SUBFR, sub( 14, q_h1 ) + shift ); /* set h1[] in Q14 with scaling for convolution Q14*/ #endif #ifndef USE_EVS_FUNC_LP lp_select = lp_filt_exc_enc_ivas_fx( MODE1, st_fx->coder_type, i_subfr_fx, exc_fx, h1_fx, Loading Loading @@ -695,7 +695,7 @@ void encod_gen_voic_ivas_fx( Lgcode = L_shl_o( gain_code_fx, Q_new, &Overflow ); /* scaled gain_code with Qnew -> Q16*/ gcode16 = round_fx_o( Lgcode, &Overflow ); /* Q0 */ #ifdef USE_EVS_Est_tilt2_FUNC #if defined USE_EVS_Est_tilt2_FUNC && defined TRY_SHIFT_ACELP hLPDmem->tilt_code = Est_tilt2(&exc_fx[i_subfr_fx], gain_pit_fx, code_fx, Lgcode, &voice_fac_fx, shift); /* Q15 */ #else hLPDmem->tilt_code = est_tilt_ivas_fx( &exc_fx[i_subfr_fx], gain_pit_fx, code_fx, gain_code_fx, &voice_fac_fx, Q_new, L_SUBFR, 0 ); /* Q15 */ Loading
lib_enc/gain_enc_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -466,7 +466,7 @@ void gain_enc_mless_fx( qua_table = gain_qua_mless_6b_fx; if ( element_mode > EVS_MONO ) { #ifdef USE_EVS_FUNC_FT_G #ifdef USE_EVS_FUNC_LP qua_table = gain_qua_mless_6b_stereo_fx; #endif } Loading