aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/aacdec.c
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2011-04-26 14:45:48 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-04-27 12:39:37 -0400
commitd70fa4c4238ffa69592fffa7c817532534f303c4 (patch)
treebb1d0fdf72e89cce8fad6093fdb7cafef43752f6 /libavcodec/aacdec.c
parente4744b59aadd6e7064491c0228d6248289a6a85a (diff)
downloadandroid_external_ffmpeg-d70fa4c4238ffa69592fffa7c817532534f303c4.tar.gz
android_external_ffmpeg-d70fa4c4238ffa69592fffa7c817532534f303c4.tar.bz2
android_external_ffmpeg-d70fa4c4238ffa69592fffa7c817532534f303c4.zip
Define POW_SF2_ZERO in aac.h and use for ff_aac_pow2sf_tabp[] offsets instead
of hardcoding 200 everywhere.
Diffstat (limited to 'libavcodec/aacdec.c')
-rw-r--r--libavcodec/aacdec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index e289caa4f6..bcc277c3c0 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -811,7 +811,7 @@ static int decode_scalefactors(AACContext *ac, float sf[120], GetBitContext *gb,
"audible artifact, there may be a bug in the "
"decoder. ", offset[2], clipped_offset);
}
- sf[idx] = ff_aac_pow2sf_tab[-clipped_offset + 200];
+ sf[idx] = ff_aac_pow2sf_tab[-clipped_offset + POW_SF2_ZERO];
}
} else if (band_type[idx] == NOISE_BT) {
for (; i < run_end; i++, idx++) {
@@ -826,7 +826,7 @@ static int decode_scalefactors(AACContext *ac, float sf[120], GetBitContext *gb,
"artifact, there may be a bug in the decoder. ",
offset[1], clipped_offset);
}
- sf[idx] = -ff_aac_pow2sf_tab[clipped_offset + sf_offset + 100];
+ sf[idx] = -ff_aac_pow2sf_tab[clipped_offset + sf_offset - 100 + POW_SF2_ZERO];
}
} else {
for (; i < run_end; i++, idx++) {
@@ -836,7 +836,7 @@ static int decode_scalefactors(AACContext *ac, float sf[120], GetBitContext *gb,
"%s (%d) out of range.\n", sf_str[0], offset[0]);
return -1;
}
- sf[idx] = -ff_aac_pow2sf_tab[ offset[0] + sf_offset];
+ sf[idx] = -ff_aac_pow2sf_tab[offset[0] + sf_offset - 200 + POW_SF2_ZERO];
}
}
}