mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
swr/resample: fix filter rounding and cliping for s32
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
cf7b71b0b8
commit
91debec976
@ -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++)
|
||||
|
Loading…
Reference in New Issue
Block a user