Commit 34988466 authored by michael's avatar michael

table[index][ch] -> table[ch][index] (might be faster ...)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@8651 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 0ac10071
......@@ -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++) {
......
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