| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |