| 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 #include "stack_alloc.h" | 33 #include "stack_alloc.h" |
| 34 #include "tuning_parameters.h" | 34 #include "tuning_parameters.h" |
| 35 | 35 |
| 36 /* Prefilter for finding Quantizer input signal */ | 36 /* Prefilter for finding Quantizer input signal */ |
| 37 static inline void silk_prefilt_FIX( | 37 static OPUS_INLINE void silk_prefilt_FIX( |
| 38 silk_prefilter_state_FIX *P, /* I/O state
*/ | 38 silk_prefilter_state_FIX *P, /* I/O state
*/ |
| 39 opus_int32 st_res_Q12[], /* I short term r
esidual signal */ | 39 opus_int32 st_res_Q12[], /* I short term r
esidual signal */ |
| 40 opus_int32 xw_Q3[], /* O prefiltered
signal */ | 40 opus_int32 xw_Q3[], /* O prefiltered
signal */ |
| 41 opus_int32 HarmShapeFIRPacked_Q12, /* I Harmonic sha
ping coeficients */ | 41 opus_int32 HarmShapeFIRPacked_Q12, /* I Harmonic sha
ping coeficients */ |
| 42 opus_int Tilt_Q14, /* I Tilt shaping
coeficient */ | 42 opus_int Tilt_Q14, /* I Tilt shaping
coeficient */ |
| 43 opus_int32 LF_shp_Q14, /* I Low-frequanc
y shaping coeficients */ | 43 opus_int32 LF_shp_Q14, /* I Low-frequanc
y shaping coeficients */ |
| 44 opus_int lag, /* I Lag for harm
onic shaping */ | 44 opus_int lag, /* I Lag for harm
onic shaping */ |
| 45 opus_int length /* I Length of si
gnals */ | 45 opus_int length /* I Length of si
gnals */ |
| 46 ); | 46 ); |
| 47 | 47 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 149 |
| 150 px += psEnc->sCmn.subfr_length; | 150 px += psEnc->sCmn.subfr_length; |
| 151 pxw_Q3 += psEnc->sCmn.subfr_length; | 151 pxw_Q3 += psEnc->sCmn.subfr_length; |
| 152 } | 152 } |
| 153 | 153 |
| 154 P->lagPrev = psEncCtrl->pitchL[ psEnc->sCmn.nb_subfr - 1 ]; | 154 P->lagPrev = psEncCtrl->pitchL[ psEnc->sCmn.nb_subfr - 1 ]; |
| 155 RESTORE_STACK; | 155 RESTORE_STACK; |
| 156 } | 156 } |
| 157 | 157 |
| 158 /* Prefilter for finding Quantizer input signal */ | 158 /* Prefilter for finding Quantizer input signal */ |
| 159 static inline void silk_prefilt_FIX( | 159 static OPUS_INLINE void silk_prefilt_FIX( |
| 160 silk_prefilter_state_FIX *P, /* I/O state
*/ | 160 silk_prefilter_state_FIX *P, /* I/O state
*/ |
| 161 opus_int32 st_res_Q12[], /* I short term r
esidual signal */ | 161 opus_int32 st_res_Q12[], /* I short term r
esidual signal */ |
| 162 opus_int32 xw_Q3[], /* O prefiltered
signal */ | 162 opus_int32 xw_Q3[], /* O prefiltered
signal */ |
| 163 opus_int32 HarmShapeFIRPacked_Q12, /* I Harmonic sha
ping coeficients */ | 163 opus_int32 HarmShapeFIRPacked_Q12, /* I Harmonic sha
ping coeficients */ |
| 164 opus_int Tilt_Q14, /* I Tilt shaping
coeficient */ | 164 opus_int Tilt_Q14, /* I Tilt shaping
coeficient */ |
| 165 opus_int32 LF_shp_Q14, /* I Low-frequanc
y shaping coeficients */ | 165 opus_int32 LF_shp_Q14, /* I Low-frequanc
y shaping coeficients */ |
| 166 opus_int lag, /* I Lag for harm
onic shaping */ | 166 opus_int lag, /* I Lag for harm
onic shaping */ |
| 167 opus_int length /* I Length of si
gnals */ | 167 opus_int length /* I Length of si
gnals */ |
| 168 ) | 168 ) |
| 169 { | 169 { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 200 LTP_shp_buf[ LTP_shp_buf_idx ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROU
ND( sLF_MA_shp_Q12, 12 ) ); | 200 LTP_shp_buf[ LTP_shp_buf_idx ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROU
ND( sLF_MA_shp_Q12, 12 ) ); |
| 201 | 201 |
| 202 xw_Q3[i] = silk_RSHIFT_ROUND( silk_SUB32( sLF_MA_shp_Q12, n_LTP_Q12 ), 9
); | 202 xw_Q3[i] = silk_RSHIFT_ROUND( silk_SUB32( sLF_MA_shp_Q12, n_LTP_Q12 ), 9
); |
| 203 } | 203 } |
| 204 | 204 |
| 205 /* Copy temp variable back to state */ | 205 /* Copy temp variable back to state */ |
| 206 P->sLF_AR_shp_Q12 = sLF_AR_shp_Q12; | 206 P->sLF_AR_shp_Q12 = sLF_AR_shp_Q12; |
| 207 P->sLF_MA_shp_Q12 = sLF_MA_shp_Q12; | 207 P->sLF_MA_shp_Q12 = sLF_MA_shp_Q12; |
| 208 P->sLTP_shp_buf_idx = LTP_shp_buf_idx; | 208 P->sLTP_shp_buf_idx = LTP_shp_buf_idx; |
| 209 } | 209 } |
| OLD | NEW |