summaryrefslogtreecommitdiff
path: root/libavcodec/adpcm.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-04-07 21:15:52 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-04-07 21:15:52 +0000
commit20f757076e7dd2091f6f0865266997d66dc33d57 (patch)
treee266a03c032edd54e7f17fc12cb24435e42a9ed4 /libavcodec/adpcm.c
parent8845202e8a2a372d899838ebbd80a286f9c20973 (diff)
downloadffmpeg-20f757076e7dd2091f6f0865266997d66dc33d57.tar.gz
table[index][ch] -> table[ch][index] (might be faster ...)
Originally committed as revision 8651 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/adpcm.c')
-rw-r--r--libavcodec/adpcm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index cf282f1071..3ba941e8fc 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -1312,7 +1312,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
case CODEC_ID_ADPCM_THP:
{
GetBitContext gb;
- int table[16][2];
+ int table[2][16];
unsigned int samplecnt;
int prev1[2], prev2[2];
int ch;
@@ -1330,7 +1330,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
for (ch = 0; ch < 2; ch++)
for (i = 0; i < 16; i++)
- table[i][ch] = get_sbits(&gb, 16);
+ table[ch][i] = get_sbits(&gb, 16);
/* Initialize the previous sample. */
for (ch = 0; ch < 2; ch++) {
@@ -1350,8 +1350,8 @@ static int adpcm_decode_frame(AVCodecContext *avctx,
for (i = 0; i < samplecnt / 14; i++) {
uint8_t index = get_bits (&gb, 4) & 7;
unsigned int exp = get_bits (&gb, 4);
- int factor1 = table[index * 2][ch];
- int factor2 = table[index * 2 + 1][ch];
+ int factor1 = table[ch][index * 2];
+ int factor2 = table[ch][index * 2 + 1];
/* Decode 14 samples. */
for (n = 0; n < 14; n++) {