Commit 91debec9 authored by Michael Niedermayer's avatar Michael Niedermayer

swr/resample: fix filter rounding and cliping for s32

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent cf7b71b0
......@@ -142,7 +142,7 @@ static int build_filter(ResampleContext *c, void *filter, double factor, int tap
break;
case AV_SAMPLE_FMT_S32P:
for(i=0;i<tap_count;i++)
((int32_t*)filter)[ph * alloc + i] = av_clip(lrintf(tab[i] * scale / norm), INT32_MIN, INT32_MAX);
((int32_t*)filter)[ph * alloc + i] = av_clipl_int32(llrint(tab[i] * scale / norm));
break;
case AV_SAMPLE_FMT_FLTP:
for(i=0;i<tap_count;i++)
......
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