From 9bd2b8e50ca2e8e0b52580714b54dbca33b809a5 Mon Sep 17 00:00:00 2001 From: Bradley Sepos Date: Wed, 10 Jan 2018 23:58:02 -0500 Subject: libhb: Allow NLMeans prefilter passthru when strength is 0 (zero). --- libhb/nlmeans.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libhb/nlmeans.c') diff --git a/libhb/nlmeans.c b/libhb/nlmeans.c index 19bd99e5a..d5dd4a2c1 100644 --- a/libhb/nlmeans.c +++ b/libhb/nlmeans.c @@ -1109,16 +1109,16 @@ static void nlmeans_filter_thread(void *thread_args_v) for (int c = 0; c < 3; c++) { - if (pv->strength[c] == 0) + if (pv->prefilter[c] & NLMEANS_PREFILTER_MODE_PASSTHRU) { + nlmeans_prefilter(&frame->plane[c], pv->prefilter[c]); nlmeans_deborder(&frame->plane[c], buf->plane[c].data, buf->plane[c].width, buf->plane[c].stride, buf->plane[c].height); continue; } - if (pv->prefilter[c] & NLMEANS_PREFILTER_MODE_PASSTHRU) + if (pv->strength[c] == 0) { - nlmeans_prefilter(&frame->plane[c], pv->prefilter[c]); nlmeans_deborder(&frame->plane[c], buf->plane[c].data, buf->plane[c].width, buf->plane[c].stride, buf->plane[c].height); @@ -1240,16 +1240,16 @@ static hb_buffer_t * nlmeans_filter_flush(hb_filter_private_t *pv) for (int c = 0; c < 3; c++) { - if (pv->strength[c] == 0) + if (pv->prefilter[c] & NLMEANS_PREFILTER_MODE_PASSTHRU) { + nlmeans_prefilter(&frame->plane[c], pv->prefilter[c]); nlmeans_deborder(&frame->plane[c], buf->plane[c].data, buf->plane[c].width, buf->plane[c].stride, buf->plane[c].height); continue; } - if (pv->prefilter[c] & NLMEANS_PREFILTER_MODE_PASSTHRU) + if (pv->strength[c] == 0) { - nlmeans_prefilter(&frame->plane[c], pv->prefilter[c]); nlmeans_deborder(&frame->plane[c], buf->plane[c].data, buf->plane[c].width, buf->plane[c].stride, buf->plane[c].height); -- cgit v1.2.3