Commit f33db063 authored by vitor's avatar vitor

Use FFMIN() instead of rewriting it.



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@15248 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 0f2f6c9e
...@@ -284,10 +284,7 @@ static void chomp6(ChannelData *ctx, int16_t *output, uint8_t val, ...@@ -284,10 +284,7 @@ static void chomp6(ChannelData *ctx, int16_t *output, uint8_t val,
current = (short)tab2[(ctx->index & 0x7f0) >> 4][val]; current = (short)tab2[(ctx->index & 0x7f0) >> 4][val];
if ((ctx->previous ^ current) >= 0) { if ((ctx->previous ^ current) >= 0) {
if (ctx->factor + 506 > 32767) ctx->factor = FFMIN(ctx->factor + 506, 32767);
ctx->factor = 32767;
else
ctx->factor += 506;
} else { } else {
if (ctx->factor - 314 < -32768) if (ctx->factor - 314 < -32768)
ctx->factor = -32767; ctx->factor = -32767;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment