Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(598)

Unified Diff: third_party/opus/src/silk/float/schur_FLP.c

Issue 2962373002: [Opus] Update to v1.2.1 (Closed)
Patch Set: Pre-increment instead of post-increment Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/opus/src/silk/float/prefilter_FLP.c ('k') | third_party/opus/src/silk/float/solve_LS_FLP.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/opus/src/silk/float/schur_FLP.c
diff --git a/third_party/opus/src/silk/float/schur_FLP.c b/third_party/opus/src/silk/float/schur_FLP.c
index ee436f8351c8adf1ee36fa5052612ccf462a55ae..c1e0bbb5411c9959ca3f7f6c29577136170481dd 100644
--- a/third_party/opus/src/silk/float/schur_FLP.c
+++ b/third_party/opus/src/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 ];
}
-
« no previous file with comments | « third_party/opus/src/silk/float/prefilter_FLP.c ('k') | third_party/opus/src/silk/float/solve_LS_FLP.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698