Debian Codegraph @

external/opusfile/opus/celt/bands.h

raw symbols SCIP
1 /* Copyright (c) 2007-2008 CSIRO
2 Copyright (c) 2007-2009 Xiph.Org Foundation
3 Copyright (c) 2008-2009 Gregory Maxwell
4 Written by Jean-Marc Valin and Gregory Maxwell */
5 /*
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions
8 are met:
9
10 - Redistributions of source code must retain the above copyright
11 notice, this list of conditions and the following disclaimer.
12
13 - Redistributions in binary form must reproduce the above copyright
14 notice, this list of conditions and the following disclaimer in the
15 documentation and/or other materials provided with the distribution.
16
17 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
21 OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30 #ifndef BANDS_H
31 #define BANDS_Hcxx . . $ `external/opusfile/opus/celt/bands.h:31:9`!
32
33 #include "arch.h"cxx . . $ `<file>/external/opusfile/opus/celt/arch.h`/
34 #include "modes.h"cxx . . $ `<file>/external/opusfile/opus/celt/modes.h`/
35 #include "entenc.h"cxx . . $ `<file>/external/opusfile/opus/celt/entenc.h`/
36 #include "entdec.h"cxx . . $ `<file>/external/opusfile/opus/celt/entdec.h`/
37 #include "rate.h"cxx . . $ `<file>/external/opusfile/opus/celt/rate.h`/
38
39 opus_int16cxx . . $ opus_int16# bitexact_coscxx . . $ bitexact_cos(14a1761c3ef4450f).(opus_int16cxx . . $ opus_int16# x);
40 int bitexact_log2tancxx . . $ bitexact_log2tan(9b79fb6aee4c0440).(int isin,int icos);
41
42 /** Compute the amplitude (sqrt energy) in each of the bands
43 * @param m Mode data
44 * @param X Spectrum
45 * @param bandE Square root of the energy for each band (returned)
46 */
47 void compute_band_energiescxx . . $ compute_band_energies(56e9f7251a30f45e).(const CELTModecxx . . $ OpusCustomMode# *m, const celt_sigcxx . . $ celt_sig# *X, celt_enercxx . . $ celt_ener# *bandE, int end, int C, int LM, int arch);
48
49 /*void compute_noise_energies(const CELTMode *m, const celt_sig *X, const opus_val16 *tonality, celt_ener *bandE);*/
50
51 /** Normalise each band of X such that the energy in each band is
52 equal to 1
53 * @param m Mode data
54 * @param X Spectrum (returned normalised)
55 * @param bandE Square root of the energy for each band
56 */
57 void normalise_bandscxx . . $ normalise_bands(6033f0e734b1716).(const CELTModecxx . . $ OpusCustomMode# *m, const celt_sigcxx . . $ celt_sig# * OPUS_RESTRICTcxx . . $ `external/opusfile/opus/opus_defines.h:98:10`! freq, celt_normcxx . . $ celt_norm# * OPUS_RESTRICTcxx . . $ `external/opusfile/opus/opus_defines.h:98:10`! X, const celt_enercxx . . $ celt_ener# *bandE, int end, int C, int M);
58
59 /** Denormalise each band of X to restore full amplitude
60 * @param m Mode data
61 * @param X Spectrum (returned de-normalised)
62 * @param bandE Square root of the energy for each band
63 */
64 void denormalise_bandscxx . . $ denormalise_bands(643eeed255753992).(const CELTModecxx . . $ `external/opusfile/opus/celt/celt.h:51:9`! *m, const celt_normcxx . . $ celt_norm# * OPUS_RESTRICTcxx . . $ `external/opusfile/opus/opus_defines.h:98:10`! X,
65 celt_sigcxx . . $ celt_sig# * OPUS_RESTRICTcxx . . $ `external/opusfile/opus/opus_defines.h:98:10`! freq, const opus_val16cxx . . $ opus_val16# *bandE, int start,
66 int end, int M, int downsample, int silence);
67
68 #define SPREAD_NONEcxx . . $ `external/opusfile/opus/celt/bands.h:68:9`! (0)
69 #define SPREAD_LIGHTcxx . . $ `external/opusfile/opus/celt/bands.h:69:9`! (1)
70 #define SPREAD_NORMALcxx . . $ `external/opusfile/opus/celt/bands.h:70:9`! (2)
71 #define SPREAD_AGGRESSIVEcxx . . $ `external/opusfile/opus/celt/bands.h:71:9`! (3)
72
73 int spreading_decisioncxx . . $ spreading_decision(eec12c9f7accf33c).(const CELTModecxx . . $ `external/opusfile/opus/celt/celt.h:51:9`! *m, const celt_normcxx . . $ celt_norm# *X, int *average,
74 int last_decision, int *hf_average, int *tapset_decision, int update_hf,
75 int end, int C, int M, const int *spread_weight);
76
77 #ifdef MEASURE_NORM_MSE
78 void measure_norm_mse(const CELTMode *m, float *X, float *X0, float *bandE, float *bandE0, int M, int N, int C);
79 #endif
80
81 void haar1cxx . . $ haar1(daeeb6b413899da0).(celt_normcxx . . $ celt_norm# *X, int N0, int stride);
82
83 /** Quantisation/encoding of the residual spectrum
84 * @param encode flag that indicates whether we're encoding (1) or decoding (0)
85 * @param m Mode data
86 * @param start First band to process
87 * @param end Last band to process + 1
88 * @param X Residual (normalised)
89 * @param Y Residual (normalised) for second channel (or NULL for mono)
90 * @param collapse_masks Anti-collapse tracking mask
91 * @param bandE Square root of the energy for each band
92 * @param pulses Bit allocation (per band) for PVQ
93 * @param shortBlocks Zero for long blocks, non-zero for short blocks
94 * @param spread Amount of spreading to use
95 * @param dual_stereo Zero for MS stereo, non-zero for dual stereo
96 * @param intensity First band to use intensity stereo
97 * @param tf_res Time-frequency resolution change
98 * @param total_bits Total number of bits that can be used for the frame (including the ones already spent)
99 * @param balance Number of unallocated bits
100 * @param en Entropy coder state
101 * @param LM log2() of the number of 2.5 subframes in the frame
102 * @param codedBands Last band to receive bits + 1
103 * @param seed Random generator seed
104 * @param arch Run-time architecture (see opus_select_arch())
105 */
106 void quant_all_bandscxx . . $ quant_all_bands(d2a71e937cf303f9).(int encode, const CELTModecxx . . $ `external/opusfile/opus/celt/celt.h:51:9`! *m, int start, int end,
107 celt_normcxx . . $ celt_norm# * X, celt_normcxx . . $ celt_norm# * Y, unsigned char *collapse_masks,
108 const celt_enercxx . . $ celt_ener# *bandE, int *pulses, int shortBlocks, int spread,
109 int dual_stereo, int intensity, int *tf_res, opus_int32cxx . . $ opus_int32# total_bits,
110 opus_int32cxx . . $ opus_int32# balance, ec_ctxcxx . . $ ec_ctx# *ec, int M, int codedBands, opus_uint32cxx . . $ opus_uint32# *seed,
111 int complexity, int arch, int disable_inv);
112
113 void anti_collapsecxx . . $ anti_collapse(1cab749567f0d763).(const CELTModecxx . . $ OpusCustomMode# *m, celt_normcxx . . $ celt_norm# *X_,
114 unsigned char *collapse_masks, int LM, int C, int size, int start,
115 int end, const opus_val16cxx . . $ opus_val16# *logE, const opus_val16cxx . . $ opus_val16# *prev1logE,
116 const opus_val16cxx . . $ opus_val16# *prev2logE, const int *pulses, opus_uint32cxx . . $ opus_uint32# seed,
117 int arch);
118
119 opus_uint32cxx . . $ opus_uint32# celt_lcg_randcxx . . $ celt_lcg_rand(2141b656ce2cc063).(opus_uint32cxx . . $ opus_uint32# seed);
120
121 int hysteresis_decisioncxx . . $ hysteresis_decision(afac55c000e37c40).(opus_val16cxx . . $ opus_val16# val, const opus_val16cxx . . $ opus_val16# *thresholds, const opus_val16cxx . . $ opus_val16# *hysteresis, int N, int prev);
122
123 #endif /* BANDS_H */