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

kostya subversion at mplayerhq.hu
Sun Aug 17 10:22:09 CEST 2008


Author: kostya
Date: Sun Aug 17 10:22:09 2008
New Revision: 3379

Log:
Use av_clipf() instead of condition

Modified:
   aacenc/aacpsy.c

Modified: aacenc/aacpsy.c
==============================================================================
--- aacenc/aacpsy.c	(original)
+++ aacenc/aacpsy.c	Sun Aug 17 10:22:09 2008
@@ -515,8 +515,7 @@ static void calc_pe(Psy3gppBand *band, i
     }
     band->pe = band->a - band->b * log2(band->thr);
     band->min_snr = 1.0 / (pow(2.0, band->pe / band_width) - 1.5);
-    if(band->min_snr < 1.26f)     band->min_snr = 1.26f;
-    if(band->min_snr > 316.2277f) band->min_snr = 316.2277f;
+    band->min_snr = av_clipf(band->min_snr, 1.26f, 316.2277f);
 }
 
 /**



More information about the FFmpeg-soc mailing list