[FFmpeg-cvslog] r15248 - trunk/libavcodec/mace.c

vitor subversion
Sun Sep 7 15:46:09 CEST 2008


Author: vitor
Date: Sun Sep  7 15:46:09 2008
New Revision: 15248

Log:
Use FFMIN() instead of rewriting it.



Modified:
   trunk/libavcodec/mace.c

Modified: trunk/libavcodec/mace.c
==============================================================================
--- trunk/libavcodec/mace.c	(original)
+++ trunk/libavcodec/mace.c	Sun Sep  7 15:46:09 2008
@@ -284,10 +284,7 @@ static void chomp6(ChannelData *ctx, int
     current = (short)tab2[(ctx->index & 0x7f0) >> 4][val];
 
     if ((ctx->previous ^ current) >= 0) {
-        if (ctx->factor + 506 > 32767)
-            ctx->factor = 32767;
-        else
-            ctx->factor += 506;
+        ctx->factor = FFMIN(ctx->factor + 506, 32767);
     } else {
         if (ctx->factor - 314 < -32768)
             ctx->factor = -32767;




More information about the ffmpeg-cvslog mailing list