1 /* 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 3 * 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 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 /* 12 * lpc_masking_model.h 13 * 14 * LPC functions 15 * 16 */ 17 18 #ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_LPC_MASKING_MODEL_H_ 19 #define WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_LPC_MASKING_MODEL_H_ 20 21 #ifdef __cplusplus 22 extern "C" { 23 #endif 24 25 #include "structs.h" 26 27 void WebRtcIsacfix_GetVars(const WebRtc_Word16 *input, 28 const WebRtc_Word16 *pitchGains_Q12, 29 WebRtc_UWord32 *oldEnergy, 30 WebRtc_Word16 *varscale); 31 32 void WebRtcIsacfix_GetLpcCoef(WebRtc_Word16 *inLoQ0, 33 WebRtc_Word16 *inHiQ0, 34 MaskFiltstr_enc *maskdata, 35 WebRtc_Word16 snrQ10, 36 const WebRtc_Word16 *pitchGains_Q12, 37 WebRtc_Word32 *gain_lo_hiQ17, 38 WebRtc_Word16 *lo_coeffQ15, 39 WebRtc_Word16 *hi_coeffQ15); 40 41 typedef int32_t (*CalculateResidualEnergy)(int lpc_order, 42 int32_t q_val_corr, 43 int q_val_polynomial, 44 int16_t* a_polynomial, 45 int32_t* corr_coeffs, 46 int* q_val_residual_energy); 47 extern CalculateResidualEnergy WebRtcIsacfix_CalculateResidualEnergy; 48 49 int32_t WebRtcIsacfix_CalculateResidualEnergyC(int lpc_order, 50 int32_t q_val_corr, 51 int q_val_polynomial, 52 int16_t* a_polynomial, 53 int32_t* corr_coeffs, 54 int* q_val_residual_energy); 55 56 #if (defined WEBRTC_DETECT_ARM_NEON) || (defined WEBRTC_ARCH_ARM_NEON) 57 int32_t WebRtcIsacfix_CalculateResidualEnergyNeon(int lpc_order, 58 int32_t q_val_corr, 59 int q_val_polynomial, 60 int16_t* a_polynomial, 61 int32_t* corr_coeffs, 62 int* q_val_residual_energy); 63 #endif 64 65 #ifdef __cplusplus 66 } /* extern "C" */ 67 #endif 68 69 #endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_LPC_MASKING_MODEL_H_ */ 70