OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 194 |
195 return(0); | 195 return(0); |
196 } | 196 } |
197 | 197 |
198 /**************************************************************************** | 198 /**************************************************************************** |
199 * WebRtcIsacfix_InitNeon(...) | 199 * WebRtcIsacfix_InitNeon(...) |
200 * | 200 * |
201 * This function initializes function pointers for ARM Neon platform. | 201 * This function initializes function pointers for ARM Neon platform. |
202 */ | 202 */ |
203 | 203 |
204 #if defined(WEBRTC_DETECT_NEON) || defined(WEBRTC_HAS_NEON) | 204 #if defined(WEBRTC_HAS_NEON) |
205 static void WebRtcIsacfix_InitNeon(void) { | 205 static void WebRtcIsacfix_InitNeon(void) { |
206 WebRtcIsacfix_AutocorrFix = WebRtcIsacfix_AutocorrNeon; | 206 WebRtcIsacfix_AutocorrFix = WebRtcIsacfix_AutocorrNeon; |
207 WebRtcIsacfix_FilterMaLoopFix = WebRtcIsacfix_FilterMaLoopNeon; | 207 WebRtcIsacfix_FilterMaLoopFix = WebRtcIsacfix_FilterMaLoopNeon; |
208 WebRtcIsacfix_Spec2Time = WebRtcIsacfix_Spec2TimeNeon; | 208 WebRtcIsacfix_Spec2Time = WebRtcIsacfix_Spec2TimeNeon; |
209 WebRtcIsacfix_Time2Spec = WebRtcIsacfix_Time2SpecNeon; | 209 WebRtcIsacfix_Time2Spec = WebRtcIsacfix_Time2SpecNeon; |
210 WebRtcIsacfix_AllpassFilter2FixDec16 = | 210 WebRtcIsacfix_AllpassFilter2FixDec16 = |
211 WebRtcIsacfix_AllpassFilter2FixDec16Neon; | 211 WebRtcIsacfix_AllpassFilter2FixDec16Neon; |
212 WebRtcIsacfix_MatrixProduct1 = WebRtcIsacfix_MatrixProduct1Neon; | 212 WebRtcIsacfix_MatrixProduct1 = WebRtcIsacfix_MatrixProduct1Neon; |
213 WebRtcIsacfix_MatrixProduct2 = WebRtcIsacfix_MatrixProduct2Neon; | 213 WebRtcIsacfix_MatrixProduct2 = WebRtcIsacfix_MatrixProduct2Neon; |
214 } | 214 } |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 WebRtcIsacfix_FilterMaLoopFix = WebRtcIsacfix_FilterMaLoopC; | 246 WebRtcIsacfix_FilterMaLoopFix = WebRtcIsacfix_FilterMaLoopC; |
247 WebRtcIsacfix_CalculateResidualEnergy = | 247 WebRtcIsacfix_CalculateResidualEnergy = |
248 WebRtcIsacfix_CalculateResidualEnergyC; | 248 WebRtcIsacfix_CalculateResidualEnergyC; |
249 WebRtcIsacfix_AllpassFilter2FixDec16 = WebRtcIsacfix_AllpassFilter2FixDec16C; | 249 WebRtcIsacfix_AllpassFilter2FixDec16 = WebRtcIsacfix_AllpassFilter2FixDec16C; |
250 WebRtcIsacfix_HighpassFilterFixDec32 = WebRtcIsacfix_HighpassFilterFixDec32C; | 250 WebRtcIsacfix_HighpassFilterFixDec32 = WebRtcIsacfix_HighpassFilterFixDec32C; |
251 WebRtcIsacfix_Time2Spec = WebRtcIsacfix_Time2SpecC; | 251 WebRtcIsacfix_Time2Spec = WebRtcIsacfix_Time2SpecC; |
252 WebRtcIsacfix_Spec2Time = WebRtcIsacfix_Spec2TimeC; | 252 WebRtcIsacfix_Spec2Time = WebRtcIsacfix_Spec2TimeC; |
253 WebRtcIsacfix_MatrixProduct1 = WebRtcIsacfix_MatrixProduct1C; | 253 WebRtcIsacfix_MatrixProduct1 = WebRtcIsacfix_MatrixProduct1C; |
254 WebRtcIsacfix_MatrixProduct2 = WebRtcIsacfix_MatrixProduct2C; | 254 WebRtcIsacfix_MatrixProduct2 = WebRtcIsacfix_MatrixProduct2C; |
255 | 255 |
256 #ifdef WEBRTC_DETECT_NEON | 256 #if defined(WEBRTC_HAS_NEON) |
257 if ((WebRtc_GetCPUFeaturesARM() & kCPUFeatureNEON) != 0) { | |
258 WebRtcIsacfix_InitNeon(); | |
259 } | |
260 #elif defined(WEBRTC_HAS_NEON) | |
261 WebRtcIsacfix_InitNeon(); | 257 WebRtcIsacfix_InitNeon(); |
262 #endif | 258 #endif |
263 | 259 |
264 #if defined(MIPS32_LE) | 260 #if defined(MIPS32_LE) |
265 WebRtcIsacfix_InitMIPS(); | 261 WebRtcIsacfix_InitMIPS(); |
266 #endif | 262 #endif |
267 } | 263 } |
268 | 264 |
269 /**************************************************************************** | 265 /**************************************************************************** |
270 * WebRtcIsacfix_EncoderInit(...) | 266 * WebRtcIsacfix_EncoderInit(...) |
(...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1546 assert(inst->initflag & 1); // Decoder initialized. | 1542 assert(inst->initflag & 1); // Decoder initialized. |
1547 WebRtcIsacfixBw_GetBandwidthInfo(&inst->bwestimator_obj, bwinfo); | 1543 WebRtcIsacfixBw_GetBandwidthInfo(&inst->bwestimator_obj, bwinfo); |
1548 } | 1544 } |
1549 | 1545 |
1550 void WebRtcIsacfix_SetBandwidthInfo(ISACFIX_MainStruct* ISAC_main_inst, | 1546 void WebRtcIsacfix_SetBandwidthInfo(ISACFIX_MainStruct* ISAC_main_inst, |
1551 const IsacBandwidthInfo* bwinfo) { | 1547 const IsacBandwidthInfo* bwinfo) { |
1552 ISACFIX_SubStruct* inst = (ISACFIX_SubStruct*)ISAC_main_inst; | 1548 ISACFIX_SubStruct* inst = (ISACFIX_SubStruct*)ISAC_main_inst; |
1553 assert(inst->initflag & 2); // Encoder initialized. | 1549 assert(inst->initflag & 2); // Encoder initialized. |
1554 WebRtcIsacfixBw_SetBandwidthInfo(&inst->bwestimator_obj, bwinfo); | 1550 WebRtcIsacfixBw_SetBandwidthInfo(&inst->bwestimator_obj, bwinfo); |
1555 } | 1551 } |
OLD | NEW |