diff options
author | Paul B Mahol <onemda@gmail.com> | 2021-10-23 23:51:42 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2021-10-23 23:53:51 +0200 |
commit | 97cff84f106ff348a48915866ba7f487a77f2c31 (patch) | |
tree | dbf4beb0c4ba57ae4b7bd54d22cde909895abc00 /libavfilter/vf_dblur.c | |
parent | 2148934ce3145940419ccc5b2d7ae93d11a043aa (diff) | |
download | ffmpeg-97cff84f106ff348a48915866ba7f487a77f2c31.tar.gz |
avfilter/vf_dblur: add clipping
Diffstat (limited to 'libavfilter/vf_dblur.c')
-rw-r--r-- | libavfilter/vf_dblur.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_dblur.c b/libavfilter/vf_dblur.c index c1e20fef6c..e821029906 100644 --- a/libavfilter/vf_dblur.c +++ b/libavfilter/vf_dblur.c @@ -241,7 +241,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) if (s->depth == 8) { for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { - dst[x] = lrintf(bptr[x]); + dst[x] = av_clip_uint8(lrintf(bptr[x])); } bptr += width; dst += out->linesize[plane]; @@ -249,7 +249,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) } else { for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { - dst16[x] = lrintf(bptr[x]); + dst16[x] = av_clip_uintp2_c(lrintf(bptr[x]), s->depth); } bptr += width; dst16 += out->linesize[plane] / 2; |