Loading lib_com/lsf_tools.c +12 −2 Original line number Diff line number Diff line Loading @@ -959,8 +959,11 @@ void isp2isf( * * Convert from LPC to reflection coeff *-------------------------------------------------------------------*/ #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT void a2rc( #else int a2rc( #endif const float *a, /* i : LPC coefficients */ float *refl, /* o : Reflection co-efficients */ const int16_t lpcorder /* i : LPC order */ Loading @@ -985,8 +988,11 @@ void a2rc( { refl[j] = 0.f; } #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT return; #else return 0; #endif } refl[m] = -km; Loading @@ -1006,7 +1012,11 @@ void a2rc( } } #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT return; #else return 0; #endif } Loading lib_com/prot.h +4 −0 Original line number Diff line number Diff line Loading @@ -2998,7 +2998,11 @@ void a2isf( const float *old_isf, const int16_t lpcOrder ); #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT void a2rc( #else int a2rc( #endif const float *a, /* i : LPC coefficients */ float *refl, /* o : Reflection co-efficients */ const int16_t lpcorder /* i : LPC order */ Loading lib_dec/ivas_lfe_plc.c +2 −27 Original line number Diff line number Diff line Loading @@ -286,32 +286,20 @@ static int16_t lfeplc_lev_dur( return ( flag ); } #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT /*-------------------------------------------------------------------* * a2rc() * * Convert from LPC to reflection coeff *-------------------------------------------------------------------*/ #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT static uint16_t d_a2rc( const double *a, /* i : LPC coefficients */ double *refl, /* o : Reflection co-efficients */ const int16_t lpcorder /* i : LPC order */ ) #else static uint16_t lfeplc_a2rc( const float *a, /* i : LPC coefficients */ float *refl, /* o : Reflection co-efficients */ const int16_t lpcorder /* i : LPC order */ ) #endif { #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT double ff[LFE_PLC_LPCORD]; double km, denom, x; #else float ff[LFE_PLC_LPCORD]; float km, denom, x; #endif int16_t m, j, n; for ( m = 0; m < lpcorder; m++ ) Loading @@ -323,30 +311,18 @@ static uint16_t lfeplc_a2rc( for ( m = lpcorder - 1; m >= 0; m-- ) { km = ff[m]; #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT if ( km <= -1.0 || km >= 1.0 ) #else if ( km <= -1.0f || km >= 1.0f ) #endif { for ( j = 0; j < lpcorder; j++ ) { #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT refl[j] = 0.0; #else refl[j] = 0.0f; #endif } return 0; } refl[m] = -km; #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT denom = 1.0 / ( 1.0 - km * km ); #else denom = 1.0f / ( 1.0f - km * km ); #endif for ( j = 0; j < m / 2; j++ ) { n = m - 1 - j; Loading @@ -364,7 +340,6 @@ static uint16_t lfeplc_a2rc( return 1; } #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT static void d_syn_filt( const double a[], /* i : LP filter coefficients */ const int16_t m, /* i : order of LP filter */ Loading Loading @@ -448,7 +423,7 @@ static uint16_t check_stab( #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT stable = d_a2rc( amod, refl, LFE_PLC_LPCORD ); #else stable = lfeplc_a2rc( amod, refl, LFE_PLC_LPCORD ); stable = a2rc( amod, refl, LFE_PLC_LPCORD ); #endif return stable; Loading lib_dec/swb_tbe_dec.c +4 −0 Original line number Diff line number Diff line Loading @@ -933,7 +933,11 @@ void swb_tbe_dec( lsf_diff[i] = lsf_shb[i] - lsf_shb[i - 1]; } #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT a2rc( hBWE_TD->cur_sub_Aq + 1, refl, M ); #else (void) a2rc( hBWE_TD->cur_sub_Aq + 1, refl, M ); #endif tilt_para = 6.6956f * ( 1.0f + refl[0] ) * ( 1.0f + refl[0] ) - 3.8714f * ( 1.0f + refl[0] ) + 1.3041f; if ( st->last_extl != SWB_TBE && st->last_extl != FB_TBE ) { Loading lib_enc/swb_tbe_enc.c +4 −1 Original line number Diff line number Diff line Loading @@ -795,8 +795,11 @@ void swb_tbe_enc( { lsf_diff[i] = lsf_shb[i] - lsf_shb[i - 1]; } #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT a2rc( hBWE_TD->cur_sub_Aq + 1, refl, M ); #else (void) a2rc( hBWE_TD->cur_sub_Aq + 1, refl, M ); #endif /* LSP interpolation for 13.2 kbps and 16.4 kbps */ tilt_para = 6.6956f * ( 1.0f + refl[0] ) * ( 1.0f + refl[0] ) - 3.8714f * ( 1.0f + refl[0] ) + 1.3041f; if ( st->last_extl != SWB_TBE ) Loading Loading
lib_com/lsf_tools.c +12 −2 Original line number Diff line number Diff line Loading @@ -959,8 +959,11 @@ void isp2isf( * * Convert from LPC to reflection coeff *-------------------------------------------------------------------*/ #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT void a2rc( #else int a2rc( #endif const float *a, /* i : LPC coefficients */ float *refl, /* o : Reflection co-efficients */ const int16_t lpcorder /* i : LPC order */ Loading @@ -985,8 +988,11 @@ void a2rc( { refl[j] = 0.f; } #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT return; #else return 0; #endif } refl[m] = -km; Loading @@ -1006,7 +1012,11 @@ void a2rc( } } #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT return; #else return 0; #endif } Loading
lib_com/prot.h +4 −0 Original line number Diff line number Diff line Loading @@ -2998,7 +2998,11 @@ void a2isf( const float *old_isf, const int16_t lpcOrder ); #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT void a2rc( #else int a2rc( #endif const float *a, /* i : LPC coefficients */ float *refl, /* o : Reflection co-efficients */ const int16_t lpcorder /* i : LPC order */ Loading
lib_dec/ivas_lfe_plc.c +2 −27 Original line number Diff line number Diff line Loading @@ -286,32 +286,20 @@ static int16_t lfeplc_lev_dur( return ( flag ); } #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT /*-------------------------------------------------------------------* * a2rc() * * Convert from LPC to reflection coeff *-------------------------------------------------------------------*/ #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT static uint16_t d_a2rc( const double *a, /* i : LPC coefficients */ double *refl, /* o : Reflection co-efficients */ const int16_t lpcorder /* i : LPC order */ ) #else static uint16_t lfeplc_a2rc( const float *a, /* i : LPC coefficients */ float *refl, /* o : Reflection co-efficients */ const int16_t lpcorder /* i : LPC order */ ) #endif { #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT double ff[LFE_PLC_LPCORD]; double km, denom, x; #else float ff[LFE_PLC_LPCORD]; float km, denom, x; #endif int16_t m, j, n; for ( m = 0; m < lpcorder; m++ ) Loading @@ -323,30 +311,18 @@ static uint16_t lfeplc_a2rc( for ( m = lpcorder - 1; m >= 0; m-- ) { km = ff[m]; #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT if ( km <= -1.0 || km >= 1.0 ) #else if ( km <= -1.0f || km >= 1.0f ) #endif { for ( j = 0; j < lpcorder; j++ ) { #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT refl[j] = 0.0; #else refl[j] = 0.0f; #endif } return 0; } refl[m] = -km; #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT denom = 1.0 / ( 1.0 - km * km ); #else denom = 1.0f / ( 1.0f - km * km ); #endif for ( j = 0; j < m / 2; j++ ) { n = m - 1 - j; Loading @@ -364,7 +340,6 @@ static uint16_t lfeplc_a2rc( return 1; } #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT static void d_syn_filt( const double a[], /* i : LP filter coefficients */ const int16_t m, /* i : order of LP filter */ Loading Loading @@ -448,7 +423,7 @@ static uint16_t check_stab( #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT stable = d_a2rc( amod, refl, LFE_PLC_LPCORD ); #else stable = lfeplc_a2rc( amod, refl, LFE_PLC_LPCORD ); stable = a2rc( amod, refl, LFE_PLC_LPCORD ); #endif return stable; Loading
lib_dec/swb_tbe_dec.c +4 −0 Original line number Diff line number Diff line Loading @@ -933,7 +933,11 @@ void swb_tbe_dec( lsf_diff[i] = lsf_shb[i] - lsf_shb[i - 1]; } #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT a2rc( hBWE_TD->cur_sub_Aq + 1, refl, M ); #else (void) a2rc( hBWE_TD->cur_sub_Aq + 1, refl, M ); #endif tilt_para = 6.6956f * ( 1.0f + refl[0] ) * ( 1.0f + refl[0] ) - 3.8714f * ( 1.0f + refl[0] ) + 1.3041f; if ( st->last_extl != SWB_TBE && st->last_extl != FB_TBE ) { Loading
lib_enc/swb_tbe_enc.c +4 −1 Original line number Diff line number Diff line Loading @@ -795,8 +795,11 @@ void swb_tbe_enc( { lsf_diff[i] = lsf_shb[i] - lsf_shb[i - 1]; } #ifndef NONE_BE_FIX_816_LFE_PLC_FLOAT a2rc( hBWE_TD->cur_sub_Aq + 1, refl, M ); #else (void) a2rc( hBWE_TD->cur_sub_Aq + 1, refl, M ); #endif /* LSP interpolation for 13.2 kbps and 16.4 kbps */ tilt_para = 6.6956f * ( 1.0f + refl[0] ) * ( 1.0f + refl[0] ) - 3.8714f * ( 1.0f + refl[0] ) + 1.3041f; if ( st->last_extl != SWB_TBE ) Loading