Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions modules/ximgproc/src/edgeaware_filters_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,19 @@ inline bool CPU_SUPPORT_SSE1()
} // end
#endif

#if CV_NEON
namespace
{

inline bool CPU_SUPPORT_NEON()
{
static const bool is_supported = cv::checkHardwareSupport(CV_CPU_NEON);
return is_supported;
}

} // end
#endif

namespace cv
{
namespace ximgproc
Expand Down Expand Up @@ -288,6 +301,20 @@ void add_mul(float *dst, float *src1, float *src2, int w)
_mm_storeu_ps(dst + j, c);
}
}
#elif CV_NEON
if (CPU_SUPPORT_NEON())
{
float32x4_t a, b, c;
for (; j < w - 3; j += 4)
{
a = vld1q_f32(src1 + j);
b = vld1q_f32(src2 + j);
b = vmulq_f32(b, a);
c = vld1q_f32(dst + j);
c = vaddq_f32(c, b);
vst1q_f32(dst + j, c);
}
}
#endif
for (; j < w; j++)
{
Expand Down