[FFmpeg-soc] [soc]: r5464 - aac-sbr/aacsbr.c

alexc subversion at mplayerhq.hu
Fri Nov 27 00:32:57 CET 2009


Author: alexc
Date: Fri Nov 27 00:32:56 2009
New Revision: 5464

Log:
Fix the logic on the inner loop in sbr_hf_calc_npatches. The loop must always be
entered at least once. The condition listed in the specification is the exit
condition and thus must be inverted.

Modified:
   aac-sbr/aacsbr.c

Modified: aac-sbr/aacsbr.c
==============================================================================
--- aac-sbr/aacsbr.c	Fri Nov 27 00:32:55 2009	(r5463)
+++ aac-sbr/aacsbr.c	Fri Nov 27 00:32:56 2009	(r5464)
@@ -356,7 +356,7 @@ static int sbr_hf_calc_npatches(AACConte
 
     do {
         int odd = 0;
-        for (i = k; sb <= (sbr->k[0] - 1 + msb - odd); i--) {
+        for (i = k; i == k || sb > (sbr->k[0] - 1 + msb - odd); i--) {
             sb = sbr->f_master[i];
             odd = (sb - 2 + sbr->k[0]) & 1;
         }


More information about the FFmpeg-soc mailing list