Debian Codegraph @

external/opusfile/opus/silk/SigProc_FIX.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_SIGPROC_FIX_H
29 #define SILK_SIGPROC_FIX_Hcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:29:9`!
30
31 #ifdef __cplusplus
32 extern "C"
33 {
34 #endif
35
36 /*#define silk_MACRO_COUNT */ /* Used to enable WMOPS counting */
37
38 #define SILK_MAX_ORDER_LPCcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:38:9`! 24 /* max order of the LPC analysis in schur() and k2a() */
39
40 #include <string.h> /* for memset(), memcpy(), memmove() */
41 #include "typedef.h"cxx . . $ `<file>/external/opusfile/opus/silk/typedef.h`/
42 #include "resampler_structs.h"cxx . . $ `<file>/external/opusfile/opus/silk/resampler_structs.h`/
43 #include "macros.h"cxx . . $ `<file>/external/opusfile/opus/silk/macros.h`/
44 #include "cpu_support.h"cxx . . $ `<file>/external/opusfile/opus/celt/cpu_support.h`/
45
46 #if defined(OPUS_X86_MAY_HAVE_SSE4_1)
47 #include "x86/SigProc_FIX_sse.h"
48 #endif
49
50 #if (defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR))
51 #include "arm/biquad_alt_arm.h"
52 #include "arm/LPC_inv_pred_gain_arm.h"
53 #endif
54
55 /********************************************************************/
56 /* SIGNAL PROCESSING FUNCTIONS */
57 /********************************************************************/
58
59 /*!
60 * Initialize/reset the resampler state for a given pair of input/output sampling rates
61 */
62 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! silk_resampler_initcxx . . $ silk_resampler_init(68d7c96219bffefa).(
63 silk_resampler_state_structcxx . . $ silk_resampler_state_struct# *S, /* I/O Resampler state */
64 opus_int32cxx . . $ opus_int32# Fs_Hz_in, /* I Input sampling rate (Hz) */
65 opus_int32cxx . . $ opus_int32# Fs_Hz_out, /* I Output sampling rate (Hz) */
66 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! forEnc /* I If 1: encoder; if 0: decoder */
67 );
68
69 /*!
70 * Resampler: convert from one sampling rate to another
71 */
72 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! silk_resamplercxx . . $ silk_resampler(35bad50a08f43124).(
73 silk_resampler_state_structcxx . . $ silk_resampler_state_struct# *S, /* I/O Resampler state */
74 opus_int16cxx . . $ opus_int16# out[], /* O Output signal */
75 const opus_int16cxx . . $ opus_int16# in[], /* I Input signal */
76 opus_int32cxx . . $ opus_int32# inLen /* I Number of input samples */
77 );
78
79 /*!
80 * Downsample 2x, mediocre quality
81 */
82 void silk_resampler_down2cxx . . $ silk_resampler_down2(429a4a3d268809f6).(
83 opus_int32cxx . . $ opus_int32# *S, /* I/O State vector [ 2 ] */
84 opus_int16cxx . . $ opus_int16# *out, /* O Output signal [ len ] */
85 const opus_int16cxx . . $ opus_int16# *in, /* I Input signal [ floor(len/2) ] */
86 opus_int32cxx . . $ opus_int32# inLen /* I Number of input samples */
87 );
88
89 /*!
90 * Downsample by a factor 2/3, low quality
91 */
92 void silk_resampler_down2_3cxx . . $ silk_resampler_down2_3(429a4a3d268809f6).(
93 opus_int32cxx . . $ opus_int32# *S, /* I/O State vector [ 6 ] */
94 opus_int16cxx . . $ opus_int16# *out, /* O Output signal [ floor(2*inLen/3) ] */
95 const opus_int16cxx . . $ opus_int16# *in, /* I Input signal [ inLen ] */
96 opus_int32cxx . . $ opus_int32# inLen /* I Number of input samples */
97 );
98
99 /*!
100 * second order ARMA filter;
101 * slower than biquad() but uses more precise coefficients
102 * can handle (slowly) varying coefficients
103 */
104 void silk_biquad_alt_stride1cxx . . $ silk_biquad_alt_stride1(a79b0e3a37edf45b).(
105 const opus_int16cxx . . $ opus_int16# *in, /* I input signal */
106 const opus_int32cxx . . $ opus_int32# *B_Q28, /* I MA coefficients [3] */
107 const opus_int32cxx . . $ opus_int32# *A_Q28, /* I AR coefficients [2] */
108 opus_int32cxx . . $ opus_int32# *S, /* I/O State vector [2] */
109 opus_int16cxx . . $ opus_int16# *out, /* O output signal */
110 const opus_int32cxx . . $ opus_int32# len /* I signal length (must be even) */
111 );
112
113 void silk_biquad_alt_stride2_ccxx . . $ silk_biquad_alt_stride2_c(a79b0e3a37edf45b).(
114 const opus_int16cxx . . $ opus_int16# *in, /* I input signal */
115 const opus_int32cxx . . $ opus_int32# *B_Q28, /* I MA coefficients [3] */
116 const opus_int32cxx . . $ opus_int32# *A_Q28, /* I AR coefficients [2] */
117 opus_int32cxx . . $ opus_int32# *S, /* I/O State vector [4] */
118 opus_int16cxx . . $ opus_int16# *out, /* O output signal */
119 const opus_int32cxx . . $ opus_int32# len /* I signal length (must be even) */
120 );
121
122 /* Variable order MA prediction error filter. */
123 void silk_LPC_analysis_filtercxx . . $ silk_LPC_analysis_filter(e994c63e0c06703e).(
124 opus_int16cxx . . $ opus_int16# *out, /* O Output signal */
125 const opus_int16cxx . . $ opus_int16# *in, /* I Input signal */
126 const opus_int16cxx . . $ opus_int16# *B, /* I MA prediction coefficients, Q12 [order] */
127 const opus_int32cxx . . $ opus_int32# len, /* I Signal length */
128 const opus_int32cxx . . $ opus_int32# d, /* I Filter order */
129 int arch /* I Run-time architecture */
130 );
131
132 /* Chirp (bandwidth expand) LP AR filter */
133 void silk_bwexpandercxx . . $ silk_bwexpander(e1bec1d01040f3bf).(
134 opus_int16cxx . . $ opus_int16# *ar, /* I/O AR filter to be expanded (without leading 1) */
135 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! d, /* I Length of ar */
136 opus_int32cxx . . $ opus_int32# chirp_Q16 /* I Chirp factor (typically in the range 0 to 1) */
137 );
138
139 /* Chirp (bandwidth expand) LP AR filter */
140 void silk_bwexpander_32cxx . . $ silk_bwexpander_32(5f3888e91f92d472).(
141 opus_int32cxx . . $ opus_int32# *ar, /* I/O AR filter to be expanded (without leading 1) */
142 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! d, /* I Length of ar */
143 opus_int32cxx . . $ opus_int32# chirp_Q16 /* I Chirp factor in Q16 */
144 );
145
146 /* Compute inverse of LPC prediction gain, and */
147 /* test if LPC coefficients are stable (all poles within unit circle) */
148 opus_int32cxx . . $ opus_int32# silk_LPC_inverse_pred_gain_ccxx . . $ silk_LPC_inverse_pred_gain_c(c2498cb2c336b4ee).( /* O Returns inverse prediction gain in energy domain, Q30 */
149 const opus_int16cxx . . $ opus_int16# *A_Q12, /* I Prediction coefficients, Q12 [order] */
150 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! order /* I Prediction order */
151 );
152
153 /* Split signal in two decimated bands using first-order allpass filters */
154 void silk_ana_filt_bank_1cxx . . $ silk_ana_filt_bank_1(8e5f3f7f37a339d).(
155 const opus_int16cxx . . $ opus_int16# *in, /* I Input signal [N] */
156 opus_int32cxx . . $ opus_int32# *S, /* I/O State vector [2] */
157 opus_int16cxx . . $ opus_int16# *outL, /* O Low band [N/2] */
158 opus_int16cxx . . $ opus_int16# *outH, /* O High band [N/2] */
159 const opus_int32cxx . . $ opus_int32# N /* I Number of input samples */
160 );
161
162 #if !defined(OVERRIDE_silk_biquad_alt_stride2)
163 #define silk_biquad_alt_stride2cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:163:9`!(in, B_Q28, A_Q28, S, out, len, arch) ((void)(arch), silk_biquad_alt_stride2_c(in, B_Q28, A_Q28, S, out, len))
164 #endif
165
166 #if !defined(OVERRIDE_silk_LPC_inverse_pred_gain)
167 #define silk_LPC_inverse_pred_gaincxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:167:9`!(A_Q12, order, arch) ((void)(arch), silk_LPC_inverse_pred_gain_c(A_Q12, order))
168 #endif
169
170 /********************************************************************/
171 /* SCALAR FUNCTIONS */
172 /********************************************************************/
173
174 /* Approximation of 128 * log2() (exact inverse of approx 2^() below) */
175 /* Convert input to a log scale */
176 opus_int32cxx . . $ opus_int32# silk_lin2logcxx . . $ silk_lin2log(7864480464b09eea).(
177 const opus_int32cxx . . $ opus_int32# inLin /* I input in linear scale */
178 );
179
180 /* Approximation of a sigmoid function */
181 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! silk_sigm_Q15cxx . . $ silk_sigm_Q15(7864480464b09eea).(
182 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! in_Q5 /* I */
183 );
184
185 /* Approximation of 2^() (exact inverse of approx log2() above) */
186 /* Convert input to a linear scale */
187 opus_int32cxx . . $ opus_int32# silk_log2lincxx . . $ silk_log2lin(7864480464b09eea).(
188 const opus_int32cxx . . $ opus_int32# inLog_Q7 /* I input on log scale */
189 );
190
191 /* Compute number of bits to right shift the sum of squares of a vector */
192 /* of int16s to make it fit in an int32 */
193 void silk_sum_sqr_shiftcxx . . $ silk_sum_sqr_shift(98426d2fcb017784).(
194 opus_int32cxx . . $ opus_int32# *energy, /* O Energy of x, after shifting to the right */
195 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! *shift, /* O Number of bits right shift applied to energy */
196 const opus_int16cxx . . $ opus_int16# *x, /* I Input vector */
197 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! len /* I Length of input vector */
198 );
199
200 /* Calculates the reflection coefficients from the correlation sequence */
201 /* Faster than schur64(), but much less accurate. */
202 /* uses SMLAWB(), requiring armv5E and higher. */
203 opus_int32cxx . . $ opus_int32# silk_schurcxx . . $ silk_schur(6b94b953261adba8).( /* O Returns residual energy */
204 opus_int16cxx . . $ opus_int16# *rc_Q15, /* O reflection coefficients [order] Q15 */
205 const opus_int32cxx . . $ opus_int32# *c, /* I correlations [order+1] */
206 const opus_int32cxx . . $ opus_int32# order /* I prediction order */
207 );
208
209 /* Calculates the reflection coefficients from the correlation sequence */
210 /* Slower than schur(), but more accurate. */
211 /* Uses SMULL(), available on armv4 */
212 opus_int32cxx . . $ opus_int32# silk_schur64cxx . . $ silk_schur64(f414929d28b2e8a).( /* O returns residual energy */
213 opus_int32cxx . . $ opus_int32# rc_Q16[], /* O Reflection coefficients [order] Q16 */
214 const opus_int32cxx . . $ opus_int32# c[], /* I Correlations [order+1] */
215 opus_int32cxx . . $ opus_int32# order /* I Prediction order */
216 );
217
218 /* Step up function, converts reflection coefficients to prediction coefficients */
219 void silk_k2acxx . . $ silk_k2a(c8415042f66c3225).(
220 opus_int32cxx . . $ opus_int32# *A_Q24, /* O Prediction coefficients [order] Q24 */
221 const opus_int16cxx . . $ opus_int16# *rc_Q15, /* I Reflection coefficients [order] Q15 */
222 const opus_int32cxx . . $ opus_int32# order /* I Prediction order */
223 );
224
225 /* Step up function, converts reflection coefficients to prediction coefficients */
226 void silk_k2a_Q16cxx . . $ silk_k2a_Q16(2295dd52fa21b3fe).(
227 opus_int32cxx . . $ opus_int32# *A_Q24, /* O Prediction coefficients [order] Q24 */
228 const opus_int32cxx . . $ opus_int32# *rc_Q16, /* I Reflection coefficients [order] Q16 */
229 const opus_int32cxx . . $ opus_int32# order /* I Prediction order */
230 );
231
232 /* Apply sine window to signal vector. */
233 /* Window types: */
234 /* 1 -> sine window from 0 to pi/2 */
235 /* 2 -> sine window from pi/2 to pi */
236 /* every other sample of window is linearly interpolated, for speed */
237 void silk_apply_sine_windowcxx . . $ silk_apply_sine_window(f180bfede03221d3).(
238 opus_int16cxx . . $ opus_int16# px_win[], /* O Pointer to windowed signal */
239 const opus_int16cxx . . $ opus_int16# px[], /* I Pointer to input signal */
240 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! win_type, /* I Selects a window type */
241 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! length /* I Window length, multiple of 4 */
242 );
243
244 /* Compute autocorrelation */
245 void silk_autocorrcxx . . $ silk_autocorr(335a0fa097f831e7).(
246 opus_int32cxx . . $ opus_int32# *results, /* O Result (length correlationCount) */
247 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! *scale, /* O Scaling of the correlation vector */
248 const opus_int16cxx . . $ opus_int16# *inputData, /* I Input data to correlate */
249 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! inputDataSize, /* I Length of input */
250 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! correlationCount, /* I Number of correlation taps to compute */
251 int arch /* I Run-time architecture */
252 );
253
254 void silk_decode_pitchcxx . . $ silk_decode_pitch(bc12a53a8c24cb73).(
255 opus_int16cxx . . $ opus_int16# lagIndex, /* I */
256 opus_int8cxx . . $ opus_int8# contourIndex, /* O */
257 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! pitch_lags[], /* O 4 pitch values */
258 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! Fs_kHz, /* I sampling frequency (kHz) */
259 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! nb_subfr /* I number of sub frames */
260 );
261
262 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! silk_pitch_analysis_corecxx . . $ silk_pitch_analysis_core(1d727bf71a24028).( /* O Voicing estimate: 0 voiced, 1 unvoiced */
263 const opus_int16cxx . . $ opus_int16# *frame, /* I Signal of length PE_FRAME_LENGTH_MS*Fs_kHz */
264 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! *pitch_out, /* O 4 pitch lag values */
265 opus_int16cxx . . $ opus_int16# *lagIndex, /* O Lag Index */
266 opus_int8cxx . . $ opus_int8# *contourIndex, /* O Pitch contour Index */
267 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! *LTPCorr_Q15, /* I/O Normalized correlation; input: value from previous frame */
268 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! prevLag, /* I Last lag of previous frame; set to zero is unvoiced */
269 const opus_int32cxx . . $ opus_int32# search_thres1_Q16, /* I First stage threshold for lag candidates 0 - 1 */
270 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! search_thres2_Q13, /* I Final threshold for lag candidates 0 - 1 */
271 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! Fs_kHz, /* I Sample frequency (kHz) */
272 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! complexity, /* I Complexity setting, 0-2, where 2 is highest */
273 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! nb_subfr, /* I number of 5 ms subframes */
274 int arch /* I Run-time architecture */
275 );
276
277 /* Compute Normalized Line Spectral Frequencies (NLSFs) from whitening filter coefficients */
278 /* If not all roots are found, the a_Q16 coefficients are bandwidth expanded until convergence. */
279 void silk_A2NLSFcxx . . $ silk_A2NLSF(ea6cbb2e47d5e309).(
280 opus_int16cxx . . $ opus_int16# *NLSF, /* O Normalized Line Spectral Frequencies in Q15 (0..2^15-1) [d] */
281 opus_int32cxx . . $ opus_int32# *a_Q16, /* I/O Monic whitening filter coefficients in Q16 [d] */
282 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! d /* I Filter order (must be even) */
283 );
284
285 /* compute whitening filter coefficients from normalized line spectral frequencies */
286 void silk_NLSF2Acxx . . $ silk_NLSF2A(f180bfede03221d3).(
287 opus_int16cxx . . $ opus_int16# *a_Q12, /* O monic whitening filter coefficients in Q12, [ d ] */
288 const opus_int16cxx . . $ opus_int16# *NLSF, /* I normalized line spectral frequencies in Q15, [ d ] */
289 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! d, /* I filter order (should be even) */
290 int arch /* I Run-time architecture */
291 );
292
293 /* Convert int32 coefficients to int16 coefs and make sure there's no wrap-around */
294 void silk_LPC_fitcxx . . $ silk_LPC_fit(d95ad93ccae598da).(
295 opus_int16cxx . . $ opus_int16# *a_QOUT, /* O Output signal */
296 opus_int32cxx . . $ opus_int32# *a_QIN, /* I/O Input signal */
297 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! QOUT, /* I Input Q domain */
298 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! QIN, /* I Input Q domain */
299 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! d /* I Filter order */
300 );
301
302 void silk_insertion_sort_increasingcxx . . $ silk_insertion_sort_increasing(8cdf64d11601a064).(
303 opus_int32cxx . . $ opus_int32# *a, /* I/O Unsorted / Sorted vector */
304 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! *idx, /* O Index vector for the sorted elements */
305 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! L, /* I Vector length */
306 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! K /* I Number of correctly sorted positions */
307 );
308
309 void silk_insertion_sort_decreasing_int16cxx . . $ silk_insertion_sort_decreasing_int16(2760a9c65477ca31).(
310 opus_int16cxx . . $ opus_int16# *a, /* I/O Unsorted / Sorted vector */
311 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! *idx, /* O Index vector for the sorted elements */
312 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! L, /* I Vector length */
313 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! K /* I Number of correctly sorted positions */
314 );
315
316 void silk_insertion_sort_increasing_all_values_int16cxx . . $ silk_insertion_sort_increasing_all_values_int16(4683f455c3e046d4).(
317 opus_int16cxx . . $ opus_int16# *a, /* I/O Unsorted / Sorted vector */
318 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! L /* I Vector length */
319 );
320
321 /* NLSF stabilizer, for a single input data vector */
322 void silk_NLSF_stabilizecxx . . $ silk_NLSF_stabilize(5281e81bba0ae695).(
323 opus_int16cxx . . $ opus_int16# *NLSF_Q15, /* I/O Unstable/stabilized normalized LSF vector in Q15 [L] */
324 const opus_int16cxx . . $ opus_int16# *NDeltaMin_Q15, /* I Min distance vector, NDeltaMin_Q15[L] must be >= 1 [L+1] */
325 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! L /* I Number of NLSF parameters in the input vector */
326 );
327
328 /* Laroia low complexity NLSF weights */
329 void silk_NLSF_VQ_weights_laroiacxx . . $ silk_NLSF_VQ_weights_laroia(5281e81bba0ae695).(
330 opus_int16cxx . . $ opus_int16# *pNLSFW_Q_OUT, /* O Pointer to input vector weights [D] */
331 const opus_int16cxx . . $ opus_int16# *pNLSF_Q15, /* I Pointer to input vector [D] */
332 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! D /* I Input vector dimension (even) */
333 );
334
335 /* Compute reflection coefficients from input signal */
336 void silk_burg_modified_ccxx . . $ silk_burg_modified_c(b6a6e39dac010a93).(
337 opus_int32cxx . . $ opus_int32# *res_nrg, /* O Residual energy */
338 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! *res_nrg_Q, /* O Residual energy Q value */
339 opus_int32cxx . . $ opus_int32# A_Q16[], /* O Prediction coefficients (length order) */
340 const opus_int16cxx . . $ opus_int16# x[], /* I Input signal, length: nb_subfr * ( D + subfr_length ) */
341 const opus_int32cxx . . $ opus_int32# minInvGain_Q30, /* I Inverse of max prediction gain */
342 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! subfr_length, /* I Input signal subframe length (incl. D preceding samples) */
343 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! nb_subfr, /* I Number of subframes stacked in x */
344 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! D, /* I Order */
345 int arch /* I Run-time architecture */
346 );
347
348 /* Copy and multiply a vector by a constant */
349 void silk_scale_copy_vector16cxx . . $ silk_scale_copy_vector16(f180bfede03221d3).(
350 opus_int16cxx . . $ opus_int16# *data_out,
351 const opus_int16cxx . . $ opus_int16# *data_in,
352 opus_int32cxx . . $ opus_int32# gain_Q16, /* I Gain in Q16 */
353 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! dataSize /* I Length */
354 );
355
356 /* Some for the LTP related function requires Q26 to work.*/
357 void silk_scale_vector32_Q26_lshift_18cxx . . $ silk_scale_vector32_Q26_lshift_18(5f3888e91f92d472).(
358 opus_int32cxx . . $ opus_int32# *data1, /* I/O Q0/Q18 */
359 opus_int32cxx . . $ opus_int32# gain_Q26, /* I Q26 */
360 opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! dataSize /* I length */
361 );
362
363 /********************************************************************/
364 /* INLINE ARM MATH */
365 /********************************************************************/
366
367 /* return sum( inVec1[i] * inVec2[i] ) */
368
369 opus_int32cxx . . $ opus_int32# silk_inner_prod_alignedcxx . . $ silk_inner_prod_aligned(29e14252b8d2a269).(
370 const opus_int16cxx . . $ opus_int16# *const inVec1, /* I input vector 1 */
371 const opus_int16cxx . . $ opus_int16# *const inVec2, /* I input vector 2 */
372 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! len, /* I vector lengths */
373 int arch /* I Run-time architecture */
374 );
375
376
377 opus_int32cxx . . $ opus_int32# silk_inner_prod_aligned_scalecxx . . $ silk_inner_prod_aligned_scale(29e14252b8d2a269).(
378 const opus_int16cxx . . $ opus_int16# *const inVec1, /* I input vector 1 */
379 const opus_int16cxx . . $ opus_int16# *const inVec2, /* I input vector 2 */
380 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! scale, /* I number of bits to shift */
381 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! len /* I vector lengths */
382 );
383
384 opus_int64cxx . . $ opus_int64# silk_inner_prod16_aligned_64_ccxx . . $ silk_inner_prod16_aligned_64_c(1d35a4ecf565f3d8).(
385 const opus_int16cxx . . $ opus_int16# *inVec1, /* I input vector 1 */
386 const opus_int16cxx . . $ opus_int16# *inVec2, /* I input vector 2 */
387 const opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! len /* I vector lengths */
388 );
389
390 /********************************************************************/
391 /* MACROS */
392 /********************************************************************/
393
394 /* Rotate a32 right by 'rot' bits. Negative rot values result in rotating
395 left. Output is 32bit int.
396 Note: contemporary compilers recognize the C expression below and
397 compile it into a 'ror' instruction if available. No need for OPUS_INLINE ASM! */
398 static OPUS_INLINEcxx . . $ `external/opusfile/opus/opus_defines.h:110:10`! opus_int32cxx . . $ opus_int32# silk_ROR32cxx . . $ silk_ROR32(9b79fb6aee4c0440).( opus_int32cxx . . $ opus_int32# a32, opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! rot )
399 {
400 opus_uint32cxx . . $ opus_uint32# x = (opus_uint32cxx . . $ opus_uint32#) a32;
401 opus_uint32cxx . . $ opus_uint32# r = (opus_uint32cxx . . $ opus_uint32#) rot;
402 opus_uint32cxx . . $ opus_uint32# m = (opus_uint32cxx . . $ opus_uint32#) -rot;
403 if( rot == 0 ) {
404 return a32;
405 } else if( rot < 0 ) {
406 return (opus_int32cxx . . $ opus_int32#) ((x << m) | (x >> (32 - m)));
407 } else {
408 return (opus_int32cxx . . $ opus_int32#) ((x << (32 - r)) | (x >> r));
409 }
410 }
411
412 /* Allocate opus_int16 aligned to 4-byte memory address */
413 #if EMBEDDED_ARM
414 #define silk_DWORD_ALIGN __attribute__((aligned(4)))
415 #else
416 #define silk_DWORD_ALIGNcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:416:9`!
417 #endif
418
419 /* Useful Macros that can be adjusted to other platforms */
420 #define silk_memcpycxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:420:9`!(dest, src, size) memcpy((dest), (src), (size))
421 #define silk_memsetcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:421:9`!(dest, src, size) memset((dest), (src), (size))
422 #define silk_memmovecxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:422:9`!(dest, src, size) memmove((dest), (src), (size))
423
424 /* Fixed point macros */
425
426 /* (a32 * b32) output have to be 32bit int */
427 #define silk_MULcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:427:9`!(a32, b32) ((a32) * (b32))
428
429 /* (a32 * b32) output have to be 32bit uint */
430 #define silk_MUL_uintcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:430:9`!(a32, b32) silk_MUL(a32, b32)
431
432 /* a32 + (b32 * c32) output have to be 32bit int */
433 #define silk_MLAcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:433:9`!(a32, b32, c32) silk_ADD32((a32),((b32) * (c32)))
434
435 /* a32 + (b32 * c32) output have to be 32bit uint */
436 #define silk_MLA_uintcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:436:9`!(a32, b32, c32) silk_MLA(a32, b32, c32)
437
438 /* ((a32 >> 16) * (b32 >> 16)) output have to be 32bit int */
439 #define silk_SMULTTcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:439:9`!(a32, b32) (((a32) >> 16) * ((b32) >> 16))
440
441 /* a32 + ((a32 >> 16) * (b32 >> 16)) output have to be 32bit int */
442 #define silk_SMLATTcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:442:9`!(a32, b32, c32) silk_ADD32((a32),((b32) >> 16) * ((c32) >> 16))
443
444 #define silk_SMLALBBcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:444:9`!(a64, b16, c16) silk_ADD64((a64),(opus_int64)((opus_int32)(b16) * (opus_int32)(c16)))
445
446 /* (a32 * b32) */
447 #define silk_SMULLcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:447:9`!(a32, b32) ((opus_int64)(a32) * /*(opus_int64)*/(b32))
448
449 /* Adds two signed 32-bit values in a way that can overflow, while not relying on undefined behaviour
450 (just standard two's complement implementation-specific behaviour) */
451 #define silk_ADD32_ovflwcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:451:9`!(a, b) ((opus_int32)((opus_uint32)(a) + (opus_uint32)(b)))
452 /* Subtractss two signed 32-bit values in a way that can overflow, while not relying on undefined behaviour
453 (just standard two's complement implementation-specific behaviour) */
454 #define silk_SUB32_ovflwcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:454:9`!(a, b) ((opus_int32)((opus_uint32)(a) - (opus_uint32)(b)))
455
456 /* Multiply-accumulate macros that allow overflow in the addition (ie, no asserts in debug mode) */
457 #define silk_MLA_ovflwcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:457:9`!(a32, b32, c32) silk_ADD32_ovflw((a32), (opus_uint32)(b32) * (opus_uint32)(c32))
458 #define silk_SMLABB_ovflwcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:458:9`!(a32, b32, c32) (silk_ADD32_ovflw((a32) , ((opus_int32)((opus_int16)(b32))) * (opus_int32)((opus_int16)(c32))))
459
460 #define silk_DIV32_16cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:460:9`!(a32, b16) ((opus_int32)((a32) / (b16)))
461 #define silk_DIV32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:461:9`!(a32, b32) ((opus_int32)((a32) / (b32)))
462
463 /* These macros enables checking for overflow in silk_API_Debug.h*/
464 #define silk_ADD16cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:464:9`!(a, b) ((a) + (b))
465 #define silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!(a, b) ((a) + (b))
466 #define silk_ADD64cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:466:9`!(a, b) ((a) + (b))
467
468 #define silk_SUB16cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:468:9`!(a, b) ((a) - (b))
469 #define silk_SUB32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:469:9`!(a, b) ((a) - (b))
470 #define silk_SUB64cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:470:9`!(a, b) ((a) - (b))
471
472 #define silk_SAT8cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:472:9`!(a) ((a) > silk_int8_MAX ? silk_int8_MAX : \
473 ((a) < silk_int8_MIN ? silk_int8_MIN : (a)))
474 #define silk_SAT16cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:474:9`!(a) ((a) > silk_int16_MAXcxx . . $ `external/opusfile/opus/silk/typedef.h:44:9`! ? silk_int16_MAXcxx . . $ `external/opusfile/opus/silk/typedef.h:44:9`! : \
475 ((a) < silk_int16_MINcxx . . $ `external/opusfile/opus/silk/typedef.h:45:9`! ? silk_int16_MINcxx . . $ `external/opusfile/opus/silk/typedef.h:45:9`! : (a)))
476 #define silk_SAT32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:476:9`!(a) ((a) > silk_int32_MAX ? silk_int32_MAX : \
477 ((a) < silk_int32_MIN ? silk_int32_MIN : (a)))
478
479 #define silk_CHECK_FIT8cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:479:9`!(a) (a)
480 #define silk_CHECK_FIT16cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:480:9`!(a) (a)
481 #define silk_CHECK_FIT32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:481:9`!(a) (a)
482
483 #define silk_ADD_SAT16cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:483:9`!(a, b) (opus_int16)silk_SAT16( silk_ADD32( (opus_int32)(a), (b) ) )
484 #define silk_ADD_SAT64cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:484:9`!(a, b) ((((a) + (b)) & 0x8000000000000000LL) == 0 ? \
485 ((((a) & (b)) & 0x8000000000000000LL) != 0 ? silk_int64_MIN : (a)+(b)) : \
486 ((((a) | (b)) & 0x8000000000000000LL) == 0 ? silk_int64_MAX : (a)+(b)) )
487
488 #define silk_SUB_SAT16cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:488:9`!(a, b) (opus_int16)silk_SAT16( silk_SUB32( (opus_int32)(a), (b) ) )
489 #define silk_SUB_SAT64cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:489:9`!(a, b) ((((a)-(b)) & 0x8000000000000000LL) == 0 ? \
490 (( (a) & ((b)^0x8000000000000000LL) & 0x8000000000000000LL) ? silk_int64_MIN : (a)-(b)) : \
491 ((((a)^0x8000000000000000LL) & (b) & 0x8000000000000000LL) ? silk_int64_MAX : (a)-(b)) )
492
493 /* Saturation for positive input values */
494 #define silk_POS_SAT32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:494:9`!(a) ((a) > silk_int32_MAX ? silk_int32_MAX : (a))
495
496 /* Add with saturation for positive input values */
497 #define silk_ADD_POS_SAT8cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:497:9`!(a, b) ((((a)+(b)) & 0x80) ? silk_int8_MAX : ((a)+(b)))
498 #define silk_ADD_POS_SAT16cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:498:9`!(a, b) ((((a)+(b)) & 0x8000) ? silk_int16_MAX : ((a)+(b)))
499 #define silk_ADD_POS_SAT32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:499:9`!(a, b) ((((opus_uint32)(a)+(opus_uint32)(b)) & 0x80000000) ? silk_int32_MAX : ((a)+(b)))
500
501 #define silk_LSHIFT8cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:501:9`!(a, shift) ((opus_int8)((opus_uint8)(a)<<(shift))) /* shift >= 0, shift < 8 */
502 #define silk_LSHIFT16cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:502:9`!(a, shift) ((opus_int16)((opus_uint16)(a)<<(shift))) /* shift >= 0, shift < 16 */
503 #define silk_LSHIFT32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:503:9`!(a, shift) ((opus_int32)((opus_uint32)(a)<<(shift))) /* shift >= 0, shift < 32 */
504 #define silk_LSHIFT64cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:504:9`!(a, shift) ((opus_int64)((opus_uint64)(a)<<(shift))) /* shift >= 0, shift < 64 */
505 #define silk_LSHIFTcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:505:9`!(a, shift) silk_LSHIFT32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:503:9`!(a, shift) /* shift >= 0, shift < 32 */
506
507 #define silk_RSHIFT8cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:507:9`!(a, shift) ((a)>>(shift)) /* shift >= 0, shift < 8 */
508 #define silk_RSHIFT16cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:508:9`!(a, shift) ((a)>>(shift)) /* shift >= 0, shift < 16 */
509 #define silk_RSHIFT32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:509:9`!(a, shift) ((a)>>(shift)) /* shift >= 0, shift < 32 */
510 #define silk_RSHIFT64cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:510:9`!(a, shift) ((a)>>(shift)) /* shift >= 0, shift < 64 */
511 #define silk_RSHIFTcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:511:9`!(a, shift) silk_RSHIFT32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:509:9`!(a, shift) /* shift >= 0, shift < 32 */
512
513 /* saturates before shifting */
514 #define silk_LSHIFT_SAT32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:514:9`!(a, shift) (silk_LSHIFT32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:503:9`!( silk_LIMITcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:581:9`!( (a), silk_RSHIFT32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:509:9`!( silk_int32_MINcxx . . $ `external/opusfile/opus/silk/typedef.h:43:9`!, (shift) ), \
515 silk_RSHIFT32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:509:9`!( silk_int32_MAXcxx . . $ `external/opusfile/opus/silk/typedef.h:42:9`!, (shift) ) ), (shift) ))
516
517 #define silk_LSHIFT_ovflwcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:517:9`!(a, shift) ((opus_int32)((opus_uint32)(a) << (shift))) /* shift >= 0, allowed to overflow */
518 #define silk_LSHIFT_uintcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:518:9`!(a, shift) ((a) << (shift)) /* shift >= 0 */
519 #define silk_RSHIFT_uintcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:519:9`!(a, shift) ((a) >> (shift)) /* shift >= 0 */
520
521 #define silk_ADD_LSHIFTcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:521:9`!(a, b, shift) ((a) + silk_LSHIFT((b), (shift))) /* shift >= 0 */
522 #define silk_ADD_LSHIFT32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:522:9`!(a, b, shift) silk_ADD32((a), silk_LSHIFT32((b), (shift))) /* shift >= 0 */
523 #define silk_ADD_LSHIFT_uintcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:523:9`!(a, b, shift) ((a) + silk_LSHIFT_uint((b), (shift))) /* shift >= 0 */
524 #define silk_ADD_RSHIFTcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:524:9`!(a, b, shift) ((a) + silk_RSHIFT((b), (shift))) /* shift >= 0 */
525 #define silk_ADD_RSHIFT32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:525:9`!(a, b, shift) silk_ADD32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:465:9`!((a), silk_RSHIFT32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:509:9`!((b), (shift))) /* shift >= 0 */
526 #define silk_ADD_RSHIFT_uintcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:526:9`!(a, b, shift) ((a) + silk_RSHIFT_uint((b), (shift))) /* shift >= 0 */
527 #define silk_SUB_LSHIFT32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:527:9`!(a, b, shift) silk_SUB32((a), silk_LSHIFT32((b), (shift))) /* shift >= 0 */
528 #define silk_SUB_RSHIFT32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:528:9`!(a, b, shift) silk_SUB32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:469:9`!((a), silk_RSHIFT32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:509:9`!((b), (shift))) /* shift >= 0 */
529
530 /* Requires that shift > 0 */
531 #define silk_RSHIFT_ROUNDcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:531:9`!(a, shift) ((shift) == 1 ? ((a) >> 1) + ((a) & 1) : (((a) >> ((shift) - 1)) + 1) >> 1)
532 #define silk_RSHIFT_ROUND64cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:532:9`!(a, shift) ((shift) == 1 ? ((a) >> 1) + ((a) & 1) : (((a) >> ((shift) - 1)) + 1) >> 1)
533
534 /* Number of rightshift required to fit the multiplication */
535 #define silk_NSHIFT_MUL_32_32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:535:9`!(a, b) ( -(31- (32-silk_CLZ32(silk_abs(a)) + (32-silk_CLZ32(silk_abs(b))))) )
536 #define silk_NSHIFT_MUL_16_16cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:536:9`!(a, b) ( -(15- (16-silk_CLZ16(silk_abs(a)) + (16-silk_CLZ16(silk_abs(b))))) )
537
538
539 #define silk_mincxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:539:9`!(a, b) (((a) < (b)) ? (a) : (b))
540 #define silk_maxcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:540:9`!(a, b) (((a) > (b)) ? (a) : (b))
541
542 /* Macro to convert floating-point constants to fixed-point */
543 #define SILK_FIX_CONSTcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:543:9`!( C, Q ) ((opus_int32)((C) * ((opus_int64)1 << (Q)) + 0.5))
544
545 /* silk_min() versions with typecast in the function call */
546 static OPUS_INLINEcxx . . $ `external/opusfile/opus/opus_defines.h:110:10`! opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! silk_min_intcxx . . $ silk_min_int(9b79fb6aee4c0440).(opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! a, opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! b)
547 {
548 return (((a) < (b)) ? (a) : (b));
549 }
550 static OPUS_INLINEcxx . . $ `external/opusfile/opus/opus_defines.h:110:10`! opus_int16cxx . . $ opus_int16# silk_min_16cxx . . $ silk_min_16(3e795a2f2b52fe81).(opus_int16cxx . . $ opus_int16# a, opus_int16cxx . . $ opus_int16# b)
551 {
552 return (((a) < (b)) ? (a) : (b));
553 }
554 static OPUS_INLINEcxx . . $ `external/opusfile/opus/opus_defines.h:110:10`! opus_int32cxx . . $ opus_int32# silk_min_32cxx . . $ silk_min_32(9b79fb6aee4c0440).(opus_int32cxx . . $ opus_int32# a, opus_int32cxx . . $ opus_int32# b)
555 {
556 return (((a) < (b)) ? (a) : (b));
557 }
558 static OPUS_INLINEcxx . . $ `external/opusfile/opus/opus_defines.h:110:10`! opus_int64cxx . . $ opus_int64# silk_min_64cxx . . $ silk_min_64(d0a0e4c270da0eca).(opus_int64cxx . . $ opus_int64# a, opus_int64cxx . . $ opus_int64# b)
559 {
560 return (((a) < (b)) ? (a) : (b));
561 }
562
563 /* silk_min() versions with typecast in the function call */
564 static OPUS_INLINEcxx . . $ `external/opusfile/opus/opus_defines.h:110:10`! opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! silk_max_intcxx . . $ silk_max_int(9b79fb6aee4c0440).(opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! a, opus_intcxx . . $ `external/opusfile/opus/opus_types.h:36:9`! b)
565 {
566 return (((a) > (b)) ? (a) : (b));
567 }
568 static OPUS_INLINEcxx . . $ `external/opusfile/opus/opus_defines.h:110:10`! opus_int16cxx . . $ opus_int16# silk_max_16cxx . . $ silk_max_16(3e795a2f2b52fe81).(opus_int16cxx . . $ opus_int16# a, opus_int16cxx . . $ opus_int16# b)
569 {
570 return (((a) > (b)) ? (a) : (b));
571 }
572 static OPUS_INLINEcxx . . $ `external/opusfile/opus/opus_defines.h:110:10`! opus_int32cxx . . $ opus_int32# silk_max_32cxx . . $ silk_max_32(9b79fb6aee4c0440).(opus_int32cxx . . $ opus_int32# a, opus_int32cxx . . $ opus_int32# b)
573 {
574 return (((a) > (b)) ? (a) : (b));
575 }
576 static OPUS_INLINEcxx . . $ `external/opusfile/opus/opus_defines.h:110:10`! opus_int64cxx . . $ opus_int64# silk_max_64cxx . . $ silk_max_64(d0a0e4c270da0eca).(opus_int64cxx . . $ opus_int64# a, opus_int64cxx . . $ opus_int64# b)
577 {
578 return (((a) > (b)) ? (a) : (b));
579 }
580
581 #define silk_LIMITcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:581:9`!( a, limit1, limit2) ((limit1) > (limit2) ? ((a) > (limit1) ? (limit1) : ((a) < (limit2) ? (limit2) : (a))) \
582 : ((a) > (limit2) ? (limit2) : ((a) < (limit1) ? (limit1) : (a))))
583
584 #define silk_LIMIT_intcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:584:9`! silk_LIMIT
585 #define silk_LIMIT_16cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:585:9`! silk_LIMIT
586 #define silk_LIMIT_32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:586:9`! silk_LIMIT
587
588 #define silk_abscxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:588:9`!(a) (((a) > 0) ? (a) : -(a)) /* Be careful, silk_abs returns wrong when input equals to silk_intXX_MIN */
589 #define silk_abs_intcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:589:9`!(a) (((a) ^ ((a) >> (8 * sizeof(a) - 1))) - ((a) >> (8 * sizeof(a) - 1)))
590 #define silk_abs_int32cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:590:9`!(a) (((a) ^ ((a) >> 31)) - ((a) >> 31))
591 #define silk_abs_int64cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:591:9`!(a) (((a) > 0) ? (a) : -(a))
592
593 #define silk_signcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:593:9`!(a) ((a) > 0 ? 1 : ( (a) < 0 ? -1 : 0 ))
594
595 /* PSEUDO-RANDOM GENERATOR */
596 /* Make sure to store the result as the seed for the next call (also in between */
597 /* frames), otherwise result won't be random at all. When only using some of the */
598 /* bits, take the most significant bits by right-shifting. */
599 #define RAND_MULTIPLIERcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:599:9`! 196314165
600 #define RAND_INCREMENTcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:600:9`! 907633515
601 #define silk_RANDcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:601:9`!(seed) (silk_MLA_ovflw((RAND_INCREMENT), (seed), (RAND_MULTIPLIER)))
602
603 /* Add some multiplication functions that can be easily mapped to ARM. */
604
605 /* silk_SMMUL: Signed top word multiply.
606 ARMv6 2 instruction cycles.
607 ARMv3M+ 3 instruction cycles. use SMULL and ignore LSB registers.(except xM)*/
608 /*#define silk_SMMUL(a32, b32) (opus_int32)silk_RSHIFT(silk_SMLAL(silk_SMULWB((a32), (b32)), (a32), silk_RSHIFT_ROUND((b32), 16)), 16)*/
609 /* the following seems faster on x86 */
610 #define silk_SMMULcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:610:9`!(a32, b32) (opus_int32)silk_RSHIFT64cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:510:9`!(silk_SMULLcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:447:9`!((a32), (b32)), 32)
611
612 #if !defined(OPUS_X86_MAY_HAVE_SSE4_1)
613 #define silk_burg_modifiedcxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:613:9`!(res_nrg, res_nrg_Q, A_Q16, x, minInvGain_Q30, subfr_length, nb_subfr, D, arch) \
614 ((void)(arch), silk_burg_modified_c(res_nrg, res_nrg_Q, A_Q16, x, minInvGain_Q30, subfr_length, nb_subfr, D, arch))
615
616 #define silk_inner_prod16_aligned_64cxx . . $ `external/opusfile/opus/silk/SigProc_FIX.h:616:9`!(inVec1, inVec2, len, arch) \
617 ((void)(arch),silk_inner_prod16_aligned_64_c(inVec1, inVec2, len))
618 #endif
619
620 #include "Inlines.h"cxx . . $ `<file>/external/opusfile/opus/silk/Inlines.h`/
621 #include "MacroCount.h"cxx . . $ `<file>/external/opusfile/opus/silk/MacroCount.h`/
622 #include "MacroDebug.h"cxx . . $ `<file>/external/opusfile/opus/silk/MacroDebug.h`/
623
624 #ifdef OPUS_ARM_INLINE_ASM
625 #include "arm/SigProc_FIX_armv4.h"
626 #endif
627
628 #ifdef OPUS_ARM_INLINE_EDSP
629 #include "arm/SigProc_FIX_armv5e.h"
630 #endif
631
632 #if defined(MIPSr1_ASM)
633 #include "mips/sigproc_fix_mipsr1.h"
634 #endif
635
636
637 #ifdef __cplusplus
638 }
639 #endif
640
641 #endif /* SILK_SIGPROC_FIX_H */