cv::polarToCart

This commit is contained in:
Ilya Lavrenov 2014-10-12 04:54:27 -07:00
parent d5f006eee5
commit ccdc71286c

View File

@ -892,12 +892,25 @@ void polarToCart( InputArray src1, InputArray src2,
SinCos_32f( angle, y, x, len, angleInDegrees );
if( mag )
for( k = 0; k < len; k++ )
{
k = 0;
#if CV_NEON
for( ; k <= len - 4; k += 4 )
{
float32x4_t v_m = vld1q_f32(mag + k);
vst1q_f32(x + k, vmulq_f32(vld1q_f32(x + k), v_m));
vst1q_f32(y + k, vmulq_f32(vld1q_f32(y + k), v_m));
}
#endif
for( ; k < len; k++ )
{
float m = mag[k];
x[k] *= m; y[k] *= m;
}
}
}
else
{
const double *mag = (const double*)ptrs[0], *angle = (const double*)ptrs[1];