Debian Codegraph @

external/opusfile/opus/silk/main.h

raw symbols SCIP
1 /***********************************************************************
2 Copyright (c) 2006-2011, Skype Limited. All rights reserved.
3 Redistribution and use in source and binary forms, with or without
4 modification, are permitted provided that the following conditions
5 are met:
6 - Redistributions of source code must retain the above copyright notice,
7 this list of conditions and the following disclaimer.
8 - Redistributions in binary form must reproduce the above copyright
9 notice, this list of conditions and the following disclaimer in the
10 documentation and/or other materials provided with the distribution.
11 - Neither the name of Internet Society, IETF or IETF Trust, nor the
12 names of specific contributors, may be used to endorse or promote
13 products derived from this software without specific prior written
14 permission.
15 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 POSSIBILITY OF SUCH DAMAGE.
26 ***********************************************************************/
27
28 #ifndef SILK_MAIN_Hcxx . . $ `external/opusfile/opus/silk/main.h:29:9`!
29 #define SILK_MAIN_Hcxx . . $ `external/opusfile/opus/silk/main.h:29:9`!
30
31 #include "SigProc_FIX.h"cxx . . $ `<file>/external/opusfile/opus/silk/SigProc_FIX.h`/
32 #include "define.h"cxx . . $ `<file>/external/opusfile/opus/silk/define.h`/
33 #include "structs.h"cxx . . $ `<file>/external/opusfile/opus/silk/structs.h`/
34 #include "tables.h"cxx . . $ `<file>/external/opusfile/opus/silk/tables.h`/
35 #include "PLC.h"cxx . . $ `<file>/external/opusfile/opus/silk/PLC.h`/
36 #include "control.h"cxx . . $ `<file>/external/opusfile/opus/silk/control.h`/
37 #include "debug.h"cxx . . $ `<file>/external/opusfile/opus/silk/debug.h`/
38 #include "entenc.h"cxx . . $ `<file>/external/opusfile/opus/celt/entenc.h`/
39 #include "entdec.h"cxx . . $ `<file>/external/opusfile/opus/celt/entdec.h`/
40
41 #if defined(OPUS_X86_MAY_HAVE_SSE4_1)
42 #include "x86/main_sse.h"
43 #endif
44
45 #if (defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR))
46 #include "arm/NSQ_del_dec_arm.h"
47 #endif
48
49 /* Convert Left/Right stereo signal to adaptive Mid/Side representation */
50 void silk_stereo_LR_to_MScxx . . $ silk_stereo_LR_to_MS(680593ae8f96460e).(
51 stereo_enc_statecxx . . $ stereo_enc_state# *state, /* I/O State */
52 opus_int16cxx . . $ opus_int16# x1[], /* I/O Left input signal, becomes mid signal */
53 opus_int16cxx . . $ opus_int16# x2[], /* I/O Right input signal, becomes side signal */
54 opus_int8cxx . . $ opus_int8# ix[ 2 ][ 3 ], /* O Quantization indices */
55 opus_int8cxx . . $ opus_int8# *mid_only_flag, /* O Flag: only mid signal coded */
56 opus_int32cxx . . $ opus_int32# mid_side_rates_bps[], /* O Bitrates for mid and side signals */
57 opus_int32cxx . . $ opus_int32# total_rate_bps, /* I Total bitrate */
58 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! prev_speech_act_Q8, /* I Speech activity level in previous frame */
59 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! toMono, /* I Last frame before a stereo->mono transition */
60 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! fs_kHz, /* I Sample rate (kHz) */
61 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! frame_length /* I Number of samples */
62 );
63
64 /* Convert adaptive Mid/Side representation to Left/Right stereo signal */
65 void silk_stereo_MS_to_LRcxx . . $ silk_stereo_MS_to_LR(353d5f0ee8d1d7a5).(
66 stereo_dec_statecxx . . $ stereo_dec_state# *state, /* I/O State */
67 opus_int16cxx . . $ opus_int16# x1[], /* I/O Left input signal, becomes mid signal */
68 opus_int16cxx . . $ opus_int16# x2[], /* I/O Right input signal, becomes side signal */
69 const opus_int32cxx . . $ opus_int32# pred_Q13[], /* I Predictors */
70 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! fs_kHz, /* I Samples rate (kHz) */
71 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! frame_length /* I Number of samples */
72 );
73
74 /* Find least-squares prediction gain for one signal based on another and quantize it */
75 opus_int32cxx . . $ opus_int32# silk_stereo_find_predictorcxx . . $ silk_stereo_find_predictor(e2681b1f7efbe9b8).( /* O Returns predictor in Q13 */
76 opus_int32cxx . . $ opus_int32# *ratio_Q14, /* O Ratio of residual and mid energies */
77 const opus_int16cxx . . $ opus_int16# x[], /* I Basis signal */
78 const opus_int16cxx . . $ opus_int16# y[], /* I Target signal */
79 opus_int32cxx . . $ opus_int32# mid_res_amp_Q0[], /* I/O Smoothed mid, residual norms */
80 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! length, /* I Number of samples */
81 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! smooth_coef_Q16 /* I Smoothing coefficient */
82 );
83
84 /* Quantize mid/side predictors */
85 void silk_stereo_quant_predcxx . . $ silk_stereo_quant_pred(e65f9e5539ba564d).(
86 opus_int32cxx . . $ opus_int32# pred_Q13[], /* I/O Predictors (out: quantized) */
87 opus_int8cxx . . $ opus_int8# ix[ 2 ][ 3 ] /* O Quantization indices */
88 );
89
90 /* Entropy code the mid/side quantization indices */
91 void silk_stereo_encode_predcxx . . $ silk_stereo_encode_pred(86eacff9412b009).(
92 ec_enccxx . . $ ec_enc# *psRangeEnc, /* I/O Compressor data structure */
93 opus_int8cxx . . $ opus_int8# ix[ 2 ][ 3 ] /* I Quantization indices */
94 );
95
96 /* Entropy code the mid-only flag */
97 void silk_stereo_encode_mid_onlycxx . . $ silk_stereo_encode_mid_only(40adebacf725b59c).(
98 ec_enccxx . . $ ec_enc# *psRangeEnc, /* I/O Compressor data structure */
99 opus_int8cxx . . $ opus_int8# mid_only_flag
100 );
101
102 /* Decode mid/side predictors */
103 void silk_stereo_decode_predcxx . . $ silk_stereo_decode_pred(eb42264ed5006d1e).(
104 ec_deccxx . . $ ec_dec# *psRangeDec, /* I/O Compressor data structure */
105 opus_int32cxx . . $ opus_int32# pred_Q13[] /* O Predictors */
106 );
107
108 /* Decode mid-only flag */
109 void silk_stereo_decode_mid_onlycxx . . $ silk_stereo_decode_mid_only(eb42264ed5006d1e).(
110 ec_deccxx . . $ ec_dec# *psRangeDec, /* I/O Compressor data structure */
111 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! *decode_only_mid /* O Flag that only mid channel has been coded */
112 );
113
114 /* Encodes signs of excitation */
115 void silk_encode_signscxx . . $ silk_encode_signs(dc938ed96e71bd5d).(
116 ec_enccxx . . $ ec_enc# *psRangeEnc, /* I/O Compressor data structure */
117 const opus_int8cxx . . $ opus_int8# pulses[], /* I pulse signal */
118 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! length, /* I length of input */
119 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! signalType, /* I Signal type */
120 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! quantOffsetType, /* I Quantization offset type */
121 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! sum_pulses[ MAX_NB_SHELL_BLOCKScxx . . $ `external/opusfile/opus/silk/define.h:170:9`! ] /* I Sum of absolute pulses per block */
122 );
123
124 /* Decodes signs of excitation */
125 void silk_decode_signscxx . . $ silk_decode_signs(bdeb93d39a669314).(
126 ec_deccxx . . $ ec_dec# *psRangeDec, /* I/O Compressor data structure */
127 opus_int16cxx . . $ opus_int16# pulses[], /* I/O pulse signal */
128 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! length, /* I length of input */
129 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! signalType, /* I Signal type */
130 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! quantOffsetType, /* I Quantization offset type */
131 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! sum_pulses[ MAX_NB_SHELL_BLOCKScxx . . $ `external/opusfile/opus/silk/define.h:170:9`! ] /* I Sum of absolute pulses per block */
132 );
133
134 /* Check encoder control struct */
135 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! check_control_inputcxx . . $ check_control_input(4fcd8096fd70892e).(
136 silk_EncControlStructcxx . . $ silk_EncControlStruct# *encControl /* I Control structure */
137 );
138
139 /* Control internal sampling rate */
140 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! silk_control_audio_bandwidthcxx . . $ silk_control_audio_bandwidth(b0d771aca2d848f1).(
141 silk_encoder_statecxx . . $ silk_encoder_state# *psEncC, /* I/O Pointer to Silk encoder state */
142 silk_EncControlStructcxx . . $ silk_EncControlStruct# *encControl /* I Control structure */
143 );
144
145 /* Control SNR of redidual quantizer */
146 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! silk_control_SNRcxx . . $ silk_control_SNR(99ece60f02e4a8bb).(
147 silk_encoder_statecxx . . $ silk_encoder_state# *psEncC, /* I/O Pointer to Silk encoder state */
148 opus_int32cxx . . $ opus_int32# TargetRate_bps /* I Target max bitrate (bps) */
149 );
150
151 /***************/
152 /* Shell coder */
153 /***************/
154
155 /* Encode quantization indices of excitation */
156 void silk_encode_pulsescxx . . $ silk_encode_pulses(b0c488396eb75e85).(
157 ec_enccxx . . $ ec_enc# *psRangeEnc, /* I/O compressor data structure */
158 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! signalType, /* I Signal type */
159 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! quantOffsetType, /* I quantOffsetType */
160 opus_int8cxx . . $ opus_int8# pulses[], /* I quantization indices */
161 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! frame_length /* I Frame length */
162 );
163
164 /* Shell encoder, operates on one shell code frame of 16 pulses */
165 void silk_shell_encodercxx . . $ silk_shell_encoder(f085c63ccefc0335).(
166 ec_enccxx . . $ ec_enc# *psRangeEnc, /* I/O compressor data structure */
167 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! *pulses0 /* I data: nonnegative pulse amplitudes */
168 );
169
170 /* Shell decoder, operates on one shell code frame of 16 pulses */
171 void silk_shell_decodercxx . . $ silk_shell_decoder(e1963283a213f8ae).(
172 opus_int16cxx . . $ opus_int16# *pulses0, /* O data: nonnegative pulse amplitudes */
173 ec_deccxx . . $ ec_dec# *psRangeDec, /* I/O Compressor data structure */
174 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! pulses4 /* I number of pulses per pulse-subframe */
175 );
176
177 /* Gain scalar quantization with hysteresis, uniform on log scale */
178 void silk_gains_quantcxx . . $ silk_gains_quant(fe48b9a386c4132d).(
179 opus_int8cxx . . $ opus_int8# ind[ MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! ], /* O gain indices */
180 opus_int32cxx . . $ opus_int32# gain_Q16[ MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! ], /* I/O gains (quantized out) */
181 opus_int8cxx . . $ opus_int8# *prev_ind, /* I/O last index in previous frame */
182 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! conditional, /* I first gain is delta coded if 1 */
183 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! nb_subfr /* I number of subframes */
184 );
185
186 /* Gains scalar dequantization, uniform on log scale */
187 void silk_gains_dequantcxx . . $ silk_gains_dequant(e7a7ed9bd36c8e0d).(
188 opus_int32cxx . . $ opus_int32# gain_Q16[ MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! ], /* O quantized gains */
189 const opus_int8cxx . . $ opus_int8# ind[ MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! ], /* I gain indices */
190 opus_int8cxx . . $ opus_int8# *prev_ind, /* I/O last index in previous frame */
191 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! conditional, /* I first gain is delta coded if 1 */
192 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! nb_subfr /* I number of subframes */
193 );
194
195 /* Compute unique identifier of gain indices vector */
196 opus_int32cxx . . $ opus_int32# silk_gains_IDcxx . . $ silk_gains_ID(1380bfeceff4370d).( /* O returns unique identifier of gains */
197 const opus_int8cxx . . $ opus_int8# ind[ MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! ], /* I gain indices */
198 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! nb_subfr /* I number of subframes */
199 );
200
201 /* Interpolate two vectors */
202 void silk_interpolatecxx . . $ silk_interpolate(2b9c185163305420).(
203 opus_int16cxx . . $ opus_int16# xi[ MAX_LPC_ORDERcxx . . $ `external/opusfile/opus/silk/define.h:142:9`! ], /* O interpolated vector */
204 const opus_int16cxx . . $ opus_int16# x0[ MAX_LPC_ORDERcxx . . $ `external/opusfile/opus/silk/define.h:142:9`! ], /* I first vector */
205 const opus_int16cxx . . $ opus_int16# x1[ MAX_LPC_ORDERcxx . . $ `external/opusfile/opus/silk/define.h:142:9`! ], /* I second vector */
206 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! ifact_Q2, /* I interp. factor, weight on 2nd vector */
207 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! d /* I number of parameters */
208 );
209
210 /* LTP tap quantizer */
211 void silk_quant_LTP_gainscxx . . $ silk_quant_LTP_gains(69ce046bf929356e).(
212 opus_int16cxx . . $ opus_int16# B_Q14[ MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! * LTP_ORDERcxx . . $ `external/opusfile/opus/silk/define.h:146:9`! ], /* O Quantized LTP gains */
213 opus_int8cxx . . $ opus_int8# cbk_index[ MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! ], /* O Codebook Index */
214 opus_int8cxx . . $ opus_int8# *periodicity_index, /* O Periodicity Index */
215 opus_int32cxx . . $ opus_int32# *sum_gain_dB_Q7, /* I/O Cumulative max prediction gain */
216 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! *pred_gain_dB_Q7, /* O LTP prediction gain */
217 const opus_int32cxx . . $ opus_int32# XX_Q17[ MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`!*LTP_ORDERcxx . . $ `external/opusfile/opus/silk/define.h:146:9`!*LTP_ORDERcxx . . $ `external/opusfile/opus/silk/define.h:146:9`! ], /* I Correlation matrix in Q18 */
218 const opus_int32cxx . . $ opus_int32# xX_Q17[ MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`!*LTP_ORDERcxx . . $ `external/opusfile/opus/silk/define.h:146:9`! ], /* I Correlation vector in Q18 */
219 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! subfr_len, /* I Number of samples per subframe */
220 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! nb_subfr, /* I Number of subframes */
221 int arch /* I Run-time architecture */
222 );
223
224 /* Entropy constrained matrix-weighted VQ, for a single input data vector */
225 void silk_VQ_WMat_EC_ccxx . . $ silk_VQ_WMat_EC_c(cb436e84f586854e).(
226 opus_int8cxx . . $ opus_int8# *ind, /* O index of best codebook vector */
227 opus_int32cxx . . $ opus_int32# *res_nrg_Q15, /* O best residual energy */
228 opus_int32cxx . . $ opus_int32# *rate_dist_Q8, /* O best total bitrate */
229 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! *gain_Q7, /* O sum of absolute LTP coefficients */
230 const opus_int32cxx . . $ opus_int32# *XX_Q17, /* I correlation matrix */
231 const opus_int32cxx . . $ opus_int32# *xX_Q17, /* I correlation vector */
232 const opus_int8cxx . . $ opus_int8# *cb_Q7, /* I codebook */
233 const opus_uint8cxx . . $ opus_uint8# *cb_gain_Q7, /* I codebook effective gain */
234 const opus_uint8cxx . . $ opus_uint8# *cl_Q5, /* I code length for each codebook vector */
235 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! subfr_len, /* I number of samples per subframe */
236 const opus_int32cxx . . $ opus_int32# max_gain_Q7, /* I maximum sum of absolute LTP coefficients */
237 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! L /* I number of vectors in codebook */
238 );
239
240 #if !defined(OVERRIDE_silk_VQ_WMat_EC)
241 #define silk_VQ_WMat_ECcxx . . $ `external/opusfile/opus/silk/main.h:241:9`!(ind, res_nrg_Q15, rate_dist_Q8, gain_Q7, XX_Q17, xX_Q17, cb_Q7, cb_gain_Q7, cl_Q5, subfr_len, max_gain_Q7, L, arch) \
242 ((void)(arch),silk_VQ_WMat_EC_c(ind, res_nrg_Q15, rate_dist_Q8, gain_Q7, XX_Q17, xX_Q17, cb_Q7, cb_gain_Q7, cl_Q5, subfr_len, max_gain_Q7, L))
243 #endif
244
245 /************************************/
246 /* Noise shaping quantization (NSQ) */
247 /************************************/
248
249 void silk_NSQ_ccxx . . $ silk_NSQ_c(d1c114c0aa0bae3).(
250 const silk_encoder_statecxx . . $ silk_encoder_state# *psEncC, /* I Encoder State */
251 silk_nsq_statecxx . . $ silk_nsq_state# *NSQ, /* I/O NSQ state */
252 SideInfoIndicescxx . . $ SideInfoIndices# *psIndices, /* I/O Quantization Indices */
253 const opus_int16cxx . . $ opus_int16# x16[], /* I Input */
254 opus_int8cxx . . $ opus_int8# pulses[], /* O Quantized pulse signal */
255 const opus_int16cxx . . $ opus_int16# PredCoef_Q12[ 2 * MAX_LPC_ORDERcxx . . $ `external/opusfile/opus/silk/define.h:142:9`! ], /* I Short term prediction coefs */
256 const opus_int16cxx . . $ opus_int16# LTPCoef_Q14[ LTP_ORDERcxx . . $ `external/opusfile/opus/silk/define.h:146:9`! * MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! ], /* I Long term prediction coefs */
257 const opus_int16cxx . . $ opus_int16# AR_Q13[ MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! * MAX_SHAPE_LPC_ORDERcxx . . $ `external/opusfile/opus/silk/define.h:155:9`! ], /* I Noise shaping coefs */
258 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! HarmShapeGain_Q14[ MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! ], /* I Long term shaping coefs */
259 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! Tilt_Q14[ MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! ], /* I Spectral tilt */
260 const opus_int32cxx . . $ opus_int32# LF_shp_Q14[ MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! ], /* I Low frequency shaping coefs */
261 const opus_int32cxx . . $ opus_int32# Gains_Q16[ MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! ], /* I Quantization step sizes */
262 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! pitchL[ MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! ], /* I Pitch lags */
263 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! Lambda_Q10, /* I Rate/distortion tradeoff */
264 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! LTP_scale_Q14 /* I LTP state scaling */
265 );
266
267 #if !defined(OVERRIDE_silk_NSQ)
268 #define silk_NSQcxx . . $ `external/opusfile/opus/silk/main.h:268:9`!(psEncC, NSQ, psIndices, x16, pulses, PredCoef_Q12, LTPCoef_Q14, AR_Q13, \
269 HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, pitchL, Lambda_Q10, LTP_scale_Q14, arch) \
270 ((void)(arch),silk_NSQ_c(psEncC, NSQ, psIndices, x16, pulses, PredCoef_Q12, LTPCoef_Q14, AR_Q13, \
271 HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, pitchL, Lambda_Q10, LTP_scale_Q14))
272 #endif
273
274 /* Noise shaping using delayed decision */
275 void silk_NSQ_del_dec_ccxx . . $ silk_NSQ_del_dec_c(d1c114c0aa0bae3).(
276 const silk_encoder_statecxx . . $ silk_encoder_state# *psEncC, /* I Encoder State */
277 silk_nsq_statecxx . . $ silk_nsq_state# *NSQ, /* I/O NSQ state */
278 SideInfoIndicescxx . . $ SideInfoIndices# *psIndices, /* I/O Quantization Indices */
279 const opus_int16cxx . . $ opus_int16# x16[], /* I Input */
280 opus_int8cxx . . $ opus_int8# pulses[], /* O Quantized pulse signal */
281 const opus_int16cxx . . $ opus_int16# PredCoef_Q12[ 2 * MAX_LPC_ORDERcxx . . $ `external/opusfile/opus/silk/define.h:142:9`! ], /* I Short term prediction coefs */
282 const opus_int16cxx . . $ opus_int16# LTPCoef_Q14[ LTP_ORDERcxx . . $ `external/opusfile/opus/silk/define.h:146:9`! * MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! ], /* I Long term prediction coefs */
283 const opus_int16cxx . . $ opus_int16# AR_Q13[ MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! * MAX_SHAPE_LPC_ORDERcxx . . $ `external/opusfile/opus/silk/define.h:155:9`! ], /* I Noise shaping coefs */
284 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! HarmShapeGain_Q14[ MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! ], /* I Long term shaping coefs */
285 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! Tilt_Q14[ MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! ], /* I Spectral tilt */
286 const opus_int32cxx . . $ opus_int32# LF_shp_Q14[ MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! ], /* I Low frequency shaping coefs */
287 const opus_int32cxx . . $ opus_int32# Gains_Q16[ MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! ], /* I Quantization step sizes */
288 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! pitchL[ MAX_NB_SUBFRcxx . . $ `external/opusfile/opus/silk/define.h:90:9`! ], /* I Pitch lags */
289 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! Lambda_Q10, /* I Rate/distortion tradeoff */
290 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! LTP_scale_Q14 /* I LTP state scaling */
291 );
292
293 #if !defined(OVERRIDE_silk_NSQ_del_dec)
294 #define silk_NSQ_del_deccxx . . $ `external/opusfile/opus/silk/main.h:294:9`!(psEncC, NSQ, psIndices, x16, pulses, PredCoef_Q12, LTPCoef_Q14, AR_Q13, \
295 HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, pitchL, Lambda_Q10, LTP_scale_Q14, arch) \
296 ((void)(arch),silk_NSQ_del_dec_c(psEncC, NSQ, psIndices, x16, pulses, PredCoef_Q12, LTPCoef_Q14, AR_Q13, \
297 HarmShapeGain_Q14, Tilt_Q14, LF_shp_Q14, Gains_Q16, pitchL, Lambda_Q10, LTP_scale_Q14))
298 #endif
299
300 /************/
301 /* Silk VAD */
302 /************/
303 /* Initialize the Silk VAD */
304 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! silk_VAD_Initcxx . . $ silk_VAD_Init(6d009c2fedcdb40).( /* O Return value, 0 if success */
305 silk_VAD_statecxx . . $ silk_VAD_state# *psSilk_VAD /* I/O Pointer to Silk VAD state */
306 );
307
308 /* Get speech activity level in Q8 */
309 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! silk_VAD_GetSA_Q8_ccxx . . $ silk_VAD_GetSA_Q8_c(8e907b45f6719cf).( /* O Return value, 0 if success */
310 silk_encoder_statecxx . . $ silk_encoder_state# *psEncC, /* I/O Encoder state */
311 const opus_int16cxx . . $ opus_int16# pIn[] /* I PCM input */
312 );
313
314 #if !defined(OVERRIDE_silk_VAD_GetSA_Q8)
315 #define silk_VAD_GetSA_Q8cxx . . $ `external/opusfile/opus/silk/main.h:315:9`!(psEnC, pIn, arch) ((void)(arch),silk_VAD_GetSA_Q8_c(psEnC, pIn))
316 #endif
317
318 /* Low-pass filter with variable cutoff frequency based on */
319 /* piece-wise linear interpolation between elliptic filters */
320 /* Start by setting transition_frame_no = 1; */
321 void silk_LP_variable_cutoffcxx . . $ silk_LP_variable_cutoff(71adae6c5584b270).(
322 silk_LP_statecxx . . $ silk_LP_state# *psLP, /* I/O LP filter state */
323 opus_int16cxx . . $ opus_int16# *frame, /* I/O Low-pass filtered output signal */
324 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! frame_length /* I Frame length */
325 );
326
327 /******************/
328 /* NLSF Quantizer */
329 /******************/
330 /* Limit, stabilize, convert and quantize NLSFs */
331 void silk_process_NLSFscxx . . $ silk_process_NLSFs(c964091ecf4dab9e).(
332 silk_encoder_statecxx . . $ silk_encoder_state# *psEncC, /* I/O Encoder state */
333 opus_int16cxx . . $ opus_int16# PredCoef_Q12[ 2 ][ MAX_LPC_ORDERcxx . . $ `external/opusfile/opus/silk/define.h:142:9`! ], /* O Prediction coefficients */
334 opus_int16cxx . . $ opus_int16# pNLSF_Q15[ MAX_LPC_ORDERcxx . . $ `external/opusfile/opus/silk/define.h:142:9`! ], /* I/O Normalized LSFs (quant out) (0 - (2^15-1)) */
335 const opus_int16cxx . . $ opus_int16# prev_NLSFq_Q15[ MAX_LPC_ORDERcxx . . $ `external/opusfile/opus/silk/define.h:142:9`! ] /* I Previous Normalized LSFs (0 - (2^15-1)) */
336 );
337
338 opus_int32cxx . . $ opus_int32# silk_NLSF_encodecxx . . $ silk_NLSF_encode(7c6e9094d0221c48).( /* O Returns RD value in Q25 */
339 opus_int8cxx . . $ opus_int8# *NLSFIndices, /* I Codebook path vector [ LPC_ORDER + 1 ] */
340 opus_int16cxx . . $ opus_int16# *pNLSF_Q15, /* I/O Quantized NLSF vector [ LPC_ORDER ] */
341 const silk_NLSF_CB_structcxx . . $ silk_NLSF_CB_struct# *psNLSF_CB, /* I Codebook object */
342 const opus_int16cxx . . $ opus_int16# *pW_QW, /* I NLSF weight vector [ LPC_ORDER ] */
343 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! NLSF_mu_Q20, /* I Rate weight for the RD optimization */
344 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! nSurvivors, /* I Max survivors after first stage */
345 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! signalType /* I Signal type: 0/1/2 */
346 );
347
348 /* Compute quantization errors for an LPC_order element input vector for a VQ codebook */
349 void silk_NLSF_VQcxx . . $ silk_NLSF_VQ(6716e5122870dbb7).(
350 opus_int32cxx . . $ opus_int32# err_Q26[], /* O Quantization errors [K] */
351 const opus_int16cxx . . $ opus_int16# in_Q15[], /* I Input vectors to be quantized [LPC_order] */
352 const opus_uint8cxx . . $ opus_uint8# pCB_Q8[], /* I Codebook vectors [K*LPC_order] */
353 const opus_int16cxx . . $ opus_int16# pWght_Q9[], /* I Codebook weights [K*LPC_order] */
354 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! K, /* I Number of codebook vectors */
355 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! LPC_order /* I Number of LPCs */
356 );
357
358 /* Delayed-decision quantizer for NLSF residuals */
359 opus_int32cxx . . $ opus_int32# silk_NLSF_del_dec_quantcxx . . $ silk_NLSF_del_dec_quant(325c17dbb627170).( /* O Returns RD value in Q25 */
360 opus_int8cxx . . $ opus_int8# indices[], /* O Quantization indices [ order ] */
361 const opus_int16cxx . . $ opus_int16# x_Q10[], /* I Input [ order ] */
362 const opus_int16cxx . . $ opus_int16# w_Q5[], /* I Weights [ order ] */
363 const opus_uint8cxx . . $ opus_uint8# pred_coef_Q8[], /* I Backward predictor coefs [ order ] */
364 const opus_int16cxx . . $ opus_int16# ec_ix[], /* I Indices to entropy coding tables [ order ] */
365 const opus_uint8cxx . . $ opus_uint8# ec_rates_Q5[], /* I Rates [] */
366 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! quant_step_size_Q16, /* I Quantization step size */
367 const opus_int16cxx . . $ opus_int16# inv_quant_step_size_Q6, /* I Inverse quantization step size */
368 const opus_int32cxx . . $ opus_int32# mu_Q20, /* I R/D tradeoff */
369 const opus_int16cxx . . $ opus_int16# order /* I Number of input values */
370 );
371
372 /* Unpack predictor values and indices for entropy coding tables */
373 void silk_NLSF_unpackcxx . . $ silk_NLSF_unpack(247c99e04080b04).(
374 opus_int16cxx . . $ opus_int16# ec_ix[], /* O Indices to entropy tables [ LPC_ORDER ] */
375 opus_uint8cxx . . $ opus_uint8# pred_Q8[], /* O LSF predictor [ LPC_ORDER ] */
376 const silk_NLSF_CB_structcxx . . $ silk_NLSF_CB_struct# *psNLSF_CB, /* I Codebook object */
377 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! CB1_index /* I Index of vector in first LSF codebook */
378 );
379
380 /***********************/
381 /* NLSF vector decoder */
382 /***********************/
383 void silk_NLSF_decodecxx . . $ silk_NLSF_decode(f271e27b3cab8e21).(
384 opus_int16cxx . . $ opus_int16# *pNLSF_Q15, /* O Quantized NLSF vector [ LPC_ORDER ] */
385 opus_int8cxx . . $ opus_int8# *NLSFIndices, /* I Codebook path vector [ LPC_ORDER + 1 ] */
386 const silk_NLSF_CB_structcxx . . $ silk_NLSF_CB_struct# *psNLSF_CB /* I Codebook object */
387 );
388
389 /****************************************************/
390 /* Decoder Functions */
391 /****************************************************/
392 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! silk_init_decodercxx . . $ silk_init_decoder(bbe3842e18cf5c1d).(
393 silk_decoder_statecxx . . $ silk_decoder_state# *psDec /* I/O Decoder state pointer */
394 );
395
396 /* Set decoder sampling rate */
397 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! silk_decoder_set_fscxx . . $ silk_decoder_set_fs(b0ff25a6b547ea0c).(
398 silk_decoder_statecxx . . $ silk_decoder_state# *psDec, /* I/O Decoder state pointer */
399 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! fs_kHz, /* I Sampling frequency (kHz) */
400 opus_int32cxx . . $ opus_int32# fs_API_Hz /* I API Sampling frequency (Hz) */
401 );
402
403 /****************/
404 /* Decode frame */
405 /****************/
406 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! silk_decode_framecxx . . $ silk_decode_frame(cefb5b6d44164d9c).(
407 silk_decoder_statecxx . . $ silk_decoder_state# *psDec, /* I/O Pointer to Silk decoder state */
408 ec_deccxx . . $ ec_dec# *psRangeDec, /* I/O Compressor data structure */
409 opus_int16cxx . . $ opus_int16# pOut[], /* O Pointer to output speech frame */
410 opus_int32cxx . . $ opus_int32# *pN, /* O Pointer to size of output frame */
411 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! lostFlag, /* I 0: no loss, 1 loss, 2 decode fec */
412 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! condCoding, /* I The type of conditional coding to use */
413 int arch /* I Run-time architecture */
414 );
415
416 /* Decode indices from bitstream */
417 void silk_decode_indicescxx . . $ silk_decode_indices(9b8b62953f1146f3).(
418 silk_decoder_statecxx . . $ silk_decoder_state# *psDec, /* I/O State */
419 ec_deccxx . . $ ec_dec# *psRangeDec, /* I/O Compressor data structure */
420 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! FrameIndex, /* I Frame number */
421 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! decode_LBRR, /* I Flag indicating LBRR data is being decoded */
422 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! condCoding /* I The type of conditional coding to use */
423 );
424
425 /* Decode parameters from payload */
426 void silk_decode_parameterscxx . . $ silk_decode_parameters(34334dd9f9bfd38c).(
427 silk_decoder_statecxx . . $ silk_decoder_state# *psDec, /* I/O State */
428 silk_decoder_controlcxx . . $ silk_decoder_control# *psDecCtrl, /* I/O Decoder control */
429 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! condCoding /* I The type of conditional coding to use */
430 );
431
432 /* Core decoder. Performs inverse NSQ operation LTP + LPC */
433 void silk_decode_corecxx . . $ silk_decode_core(9cfceb12ad7136d6).(
434 silk_decoder_statecxx . . $ silk_decoder_state# *psDec, /* I/O Decoder state */
435 silk_decoder_controlcxx . . $ silk_decoder_control# *psDecCtrl, /* I Decoder control */
436 opus_int16cxx . . $ opus_int16# xq[], /* O Decoded speech */
437 const opus_int16cxx . . $ opus_int16# pulses[ MAX_FRAME_LENGTHcxx . . $ `external/opusfile/opus/silk/define.h:97:9`! ], /* I Pulse signal */
438 int arch /* I Run-time architecture */
439 );
440
441 /* Decode quantization indices of excitation (Shell coding) */
442 void silk_decode_pulsescxx . . $ silk_decode_pulses(2cc810bc97bf43df).(
443 ec_deccxx . . $ ec_dec# *psRangeDec, /* I/O Compressor data structure */
444 opus_int16cxx . . $ opus_int16# pulses[], /* O Excitation signal */
445 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! signalType, /* I Sigtype */
446 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! quantOffsetType, /* I quantOffsetType */
447 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! frame_length /* I Frame length */
448 );
449
450 /******************/
451 /* CNG */
452 /******************/
453
454 /* Reset CNG */
455 void silk_CNG_Resetcxx . . $ silk_CNG_Reset(240ed8acede374f9).(
456 silk_decoder_statecxx . . $ silk_decoder_state# *psDec /* I/O Decoder state */
457 );
458
459 /* Updates CNG estimate, and applies the CNG when packet was lost */
460 void silk_CNGcxx . . $ silk_CNG(3e85da5896dfe775).(
461 silk_decoder_statecxx . . $ silk_decoder_state# *psDec, /* I/O Decoder state */
462 silk_decoder_controlcxx . . $ silk_decoder_control# *psDecCtrl, /* I/O Decoder control */
463 opus_int16cxx . . $ opus_int16# frame[], /* I/O Signal */
464 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! length /* I Length of residual */
465 );
466
467 /* Encoding of various parameters */
468 void silk_encode_indicescxx . . $ silk_encode_indices(ff8f51fcf2ede63a).(
469 silk_encoder_statecxx . . $ silk_encoder_state# *psEncC, /* I/O Encoder state */
470 ec_enccxx . . $ ec_enc# *psRangeEnc, /* I/O Compressor data structure */
471 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! FrameIndex, /* I Frame number */
472 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! encode_LBRR, /* I Flag indicating LBRR data is being encoded */
473 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! condCoding /* I The type of conditional coding to use */
474 );
475
476 #endif