Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Giles <giles@mozilla.com>2011-11-26 01:02:00 +0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2011-12-02 21:31:36 +0400
commit120800f8fa478d75ad9f94d91dae775386c6b0d5 (patch)
tree12d06687371998fa8d682443f25b3f1d1ac6a054 /celt/rate.c
parente1be1920bac28c897a940be55319abbb1bed0f51 (diff)
Rename '_FOO' to avoid potentional collisions with reserved identifiers.
C reserves identifiers of the from _[A-Z]+ and we have a number of those in the code. This patch renames the various function arguments, MACROS and preprocessor symbols to avoid the reserved form. It also removes the CHANNELS() macro altogether. This was a minor optimization for TI DSP to force a mono-only build, as were the associated local 'const' versions. Since stereo support is manditory, it wasn't worth keeping. Thanks to John Ridges for raising the issue, and Jean-Marc Valin and Greg Maxwell for reviewing the changes.
Diffstat (limited to 'celt/rate.c')
-rw-r--r--celt/rate.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/celt/rate.c b/celt/rate.c
index c1ad6908..b39a9440 100644
--- a/celt/rate.c
+++ b/celt/rate.c
@@ -248,13 +248,12 @@ void compute_pulse_cache(CELTMode *m, int LM)
static inline int interp_bits2pulses(const CELTMode *m, int start, int end, int skip_start,
const int *bits1, const int *bits2, const int *thresh, const int *cap, opus_int32 total, opus_int32 *_balance,
int skip_rsv, int *intensity, int intensity_rsv, int *dual_stereo, int dual_stereo_rsv, int *bits,
- int *ebits, int *fine_priority, int _C, int LM, ec_ctx *ec, int encode, int prev)
+ int *ebits, int *fine_priority, int C, int LM, ec_ctx *ec, int encode, int prev)
{
opus_int32 psum;
int lo, hi;
int i, j;
int logM;
- const int C = CHANNELS(_C);
int stereo;
int codedBands=-1;
int alloc_floor;
@@ -525,10 +524,9 @@ static inline int interp_bits2pulses(const CELTMode *m, int start, int end, int
}
int compute_allocation(const CELTMode *m, int start, int end, const int *offsets, const int *cap, int alloc_trim, int *intensity, int *dual_stereo,
- opus_int32 total, opus_int32 *balance, int *pulses, int *ebits, int *fine_priority, int _C, int LM, ec_ctx *ec, int encode, int prev)
+ opus_int32 total, opus_int32 *balance, int *pulses, int *ebits, int *fine_priority, int C, int LM, ec_ctx *ec, int encode, int prev)
{
int lo, hi, len, j;
- const int C = CHANNELS(_C);
int codedBands;
int skip_start;
int skip_rsv;