mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-14 22:22:59 +02:00
avfilter/vf_dblur: add clipping
This commit is contained in:
parent
2148934ce3
commit
97cff84f10
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user