[FFmpeg-devel] [PATCH 3/5] binkaudio: remove unnecessary loop
Peter Ross
pross
Sun Feb 20 02:24:38 CET 2011
decode_init sets bands[0] == 2, so this loop always sets the band table
index (k) to zero.
---
libavcodec/binkaudio.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c
index fb442c0..b601a01 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;
--
1.7.1
-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110220/4baffcea/attachment.pgp>
More information about the ffmpeg-devel
mailing list