[FFmpeg-soc] [soc]: r3356 - aacenc/aacpsy.c

kostya subversion at mplayerhq.hu
Sat Aug 16 16:08:47 CEST 2008


Author: kostya
Date: Sat Aug 16 16:08:47 2008
New Revision: 3356

Log:
Rename variable and rewrite condition using it to be more clear

Modified:
   aacenc/aacpsy.c

Modified: aacenc/aacpsy.c
==============================================================================
--- aacenc/aacpsy.c	(original)
+++ aacenc/aacpsy.c	Sat Aug 16 16:08:47 2008
@@ -586,7 +586,7 @@ static void psy_3gpp_process(AACPsyConte
         start = 0;
         for(w = 0; w < cpe->ch[0].ics.num_windows; w++){
             for(g = 0; g < cpe->ch[0].ics.num_swb; g++){
-                double en_m = 0.0, en_s = 0.0, ff_m = 0.0, ff_s = 0.0, l1;
+                double en_m = 0.0, en_s = 0.0, ff_m = 0.0, ff_s = 0.0, minthr;
                 float m, s;
 
                 g2 = w*16 + g;
@@ -601,8 +601,8 @@ static void psy_3gpp_process(AACPsyConte
                 }
                 en_m /= 262144.0*2.0;
                 en_s /= 262144.0*2.0;
-                l1 = FFMIN(pch->band[0][g2].thr, pch->band[1][g2].thr);
-                if(en_m == 0.0 || en_s == 0.0 || l1*l1 / (en_m * en_s) >= (pch->band[0][g2].thr * pch->band[1][g2].thr / (pch->band[0][g2].energy * pch->band[1][g2].energy))){
+                minthr = FFMIN(pch->band[0][g2].thr, pch->band[1][g2].thr);
+                if(minthr * minthr * pch->band[0][g2].energy * pch->band[1][g2].energy  >= (pch->band[0][g2].thr * pch->band[1][g2].thr * en_m * en_s)){
                     cpe->ms_mask[g2] = 1;
                     pch->band[0][g2].energy = en_m;
                     pch->band[1][g2].energy = en_s;



More information about the FFmpeg-soc mailing list