Mercurial > libavcodec.hg
changeset 7811:ed61b4ffdd7e libavcodec
Use FFMIN() instead of rewriting it.
author | vitor |
---|---|
date | Sun, 07 Sep 2008 13:46:09 +0000 |
parents | 06d3f6968b90 |
children | 54348529f568 |
files | mace.c |
diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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;