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

Side by Side Diff: silk/NLSF2A.c

Issue 107243004: Updating Opus to release 1.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/opus
Patch Set: Created 7 years 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/MacroDebug.h ('k') | silk/NLSF_decode.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 23 matching lines...) Expand all
34 /* a piecewise linear approximation maps LSF <-> cos(LSF) */ 34 /* a piecewise linear approximation maps LSF <-> cos(LSF) */
35 /* therefore the result is not accurate LSFs, but the two */ 35 /* therefore the result is not accurate LSFs, but the two */
36 /* functions are accurate inverses of each other */ 36 /* functions are accurate inverses of each other */
37 37
38 #include "SigProc_FIX.h" 38 #include "SigProc_FIX.h"
39 #include "tables.h" 39 #include "tables.h"
40 40
41 #define QA 16 41 #define QA 16
42 42
43 /* helper function for NLSF2A(..) */ 43 /* helper function for NLSF2A(..) */
44 static inline void silk_NLSF2A_find_poly( 44 static OPUS_INLINE void silk_NLSF2A_find_poly(
45 opus_int32 *out, /* O intermediate polynomial, QA [dd+1] */ 45 opus_int32 *out, /* O intermediate polynomial, QA [dd+1] */
46 const opus_int32 *cLSF, /* I vector of interleaved 2*cos(LSFs), QA [d] */ 46 const opus_int32 *cLSF, /* I vector of interleaved 2*cos(LSFs), QA [d] */
47 opus_int dd /* I polynomial order (= 1/2 * filter orde r) */ 47 opus_int dd /* I polynomial order (= 1/2 * filter orde r) */
48 ) 48 )
49 { 49 {
50 opus_int k, n; 50 opus_int k, n;
51 opus_int32 ftmp; 51 opus_int32 ftmp;
52 52
53 out[0] = silk_LSHIFT( 1, QA ); 53 out[0] = silk_LSHIFT( 1, QA );
54 out[1] = -cLSF[0]; 54 out[1] = -cLSF[0];
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 silk_bwexpander_32( a32_QA1, d, 65536 - silk_LSHIFT( 2, i ) ); 169 silk_bwexpander_32( a32_QA1, d, 65536 - silk_LSHIFT( 2, i ) );
170 for( k = 0; k < d; k++ ) { 170 for( k = 0; k < d; k++ ) {
171 a_Q12[ k ] = (opus_int16)silk_RSHIFT_ROUND( a32_QA1[ k ], QA + 1 - 12 ); /* QA+1 -> Q12 */ 171 a_Q12[ k ] = (opus_int16)silk_RSHIFT_ROUND( a32_QA1[ k ], QA + 1 - 12 ); /* QA+1 -> Q12 */
172 } 172 }
173 } else { 173 } else {
174 break; 174 break;
175 } 175 }
176 } 176 }
177 } 177 }
178 178
OLDNEW
« no previous file with comments | « silk/MacroDebug.h ('k') | silk/NLSF_decode.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698