OSDN Git Service

Simplify: use FFMAX
authorVitor Sessak <vitor1001@gmail.com>
Sun, 13 Jul 2008 20:36:32 +0000 (20:36 +0000)
committerVitor Sessak <vitor1001@gmail.com>
Sun, 13 Jul 2008 20:36:32 +0000 (20:36 +0000)
Originally committed as revision 14215 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/ra288.c

index 57ee6c2..35d21f4 100644 (file)
@@ -74,8 +74,7 @@ static void decode(Real288_internal *glob, float gain, int cb_coef)
 
     sum = scalar_product_float(buffer, buffer, 5) / 5;
 
-    if (sum < 1)
-        sum = 1;
+    sum = FFMAX(sum, 1);
 
     /* shift and store */
     memmove(glob->lhist, glob->lhist - 1, 10 * sizeof(*glob->lhist));