summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2022-06-23 14:47:29 +0200
committerPaul B Mahol <onemda@gmail.com>2022-06-23 18:50:54 +0200
commit5a4ffb4f5ef6ab68132f74d845a911ac65c1019f (patch)
tree13c3b8fbbb9f91603326ee166c8754b51d78e898 /libavfilter
parentfed07efcde72824ac1ada80d4af4e91ac4fcfc14 (diff)
avfilter/vf_gblur: properly round output
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_gblur.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/libavfilter/vf_gblur.c b/libavfilter/vf_gblur.c
index b88a9a6d26..8bb851a774 100644
--- a/libavfilter/vf_gblur.c
+++ b/libavfilter/vf_gblur.c
@@ -280,17 +280,15 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
width * sizeof(float), height);
} else if (s->depth == 8) {
for (y = 0; y < height; y++) {
- for (x = 0; x < width; x++) {
- dst[x] = bptr[x];
- }
+ for (x = 0; x < width; x++)
+ dst[x] = lrintf(bptr[x]);
bptr += width;
dst += out->linesize[plane];
}
} else {
for (y = 0; y < height; y++) {
- for (x = 0; x < width; x++) {
- dst16[x] = bptr[x];
- }
+ for (x = 0; x < width; x++)
+ dst16[x] = lrintf(bptr[x]);
bptr += width;
dst16 += out->linesize[plane] / 2;
}