diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-05-28 21:15:14 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2017-05-28 21:15:14 +0200 |
commit | 47e0e530a9756817cc1d62c48ec44089f3c2932f (patch) | |
tree | 1ca0698c31ac37c4b6a7d251a4c1369eb7cb6bf9 /thirdparty/opus/silk/fixed/x86 | |
parent | a100f0187029305110a71eb0094eafa8264d46af (diff) |
opus: Update to upstream version 1.1.5
Diffstat (limited to 'thirdparty/opus/silk/fixed/x86')
-rw-r--r-- | thirdparty/opus/silk/fixed/x86/burg_modified_FIX_sse.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/thirdparty/opus/silk/fixed/x86/burg_modified_FIX_sse.c b/thirdparty/opus/silk/fixed/x86/burg_modified_FIX_sse.c index 3756095fbe..3c3583c5fc 100644 --- a/thirdparty/opus/silk/fixed/x86/burg_modified_FIX_sse.c +++ b/thirdparty/opus/silk/fixed/x86/burg_modified_FIX_sse.c @@ -300,12 +300,14 @@ void silk_burg_modified_sse4_1( /* Max prediction gain exceeded; set reflection coefficient such that max prediction gain is exactly hit */ tmp2 = ( (opus_int32)1 << 30 ) - silk_DIV32_varQ( minInvGain_Q30, invGain_Q30, 30 ); /* Q30 */ rc_Q31 = silk_SQRT_APPROX( tmp2 ); /* Q15 */ - /* Newton-Raphson iteration */ - rc_Q31 = silk_RSHIFT32( rc_Q31 + silk_DIV32( tmp2, rc_Q31 ), 1 ); /* Q15 */ - rc_Q31 = silk_LSHIFT32( rc_Q31, 16 ); /* Q31 */ - if( num < 0 ) { - /* Ensure adjusted reflection coefficients has the original sign */ - rc_Q31 = -rc_Q31; + if( rc_Q31 > 0 ) { + /* Newton-Raphson iteration */ + rc_Q31 = silk_RSHIFT32( rc_Q31 + silk_DIV32( tmp2, rc_Q31 ), 1 ); /* Q15 */ + rc_Q31 = silk_LSHIFT32( rc_Q31, 16 ); /* Q31 */ + if( num < 0 ) { + /* Ensure adjusted reflection coefficients has the original sign */ + rc_Q31 = -rc_Q31; + } } invGain_Q30 = minInvGain_Q30; reached_max_gain = 1; |