[SCM] libav/experimental: Convert a for() loop into a while() loop for the downward part of the exponent delta limiting.
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:20:31 UTC 2013
The following commit has been merged in the experimental branch:
commit cdedf7e6254024c643532d45ac7c68e84e50eb01
Author: Justin Ruggles <justin.ruggles at gmail.com>
Date: Thu Dec 16 21:09:08 2010 +0000
Convert a for() loop into a while() loop for the downward part of the exponent
delta limiting.
Originally committed as revision 26035 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index 7d3666a..212a221 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -639,7 +639,8 @@ static void encode_exponents_blk_ch(uint8_t *exp,
differentially encoded */
for (i = 1; i <= nb_groups; i++)
exp[i] = FFMIN(exp[i], exp[i-1] + 2);
- for (i = nb_groups-1; i >= 0; i--)
+ i--;
+ while (--i >= 0)
exp[i] = FFMIN(exp[i], exp[i+1] + 2);
/* now we have the exponent values the decoder will see */
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list