summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-06-29 08:35:27 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-06-29 08:35:27 +0000
commit5e97c2f9603d6cc1dc126d9a62f8b873c6121c17 (patch)
tree9311b811d45c79c0bc080284fa9eaa979230b8a6 /libmpcodecs
parentfe3548c668058b01710e716286340be2b4bb9ea3 (diff)
downloadmpv-5e97c2f9603d6cc1dc126d9a62f8b873c6121c17.tar.bz2
mpv-5e97c2f9603d6cc1dc126d9a62f8b873c6121c17.tar.xz
Directly pass arrays into decode_nibbles
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27149 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/ad_imaadpcm.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/libmpcodecs/ad_imaadpcm.c b/libmpcodecs/ad_imaadpcm.c
index 5411e72433..bbb30fbc6c 100644
--- a/libmpcodecs/ad_imaadpcm.c
+++ b/libmpcodecs/ad_imaadpcm.c
@@ -132,24 +132,17 @@ static int control(sh_audio_t *sh_audio,int cmd,void* arg, ...)
static void decode_nibbles(unsigned short *output,
int output_size, int channels,
- int predictor_l, int index_l,
- int predictor_r, int index_r)
+ int predictor[2], int index[2])
{
int step[2];
- int predictor[2];
- int index[2];
int diff;
int i;
int sign;
int delta;
int channel_number = 0;
- step[0] = adpcm_step[index_l];
- step[1] = adpcm_step[index_r];
- predictor[0] = predictor_l;
- predictor[1] = predictor_r;
- index[0] = index_l;
- index[1] = index_r;
+ step[0] = adpcm_step[index[0]];
+ step[1] = adpcm_step[index[1]];
for (i = 0; i < output_size; i++)
{
@@ -223,8 +216,7 @@ static int qt_ima_adpcm_decode_block(unsigned short *output,
decode_nibbles(output,
QT_IMA_ADPCM_SAMPLES_PER_BLOCK * channels, channels,
- initial_predictor[0], initial_index[0],
- initial_predictor[1], initial_index[1]);
+ initial_predictor, initial_index);
return QT_IMA_ADPCM_SAMPLES_PER_BLOCK * channels;
}
@@ -291,8 +283,7 @@ static int ms_ima_adpcm_decode_block(unsigned short *output,
decode_nibbles(output,
(block_size - MS_IMA_ADPCM_PREAMBLE_SIZE * channels) * 2,
channels,
- predictor[0], index[0],
- predictor[1], index[1]);
+ predictor, index);
return (block_size - MS_IMA_ADPCM_PREAMBLE_SIZE * channels) * 2;
}
@@ -326,8 +317,7 @@ static int dk4_ima_adpcm_decode_block(unsigned short *output,
decode_nibbles(&output[channels],
(block_size - MS_IMA_ADPCM_PREAMBLE_SIZE * channels) * 2 - channels,
channels,
- predictor[0], index[0],
- predictor[1], index[1]);
+ predictor, index);
return (block_size - MS_IMA_ADPCM_PREAMBLE_SIZE * channels) * 2 - channels;
}