summaryrefslogtreecommitdiff
path: root/libavcodec/binkaudio.c
diff options
context:
space:
mode:
authorPeter Ross <pross@xvid.org>2011-02-20 12:24:38 +1100
committerRonald S. Bultje <rsbultje@gmail.com>2011-02-25 15:24:35 -0500
commita304def1dca50d63bf2a39651f84792980db3508 (patch)
tree698999a1bc3ff91afd3a4a3bee6b37ce22d13a8d /libavcodec/binkaudio.c
parent582ac86d19c61ad73c2e1a2d5ed54a5fe1e20bd1 (diff)
downloadffmpeg-a304def1dca50d63bf2a39651f84792980db3508.tar.gz
binkaudio: remove unnecessary loop
decode_init sets bands[0] == 2, so this loop always sets the band table index (k) to zero. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavcodec/binkaudio.c')
-rw-r--r--libavcodec/binkaudio.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c
index fb442c00b2..b601a01f0a 100644
--- a/libavcodec/binkaudio.c
+++ b/libavcodec/binkaudio.c
@@ -164,7 +164,6 @@ static void decode_block(BinkAudioContext *s, short *out, int use_dct)
for (ch = 0; ch < s->channels; ch++) {
FFTSample *coeffs = s->coeffs_ptr[ch];
- q = 0.0f;
coeffs[0] = get_float(gb) * s->root;
coeffs[1] = get_float(gb) * s->root;
@@ -174,10 +173,8 @@ static void decode_block(BinkAudioContext *s, short *out, int use_dct)
quant[i] = expf(FFMIN(value, 95) * 0.15289164787221953823f) * s->root;
}
- // find band (k)
- for (k = 0; s->bands[k] < 1; k++) {
- q = quant[k];
- }
+ k = 0;
+ q = quant[0];
// parse coefficients
i = 2;