Commit 523a018b authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Put some static tables const

parent 9a17f78c
...@@ -77,7 +77,7 @@ static void DecodeAdpcmDk4 ( decoder_t *, int16_t *, uint8_t * ); ...@@ -77,7 +77,7 @@ static void DecodeAdpcmDk4 ( decoder_t *, int16_t *, uint8_t * );
static void DecodeAdpcmDk3 ( decoder_t *, int16_t *, uint8_t * ); static void DecodeAdpcmDk3 ( decoder_t *, int16_t *, uint8_t * );
static void DecodeAdpcmEA ( decoder_t *, int16_t *, uint8_t * ); static void DecodeAdpcmEA ( decoder_t *, int16_t *, uint8_t * );
static int pi_channels_maps[6] = static const int pi_channels_maps[6] =
{ {
0, 0,
AOUT_CHAN_CENTER, AOUT_CHAN_CENTER,
...@@ -89,13 +89,13 @@ static int pi_channels_maps[6] = ...@@ -89,13 +89,13 @@ static int pi_channels_maps[6] =
}; };
/* Various table from http://www.pcisys.net/~melanson/codecs/adpcm.txt */ /* Various table from http://www.pcisys.net/~melanson/codecs/adpcm.txt */
static int i_index_table[16] = static const int i_index_table[16] =
{ {
-1, -1, -1, -1, 2, 4, 6, 8, -1, -1, -1, -1, 2, 4, 6, 8,
-1, -1, -1, -1, 2, 4, 6, 8 -1, -1, -1, -1, 2, 4, 6, 8
}; };
static int i_step_table[89] = static const int i_step_table[89] =
{ {
7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17,
19, 21, 23, 25, 28, 31, 34, 37, 41, 45, 19, 21, 23, 25, 28, 31, 34, 37, 41, 45,
...@@ -108,18 +108,18 @@ static int i_step_table[89] = ...@@ -108,18 +108,18 @@ static int i_step_table[89] =
15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767 15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767
}; };
static int i_adaptation_table[16] = static const int i_adaptation_table[16] =
{ {
230, 230, 230, 230, 307, 409, 512, 614, 230, 230, 230, 230, 307, 409, 512, 614,
768, 614, 512, 409, 307, 230, 230, 230 768, 614, 512, 409, 307, 230, 230, 230
}; };
static int i_adaptation_coeff1[7] = static const int i_adaptation_coeff1[7] =
{ {
256, 512, 0, 192, 240, 460, 392 256, 512, 0, 192, 240, 460, 392
}; };
static int i_adaptation_coeff2[7] = static const int i_adaptation_coeff2[7] =
{ {
0, -256, 0, 64, 0, -208, -232 0, -256, 0, 64, 0, -208, -232
}; };
......
...@@ -66,12 +66,12 @@ static block_t *EncoderEncode( encoder_t *, aout_buffer_t * ); ...@@ -66,12 +66,12 @@ static block_t *EncoderEncode( encoder_t *, aout_buffer_t * );
struct decoder_sys_t struct decoder_sys_t
{ {
int16_t *p_logtos16; /* used with m/alaw to int16_t */ const int16_t *p_logtos16; /* used with m/alaw to int16_t */
audio_date_t end_date; audio_date_t end_date;
}; };
static int pi_channels_maps[] = static const int pi_channels_maps[] =
{ {
0, 0,
AOUT_CHAN_CENTER, AOUT_CHAN_CENTER,
...@@ -91,7 +91,7 @@ static int pi_channels_maps[] = ...@@ -91,7 +91,7 @@ static int pi_channels_maps[] =
| AOUT_CHAN_MIDDLELEFT | AOUT_CHAN_MIDDLERIGHT | AOUT_CHAN_LFE | AOUT_CHAN_MIDDLELEFT | AOUT_CHAN_MIDDLERIGHT | AOUT_CHAN_LFE
}; };
static int16_t ulawtos16[256] = static const int16_t ulawtos16[256] =
{ {
-32124, -31100, -30076, -29052, -28028, -27004, -25980, -24956, -32124, -31100, -30076, -29052, -28028, -27004, -25980, -24956,
-23932, -22908, -21884, -20860, -19836, -18812, -17788, -16764, -23932, -22908, -21884, -20860, -19836, -18812, -17788, -16764,
...@@ -127,7 +127,7 @@ static int16_t ulawtos16[256] = ...@@ -127,7 +127,7 @@ static int16_t ulawtos16[256] =
56, 48, 40, 32, 24, 16, 8, 0 56, 48, 40, 32, 24, 16, 8, 0
}; };
static int16_t alawtos16[256] = static const int16_t alawtos16[256] =
{ {
-5504, -5248, -6016, -5760, -4480, -4224, -4992, -4736, -5504, -5248, -6016, -5760, -4480, -4224, -4992, -4736,
-7552, -7296, -8064, -7808, -6528, -6272, -7040, -6784, -7552, -7296, -8064, -7808, -6528, -6272, -7040, -6784,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment