changeset 7269:04ecb6594999 libavcodec

Another av_clipf() usage
author vitor
date Sun, 13 Jul 2008 20:39:55 +0000
parents 7e51fc7805ac
children 26818b216bfb
files ra288.c
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ra288.c	Sun Jul 13 20:38:42 2008 +0000
+++ b/ra288.c	Sun Jul 13 20:39:55 2008 +0000
@@ -62,10 +62,7 @@
     /* convert log and do rms */
     sum = 32. - scalar_product_float(glob->pr2, glob->lhist, 10);
 
-    if (sum < 0)
-        sum = 0;
-    else if (sum > 60)
-        sum = 60;
+    sum = av_clipf(sum, 0, 60);
 
     sumsum = exp(sum * 0.1151292546497) * gain;    /* pow(10.0,sum/20)*f */