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 16 matching lines...) Expand all Loading... |
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 #include "main_FIX.h" | 32 #include "main_FIX.h" |
33 | 33 |
34 #define QC 10 | 34 #define QC 10 |
35 #define QS 14 | 35 #define QS 14 |
36 | 36 |
| 37 #if defined(MIPSr1_ASM) |
| 38 #include "mips/warped_autocorrelation_FIX_mipsr1.h" |
| 39 #endif |
| 40 |
| 41 |
| 42 #ifndef OVERRIDE_silk_warped_autocorrelation_FIX |
37 /* Autocorrelations for a warped frequency axis */ | 43 /* Autocorrelations for a warped frequency axis */ |
38 void silk_warped_autocorrelation_FIX( | 44 void silk_warped_autocorrelation_FIX( |
39 opus_int32 *corr, /* O
Result [order + 1]
*/ | 45 opus_int32 *corr, /* O
Result [order + 1]
*/ |
40 opus_int *scale, /* O
Scaling of the correlation vector
*/ | 46 opus_int *scale, /* O
Scaling of the correlation vector
*/ |
41 const opus_int16 *input, /* I
Input data to correlate
*/ | 47 const opus_int16 *input, /* I
Input data to correlate
*/ |
42 const opus_int warping_Q16, /* I
Warping coefficient
*/ | 48 const opus_int warping_Q16, /* I
Warping coefficient
*/ |
43 const opus_int length, /* I
Length of input
*/ | 49 const opus_int length, /* I
Length of input
*/ |
44 const opus_int order /* I
Correlation order (even)
*/ | 50 const opus_int order /* I
Correlation order (even)
*/ |
45 ) | 51 ) |
46 { | 52 { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 for( i = 0; i < order + 1; i++ ) { | 85 for( i = 0; i < order + 1; i++ ) { |
80 corr[ i ] = (opus_int32)silk_CHECK_FIT32( silk_LSHIFT64( corr_QC[ i
], lsh ) ); | 86 corr[ i ] = (opus_int32)silk_CHECK_FIT32( silk_LSHIFT64( corr_QC[ i
], lsh ) ); |
81 } | 87 } |
82 } else { | 88 } else { |
83 for( i = 0; i < order + 1; i++ ) { | 89 for( i = 0; i < order + 1; i++ ) { |
84 corr[ i ] = (opus_int32)silk_CHECK_FIT32( silk_RSHIFT64( corr_QC[ i
], -lsh ) ); | 90 corr[ i ] = (opus_int32)silk_CHECK_FIT32( silk_RSHIFT64( corr_QC[ i
], -lsh ) ); |
85 } | 91 } |
86 } | 92 } |
87 silk_assert( corr_QC[ 0 ] >= 0 ); /* If breaking, decrease QC*/ | 93 silk_assert( corr_QC[ 0 ] >= 0 ); /* If breaking, decrease QC*/ |
88 } | 94 } |
| 95 #endif /* OVERRIDE_silk_warped_autocorrelation_FIX */ |
OLD | NEW |