diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2015-12-31 14:43:49 -0500 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2015-12-31 14:46:14 -0500 |
commit | 68a0e046a2711e8105a52a43629796f4ef4babd8 (patch) | |
tree | 6a9814c0fa34007010c52b7eaace04b776818c94 | |
parent | 9ba205d790cff621d565e554093233b263f7ed0b (diff) | |
download | opus-68a0e046a2711e8105a52a43629796f4ef4babd8.tar.gz |
Renamed MAX_PULSES to SILK_MAX_PULSES and CELT_MAX_PULSES
Avoids accidental name collisions
-rw-r--r-- | celt/rate.c | 2 | ||||
-rw-r--r-- | celt/rate.h | 2 | ||||
-rw-r--r-- | silk/decode_pulses.c | 4 | ||||
-rw-r--r-- | silk/define.h | 2 | ||||
-rw-r--r-- | silk/encode_pulses.c | 6 | ||||
-rw-r--r-- | silk/tables.h | 6 |
6 files changed, 11 insertions, 11 deletions
diff --git a/celt/rate.c b/celt/rate.c index f85c3ee6..b28d8fec 100644 --- a/celt/rate.c +++ b/celt/rate.c @@ -131,7 +131,7 @@ void compute_pulse_cache(CELTMode *m, int LM) for (i=0;i<nbEntries;i++) { unsigned char *ptr = bits+entryI[i]; - opus_int16 tmp[MAX_PULSES+1]; + opus_int16 tmp[CELT_MAX_PULSES+1]; get_required_bits(tmp, entryN[i], get_pulses(entryK[i]), BITRES); for (j=1;j<=entryK[i];j++) ptr[j] = tmp[get_pulses(j)]-1; diff --git a/celt/rate.h b/celt/rate.h index f1e06611..515f7687 100644 --- a/celt/rate.h +++ b/celt/rate.h @@ -32,7 +32,7 @@ #define MAX_PSEUDO 40 #define LOG_MAX_PSEUDO 6 -#define MAX_PULSES 128 +#define CELT_MAX_PULSES 128 #define MAX_FINE_BITS 8 diff --git a/silk/decode_pulses.c b/silk/decode_pulses.c index 1e14bc37..d6bbec92 100644 --- a/silk/decode_pulses.c +++ b/silk/decode_pulses.c @@ -69,9 +69,9 @@ void silk_decode_pulses( sum_pulses[ i ] = ec_dec_icdf( psRangeDec, cdf_ptr, 8 ); /* LSB indication */ - while( sum_pulses[ i ] == MAX_PULSES + 1 ) { + while( sum_pulses[ i ] == SILK_MAX_PULSES + 1 ) { nLshifts[ i ]++; - /* When we've already got 10 LSBs, we shift the table to not allow (MAX_PULSES + 1) */ + /* When we've already got 10 LSBs, we shift the table to not allow (SILK_MAX_PULSES + 1) */ sum_pulses[ i ] = ec_dec_icdf( psRangeDec, silk_pulses_per_block_iCDF[ N_RATE_LEVELS - 1] + ( nLshifts[ i ] == 10 ), 8 ); } diff --git a/silk/define.h b/silk/define.h index c47aca9f..19c9b00e 100644 --- a/silk/define.h +++ b/silk/define.h @@ -169,7 +169,7 @@ extern "C" #define N_RATE_LEVELS 10 /* Maximum sum of pulses per shell coding frame */ -#define MAX_PULSES 16 +#define SILK_MAX_PULSES 16 #define MAX_MATRIX_SIZE MAX_LPC_ORDER /* Max of LPC Order and LTP order */ diff --git a/silk/encode_pulses.c b/silk/encode_pulses.c index a4501438..ab00264f 100644 --- a/silk/encode_pulses.c +++ b/silk/encode_pulses.c @@ -142,7 +142,7 @@ void silk_encode_pulses( sumBits_Q5 = silk_rate_levels_BITS_Q5[ signalType >> 1 ][ k ]; for( i = 0; i < iter; i++ ) { if( nRshifts[ i ] > 0 ) { - sumBits_Q5 += nBits_ptr[ MAX_PULSES + 1 ]; + sumBits_Q5 += nBits_ptr[ SILK_MAX_PULSES + 1 ]; } else { sumBits_Q5 += nBits_ptr[ sum_pulses[ i ] ]; } @@ -162,9 +162,9 @@ void silk_encode_pulses( if( nRshifts[ i ] == 0 ) { ec_enc_icdf( psRangeEnc, sum_pulses[ i ], cdf_ptr, 8 ); } else { - ec_enc_icdf( psRangeEnc, MAX_PULSES + 1, cdf_ptr, 8 ); + ec_enc_icdf( psRangeEnc, SILK_MAX_PULSES + 1, cdf_ptr, 8 ); for( k = 0; k < nRshifts[ i ] - 1; k++ ) { - ec_enc_icdf( psRangeEnc, MAX_PULSES + 1, silk_pulses_per_block_iCDF[ N_RATE_LEVELS - 1 ], 8 ); + ec_enc_icdf( psRangeEnc, SILK_MAX_PULSES + 1, silk_pulses_per_block_iCDF[ N_RATE_LEVELS - 1 ], 8 ); } ec_enc_icdf( psRangeEnc, sum_pulses[ i ], silk_pulses_per_block_iCDF[ N_RATE_LEVELS - 1 ], 8 ); } diff --git a/silk/tables.h b/silk/tables.h index a91431e8..7fea6fda 100644 --- a/silk/tables.h +++ b/silk/tables.h @@ -47,8 +47,8 @@ extern const opus_uint8 silk_pitch_contour_NB_iCDF[ 11 ]; extern const opus_uint8 silk_pitch_contour_10_ms_iCDF[ 12 ]; /* 12 */ extern const opus_uint8 silk_pitch_contour_10_ms_NB_iCDF[ 3 ]; /* 3 */ -extern const opus_uint8 silk_pulses_per_block_iCDF[ N_RATE_LEVELS ][ MAX_PULSES + 2 ]; /* 180 */ -extern const opus_uint8 silk_pulses_per_block_BITS_Q5[ N_RATE_LEVELS - 1 ][ MAX_PULSES + 2 ]; /* 162 */ +extern const opus_uint8 silk_pulses_per_block_iCDF[ N_RATE_LEVELS ][ SILK_MAX_PULSES + 2 ]; /* 180 */ +extern const opus_uint8 silk_pulses_per_block_BITS_Q5[ N_RATE_LEVELS - 1 ][ SILK_MAX_PULSES + 2 ]; /* 162 */ extern const opus_uint8 silk_rate_levels_iCDF[ 2 ][ N_RATE_LEVELS - 1 ]; /* 18 */ extern const opus_uint8 silk_rate_levels_BITS_Q5[ 2 ][ N_RATE_LEVELS - 1 ]; /* 18 */ @@ -59,7 +59,7 @@ extern const opus_uint8 silk_shell_code_table0[ 152 ]; extern const opus_uint8 silk_shell_code_table1[ 152 ]; /* 152 */ extern const opus_uint8 silk_shell_code_table2[ 152 ]; /* 152 */ extern const opus_uint8 silk_shell_code_table3[ 152 ]; /* 152 */ -extern const opus_uint8 silk_shell_code_table_offsets[ MAX_PULSES + 1 ]; /* 17 */ +extern const opus_uint8 silk_shell_code_table_offsets[ SILK_MAX_PULSES + 1 ]; /* 17 */ extern const opus_uint8 silk_lsb_iCDF[ 2 ]; /* 2 */ |