]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Use FFMIN() instead of rewriting it.
authorvitor <vitor@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 7 Sep 2008 13:46:09 +0000 (13:46 +0000)
committervitor <vitor@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 7 Sep 2008 13:46:09 +0000 (13:46 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@15248 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/mace.c

index 79e9b30ef1c5f556963ce09e7b4dc9248d950ca8..dced77da1fbe4f89df83128662b4a42fd39a1084 100644 (file)
@@ -284,10 +284,7 @@ static void chomp6(ChannelData *ctx, int16_t *output, uint8_t val,
     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;