summaryrefslogtreecommitdiff
path: root/libavcodec/adpcm.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-04-07 21:27:58 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-04-07 21:27:58 +0000
commitb736a365bede6c270ff9084af2602d8fa7faf8c9 (patch)
tree6d36b7b423f167ae37526edbd97ad7a6eb03af98 /libavcodec/adpcm.c
parent11d662666dab3e3a74b4cee7cae569f7ae70bce0 (diff)
prev1/2 -> prev[2]
Originally committed as revision 8654 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/adpcm.c')
-rw-r--r--libavcodec/adpcm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index 8ebceb9fd2..085d1a149c 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -1314,7 +1314,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
GetBitContext gb;
int table[2][16];
unsigned int samplecnt;
- int prev1[2], prev2[2];
+ int prev[2][2];
int ch;
if (buf_size < 80) {
@@ -1333,8 +1333,8 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
/* Initialize the previous sample. */
for (ch = 0; ch < 2; ch++) {
- prev1[ch] = get_sbits(&gb, 16);
- prev2[ch] = get_sbits(&gb, 16);
+ prev[ch][0] = get_sbits(&gb, 16);
+ prev[ch][1] = get_sbits(&gb, 16);
}
if (samplecnt >= (samples_end - samples) / (st + 1)) {
@@ -1356,10 +1356,10 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
for (n = 0; n < 14; n++) {
int sampledat = get_sbits (&gb, 4);
- *samples = ((prev1[ch]*factor1
- + prev2[ch]*factor2) >> 11) + (sampledat << exp);
- prev2[ch] = prev1[ch];
- prev1[ch] = *samples++;
+ *samples = ((prev[ch][0]*factor1
+ + prev[ch][1]*factor2) >> 11) + (sampledat << exp);
+ prev[ch][1] = prev[ch][0];
+ prev[ch][0] = *samples++;
/* In case of stereo, skip one sample, this sample
is for the other channel. */