// Also weight the centered pixel
wa[x].total_weight += 1.f;
wa[x].sum += 1.f * src[x];
- dst[x] = av_clip_uint8(wa[x].sum / wa[x].total_weight);
+ dst[x] = av_clip_uint8(wa[x].sum / wa[x].total_weight + 0.5f);
}
dst += dst_linesize;
src += src_linesize;
{ NULL }
};
-AVFilter ff_vf_nlmeans = {
+const AVFilter ff_vf_nlmeans = {
.name = "nlmeans",
.description = NULL_IF_CONFIG_SMALL("Non-local means denoiser."),
.priv_size = sizeof(NLMeansContext),