guidedfilter: apply changes requested by @Floessie in code review

This commit is contained in:
Ingo Weyrich
2019-09-23 13:39:50 +02:00
parent f03605b735
commit 3ca7f09655

View File

@@ -66,7 +66,7 @@ void guidedFilter(const array2D<float> &guide, const array2D<float> &src, array2
enum Op {MUL, DIVEPSILON, SUBMUL};
const auto apply =
[=](Op op, array2D<float> &res, const array2D<float> &a, const array2D<float> &b, const array2D<float> &c=array2D<float>()) -> void
[multithread, epsilon](Op op, array2D<float> &res, const array2D<float> &a, const array2D<float> &b, const array2D<float> &c=array2D<float>()) -> void
{
const int w = res.width();
const int h = res.height();
@@ -96,13 +96,13 @@ void guidedFilter(const array2D<float> &guide, const array2D<float> &src, array2
};
const auto f_subsample =
[=](array2D<float> &d, const array2D<float> &s) -> void
[multithread](array2D<float> &d, const array2D<float> &s) -> void
{
rescaleBilinear(s, d, multithread);
};
const auto f_mean =
[&](array2D<float> &d, array2D<float> &s, int rad) -> void
[multithread](array2D<float> &d, array2D<float> &s, int rad) -> void
{
rad = LIM(rad, 0, (min(s.width(), s.height()) - 1) / 2 - 1);
boxblur(s, d, rad, s.width(), s.height(), multithread);