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

Side by Side Diff: silk/NLSF_stabilize.c

Issue 12388030: Update Opus to 1.0.2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/opus
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « silk/API.h ('k') | silk/PLC.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /*********************************************************************** 1 /***********************************************************************
2 Copyright (c) 2006-2011, Skype Limited. All rights reserved. 2 Copyright (c) 2006-2011, Skype Limited. All rights reserved.
3 Redistribution and use in source and binary forms, with or without 3 Redistribution and use in source and binary forms, with or without
4 modification, are permitted provided that the following conditions 4 modification, are permitted provided that the following conditions
5 are met: 5 are met:
6 - Redistributions of source code must retain the above copyright notice, 6 - Redistributions of source code must retain the above copyright notice,
7 this list of conditions and the following disclaimer. 7 this list of conditions and the following disclaimer.
8 - Redistributions in binary form must reproduce the above copyright 8 - Redistributions in binary form must reproduce the above copyright
9 notice, this list of conditions and the following disclaimer in the 9 notice, this list of conditions and the following disclaimer in the
10 documentation and/or other materials provided with the distribution. 10 documentation and/or other materials provided with the distribution.
(...skipping 13 matching lines...) Expand all
24 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 POSSIBILITY OF SUCH DAMAGE. 25 POSSIBILITY OF SUCH DAMAGE.
26 ***********************************************************************/ 26 ***********************************************************************/
27 27
28 #ifdef HAVE_CONFIG_H 28 #ifdef HAVE_CONFIG_H
29 #include "config.h" 29 #include "config.h"
30 #endif 30 #endif
31 31
32 /* NLSF stabilizer: */ 32 /* NLSF stabilizer: */
33 /* */ 33 /* */
34 /* - Moves NLSFs futher apart if they are too close */ 34 /* - Moves NLSFs further apart if they are too close */
35 /* - Moves NLSFs away from borders if they are too close */ 35 /* - Moves NLSFs away from borders if they are too close */
36 /* - High effort to achieve a modification with minimum */ 36 /* - High effort to achieve a modification with minimum */
37 /* Euclidean distance to input vector */ 37 /* Euclidean distance to input vector */
38 /* - Output are sorted NLSF coefficients */ 38 /* - Output are sorted NLSF coefficients */
39 /* */ 39 /* */
40 40
41 #include "SigProc_FIX.h" 41 #include "SigProc_FIX.h"
42 42
43 /* Constant Definitions */ 43 /* Constant Definitions */
44 #define MAX_LOOPS 20 44 #define MAX_LOOPS 20
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 NLSF_Q15[i] = silk_max_int( NLSF_Q15[i], NLSF_Q15[i-1] + NDeltaMin_Q 15[i] ); 133 NLSF_Q15[i] = silk_max_int( NLSF_Q15[i], NLSF_Q15[i-1] + NDeltaMin_Q 15[i] );
134 134
135 /* Last NLSF should be no higher than 1 - NDeltaMin[L] */ 135 /* Last NLSF should be no higher than 1 - NDeltaMin[L] */
136 NLSF_Q15[L-1] = silk_min_int( NLSF_Q15[L-1], (1<<15) - NDeltaMin_Q15[L] ); 136 NLSF_Q15[L-1] = silk_min_int( NLSF_Q15[L-1], (1<<15) - NDeltaMin_Q15[L] );
137 137
138 /* Keep NDeltaMin distance between the NLSFs */ 138 /* Keep NDeltaMin distance between the NLSFs */
139 for( i = L-2; i >= 0; i-- ) 139 for( i = L-2; i >= 0; i-- )
140 NLSF_Q15[i] = silk_min_int( NLSF_Q15[i], NLSF_Q15[i+1] - NDeltaMin_Q 15[i+1] ); 140 NLSF_Q15[i] = silk_min_int( NLSF_Q15[i], NLSF_Q15[i+1] - NDeltaMin_Q 15[i+1] );
141 } 141 }
142 } 142 }
OLDNEW
« no previous file with comments | « silk/API.h ('k') | silk/PLC.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698