diff options
author | William Wilgus <me.theuser@yahoo.com> | 2019-01-04 02:01:18 -0600 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-04-23 14:23:04 +0000 |
commit | 14c6bb798d6bebc80f07e863236adbaf8d156a9c (patch) | |
tree | 551a4b641906c2626af844fa3239c1b2b1ff0ad3 /lib/rbcodec/codecs/libopus/celt/bands.h | |
parent | 75d93937965ec4df70d37df6d4feea04577c996b (diff) | |
download | rockbox-14c6bb798d6bebc80f07e863236adbaf8d156a9c.tar.gz rockbox-14c6bb798d6bebc80f07e863236adbaf8d156a9c.zip |
Sync opus codec to upstream git
Change-Id: I0cfcc0005c4ad7bfbb1aaf454188ce70fb043dc1
Diffstat (limited to 'lib/rbcodec/codecs/libopus/celt/bands.h')
-rw-r--r-- | lib/rbcodec/codecs/libopus/celt/bands.h | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/lib/rbcodec/codecs/libopus/celt/bands.h b/lib/rbcodec/codecs/libopus/celt/bands.h index 69901b1e33..422b32cf75 100644 --- a/lib/rbcodec/codecs/libopus/celt/bands.h +++ b/lib/rbcodec/codecs/libopus/celt/bands.h | |||
@@ -36,12 +36,15 @@ | |||
36 | #include "entdec.h" | 36 | #include "entdec.h" |
37 | #include "rate.h" | 37 | #include "rate.h" |
38 | 38 | ||
39 | opus_int16 bitexact_cos(opus_int16 x); | ||
40 | int bitexact_log2tan(int isin,int icos); | ||
41 | |||
39 | /** Compute the amplitude (sqrt energy) in each of the bands | 42 | /** Compute the amplitude (sqrt energy) in each of the bands |
40 | * @param m Mode data | 43 | * @param m Mode data |
41 | * @param X Spectrum | 44 | * @param X Spectrum |
42 | * @param bandE Square root of the energy for each band (returned) | 45 | * @param bandE Square root of the energy for each band (returned) |
43 | */ | 46 | */ |
44 | void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bandE, int end, int C, int LM); | 47 | void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bandE, int end, int C, int LM, int arch); |
45 | 48 | ||
46 | /*void compute_noise_energies(const CELTMode *m, const celt_sig *X, const opus_val16 *tonality, celt_ener *bandE);*/ | 49 | /*void compute_noise_energies(const CELTMode *m, const celt_sig *X, const opus_val16 *tonality, celt_ener *bandE);*/ |
47 | 50 | ||
@@ -69,7 +72,7 @@ void denormalise_bands(const CELTMode *m, const celt_norm * OPUS_RESTRICT X, | |||
69 | 72 | ||
70 | int spreading_decision(const CELTMode *m, const celt_norm *X, int *average, | 73 | int spreading_decision(const CELTMode *m, const celt_norm *X, int *average, |
71 | int last_decision, int *hf_average, int *tapset_decision, int update_hf, | 74 | int last_decision, int *hf_average, int *tapset_decision, int update_hf, |
72 | int end, int C, int M); | 75 | int end, int C, int M, const int *spread_weight); |
73 | 76 | ||
74 | #ifdef MEASURE_NORM_MSE | 77 | #ifdef MEASURE_NORM_MSE |
75 | void measure_norm_mse(const CELTMode *m, float *X, float *X0, float *bandE, float *bandE0, int M, int N, int C); | 78 | void measure_norm_mse(const CELTMode *m, float *X, float *X0, float *bandE, float *bandE0, int M, int N, int C); |
@@ -98,15 +101,20 @@ void haar1(celt_norm *X, int N0, int stride); | |||
98 | * @param LM log2() of the number of 2.5 subframes in the frame | 101 | * @param LM log2() of the number of 2.5 subframes in the frame |
99 | * @param codedBands Last band to receive bits + 1 | 102 | * @param codedBands Last band to receive bits + 1 |
100 | * @param seed Random generator seed | 103 | * @param seed Random generator seed |
104 | * @param arch Run-time architecture (see opus_select_arch()) | ||
101 | */ | 105 | */ |
102 | void quant_all_bands(int encode, const CELTMode *m, int start, int end, | 106 | void quant_all_bands(int encode, const CELTMode *m, int start, int end, |
103 | celt_norm * X, celt_norm * Y, unsigned char *collapse_masks, const celt_ener *bandE, int *pulses, | 107 | celt_norm * X, celt_norm * Y, unsigned char *collapse_masks, |
104 | int shortBlocks, int spread, int dual_stereo, int intensity, int *tf_res, | 108 | const celt_ener *bandE, int *pulses, int shortBlocks, int spread, |
105 | opus_int32 total_bits, opus_int32 balance, ec_ctx *ec, int M, int codedBands, opus_uint32 *seed); | 109 | int dual_stereo, int intensity, int *tf_res, opus_int32 total_bits, |
106 | 110 | opus_int32 balance, ec_ctx *ec, int M, int codedBands, opus_uint32 *seed, | |
107 | void anti_collapse(const CELTMode *m, celt_norm *X_, unsigned char *collapse_masks, int LM, int C, int size, | 111 | int complexity, int arch, int disable_inv); |
108 | int start, int end, const opus_val16 *logE, const opus_val16 *prev1logE, | 112 | |
109 | const opus_val16 *prev2logE, const int *pulses, opus_uint32 seed); | 113 | void anti_collapse(const CELTMode *m, celt_norm *X_, |
114 | unsigned char *collapse_masks, int LM, int C, int size, int start, | ||
115 | int end, const opus_val16 *logE, const opus_val16 *prev1logE, | ||
116 | const opus_val16 *prev2logE, const int *pulses, opus_uint32 seed, | ||
117 | int arch); | ||
110 | 118 | ||
111 | opus_uint32 celt_lcg_rand(opus_uint32 seed); | 119 | opus_uint32 celt_lcg_rand(opus_uint32 seed); |
112 | 120 | ||