Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1047)

Side by Side Diff: third_party/opus/src/celt/bands.h

Issue 2962373002: [Opus] Update to v1.2.1 (Closed)
Patch Set: Pre-increment instead of post-increment Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/opus/src/celt/arm/pitch_neon_intr.c ('k') | third_party/opus/src/celt/bands.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2007-2008 CSIRO 1 /* Copyright (c) 2007-2008 CSIRO
2 Copyright (c) 2007-2009 Xiph.Org Foundation 2 Copyright (c) 2007-2009 Xiph.Org Foundation
3 Copyright (c) 2008-2009 Gregory Maxwell 3 Copyright (c) 2008-2009 Gregory Maxwell
4 Written by Jean-Marc Valin and Gregory Maxwell */ 4 Written by Jean-Marc Valin and Gregory Maxwell */
5 /* 5 /*
6 Redistribution and use in source and binary forms, with or without 6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions 7 modification, are permitted provided that the following conditions
8 are met: 8 are met:
9 9
10 - Redistributions of source code must retain the above copyright 10 - Redistributions of source code must retain the above copyright
(...skipping 18 matching lines...) Expand all
29 29
30 #ifndef BANDS_H 30 #ifndef BANDS_H
31 #define BANDS_H 31 #define BANDS_H
32 32
33 #include "arch.h" 33 #include "arch.h"
34 #include "modes.h" 34 #include "modes.h"
35 #include "entenc.h" 35 #include "entenc.h"
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 *band E, int end, int C, int LM); 47 void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *band E, int end, int C, int LM, int arch);
45 48
46 /*void compute_noise_energies(const CELTMode *m, const celt_sig *X, const opus_v al16 *tonality, celt_ener *bandE);*/ 49 /*void compute_noise_energies(const CELTMode *m, const celt_sig *X, const opus_v al16 *tonality, celt_ener *bandE);*/
47 50
48 /** Normalise each band of X such that the energy in each band is 51 /** Normalise each band of X such that the energy in each band is
49 equal to 1 52 equal to 1
50 * @param m Mode data 53 * @param m Mode data
51 * @param X Spectrum (returned normalised) 54 * @param X Spectrum (returned normalised)
52 * @param bandE Square root of the energy for each band 55 * @param bandE Square root of the energy for each band
53 */ 56 */
54 void normalise_bands(const CELTMode *m, const celt_sig * OPUS_RESTRICT freq, cel t_norm * OPUS_RESTRICT X, const celt_ener *bandE, int end, int C, int M); 57 void normalise_bands(const CELTMode *m, const celt_sig * OPUS_RESTRICT freq, cel t_norm * OPUS_RESTRICT X, const celt_ener *bandE, int end, int C, int M);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
101 * @param arch Run-time architecture (see opus_select_arch()) 104 * @param arch Run-time architecture (see opus_select_arch())
102 */ 105 */
103 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,
104 celt_norm * X, celt_norm * Y, unsigned char *collapse_masks, 107 celt_norm * X, celt_norm * Y, unsigned char *collapse_masks,
105 const celt_ener *bandE, int *pulses, int shortBlocks, int spread, 108 const celt_ener *bandE, int *pulses, int shortBlocks, int spread,
106 int dual_stereo, int intensity, int *tf_res, opus_int32 total_bits, 109 int dual_stereo, int intensity, int *tf_res, opus_int32 total_bits,
107 opus_int32 balance, ec_ctx *ec, int M, int codedBands, opus_uint32 *seed, 110 opus_int32 balance, ec_ctx *ec, int M, int codedBands, opus_uint32 *seed,
108 int arch); 111 int complexity, int arch, int disable_inv);
109 112
110 void anti_collapse(const CELTMode *m, celt_norm *X_, 113 void anti_collapse(const CELTMode *m, celt_norm *X_,
111 unsigned char *collapse_masks, int LM, int C, int size, int start, 114 unsigned char *collapse_masks, int LM, int C, int size, int start,
112 int end, const opus_val16 *logE, const opus_val16 *prev1logE, 115 int end, const opus_val16 *logE, const opus_val16 *prev1logE,
113 const opus_val16 *prev2logE, const int *pulses, opus_uint32 seed, 116 const opus_val16 *prev2logE, const int *pulses, opus_uint32 seed,
114 int arch); 117 int arch);
115 118
116 opus_uint32 celt_lcg_rand(opus_uint32 seed); 119 opus_uint32 celt_lcg_rand(opus_uint32 seed);
117 120
118 int hysteresis_decision(opus_val16 val, const opus_val16 *thresholds, const opus _val16 *hysteresis, int N, int prev); 121 int hysteresis_decision(opus_val16 val, const opus_val16 *thresholds, const opus _val16 *hysteresis, int N, int prev);
119 122
120 #endif /* BANDS_H */ 123 #endif /* BANDS_H */
OLDNEW
« no previous file with comments | « third_party/opus/src/celt/arm/pitch_neon_intr.c ('k') | third_party/opus/src/celt/bands.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698