# HG changeset patch # User vitor # Date 1220795169 0 # Node ID ed61b4ffdd7ef9f360d0026c23220820f18e3ff2 # Parent 06d3f6968b90bbfe64872e3caf64d807b3c4d3bb Use FFMIN() instead of rewriting it. diff -r 06d3f6968b90 -r ed61b4ffdd7e mace.c --- a/mace.c Sun Sep 07 13:42:34 2008 +0000 +++ b/mace.c Sun Sep 07 13:46:09 2008 +0000 @@ -284,10 +284,7 @@ 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;