guidedfilter: multithreaded boxblur
This commit is contained in:
@@ -154,6 +154,9 @@ void guidedFilter(const array2D<float> &guide, const array2D<float> &src, array2
|
|||||||
rad = LIM(rad, 0, (min(s.width(), s.height()) - 1) / 2 - 1);
|
rad = LIM(rad, 0, (min(s.width(), s.height()) - 1) / 2 - 1);
|
||||||
float **src = s;
|
float **src = s;
|
||||||
float **dst = d;
|
float **dst = d;
|
||||||
|
#ifdef _OPENMP
|
||||||
|
#pragma omp parallel if (multithread)
|
||||||
|
#endif
|
||||||
boxblur<float, float>(src, dst, blur_buf.data, rad, rad, s.width(), s.height());
|
boxblur<float, float>(src, dst, blur_buf.data, rad, rad, s.width(), s.height());
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user