summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDjordje Senicic2016-01-04 11:34:53 -0600
committerHongmei Gou2016-01-05 18:18:40 -0600
commitcb465674db708fbc4ba9d08c4f0abd9fa2b8ad88 (patch)
tree1bb8d49b606ccc538dfa1bd650588a4a52eac3fd
parent5894d9bc350e583337f78d53795f46c87ba21765 (diff)
downloadqt-opencv-opencl-opengl-multithreaded-cb465674db708fbc4ba9d08c4f0abd9fa2b8ad88.tar.gz
qt-opencv-opencl-opengl-multithreaded-cb465674db708fbc4ba9d08c4f0abd9fa2b8ad88.tar.xz
qt-opencv-opencl-opengl-multithreaded-cb465674db708fbc4ba9d08c4f0abd9fa2b8ad88.zip
Fix bug with index calculation for conj component
-rw-r--r--phillips.cl5
1 files changed, 2 insertions, 3 deletions
diff --git a/phillips.cl b/phillips.cl
index 87fbc1d..bac6dac 100644
--- a/phillips.cl
+++ b/phillips.cl
@@ -218,9 +218,8 @@ kernel void ocl_updateHMap( global float *twiddles, global float2* h0, global fl
218 float w = sqrtf(9.81f * k_len); 218 float w = sqrtf(9.81f * k_len);
219 float omegat = w * t; 219 float omegat = w * t;
220 float2 h0_k = h0[i]; 220 float2 h0_k = h0[i];
221 float2 h0_mk = h0[(((NXY-1)-y)*NXY)+x]; 221 float2 h0_mk = h0[(((NXY-1)-y)*NXY) + (NXY-1-x)];
222 //float2 h_tilda = complex_add (complex_mult( h0_k, complex_exp(w * t)), complex_mult(conjugate(h0_mk), complex_exp(-w * t))); 222 float2 h_tilda = complex_mult( h0_k, complex_exp(omegat)) + complex_mult(conjugate(h0_mk), complex_exp(-omegat));
223 float2 h_tilda = complex_mult( h0_k, complex_exp(w * t)) + complex_mult(conjugate(h0_mk), complex_exp(-w * t));
224 // output frequency-space complex values 223 // output frequency-space complex values
225 ht[i] = h_tilda; 224 ht[i] = h_tilda;
226 } 225 }