| 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 30 matching lines...) Expand all Loading... |
| 41 #define QS 14 | 41 #define QS 14 |
| 42 | 42 |
| 43 /* Autocorrelations for a warped frequency axis */ | 43 /* Autocorrelations for a warped frequency axis */ |
| 44 #define OVERRIDE_silk_warped_autocorrelation_FIX | 44 #define OVERRIDE_silk_warped_autocorrelation_FIX |
| 45 void silk_warped_autocorrelation_FIX( | 45 void silk_warped_autocorrelation_FIX( |
| 46 opus_int32 *corr, /* O
Result [order + 1]
*/ | 46 opus_int32 *corr, /* O
Result [order + 1]
*/ |
| 47 opus_int *scale, /* O
Scaling of the correlation vector
*/ | 47 opus_int *scale, /* O
Scaling of the correlation vector
*/ |
| 48 const opus_int16 *input, /* I
Input data to correlate
*/ | 48 const opus_int16 *input, /* I
Input data to correlate
*/ |
| 49 const opus_int warping_Q16, /* I
Warping coefficient
*/ | 49 const opus_int warping_Q16, /* I
Warping coefficient
*/ |
| 50 const opus_int length, /* I
Length of input
*/ | 50 const opus_int length, /* I
Length of input
*/ |
| 51 const opus_int order /* I
Correlation order (even)
*/ | 51 const opus_int order, /* I
Correlation order (even)
*/ |
| 52 int arch /* I
Run-time architecture
*/ |
| 52 ) | 53 ) |
| 53 { | 54 { |
| 54 opus_int n, i, lsh; | 55 opus_int n, i, lsh; |
| 55 opus_int32 tmp1_QS=0, tmp2_QS=0, tmp3_QS=0, tmp4_QS=0, tmp5_QS=0, tmp6_QS=0,
tmp7_QS=0, tmp8_QS=0, start_1=0, start_2=0, start_3=0; | 56 opus_int32 tmp1_QS=0, tmp2_QS=0, tmp3_QS=0, tmp4_QS=0, tmp5_QS=0, tmp6_QS=0,
tmp7_QS=0, tmp8_QS=0, start_1=0, start_2=0, start_3=0; |
| 56 opus_int32 state_QS[ MAX_SHAPE_LPC_ORDER + 1 ] = { 0 }; | 57 opus_int32 state_QS[ MAX_SHAPE_LPC_ORDER + 1 ] = { 0 }; |
| 57 opus_int64 corr_QC[ MAX_SHAPE_LPC_ORDER + 1 ] = { 0 }; | 58 opus_int64 corr_QC[ MAX_SHAPE_LPC_ORDER + 1 ] = { 0 }; |
| 58 opus_int64 temp64; | 59 opus_int64 temp64; |
| 59 | 60 |
| 60 opus_int32 val; | 61 opus_int32 val; |
| 61 val = 2 * QS - QC; | 62 val = 2 * QS - QC; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 temp64 = (val >= 0) ? (temp64 >> val) : (temp64 << -val); | 157 temp64 = (val >= 0) ? (temp64 >> val) : (temp64 << -val); |
| 157 corr[ i ] = (opus_int32)silk_CHECK_FIT32( __builtin_mips_shilo( temp
64, -lsh ) ); | 158 corr[ i ] = (opus_int32)silk_CHECK_FIT32( __builtin_mips_shilo( temp
64, -lsh ) ); |
| 158 } | 159 } |
| 159 } | 160 } |
| 160 | 161 |
| 161 corr_QC[ 0 ] = __builtin_mips_shilo(corr_QC[ 0 ], val); | 162 corr_QC[ 0 ] = __builtin_mips_shilo(corr_QC[ 0 ], val); |
| 162 | 163 |
| 163 silk_assert( corr_QC[ 0 ] >= 0 ); /* If breaking, decrease QC*/ | 164 silk_assert( corr_QC[ 0 ] >= 0 ); /* If breaking, decrease QC*/ |
| 164 } | 165 } |
| 165 #endif /* __WARPED_AUTOCORRELATION_FIX_MIPSR1_H__ */ | 166 #endif /* __WARPED_AUTOCORRELATION_FIX_MIPSR1_H__ */ |
| OLD | NEW |