aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Giles <giles@mozilla.com>2011-11-25 13:02:00 -0800
committerJean-Marc Valin <jmvalin@jmvalin.ca>2011-12-02 12:31:36 -0500
commit120800f8fa478d75ad9f94d91dae775386c6b0d5 (patch)
tree12d06687371998fa8d682443f25b3f1d1ac6a054
parente1be1920bac28c897a940be55319abbb1bed0f51 (diff)
downloadlibopus-120800f8fa478d75ad9f94d91dae775386c6b0d5.tar.gz
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.
-rw-r--r--celt/bands.c34
-rw-r--r--celt/bands.h10
-rw-r--r--celt/celt.c29
-rw-r--r--celt/celt.h2
-rw-r--r--celt/fixed_debug.h60
-rw-r--r--celt/modes.h8
-rw-r--r--celt/pitch.c19
-rw-r--r--celt/pitch.h6
-rw-r--r--celt/quant_bands.c27
-rw-r--r--celt/quant_bands.h16
-rw-r--r--celt/rate.c6
-rw-r--r--celt/rate.h2
-rw-r--r--celt/stack_alloc.h10
-rw-r--r--include/opus_types.h6
-rw-r--r--silk/Inlines.h6
-rw-r--r--silk/MacroCount.h4
-rw-r--r--silk/MacroDebug.h6
-rw-r--r--silk/SigProc_FIX.h6
-rw-r--r--silk/debug.h6
-rw-r--r--silk/float/SigProc_FLP.h6
-rw-r--r--silk/macros.h6
-rw-r--r--silk/resampler_private.h3
-rw-r--r--silk/resampler_rom.h6
-rw-r--r--silk/tuning_parameters.h2
-rw-r--r--silk/typedef.h6
-rw-r--r--src/opus_private.h2
26 files changed, 132 insertions, 162 deletions
diff --git a/celt/bands.c b/celt/bands.c
index 666863fc..4461ffaa 100644
--- a/celt/bands.c
+++ b/celt/bands.c
@@ -75,11 +75,10 @@ static int bitexact_log2tan(int isin,int icos)
#ifdef FIXED_POINT
/* Compute the amplitude (sqrt energy) in each of the bands */
-void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bank, int end, int _C, int M)
+void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bank, int end, int C, int M)
{
int i, c, N;
const opus_int16 *eBands = m->eBands;
- const int C = CHANNELS(_C);
N = M*m->shortMdctSize;
c=0; do {
for (i=0;i<end;i++)
@@ -113,11 +112,10 @@ void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bank
}
/* Normalise each band such that the energy is one. */
-void normalise_bands(const CELTMode *m, const celt_sig * restrict freq, celt_norm * restrict X, const celt_ener *bank, int end, int _C, int M)
+void normalise_bands(const CELTMode *m, const celt_sig * restrict freq, celt_norm * restrict X, const celt_ener *bank, int end, int C, int M)
{
int i, c, N;
const opus_int16 *eBands = m->eBands;
- const int C = CHANNELS(_C);
N = M*m->shortMdctSize;
c=0; do {
i=0; do {
@@ -136,11 +134,10 @@ void normalise_bands(const CELTMode *m, const celt_sig * restrict freq, celt_nor
#else /* FIXED_POINT */
/* Compute the amplitude (sqrt energy) in each of the bands */
-void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bank, int end, int _C, int M)
+void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bank, int end, int C, int M)
{
int i, c, N;
const opus_int16 *eBands = m->eBands;
- const int C = CHANNELS(_C);
N = M*m->shortMdctSize;
c=0; do {
for (i=0;i<end;i++)
@@ -157,11 +154,10 @@ void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bank
}
/* Normalise each band such that the energy is one. */
-void normalise_bands(const CELTMode *m, const celt_sig * restrict freq, celt_norm * restrict X, const celt_ener *bank, int end, int _C, int M)
+void normalise_bands(const CELTMode *m, const celt_sig * restrict freq, celt_norm * restrict X, const celt_ener *bank, int end, int C, int M)
{
int i, c, N;
const opus_int16 *eBands = m->eBands;
- const int C = CHANNELS(_C);
N = M*m->shortMdctSize;
c=0; do {
for (i=0;i<end;i++)
@@ -177,11 +173,10 @@ void normalise_bands(const CELTMode *m, const celt_sig * restrict freq, celt_nor
#endif /* FIXED_POINT */
/* De-normalise the energy to produce the synthesis from the unit-energy bands */
-void denormalise_bands(const CELTMode *m, const celt_norm * restrict X, celt_sig * restrict freq, const celt_ener *bank, int end, int _C, int M)
+void denormalise_bands(const CELTMode *m, const celt_norm * restrict X, celt_sig * restrict freq, const celt_ener *bank, int end, int C, int M)
{
int i, c, N;
const opus_int16 *eBands = m->eBands;
- const int C = CHANNELS(_C);
N = M*m->shortMdctSize;
celt_assert2(C<=2, "denormalise_bands() not implemented for >2 channels");
c=0; do {
@@ -206,7 +201,7 @@ void denormalise_bands(const CELTMode *m, const celt_norm * restrict X, celt_sig
}
/* This prevents energy collapse for transients with multiple short MDCTs */
-void anti_collapse(const CELTMode *m, celt_norm *_X, unsigned char *collapse_masks, int LM, int C, int CC, int size,
+void anti_collapse(const CELTMode *m, celt_norm *X_, unsigned char *collapse_masks, int LM, int C, int CC, int size,
int start, int end, opus_val16 *logE, opus_val16 *prev1logE,
opus_val16 *prev2logE, int *pulses, opus_uint32 seed)
{
@@ -274,7 +269,7 @@ void anti_collapse(const CELTMode *m, celt_norm *_X, unsigned char *collapse_mas
r = MIN16(thresh, r);
r = r*sqrt_1;
#endif
- X = _X+c*size+(m->eBands[i]<<LM);
+ X = X_+c*size+(m->eBands[i]<<LM);
for (k=0;k<1<<LM;k++)
{
/* Detect collapse */
@@ -394,11 +389,10 @@ static void stereo_merge(celt_norm *X, celt_norm *Y, opus_val16 mid, int N)
/* Decide whether we should spread the pulses in the current frame */
int spreading_decision(const CELTMode *m, celt_norm *X, int *average,
int last_decision, int *hf_average, int *tapset_decision, int update_hf,
- int end, int _C, int M)
+ int end, int C, int M)
{
int i, c, N0;
int sum = 0, nbBands=0;
- const int C = CHANNELS(_C);
const opus_int16 * restrict eBands = m->eBands;
int decision;
int hf_sum=0;
@@ -1171,7 +1165,7 @@ static unsigned quant_band(int encode, const CELTMode *m, int i, celt_norm *X, c
}
void quant_all_bands(int encode, const CELTMode *m, int start, int end,
- celt_norm *_X, celt_norm *_Y, unsigned char *collapse_masks, const celt_ener *bandE, int *pulses,
+ celt_norm *X_, celt_norm *Y_, unsigned char *collapse_masks, const celt_ener *bandE, int *pulses,
int shortBlocks, int spread, int dual_stereo, int intensity, int *tf_res,
opus_int32 total_bits, opus_int32 balance, ec_ctx *ec, int LM, int codedBands, opus_uint32 *seed)
{
@@ -1185,7 +1179,7 @@ void quant_all_bands(int encode, const CELTMode *m, int start, int end,
int M;
int lowband_offset;
int update_lowband = 1;
- int C = _Y != NULL ? 2 : 1;
+ int C = Y_ != NULL ? 2 : 1;
#ifdef RESYNTH
int resynth = 1;
#else
@@ -1213,9 +1207,9 @@ void quant_all_bands(int encode, const CELTMode *m, int start, int end,
unsigned x_cm;
unsigned y_cm;
- X = _X+M*eBands[i];
- if (_Y!=NULL)
- Y = _Y+M*eBands[i];
+ X = X_+M*eBands[i];
+ if (Y_!=NULL)
+ Y = Y_+M*eBands[i];
else
Y = NULL;
N = M*eBands[i+1]-M*eBands[i];
@@ -1240,7 +1234,7 @@ void quant_all_bands(int encode, const CELTMode *m, int start, int end,
if (i>=m->effEBands)
{
X=norm;
- if (_Y!=NULL)
+ if (Y_!=NULL)
Y = norm;
}
diff --git a/celt/bands.h b/celt/bands.h
index 25c0a00e..0f6d7c04 100644
--- a/celt/bands.h
+++ b/celt/bands.h
@@ -41,7 +41,7 @@
* @param X Spectrum
* @param bands Square root of the energy for each band (returned)
*/
-void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bands, int end, int _C, int M);
+void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bands, int end, int C, int M);
/*void compute_noise_energies(const CELTMode *m, const celt_sig *X, const opus_val16 *tonality, celt_ener *bank);*/
@@ -51,14 +51,14 @@ void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *band
* @param X Spectrum (returned normalised)
* @param bands Square root of the energy for each band
*/
-void normalise_bands(const CELTMode *m, const celt_sig * restrict freq, celt_norm * restrict X, const celt_ener *bands, int end, int _C, int M);
+void normalise_bands(const CELTMode *m, const celt_sig * restrict freq, celt_norm * restrict X, const celt_ener *bands, int end, int C, int M);
/** Denormalise each band of X to restore full amplitude
* @param m Mode data
* @param X Spectrum (returned de-normalised)
* @param bands Square root of the energy for each band
*/
-void denormalise_bands(const CELTMode *m, const celt_norm * restrict X, celt_sig * restrict freq, const celt_ener *bands, int end, int _C, int M);
+void denormalise_bands(const CELTMode *m, const celt_norm * restrict X, celt_sig * restrict freq, const celt_ener *bands, int end, int C, int M);
#define SPREAD_NONE (0)
#define SPREAD_LIGHT (1)
@@ -67,7 +67,7 @@ void denormalise_bands(const CELTMode *m, const celt_norm * restrict X, celt_sig
int spreading_decision(const CELTMode *m, celt_norm *X, int *average,
int last_decision, int *hf_average, int *tapset_decision, int update_hf,
- int end, int _C, int M);
+ int end, int C, int M);
#ifdef MEASURE_NORM_MSE
void measure_norm_mse(const CELTMode *m, float *X, float *X0, float *bandE, float *bandE0, int M, int N, int C);
@@ -86,7 +86,7 @@ void quant_all_bands(int encode, const CELTMode *m, int start, int end,
int time_domain, int fold, int dual_stereo, int intensity, int *tf_res,
opus_int32 total_bits, opus_int32 balance, ec_ctx *ec, int M, int codedBands, opus_uint32 *seed);
-void anti_collapse(const CELTMode *m, celt_norm *_X, unsigned char *collapse_masks, int LM, int C, int CC, int size,
+void anti_collapse(const CELTMode *m, celt_norm *X_, unsigned char *collapse_masks, int LM, int C, int CC, int size,
int start, int end, opus_val16 *logE, opus_val16 *prev1logE,
opus_val16 *prev2logE, int *pulses, opus_uint32 seed);
diff --git a/celt/celt.c b/celt/celt.c
index 52a8f2fb..eeed05a0 100644
--- a/celt/celt.c
+++ b/celt/celt.c
@@ -100,7 +100,7 @@ static inline int fromOpus(unsigned char c)
else
return fromOpusTable[(c>>3)-16] | (c&0x7);
}
-#endif /*CUSTOM_MODES*/
+#endif /* CUSTOM_MODES */
#define COMBFILTER_MAXPERIOD 1024
#define COMBFILTER_MINPERIOD 15
@@ -383,9 +383,8 @@ static int transient_analysis(const opus_val32 * restrict in, int len, int C,
/** Apply window and compute the MDCT for all sub-frames and
all channels in a frame */
-static void compute_mdcts(const CELTMode *mode, int shortBlocks, celt_sig * restrict in, celt_sig * restrict out, int _C, int LM)
+static void compute_mdcts(const CELTMode *mode, int shortBlocks, celt_sig * restrict in, celt_sig * restrict out, int C, int LM)
{
- const int C = CHANNELS(_C);
if (C==1 && !shortBlocks)
{
const int overlap = OVERLAP(mode);
@@ -414,10 +413,9 @@ static void compute_mdcts(const CELTMode *mode, int shortBlocks, celt_sig * rest
all channels in a frame */
static void compute_inv_mdcts(const CELTMode *mode, int shortBlocks, celt_sig *X,
celt_sig * restrict out_mem[],
- celt_sig * restrict overlap_mem[], int _C, int LM)
+ celt_sig * restrict overlap_mem[], int C, int LM)
{
int c;
- const int C = CHANNELS(_C);
const int N = mode->shortMdctSize<<LM;
const int overlap = OVERLAP(mode);
VARDECL(opus_val32, x);
@@ -454,9 +452,8 @@ static void compute_inv_mdcts(const CELTMode *mode, int shortBlocks, celt_sig *X
RESTORE_STACK;
}
-static void deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int _C, int downsample, const opus_val16 *coef, celt_sig *mem)
+static void deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int C, int downsample, const opus_val16 *coef, celt_sig *mem)
{
- const int C = CHANNELS(_C);
int c;
int count=0;
c=0; do {
@@ -902,8 +899,8 @@ int celt_encode_with_ec(CELTEncoder * restrict st, const opus_val16 * pcm, int f
opus_val16 *oldBandE, *oldLogE, *oldLogE2;
int shortBlocks=0;
int isTransient=0;
- const int CC = CHANNELS(st->channels);
- const int C = CHANNELS(st->stream_channels);
+ const int CC = st->channels;
+ const int C = st->stream_channels;
int LM, M;
int tf_select;
int nbFilledBytes, nbAvailableBytes;
@@ -1692,7 +1689,7 @@ int opus_custom_encode_float(CELTEncoder * restrict st, const float * pcm, int f
if (pcm==NULL)
return OPUS_BAD_ARG;
- C = CHANNELS(st->channels);
+ C = st->channels;
N = frame_size;
ALLOC(in, C*N, opus_int16);
@@ -1719,7 +1716,7 @@ int opus_custom_encode(CELTEncoder * restrict st, const opus_int16 * pcm, int fr
if (pcm==NULL)
return OPUS_BAD_ARG;
- C=CHANNELS(st->channels);
+ C=st->channels;
N=frame_size;
ALLOC(in, C*N, celt_sig);
for (j=0;j<C*N;j++) {
@@ -2013,7 +2010,7 @@ static void celt_decode_lost(CELTDecoder * restrict st, opus_val16 * restrict pc
int overlap = st->mode->overlap;
opus_val16 fade = Q15ONE;
int i, len;
- const int C = CHANNELS(st->channels);
+ const int C = st->channels;
int offset;
celt_sig *out_mem[2];
celt_sig *decode_mem[2];
@@ -2293,7 +2290,7 @@ int celt_decode_with_ec(CELTDecoder * restrict st, const unsigned char *data, in
int shortBlocks;
int isTransient;
int intra_ener;
- const int CC = CHANNELS(st->channels);
+ const int CC = st->channels;
int LM, M;
int effEnd;
int codedBands;
@@ -2310,7 +2307,7 @@ int celt_decode_with_ec(CELTDecoder * restrict st, const unsigned char *data, in
int anti_collapse_rsv;
int anti_collapse_on=0;
int silence;
- int C = CHANNELS(st->stream_channels);
+ int C = st->stream_channels;
ALLOC_STACK;
frame_size *= st->downsample;
@@ -2664,7 +2661,7 @@ int opus_custom_decode_float(CELTDecoder * restrict st, const unsigned char *dat
if (pcm==NULL)
return OPUS_BAD_ARG;
- C = CHANNELS(st->channels);
+ C = st->channels;
N = frame_size;
ALLOC(out, C*N, opus_int16);
@@ -2694,7 +2691,7 @@ int opus_custom_decode(CELTDecoder * restrict st, const unsigned char *data, int
if (pcm==NULL)
return OPUS_BAD_ARG;
- C = CHANNELS(st->channels);
+ C = st->channels;
N = frame_size;
ALLOC(out, C*N, celt_sig);
diff --git a/celt/celt.h b/celt/celt.h
index 7a1063c8..234a17b2 100644
--- a/celt/celt.h
+++ b/celt/celt.h
@@ -114,4 +114,4 @@ int celt_decode_with_ec(OpusCustomDecoder * restrict st, const unsigned char *da
}
#endif
-#endif /*CELT_H */
+#endif /* CELT_H */
diff --git a/celt/fixed_debug.h b/celt/fixed_debug.h
index 2f19d10f..bce02961 100644
--- a/celt/fixed_debug.h
+++ b/celt/fixed_debug.h
@@ -83,8 +83,8 @@ static inline int NEG32(long long x)
return res;
}
-#define EXTRACT16(x) _EXTRACT16(x, __FILE__, __LINE__)
-static inline short _EXTRACT16(int x, char *file, int line)
+#define EXTRACT16(x) EXTRACT16_(x, __FILE__, __LINE__)
+static inline short EXTRACT16_(int x, char *file, int line)
{
int res;
if (!VERIFY_SHORT(x))
@@ -96,8 +96,8 @@ static inline short _EXTRACT16(int x, char *file, int line)
return res;
}
-#define EXTEND32(x) _EXTEND32(x, __FILE__, __LINE__)
-static inline int _EXTEND32(int x, char *file, int line)
+#define EXTEND32(x) EXTEND32_(x, __FILE__, __LINE__)
+static inline int EXTEND32_(int x, char *file, int line)
{
int res;
if (!VERIFY_SHORT(x))
@@ -109,8 +109,8 @@ static inline int _EXTEND32(int x, char *file, int line)
return res;
}
-#define SHR16(a, shift) _SHR16(a, shift, __FILE__, __LINE__)
-static inline short _SHR16(int a, int shift, char *file, int line)
+#define SHR16(a, shift) SHR16_(a, shift, __FILE__, __LINE__)
+static inline short SHR16_(int a, int shift, char *file, int line)
{
int res;
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift))
@@ -123,8 +123,8 @@ static inline short _SHR16(int a, int shift, char *file, int line)
celt_mips++;
return res;
}
-#define SHL16(a, shift) _SHL16(a, shift, __FILE__, __LINE__)
-static inline short _SHL16(int a, int shift, char *file, int line)
+#define SHL16(a, shift) SHL16_(a, shift, __FILE__, __LINE__)
+static inline short SHL16_(int a, int shift, char *file, int line)
{
int res;
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(shift))
@@ -179,8 +179,8 @@ static inline int SHL32(long long a, int shift)
//#define SHR(a,shift) ((a) >> (shift))
//#define SHL(a,shift) ((a) << (shift))
-#define ADD16(a, b) _ADD16(a, b, __FILE__, __LINE__)
-static inline short _ADD16(int a, int b, char *file, int line)
+#define ADD16(a, b) ADD16_(a, b, __FILE__, __LINE__)
+static inline short ADD16_(int a, int b, char *file, int line)
{
int res;
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
@@ -196,8 +196,8 @@ static inline short _ADD16(int a, int b, char *file, int line)
return res;
}
-#define SUB16(a, b) _SUB16(a, b, __FILE__, __LINE__)
-static inline short _SUB16(int a, int b, char *file, int line)
+#define SUB16(a, b) SUB16_(a, b, __FILE__, __LINE__)
+static inline short SUB16_(int a, int b, char *file, int line)
{
int res;
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
@@ -211,8 +211,8 @@ static inline short _SUB16(int a, int b, char *file, int line)
return res;
}
-#define ADD32(a, b) _ADD32(a, b, __FILE__, __LINE__)
-static inline int _ADD32(long long a, long long b, char *file, int line)
+#define ADD32(a, b) ADD32_(a, b, __FILE__, __LINE__)
+static inline int ADD32_(long long a, long long b, char *file, int line)
{
long long res;
if (!VERIFY_INT(a) || !VERIFY_INT(b))
@@ -228,8 +228,8 @@ static inline int _ADD32(long long a, long long b, char *file, int line)
return res;
}
-#define SUB32(a, b) _SUB32(a, b, __FILE__, __LINE__)
-static inline int _SUB32(long long a, long long b, char *file, int line)
+#define SUB32(a, b) SUB32_(a, b, __FILE__, __LINE__)
+static inline int SUB32_(long long a, long long b, char *file, int line)
{
long long res;
if (!VERIFY_INT(a) || !VERIFY_INT(b))
@@ -244,8 +244,8 @@ static inline int _SUB32(long long a, long long b, char *file, int line)
}
#undef UADD32
-#define UADD32(a, b) _UADD32(a, b, __FILE__, __LINE__)
-static inline unsigned int _UADD32(unsigned long long a, unsigned long long b, char *file, int line)
+#define UADD32(a, b) UADD32_(a, b, __FILE__, __LINE__)
+static inline unsigned int UADD32_(unsigned long long a, unsigned long long b, char *file, int line)
{
long long res;
if (!VERIFY_UINT(a) || !VERIFY_UINT(b))
@@ -262,8 +262,8 @@ static inline unsigned int _UADD32(unsigned long long a, unsigned long long b, c
}
#undef USUB32
-#define USUB32(a, b) _USUB32(a, b, __FILE__, __LINE__)
-static inline unsigned int _USUB32(unsigned long long a, unsigned long long b, char *file, int line)
+#define USUB32(a, b) USUB32_(a, b, __FILE__, __LINE__)
+static inline unsigned int USUB32_(unsigned long long a, unsigned long long b, char *file, int line)
{
long long res;
if (!VERIFY_UINT(a) || !VERIFY_UINT(b))
@@ -294,8 +294,8 @@ static inline short MULT16_16_16(int a, int b)
return res;
}
-#define MULT16_16(a, b) _MULT16_16(a, b, __FILE__, __LINE__)
-static inline int _MULT16_16(int a, int b, char *file, int line)
+#define MULT16_16(a, b) MULT16_16_(a, b, __FILE__, __LINE__)
+static inline int MULT16_16_(int a, int b, char *file, int line)
{
long long res;
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
@@ -311,8 +311,8 @@ static inline int _MULT16_16(int a, int b, char *file, int line)
#define MAC16_16(c,a,b) (celt_mips-=2,ADD32((c),MULT16_16((a),(b))))
-#define MULT16_32_QX(a, b, Q) _MULT16_32_QX(a, b, Q, __FILE__, __LINE__)
-static inline int _MULT16_32_QX(int a, long long b, int Q, char *file, int line)
+#define MULT16_32_QX(a, b, Q) MULT16_32_QX_(a, b, Q, __FILE__, __LINE__)
+static inline int MULT16_32_QX_(int a, long long b, int Q, char *file, int line)
{
long long res;
if (!VERIFY_SHORT(a) || !VERIFY_INT(b))
@@ -387,8 +387,8 @@ static inline short MULT16_16_Q14(int a, int b)
return res;
}
-#define MULT16_16_Q15(a, b) _MULT16_16_Q15(a, b, __FILE__, __LINE__)
-static inline short _MULT16_16_Q15(int a, int b, char *file, int line)
+#define MULT16_16_Q15(a, b) MULT16_16_Q15_(a, b, __FILE__, __LINE__)
+static inline short MULT16_16_Q15_(int a, int b, char *file, int line)
{
long long res;
if (!VERIFY_SHORT(a) || !VERIFY_SHORT(b))
@@ -457,9 +457,9 @@ static inline short MULT16_16_P15(int a, int b)
return res;
}
-#define DIV32_16(a, b) _DIV32_16(a, b, __FILE__, __LINE__)
+#define DIV32_16(a, b) DIV32_16_(a, b, __FILE__, __LINE__)
-static inline int _DIV32_16(long long a, long long b, char *file, int line)
+static inline int DIV32_16_(long long a, long long b, char *file, int line)
{
long long res;
if (b==0)
@@ -484,8 +484,8 @@ static inline int _DIV32_16(long long a, long long b, char *file, int line)
return res;
}
-#define DIV32(a, b) _DIV32(a, b, __FILE__, __LINE__)
-static inline int _DIV32(long long a, long long b, char *file, int line)
+#define DIV32(a, b) DIV32_(a, b, __FILE__, __LINE__)
+static inline int DIV32_(long long a, long long b, char *file, int line)
{
long long res;
if (b==0)
diff --git a/celt/modes.h b/celt/modes.h
index afd71b3c..8583a3ec 100644
--- a/celt/modes.h
+++ b/celt/modes.h
@@ -39,14 +39,6 @@
#define MAX_PERIOD 1024
-#ifndef CHANNELS
-# ifdef DISABLE_STEREO
-# define CHANNELS(_C) (1)
-# else
-# define CHANNELS(_C) (_C)
-# endif
-#endif
-
#ifndef OVERLAP
#define OVERLAP(mode) ((mode)->overlap)
#endif
diff --git a/celt/pitch.c b/celt/pitch.c
index 3bc1084f..b4079026 100644
--- a/celt/pitch.c
+++ b/celt/pitch.c
@@ -98,13 +98,12 @@ static void find_best_pitch(opus_val32 *xcorr, opus_val16 *y, int len,
}
void pitch_downsample(celt_sig * restrict x[], opus_val16 * restrict x_lp,
- int len, int _C)
+ int len, int C)
{
int i;
opus_val32 ac[5];
opus_val16 tmp=Q15ONE;
opus_val16 lpc[4], mem[4]={0,0,0,0};
- const int C = CHANNELS(_C);
for (i=1;i<len>>1;i++)
x_lp[i] = SHR32(HALF32(HALF32(x[0][(2*i-1)]+x[0][(2*i+1)])+x[0][2*i]), SIG_SHIFT+3);
x_lp[0] = SHR32(HALF32(HALF32(x[0][1])+x[0][0]), SIG_SHIFT+3);
@@ -259,7 +258,7 @@ void pitch_search(const opus_val16 * restrict x_lp, opus_val16 * restrict y,
static const int second_check[16] = {0, 0, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2};
opus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod,
- int N, int *_T0, int prev_period, opus_val16 prev_gain)
+ int N, int *T0_, int prev_period, opus_val16 prev_gain)
{
int k, i, T, T0;
opus_val16 g, g0;
@@ -273,14 +272,14 @@ opus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod,
minperiod0 = minperiod;
maxperiod /= 2;
minperiod /= 2;
- *_T0 /= 2;
+ *T0_ /= 2;
prev_period /= 2;
N /= 2;
x += maxperiod;
- if (*_T0>=maxperiod)
- *_T0=maxperiod-1;
+ if (*T0_>=maxperiod)
+ *T0_=maxperiod-1;
- T = T0 = *_T0;
+ T = T0 = *T0_;
xx=xy=yy=0;
for (i=0;i<N;i++)
{
@@ -378,9 +377,9 @@ opus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod,
offset = 0;
if (pg > g)
pg = g;
- *_T0 = 2*T+offset;
+ *T0_ = 2*T+offset;
- if (*_T0<minperiod0)
- *_T0=minperiod0;
+ if (*T0_<minperiod0)
+ *T0_=minperiod0;
return pg;
}
diff --git a/celt/pitch.h b/celt/pitch.h
index bdfa4d0e..ede10717 100644
--- a/celt/pitch.h
+++ b/celt/pitch.h
@@ -31,13 +31,13 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef _PITCH_H
-#define _PITCH_H
+#ifndef PITCH_H
+#define PITCH_H
#include "modes.h"
void pitch_downsample(celt_sig * restrict x[], opus_val16 * restrict x_lp,
- int len, int _C);
+ int len, int C);
void pitch_search(const opus_val16 * restrict x_lp, opus_val16 * restrict y,
int len, int max_pitch, int *pitch);
diff --git a/celt/quant_bands.c b/celt/quant_bands.c
index 1ef67d0e..04a819ef 100644
--- a/celt/quant_bands.c
+++ b/celt/quant_bands.c
@@ -157,9 +157,8 @@ static int quant_coarse_energy_impl(const CELTMode *m, int start, int end,
const opus_val16 *eBands, opus_val16 *oldEBands,
opus_int32 budget, opus_int32 tell,
const unsigned char *prob_model, opus_val16 *error, ec_enc *enc,
- int _C, int LM, int intra, opus_val16 max_decay)
+ int C, int LM, int intra, opus_val16 max_decay)
{
- const int C = CHANNELS(_C);
int i, c;
int badness = 0;
opus_val32 prev[2] = {0,0};
@@ -259,10 +258,9 @@ static int quant_coarse_energy_impl(const CELTMode *m, int start, int end,
void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd,
const opus_val16 *eBands, opus_val16 *oldEBands, opus_uint32 budget,
- opus_val16 *error, ec_enc *enc, int _C, int LM, int nbAvailableBytes,
+ opus_val16 *error, ec_enc *enc, int C, int LM, int nbAvailableBytes,
int force_intra, opus_val32 *delayedIntra, int two_pass, int loss_rate)
{
- const int C = CHANNELS(_C);
int intra;
opus_val16 max_decay;
VARDECL(opus_val16, oldEBands_intra);
@@ -352,10 +350,9 @@ void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd,
RESTORE_STACK;
}
-void quant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, ec_enc *enc, int _C)
+void quant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, ec_enc *enc, int C)
{
int i, c;
- const int C = CHANNELS(_C);
/* Encode finer resolution */
for (i=start;i<end;i++)
@@ -390,10 +387,9 @@ void quant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBa
}
}
-void quant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, int *fine_priority, int bits_left, ec_enc *enc, int _C)
+void quant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, int *fine_priority, int bits_left, ec_enc *enc, int C)
{
int i, prio, c;
- const int C = CHANNELS(_C);
/* Use up the remaining bits */
for (prio=0;prio<2;prio++)
@@ -420,14 +416,13 @@ void quant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *ol
}
}
-void unquant_coarse_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int intra, ec_dec *dec, int _C, int LM)
+void unquant_coarse_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int intra, ec_dec *dec, int C, int LM)
{
const unsigned char *prob_model = e_prob_model[LM][intra];
int i, c;
opus_val32 prev[2] = {0, 0};
opus_val16 coef;
opus_val16 beta;
- const int C = CHANNELS(_C);
opus_int32 budget;
opus_int32 tell;
@@ -486,10 +481,9 @@ void unquant_coarse_energy(const CELTMode *m, int start, int end, opus_val16 *ol
}
}
-void unquant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, ec_dec *dec, int _C)
+void unquant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, ec_dec *dec, int C)
{
int i, c;
- const int C = CHANNELS(_C);
/* Decode finer resolution */
for (i=start;i<end;i++)
{
@@ -510,10 +504,9 @@ void unquant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldE
}
}
-void unquant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, int *fine_priority, int bits_left, ec_dec *dec, int _C)
+void unquant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, int *fine_priority, int bits_left, ec_dec *dec, int C)
{
int i, prio, c;
- const int C = CHANNELS(_C);
/* Use up the remaining bits */
for (prio=0;prio<2;prio++)
@@ -540,10 +533,9 @@ void unquant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *
}
void log2Amp(const CELTMode *m, int start, int end,
- celt_ener *eBands, const opus_val16 *oldEBands, int _C)
+ celt_ener *eBands, const opus_val16 *oldEBands, int C)
{
int c, i;
- const int C = CHANNELS(_C);
c=0;
do {
for (i=0;i<start;i++)
@@ -560,10 +552,9 @@ void log2Amp(const CELTMode *m, int start, int end,
}
void amp2Log2(const CELTMode *m, int effEnd, int end,
- celt_ener *bandE, opus_val16 *bandLogE, int _C)
+ celt_ener *bandE, opus_val16 *bandLogE, int C)
{
int c, i;
- const int C = CHANNELS(_C);
c=0;
do {
for (i=0;i<effEnd;i++)
diff --git a/celt/quant_bands.h b/celt/quant_bands.h
index 44c08deb..b913e0b6 100644
--- a/celt/quant_bands.h
+++ b/celt/quant_bands.h
@@ -36,25 +36,25 @@
#include "mathops.h"
void amp2Log2(const CELTMode *m, int effEnd, int end,
- celt_ener *bandE, opus_val16 *bandLogE, int _C);
+ celt_ener *bandE, opus_val16 *bandLogE, int C);
void log2Amp(const CELTMode *m, int start, int end,
- celt_ener *eBands, const opus_val16 *oldEBands, int _C);
+ celt_ener *eBands, const opus_val16 *oldEBands, int C);
void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd,
const opus_val16 *eBands, opus_val16 *oldEBands, opus_uint32 budget,
- opus_val16 *error, ec_enc *enc, int _C, int LM,
+ opus_val16 *error, ec_enc *enc, int C, int LM,
int nbAvailableBytes, int force_intra, opus_val32 *delayedIntra,
int two_pass, int loss_rate);
-void quant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, ec_enc *enc, int _C);
+void quant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, ec_enc *enc, int C);
-void quant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, int *fine_priority, int bits_left, ec_enc *enc, int _C);
+void quant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, opus_val16 *error, int *fine_quant, int *fine_priority, int bits_left, ec_enc *enc, int C);
-void unquant_coarse_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int intra, ec_dec *dec, int _C, int LM);
+void unquant_coarse_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int intra, ec_dec *dec, int C, int LM);
-void unquant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, ec_dec *dec, int _C);
+void unquant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, ec_dec *dec, int C);
-void unquant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, int *fine_priority, int bits_left, ec_dec *dec, int _C);
+void unquant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *oldEBands, int *fine_quant, int *fine_priority, int bits_left, ec_dec *dec, int C);
#endif /* QUANT_BANDS */
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;
diff --git a/celt/rate.h b/celt/rate.h
index d19d0b30..30c3cc1a 100644
--- a/celt/rate.h
+++ b/celt/rate.h
@@ -96,6 +96,6 @@ static inline int pulses2bits(const CELTMode *m, int band, int LM, int pulses)
@return Total number of bits allocated
*/
int compute_allocation(const CELTMode *m, int start, int end, const int *offsets, const int *cap, int alloc_trim, int *intensity, int *dual_stero,
- 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);
#endif
diff --git a/celt/stack_alloc.h b/celt/stack_alloc.h
index 512f5292..be01e20f 100644
--- a/celt/stack_alloc.h
+++ b/celt/stack_alloc.h
@@ -109,7 +109,7 @@
char *global_stack=0;
#else
extern char *global_stack;
-#endif /*CELT_C*/
+#endif /* CELT_C */
#ifdef ENABLE_VALGRIND
@@ -119,7 +119,7 @@ extern char *global_stack;
char *global_stack_top=0;
#else
extern char *global_stack_top;
-#endif /*CELT_C*/
+#endif /* CELT_C */
#define ALIGN(stack, size) ((stack) += ((size) - (long)(stack)) & ((size) - 1))
#define PUSH(stack, size, type) (VALGRIND_MAKE_MEM_NOACCESS(stack, global_stack_top-stack),ALIGN((stack),sizeof(type)/sizeof(char)),VALGRIND_MAKE_MEM_UNDEFINED(stack, ((size)*sizeof(type)/sizeof(char))),(stack)+=(2*(size)*sizeof(type)/sizeof(char)),(type*)((stack)-(2*(size)*sizeof(type)/sizeof(char))))
@@ -133,13 +133,13 @@ extern char *global_stack_top;
#define RESTORE_STACK (global_stack = _saved_stack)
#define ALLOC_STACK char *_saved_stack; (global_stack = (global_stack==0) ? opus_alloc_scratch(GLOBAL_STACK_SIZE) : global_stack); _saved_stack = global_stack;
-#endif /*ENABLE_VALGRIND*/
+#endif /* ENABLE_VALGRIND */
#include "os_support.h"
#define VARDECL(type, var) type *var
#define ALLOC(var, size, type) var = PUSH(global_stack, size, type)
#define SAVE_STACK char *_saved_stack = global_stack;
-#endif /*VAR_ARRAYS*/
+#endif /* VAR_ARRAYS */
-#endif /*STACK_ALLOC_H*/
+#endif /* STACK_ALLOC_H */
diff --git a/include/opus_types.h b/include/opus_types.h
index ad0b9dd9..b001eb47 100644
--- a/include/opus_types.h
+++ b/include/opus_types.h
@@ -30,8 +30,8 @@
@file opus_types.h
@brief Opus reference implementation types
*/
-#ifndef _OPUS_TYPES_H
-#define _OPUS_TYPES_H
+#ifndef OPUS_TYPES_H
+#define OPUS_TYPES_H
/* Use the real stdint.h if it's there (taken from Paul Hsieh's pstdint.h) */
#if (defined(__STDC__) && __STDC__ && __STDC_VERSION__ >= 199901L) || (defined(__GNUC__) && (defined(_STDINT_H) || defined(_STDINT_H_)) || defined (HAVE_STDINT_H))
@@ -156,4 +156,4 @@
#define opus_uint64 unsigned long long
#define opus_uint8 unsigned char
-#endif /* _OPUS_TYPES_H */
+#endif /* OPUS_TYPES_H */
diff --git a/silk/Inlines.h b/silk/Inlines.h
index 26b3b5a1..8458c97c 100644
--- a/silk/Inlines.h
+++ b/silk/Inlines.h
@@ -29,8 +29,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* \brief silk_Inlines.h defines inline signal processing functions.
*/
-#ifndef _SILK_FIX_INLINES_H_
-#define _SILK_FIX_INLINES_H_
+#ifndef SILK_FIX_INLINES_H
+#define SILK_FIX_INLINES_H
#ifdef __cplusplus
extern "C"
@@ -185,4 +185,4 @@ static inline opus_int32 silk_INVERSE32_varQ( /* O returns a good approxima
}
#endif
-#endif /*_SILK_FIX_INLINES_H_*/
+#endif /* SILK_FIX_INLINES_H */
diff --git a/silk/MacroCount.h b/silk/MacroCount.h
index 98eacfb6..509c9c2d 100644
--- a/silk/MacroCount.h
+++ b/silk/MacroCount.h
@@ -25,8 +25,8 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-#ifndef _SIGPROCFIX_API_MACROCOUNT_H_
-#define _SIGPROCFIX_API_MACROCOUNT_H_
+#ifndef SIGPROCFIX_API_MACROCOUNT_H
+#define SIGPROCFIX_API_MACROCOUNT_H
#include <stdio.h>
#ifdef silk_MACRO_COUNT
diff --git a/silk/MacroDebug.h b/silk/MacroDebug.h
index e407b808..8adf44e1 100644
--- a/silk/MacroDebug.h
+++ b/silk/MacroDebug.h
@@ -25,8 +25,8 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-#ifndef _MACRO_DEBUG_H_
-#define _MACRO_DEBUG_H_
+#ifndef MACRO_DEBUG_H
+#define MACRO_DEBUG_H
/* Redefine macro functions with extensive assertion in DEBUG mode.
As functions can't be undefined, this file can't work with SigProcFIX_MacroCount.h */
@@ -566,4 +566,4 @@ static inline opus_int32 silk_CHECK_FIT32( opus_int64 a ){
*/
#endif
-#endif /* _MACRO_DEBUG_H_ */
+#endif /* MACRO_DEBUG_H */
diff --git a/silk/SigProc_FIX.h b/silk/SigProc_FIX.h
index a80ac97e..6a4e3f42 100644
--- a/silk/SigProc_FIX.h
+++ b/silk/SigProc_FIX.h
@@ -25,8 +25,8 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-#ifndef _SILK_SIGPROC_FIX_H_
-#define _SILK_SIGPROC_FIX_H_
+#ifndef SILK_SIGPROC_FIX_H
+#define SILK_SIGPROC_FIX_H
#ifdef __cplusplus
extern "C"
@@ -591,4 +591,4 @@ static inline opus_int64 silk_max_64(opus_int64 a, opus_int64 b)
}
#endif
-#endif
+#endif /* SILK_SIGPROC_FIX_H */
diff --git a/silk/debug.h b/silk/debug.h
index a3ea5cd2..5a6b1a15 100644
--- a/silk/debug.h
+++ b/silk/debug.h
@@ -25,8 +25,8 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-#ifndef _SILK_DEBUG_H_
-#define _SILK_DEBUG_H_
+#ifndef SILK_DEBUG_H
+#define SILK_DEBUG_H
#ifdef _WIN32
#define _CRT_SECURE_NO_DEPRECATE 1
@@ -284,4 +284,4 @@ extern int silk_debug_store_count;
}
#endif
-#endif /* _SILK_DEBUG_H_ */
+#endif /* SILK_DEBUG_H */
diff --git a/silk/float/SigProc_FLP.h b/silk/float/SigProc_FLP.h
index bf1d8ee5..7b2ba089 100644
--- a/silk/float/SigProc_FLP.h
+++ b/silk/float/SigProc_FLP.h
@@ -25,8 +25,8 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-#ifndef _SILK_SIGPROC_FLP_H_
-#define _SILK_SIGPROC_FLP_H_
+#ifndef SILK_SIGPROC_FLP_H
+#define SILK_SIGPROC_FLP_H
#include "SigProc_FIX.h"
#include <math.h>
@@ -214,4 +214,4 @@ static inline silk_float silk_log2( double x )
}
#endif
-#endif
+#endif /* SILK_SIGPROC_FLP_H */
diff --git a/silk/macros.h b/silk/macros.h
index 9135ddea..e3ab0e7f 100644
--- a/silk/macros.h
+++ b/silk/macros.h
@@ -25,8 +25,8 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-#ifndef _SILK_API_C_H_
-#define _SILK_API_C_H_
+#ifndef SILK_API_C_H
+#define SILK_API_C_H
/* This is an inline header file for general platform. */
@@ -128,5 +128,5 @@ static inline opus_int32 silk_CLZ32(opus_int32 in32)
#endif
#define matrix_c_adr(Matrix_base_adr, row, column, M) (Matrix_base_adr + ((row)+(M)*(column)))
-#endif /* _SILK_API_C_H_ */
+#endif /* SILK_API_C_H */
diff --git a/silk/resampler_private.h b/silk/resampler_private.h
index 50a66cfe..9e14c0f6 100644
--- a/silk/resampler_private.h
+++ b/silk/resampler_private.h
@@ -83,5 +83,4 @@ void silk_resampler_private_AR2(
#ifdef __cplusplus
}
#endif
-#endif /* SILK_RESAMPLER_H*/
-
+#endif /* SILK_RESAMPLER_H */
diff --git a/silk/resampler_rom.h b/silk/resampler_rom.h
index 0eeb9441..e273d641 100644
--- a/silk/resampler_rom.h
+++ b/silk/resampler_rom.h
@@ -25,8 +25,8 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-#ifndef _SILK_FIX_RESAMPLER_ROM_H_
-#define _SILK_FIX_RESAMPLER_ROM_H_
+#ifndef SILK_FIX_RESAMPLER_ROM_H
+#define SILK_FIX_RESAMPLER_ROM_H
#ifdef __cplusplus
extern "C"
@@ -62,4 +62,4 @@ extern const opus_int16 silk_resampler_frac_FIR_144[ 144 ][ RESAMPLER_ORDER_FIR_
}
#endif
-#endif /* _SILK_FIX_RESAMPLER_ROM_H_*/
+#endif /* SILK_FIX_RESAMPLER_ROM_H */
diff --git a/silk/tuning_parameters.h b/silk/tuning_parameters.h
index 07d9379a..d42a9639 100644
--- a/silk/tuning_parameters.h
+++ b/silk/tuning_parameters.h
@@ -167,4 +167,4 @@ extern "C"
}
#endif
-#endif /* SILK_TUNING_PARAMETERS_H*/
+#endif /* SILK_TUNING_PARAMETERS_H */
diff --git a/silk/typedef.h b/silk/typedef.h
index 26fea652..e259d758 100644
--- a/silk/typedef.h
+++ b/silk/typedef.h
@@ -25,8 +25,8 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
***********************************************************************/
-#ifndef _SILK_TYPEDEF_H_
-#define _SILK_TYPEDEF_H_
+#ifndef SILK_TYPEDEF_H
+#define SILK_TYPEDEF_H
#include "opus_types.h"
@@ -99,4 +99,4 @@ static inline void _silk_fatal(const char *str, const char *file, int line)
# endif
#endif
-#endif
+#endif /* SILK_TYPEDEF_H */
diff --git a/src/opus_private.h b/src/opus_private.h
index b3537052..c79e4b39 100644
--- a/src/opus_private.h
+++ b/src/opus_private.h
@@ -83,4 +83,4 @@ static inline int align(int i)
int opus_repacketizer_out_range_impl(OpusRepacketizer *rp, int begin, int end, unsigned char *data, int maxlen, int self_delimited);
-#endif /* OPUS_PRIVATE_H_ */
+#endif /* OPUS_PRIVATE_H */