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 21 matching lines...) Expand all Loading... |
32 #include "SigProc_FIX.h" | 32 #include "SigProc_FIX.h" |
33 | 33 |
34 /* Step up function, converts reflection coefficients to prediction coefficients
*/ | 34 /* Step up function, converts reflection coefficients to prediction coefficients
*/ |
35 void silk_k2a_Q16( | 35 void silk_k2a_Q16( |
36 opus_int32 *A_Q24, /* O Prediction coefficie
nts [order] Q24 */ | 36 opus_int32 *A_Q24, /* O Prediction coefficie
nts [order] Q24 */ |
37 const opus_int32 *rc_Q16, /* I Reflection coefficie
nts [order] Q16 */ | 37 const opus_int32 *rc_Q16, /* I Reflection coefficie
nts [order] Q16 */ |
38 const opus_int32 order /* I Prediction order
*/ | 38 const opus_int32 order /* I Prediction order
*/ |
39 ) | 39 ) |
40 { | 40 { |
41 opus_int k, n; | 41 opus_int k, n; |
42 opus_int32 Atmp[ SILK_MAX_ORDER_LPC ]; | 42 opus_int32 rc, tmp1, tmp2; |
43 | 43 |
44 for( k = 0; k < order; k++ ) { | 44 for( k = 0; k < order; k++ ) { |
45 for( n = 0; n < k; n++ ) { | 45 rc = rc_Q16[ k ]; |
46 Atmp[ n ] = A_Q24[ n ]; | 46 for( n = 0; n < (k + 1) >> 1; n++ ) { |
| 47 tmp1 = A_Q24[ n ]; |
| 48 tmp2 = A_Q24[ k - n - 1 ]; |
| 49 A_Q24[ n ] = silk_SMLAWW( tmp1, tmp2, rc ); |
| 50 A_Q24[ k - n - 1 ] = silk_SMLAWW( tmp2, tmp1, rc ); |
47 } | 51 } |
48 for( n = 0; n < k; n++ ) { | 52 A_Q24[ k ] = -silk_LSHIFT( rc, 8 ); |
49 A_Q24[ n ] = silk_SMLAWW( A_Q24[ n ], Atmp[ k - n - 1 ], rc_Q16[ k ]
); | |
50 } | |
51 A_Q24[ k ] = -silk_LSHIFT( rc_Q16[ k ], 8 ); | |
52 } | 53 } |
53 } | 54 } |
OLD | NEW |