[FFmpeg-cvslog] r26035 - trunk/libavcodec/ac3enc.c

jbr subversion
Thu Dec 16 22:09:08 CET 2010


Author: jbr
Date: Thu Dec 16 22:09:08 2010
New Revision: 26035

Log:
Convert a for() loop into a while() loop for the downward part of the exponent
delta limiting.

Modified:
   trunk/libavcodec/ac3enc.c

Modified: trunk/libavcodec/ac3enc.c
==============================================================================
--- trunk/libavcodec/ac3enc.c	Thu Dec 16 22:09:02 2010	(r26034)
+++ trunk/libavcodec/ac3enc.c	Thu Dec 16 22:09:08 2010	(r26035)
@@ -639,7 +639,8 @@ static void encode_exponents_blk_ch(uint
        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 */



More information about the ffmpeg-cvslog mailing list