From 120800f8fa478d75ad9f94d91dae775386c6b0d5 Mon Sep 17 00:00:00 2001 From: Ralph Giles Date: Fri, 25 Nov 2011 13:02:00 -0800 Subject: [PATCH] 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. --- celt/bands.c | 34 ++++++++++------------- celt/bands.h | 10 +++---- celt/celt.c | 29 +++++++++---------- celt/celt.h | 2 +- celt/fixed_debug.h | 60 ++++++++++++++++++++-------------------- celt/modes.h | 8 ------ celt/pitch.c | 19 ++++++------- celt/pitch.h | 6 ++-- celt/quant_bands.c | 27 ++++++------------ celt/quant_bands.h | 16 +++++------ celt/rate.c | 6 ++-- celt/rate.h | 2 +- celt/stack_alloc.h | 10 +++---- include/opus_types.h | 6 ++-- silk/Inlines.h | 6 ++-- silk/MacroCount.h | 4 +-- silk/MacroDebug.h | 6 ++-- silk/SigProc_FIX.h | 6 ++-- silk/debug.h | 6 ++-- silk/float/SigProc_FLP.h | 6 ++-- silk/macros.h | 6 ++-- silk/resampler_private.h | 3 +- silk/resampler_rom.h | 6 ++-- silk/tuning_parameters.h | 2 +- silk/typedef.h | 6 ++-- src/opus_private.h | 2 +- 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;ieBands; - 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;ieBands; - const int C = CHANNELS(_C); N = M*m->shortMdctSize; c=0; do { for (i=0;ieBands; - 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]<eBands[i]<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<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;jmode->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>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 g) pg = g; - *_T0 = 2*T+offset; + *T0_ = 2*T+offset; - if (*_T0= 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 #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 @@ -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 */