aboutsummaryrefslogtreecommitdiff
path: root/silk/float/schur_FLP.c
diff options
context:
space:
mode:
authorFelicia Lim <flim@google.com>2017-07-05 17:36:56 -0700
committerFelicia Lim <flim@google.com>2017-07-07 09:42:55 -0700
commit0c2090c324e4f2ba2a8621c8b083559bab74c7c5 (patch)
treefea1ab0038bc4102569d1ab4ee57a0f973895570 /silk/float/schur_FLP.c
parenta7703b70699299f078a189e19b6915120cded732 (diff)
downloadlibopus-0c2090c324e4f2ba2a8621c8b083559bab74c7c5.tar.gz
Change-Id: I551f1de5c5e121ac1275334e67c7e0f96ab18114 Test: - verified builds for arm*/mips*/x86* - checked functionality using an emulator and stagefright
Diffstat (limited to 'silk/float/schur_FLP.c')
-rw-r--r--silk/float/schur_FLP.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/silk/float/schur_FLP.c b/silk/float/schur_FLP.c
index ee436f83..c1e0bbb5 100644
--- a/silk/float/schur_FLP.c
+++ b/silk/float/schur_FLP.c
@@ -38,22 +38,23 @@ silk_float silk_schur_FLP( /* O returns residual energy
)
{
opus_int k, n;
- silk_float C[ SILK_MAX_ORDER_LPC + 1 ][ 2 ];
- silk_float Ctmp1, Ctmp2, rc_tmp;
+ double C[ SILK_MAX_ORDER_LPC + 1 ][ 2 ];
+ double Ctmp1, Ctmp2, rc_tmp;
- silk_assert( order==6||order==8||order==10||order==12||order==14||order==16 );
+ silk_assert( order >= 0 && order <= SILK_MAX_ORDER_LPC );
/* Copy correlations */
- for( k = 0; k < order+1; k++ ) {
+ k = 0;
+ do {
C[ k ][ 0 ] = C[ k ][ 1 ] = auto_corr[ k ];
- }
+ } while( ++k <= order );
for( k = 0; k < order; k++ ) {
/* Get reflection coefficient */
rc_tmp = -C[ k + 1 ][ 0 ] / silk_max_float( C[ 0 ][ 1 ], 1e-9f );
/* Save the output */
- refl_coef[ k ] = rc_tmp;
+ refl_coef[ k ] = (silk_float)rc_tmp;
/* Update correlations */
for( n = 0; n < order - k; n++ ) {
@@ -65,6 +66,5 @@ silk_float silk_schur_FLP( /* O returns residual energy
}
/* Return residual energy */
- return C[ 0 ][ 1 ];
+ return (silk_float)C[ 0 ][ 1 ];
}
-