mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 13:47:32 +08:00
cv::polarToCart
This commit is contained in:
parent
d5f006eee5
commit
ccdc71286c
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user