Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / modules / audio_coding / codecs / isac / fix / source / lpc_masking_model.h
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 int16_t *input,
28                            const int16_t *pitchGains_Q12,
29                            uint32_t *oldEnergy,
30                            int16_t *varscale);
31
32 void WebRtcIsacfix_GetLpcCoef(int16_t *inLoQ0,
33                               int16_t *inHiQ0,
34                               MaskFiltstr_enc *maskdata,
35                               int16_t snrQ10,
36                               const int16_t *pitchGains_Q12,
37                               int32_t *gain_lo_hiQ17,
38                               int16_t *lo_coeffQ15,
39                               int16_t *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 #if defined(MIPS_DSP_R2_LE)
66 int32_t WebRtcIsacfix_CalculateResidualEnergyMIPS(int lpc_order,
67                                                   int32_t q_val_corr,
68                                                   int q_val_polynomial,
69                                                   int16_t* a_polynomial,
70                                                   int32_t* corr_coeffs,
71                                                   int* q_val_residual_energy);
72 #endif
73
74 #ifdef __cplusplus
75 } /* extern "C" */
76 #endif
77
78 #endif /* WEBRTC_MODULES_AUDIO_CODING_CODECS_ISAC_FIX_SOURCE_LPC_MASKING_MODEL_H_ */