diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2008-09-07 13:46:09 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2008-09-07 13:46:09 +0000 |
commit | f9f7210e5ebe35308112e6144afb0054c7725719 (patch) | |
tree | 170a04e0de744e5c6b07ebe7e4263c4804ec0074 /libavcodec/mace.c | |
parent | 42c7aeea67883b3869ec684b371d3838be52801f (diff) | |
download | ffmpeg-f9f7210e5ebe35308112e6144afb0054c7725719.tar.gz |
Use FFMIN() instead of rewriting it.
Originally committed as revision 15248 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mace.c')
-rw-r--r-- | libavcodec/mace.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libavcodec/mace.c b/libavcodec/mace.c index 79e9b30ef1..dced77da1f 100644 --- a/libavcodec/mace.c +++ b/libavcodec/mace.c @@ -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; |