X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fcodec%2Fadpcm.c;h=909ac4f656e2deca1a25e1cf716fa709c6314d18;hb=2088806206d45c336ff19bb10f439232c5db1dc2;hp=c06b8bcc7cd4b797f64dcc16a25d8686de78d23d;hpb=f5c5a773147fccc0255acabd50961e042ade393f;p=vlc diff --git a/modules/codec/adpcm.c b/modules/codec/adpcm.c index c06b8bcc7c..909ac4f656 100644 --- a/modules/codec/adpcm.c +++ b/modules/codec/adpcm.c @@ -28,7 +28,8 @@ * Documentation: http://www.pcisys.net/~melanson/codecs/adpcm.txt *****************************************************************************/ #include -#include +#include +#include /***************************************************************************** * Module descriptor @@ -76,7 +77,7 @@ static void DecodeAdpcmDk4 ( 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 int pi_channels_maps[6] = +static const int pi_channels_maps[6] = { 0, AOUT_CHAN_CENTER, @@ -88,13 +89,13 @@ static int pi_channels_maps[6] = }; /* 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 }; -static int i_step_table[89] = +static const int i_step_table[89] = { 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, 21, 23, 25, 28, 31, 34, 37, 41, 45, @@ -107,18 +108,18 @@ static int i_step_table[89] = 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, 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 }; -static int i_adaptation_coeff2[7] = +static const int i_adaptation_coeff2[7] = { 0, -256, 0, 64, 0, -208, -232 }; @@ -147,7 +148,7 @@ static int OpenDecoder( vlc_object_t *p_this ) if( p_dec->fmt_in.audio.i_channels <= 0 || p_dec->fmt_in.audio.i_channels > 5 ) { - msg_Err( p_dec, "invalid number of channel (not between 1 and 5): %i", + msg_Err( p_dec, "invalid number of channel (not between 1 and 5): %i", p_dec->fmt_in.audio.i_channels ); return VLC_EGENERIC; }