Loading lib_com/core_com_config_fx.c +2 −9 Original line number Diff line number Diff line Loading @@ -492,13 +492,6 @@ Word16 sr2fscale_fx( return extract_l( Mpy_32_16_1( sr_core, FSCALE_DENOM_BY_12800_Q15 ) ); /*Q0*/ } Word16 sr2fscale( const Word32 sr_core /* i : internal sampling rate */ ) { return (Word16) ( ( FSCALE_DENOM * sr_core ) / 12800 ); } Word32 getCoreSamplerateMode2( const Word16 element_mode, /* i : IVAS element mode Q0*/ Loading Loading @@ -1127,8 +1120,8 @@ void init_tcx_window_cfg_fx( } /*Mid-OLA*/ /*compute minimum length for "half" window: lookahead - 5ms. It must be also multiple of 2*/ hTcxCfg->tcx_mdct_window_half_length = extract_l( L_shr( L_mult0( L_LOOK_12k8 - NS2SA( 12800, 5000000L ), sr2fscale( sr_core ) ), LD_FSCALE_DENOM ) ); /*Q0*/ hTcxCfg->tcx_mdct_window_half_lengthFB = extract_l( L_shr( L_mult0( L_LOOK_12k8 - NS2SA( 12800, 5000000L ), sr2fscale( input_Fs ) ), LD_FSCALE_DENOM ) ); /*Q0*/ hTcxCfg->tcx_mdct_window_half_length = extract_l( L_shr( L_mult0( L_LOOK_12k8 - NS2SA( 12800, 5000000L ), sr2fscale_fx( sr_core ) ), LD_FSCALE_DENOM ) ); /*Q0*/ hTcxCfg->tcx_mdct_window_half_lengthFB = extract_l( L_shr( L_mult0( L_LOOK_12k8 - NS2SA( 12800, 5000000L ), sr2fscale_fx( input_Fs ) ), LD_FSCALE_DENOM ) ); /*Q0*/ move16(); move16(); assert( GT_16( hTcxCfg->tcx_mdct_window_half_length, 16 ) && "Half window can not be large enough!" ); Loading lib_com/ivas_prot_fx.h +4 −0 Original line number Diff line number Diff line Loading @@ -3911,6 +3911,10 @@ void ivas_omasa_decode_masa_to_total_fx( const Word16 nblocks ); void ivas_get_stereo_panning_gains_fx( const Word16 aziDeg, const Word16 eleDeg, Word16 panningGains[2] ); /*----------------------------------------------------------------------------------* * TD Binaural Object renderer Loading lib_com/lpc_tools_fx.c +12 −11 Original line number Diff line number Diff line Loading @@ -446,12 +446,8 @@ static Word32 Div_32_opt( Word32 L_num /*Q31*/, Word16 denom_hi /*Qx -16*/, Word * Returns: * void */ Word16 E_LPC_lev_dur( const Word16 Rh[] /*QR -16*/, const Word16 Rl[] /*QR -1*/, Word16 A[] /*Qx*/, Word32 epsP[] /*QR*/, const Word16 order, Word16 *mem /*Qx*/ ) { return ( E_LPC_lev_dur_stab( Rh, Rl, A, epsP, order, mem, 32750 ) ); /* 0.99945 in Q15 */ } Word16 E_LPC_lev_dur_stab( const Word16 Rh[] /*QR -16*/, const Word16 Rl[] /*QR -1*/, Word16 A[] /*Qx*/, Word32 epsP[] /*QR*/, const Word16 order, Word16 *mem /*Qx*/, Word16 k_max /*Q15*/ ) static Word16 E_LPC_lev_dur_stab( const Word16 Rh[] /*QR -16*/, const Word16 Rl[] /*QR -1*/, Word16 A[] /*Qx*/, Word32 epsP[] /*QR*/, const Word16 order, Word16 *mem /*Qx*/, Word16 k_max /*Q15*/ ) { Word16 i, j, k; Word16 hi, lo; Loading Loading @@ -636,12 +632,12 @@ Word16 E_LPC_lev_dur_stab( const Word16 Rh[] /*QR -16*/, const Word16 Rl[] /*QR return ( flag ); } Word16 E_LPC_lev_dur_ivas_fx( const Word16 Rh[], const Word16 Rl[], Word16 A[], Word32 epsP[], const Word16 order, Word16 *mem ) Word16 E_LPC_lev_dur( const Word16 Rh[] /*QR -16*/, const Word16 Rl[] /*QR -1*/, Word16 A[] /*Qx*/, Word32 epsP[] /*QR*/, const Word16 order, Word16 *mem /*Qx*/ ) { return ( E_LPC_lev_dur_stab_ivas_fx( Rh, Rl, A, epsP, order, mem, 32750 ) ); /* 0.99945 in Q15 */ return ( E_LPC_lev_dur_stab( Rh, Rl, A, epsP, order, mem, 32750 ) ); /* 0.99945 in Q15 */ } Word16 E_LPC_lev_dur_stab_ivas_fx( const Word16 Rh[], const Word16 Rl[], Word16 A[], Word32 epsP[], const Word16 order, Word16 *mem, Word16 k_max ) static Word16 E_LPC_lev_dur_stab_ivas_fx( const Word16 Rh[], const Word16 Rl[], Word16 A[], Word32 epsP[], const Word16 order, Word16 *mem, Word16 k_max ) { Word16 i, j, k; Word16 hi, lo; Loading Loading @@ -826,12 +822,12 @@ Word16 E_LPC_lev_dur_stab_ivas_fx( const Word16 Rh[], const Word16 Rl[], Word16 return ( flag ); } Word16 E_LPC_lev_dur_fx( const Word16 Rh[] /*QR -16*/, const Word16 Rl[] /*QR -1*/, Word32 A[] /*QA*/, Word32 epsP[] /*QR*/, const Word16 order, Word32 *mem /*QA*/ ) Word16 E_LPC_lev_dur_ivas_fx( const Word16 Rh[], const Word16 Rl[], Word16 A[], Word32 epsP[], const Word16 order, Word16 *mem ) { return ( E_LPC_lev_dur_stab_fx( Rh, Rl, A, epsP, order, mem, 32750 ) ); /* 0.99945 in Q15 */ return ( E_LPC_lev_dur_stab_ivas_fx( Rh, Rl, A, epsP, order, mem, 32750 ) ); /* 0.99945 in Q15 */ } Word16 E_LPC_lev_dur_stab_fx( const Word16 Rh[] /*QR -16*/, const Word16 Rl[] /*QR -1*/, Word32 A[] /*QA*/, Word32 epsP[] /*QR*/, const Word16 order, Word32 *mem /*QA*/, Word16 k_max /*Q15*/ ) static Word16 E_LPC_lev_dur_stab_fx( const Word16 Rh[] /*QR -16*/, const Word16 Rl[] /*QR -1*/, Word32 A[] /*QA*/, Word32 epsP[] /*QR*/, const Word16 order, Word32 *mem /*QA*/, Word16 k_max /*Q15*/ ) { Word16 i, j, k; Word16 hi, lo; Loading Loading @@ -1016,6 +1012,11 @@ Word16 E_LPC_lev_dur_stab_fx( const Word16 Rh[] /*QR -16*/, const Word16 Rl[] /* return ( flag ); } Word16 E_LPC_lev_dur_fx( const Word16 Rh[] /*QR -16*/, const Word16 Rl[] /*QR -1*/, Word32 A[] /*QA*/, Word32 epsP[] /*QR*/, const Word16 order, Word32 *mem /*QA*/ ) { return ( E_LPC_lev_dur_stab_fx( Rh, Rl, A, epsP, order, mem, 32750 ) ); /* 0.99945 in Q15 */ } /* * E_LPC_a_add_tilt Loading lib_com/lsf_tools_fx.c +12 −13 Original line number Diff line number Diff line Loading @@ -52,17 +52,16 @@ val2 = shr( ( cbp )[2], 4 ); \ val3 = add( add( shr( lshl( ( cbp )[2], 12 ), 4 ), lshr( lshl( ( cbp )[1], 12 ), 8 ) ), s_and( ( cbp )[0], 0xF ) ); #define SPC 0.0234952f #define SPC_plus SPC * 1.001f /*-------------------------------------------------------------------* * Local functions *-------------------------------------------------------------------*/ Word16 root_search_fx( Word16 low, Word16 high, Word32 *v_low, Word32 *coef, Word16 order ); Word32 calc_weight( Word16 delta1, Word16 delta2, Word16 *n1 ); Word32 polynomial_eval_fx( Word16 f, Word32 *coef, Word16 order ); void E_LPC_isf_isp_conversion( const Word16 isf[], Word16 isp[], const Word16 m ); void E_LPC_lsp_lsf_conversion( const Word16 lsp[], Word16 lsf[], const Word16 m ); Word16 E_LPC_f_lsp_pol_get( const Word16 lsp[], Word32 f[], const Word16 n, const Word16 past_Ovf, const Word16 isMODE1 ); static Word16 root_search_fx( Word16 low, Word16 high, Word32 *v_low, Word32 *coef, Word16 order ); static Word32 calc_weight( Word16 delta1, Word16 delta2, Word16 *n1 ); static Word32 polynomial_eval_fx( Word16 f, Word32 *coef, Word16 order ); static Word16 E_LPC_f_lsp_pol_get( const Word16 lsp[], Word32 f[], const Word16 n, const Word16 past_Ovf, const Word16 isMODE1 ); static Word32 poscos_fx( Word16 w ); static Word16 chebyshev( Word16 x, Word32 *f, const Word16 n, const Word16 shift ) { Loading Loading @@ -940,7 +939,7 @@ void lsp2lpc_fx( * R.A.Salami October 1990 * *-----------------------------------------------------------* */ Word16 E_LPC_f_lsp_pol_get( const Word16 lsp[], Word32 f[], const Word16 n, const Word16 past_Ovf, const Word16 isMODE1 ) static Word16 E_LPC_f_lsp_pol_get( const Word16 lsp[], Word32 f[], const Word16 n, const Word16 past_Ovf, const Word16 isMODE1 ) { /* All computation in Q23 */ const Word16 *plsp; Loading Loading @@ -3513,7 +3512,7 @@ void lsp_convolve_fx( /*===================================================================*/ Word32 poscos_fx( Word16 w ) static Word32 poscos_fx( Word16 w ) { Word16 a, z, z2, z3, z5, z7, z9; Word32 Ltemp; Loading Loading @@ -3571,7 +3570,7 @@ Word32 poscos_fx( Word16 w ) /* _ ( Word16) root in Q15, or 0xffff if no root is found */ /*===================================================================*/ Word16 root_search_fx( Word16 low, static Word16 root_search_fx( Word16 low, Word16 high, Word32 *v_low, Word32 *coef, Loading Loading @@ -3689,7 +3688,7 @@ and delta2 */ /* (alpha/(sqrt(delta1*delta2)) */ /*===================================================================*/ Word32 calc_weight( static Word32 calc_weight( Word16 delta1, Word16 delta2, Word16 *n1 ) Loading Loading @@ -3741,7 +3740,7 @@ Word32 calc_weight( /*===================================================================*/ /* 40-32 bit conversion */ Word32 polynomial_eval_fx( Word16 f, static Word32 polynomial_eval_fx( Word16 f, Word32 *coef, Word16 order ) { Loading lib_com/prot_fx.h +24 −328 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
lib_com/core_com_config_fx.c +2 −9 Original line number Diff line number Diff line Loading @@ -492,13 +492,6 @@ Word16 sr2fscale_fx( return extract_l( Mpy_32_16_1( sr_core, FSCALE_DENOM_BY_12800_Q15 ) ); /*Q0*/ } Word16 sr2fscale( const Word32 sr_core /* i : internal sampling rate */ ) { return (Word16) ( ( FSCALE_DENOM * sr_core ) / 12800 ); } Word32 getCoreSamplerateMode2( const Word16 element_mode, /* i : IVAS element mode Q0*/ Loading Loading @@ -1127,8 +1120,8 @@ void init_tcx_window_cfg_fx( } /*Mid-OLA*/ /*compute minimum length for "half" window: lookahead - 5ms. It must be also multiple of 2*/ hTcxCfg->tcx_mdct_window_half_length = extract_l( L_shr( L_mult0( L_LOOK_12k8 - NS2SA( 12800, 5000000L ), sr2fscale( sr_core ) ), LD_FSCALE_DENOM ) ); /*Q0*/ hTcxCfg->tcx_mdct_window_half_lengthFB = extract_l( L_shr( L_mult0( L_LOOK_12k8 - NS2SA( 12800, 5000000L ), sr2fscale( input_Fs ) ), LD_FSCALE_DENOM ) ); /*Q0*/ hTcxCfg->tcx_mdct_window_half_length = extract_l( L_shr( L_mult0( L_LOOK_12k8 - NS2SA( 12800, 5000000L ), sr2fscale_fx( sr_core ) ), LD_FSCALE_DENOM ) ); /*Q0*/ hTcxCfg->tcx_mdct_window_half_lengthFB = extract_l( L_shr( L_mult0( L_LOOK_12k8 - NS2SA( 12800, 5000000L ), sr2fscale_fx( input_Fs ) ), LD_FSCALE_DENOM ) ); /*Q0*/ move16(); move16(); assert( GT_16( hTcxCfg->tcx_mdct_window_half_length, 16 ) && "Half window can not be large enough!" ); Loading
lib_com/ivas_prot_fx.h +4 −0 Original line number Diff line number Diff line Loading @@ -3911,6 +3911,10 @@ void ivas_omasa_decode_masa_to_total_fx( const Word16 nblocks ); void ivas_get_stereo_panning_gains_fx( const Word16 aziDeg, const Word16 eleDeg, Word16 panningGains[2] ); /*----------------------------------------------------------------------------------* * TD Binaural Object renderer Loading
lib_com/lpc_tools_fx.c +12 −11 Original line number Diff line number Diff line Loading @@ -446,12 +446,8 @@ static Word32 Div_32_opt( Word32 L_num /*Q31*/, Word16 denom_hi /*Qx -16*/, Word * Returns: * void */ Word16 E_LPC_lev_dur( const Word16 Rh[] /*QR -16*/, const Word16 Rl[] /*QR -1*/, Word16 A[] /*Qx*/, Word32 epsP[] /*QR*/, const Word16 order, Word16 *mem /*Qx*/ ) { return ( E_LPC_lev_dur_stab( Rh, Rl, A, epsP, order, mem, 32750 ) ); /* 0.99945 in Q15 */ } Word16 E_LPC_lev_dur_stab( const Word16 Rh[] /*QR -16*/, const Word16 Rl[] /*QR -1*/, Word16 A[] /*Qx*/, Word32 epsP[] /*QR*/, const Word16 order, Word16 *mem /*Qx*/, Word16 k_max /*Q15*/ ) static Word16 E_LPC_lev_dur_stab( const Word16 Rh[] /*QR -16*/, const Word16 Rl[] /*QR -1*/, Word16 A[] /*Qx*/, Word32 epsP[] /*QR*/, const Word16 order, Word16 *mem /*Qx*/, Word16 k_max /*Q15*/ ) { Word16 i, j, k; Word16 hi, lo; Loading Loading @@ -636,12 +632,12 @@ Word16 E_LPC_lev_dur_stab( const Word16 Rh[] /*QR -16*/, const Word16 Rl[] /*QR return ( flag ); } Word16 E_LPC_lev_dur_ivas_fx( const Word16 Rh[], const Word16 Rl[], Word16 A[], Word32 epsP[], const Word16 order, Word16 *mem ) Word16 E_LPC_lev_dur( const Word16 Rh[] /*QR -16*/, const Word16 Rl[] /*QR -1*/, Word16 A[] /*Qx*/, Word32 epsP[] /*QR*/, const Word16 order, Word16 *mem /*Qx*/ ) { return ( E_LPC_lev_dur_stab_ivas_fx( Rh, Rl, A, epsP, order, mem, 32750 ) ); /* 0.99945 in Q15 */ return ( E_LPC_lev_dur_stab( Rh, Rl, A, epsP, order, mem, 32750 ) ); /* 0.99945 in Q15 */ } Word16 E_LPC_lev_dur_stab_ivas_fx( const Word16 Rh[], const Word16 Rl[], Word16 A[], Word32 epsP[], const Word16 order, Word16 *mem, Word16 k_max ) static Word16 E_LPC_lev_dur_stab_ivas_fx( const Word16 Rh[], const Word16 Rl[], Word16 A[], Word32 epsP[], const Word16 order, Word16 *mem, Word16 k_max ) { Word16 i, j, k; Word16 hi, lo; Loading Loading @@ -826,12 +822,12 @@ Word16 E_LPC_lev_dur_stab_ivas_fx( const Word16 Rh[], const Word16 Rl[], Word16 return ( flag ); } Word16 E_LPC_lev_dur_fx( const Word16 Rh[] /*QR -16*/, const Word16 Rl[] /*QR -1*/, Word32 A[] /*QA*/, Word32 epsP[] /*QR*/, const Word16 order, Word32 *mem /*QA*/ ) Word16 E_LPC_lev_dur_ivas_fx( const Word16 Rh[], const Word16 Rl[], Word16 A[], Word32 epsP[], const Word16 order, Word16 *mem ) { return ( E_LPC_lev_dur_stab_fx( Rh, Rl, A, epsP, order, mem, 32750 ) ); /* 0.99945 in Q15 */ return ( E_LPC_lev_dur_stab_ivas_fx( Rh, Rl, A, epsP, order, mem, 32750 ) ); /* 0.99945 in Q15 */ } Word16 E_LPC_lev_dur_stab_fx( const Word16 Rh[] /*QR -16*/, const Word16 Rl[] /*QR -1*/, Word32 A[] /*QA*/, Word32 epsP[] /*QR*/, const Word16 order, Word32 *mem /*QA*/, Word16 k_max /*Q15*/ ) static Word16 E_LPC_lev_dur_stab_fx( const Word16 Rh[] /*QR -16*/, const Word16 Rl[] /*QR -1*/, Word32 A[] /*QA*/, Word32 epsP[] /*QR*/, const Word16 order, Word32 *mem /*QA*/, Word16 k_max /*Q15*/ ) { Word16 i, j, k; Word16 hi, lo; Loading Loading @@ -1016,6 +1012,11 @@ Word16 E_LPC_lev_dur_stab_fx( const Word16 Rh[] /*QR -16*/, const Word16 Rl[] /* return ( flag ); } Word16 E_LPC_lev_dur_fx( const Word16 Rh[] /*QR -16*/, const Word16 Rl[] /*QR -1*/, Word32 A[] /*QA*/, Word32 epsP[] /*QR*/, const Word16 order, Word32 *mem /*QA*/ ) { return ( E_LPC_lev_dur_stab_fx( Rh, Rl, A, epsP, order, mem, 32750 ) ); /* 0.99945 in Q15 */ } /* * E_LPC_a_add_tilt Loading
lib_com/lsf_tools_fx.c +12 −13 Original line number Diff line number Diff line Loading @@ -52,17 +52,16 @@ val2 = shr( ( cbp )[2], 4 ); \ val3 = add( add( shr( lshl( ( cbp )[2], 12 ), 4 ), lshr( lshl( ( cbp )[1], 12 ), 8 ) ), s_and( ( cbp )[0], 0xF ) ); #define SPC 0.0234952f #define SPC_plus SPC * 1.001f /*-------------------------------------------------------------------* * Local functions *-------------------------------------------------------------------*/ Word16 root_search_fx( Word16 low, Word16 high, Word32 *v_low, Word32 *coef, Word16 order ); Word32 calc_weight( Word16 delta1, Word16 delta2, Word16 *n1 ); Word32 polynomial_eval_fx( Word16 f, Word32 *coef, Word16 order ); void E_LPC_isf_isp_conversion( const Word16 isf[], Word16 isp[], const Word16 m ); void E_LPC_lsp_lsf_conversion( const Word16 lsp[], Word16 lsf[], const Word16 m ); Word16 E_LPC_f_lsp_pol_get( const Word16 lsp[], Word32 f[], const Word16 n, const Word16 past_Ovf, const Word16 isMODE1 ); static Word16 root_search_fx( Word16 low, Word16 high, Word32 *v_low, Word32 *coef, Word16 order ); static Word32 calc_weight( Word16 delta1, Word16 delta2, Word16 *n1 ); static Word32 polynomial_eval_fx( Word16 f, Word32 *coef, Word16 order ); static Word16 E_LPC_f_lsp_pol_get( const Word16 lsp[], Word32 f[], const Word16 n, const Word16 past_Ovf, const Word16 isMODE1 ); static Word32 poscos_fx( Word16 w ); static Word16 chebyshev( Word16 x, Word32 *f, const Word16 n, const Word16 shift ) { Loading Loading @@ -940,7 +939,7 @@ void lsp2lpc_fx( * R.A.Salami October 1990 * *-----------------------------------------------------------* */ Word16 E_LPC_f_lsp_pol_get( const Word16 lsp[], Word32 f[], const Word16 n, const Word16 past_Ovf, const Word16 isMODE1 ) static Word16 E_LPC_f_lsp_pol_get( const Word16 lsp[], Word32 f[], const Word16 n, const Word16 past_Ovf, const Word16 isMODE1 ) { /* All computation in Q23 */ const Word16 *plsp; Loading Loading @@ -3513,7 +3512,7 @@ void lsp_convolve_fx( /*===================================================================*/ Word32 poscos_fx( Word16 w ) static Word32 poscos_fx( Word16 w ) { Word16 a, z, z2, z3, z5, z7, z9; Word32 Ltemp; Loading Loading @@ -3571,7 +3570,7 @@ Word32 poscos_fx( Word16 w ) /* _ ( Word16) root in Q15, or 0xffff if no root is found */ /*===================================================================*/ Word16 root_search_fx( Word16 low, static Word16 root_search_fx( Word16 low, Word16 high, Word32 *v_low, Word32 *coef, Loading Loading @@ -3689,7 +3688,7 @@ and delta2 */ /* (alpha/(sqrt(delta1*delta2)) */ /*===================================================================*/ Word32 calc_weight( static Word32 calc_weight( Word16 delta1, Word16 delta2, Word16 *n1 ) Loading Loading @@ -3741,7 +3740,7 @@ Word32 calc_weight( /*===================================================================*/ /* 40-32 bit conversion */ Word32 polynomial_eval_fx( Word16 f, static Word32 polynomial_eval_fx( Word16 f, Word32 *coef, Word16 order ) { Loading