Commit ebfaf4c5 authored by Alexander Karsakov's avatar Alexander Karsakov

Added checking that z is non zero to buildWarpPlaneMaps kernel

parent 0aab7795
...@@ -73,8 +73,10 @@ __kernel void buildWarpPlaneMaps(__global uchar * xmapptr, int xmap_step, int xm ...@@ -73,8 +73,10 @@ __kernel void buildWarpPlaneMaps(__global uchar * xmapptr, int xmap_step, int xm
float y = fma(ck_rinv[3], x_, fma(ck_rinv[4], y_, ck_rinv[5] * ct1)); float y = fma(ck_rinv[3], x_, fma(ck_rinv[4], y_, ck_rinv[5] * ct1));
float z = fma(ck_rinv[6], x_, fma(ck_rinv[7], y_, ck_rinv[8] * ct1)); float z = fma(ck_rinv[6], x_, fma(ck_rinv[7], y_, ck_rinv[8] * ct1));
x /= z; if (z != 0)
y /= z; x /= z, y /= z;
else
x = y = -1;
xmap[0] = x; xmap[0] = x;
ymap[0] = y; ymap[0] = y;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment