30 const int width,
const int height,
31 const float xu,
const float yu,
34 const int col = get_global_id(0);
35 const int row = get_global_id(1);
36 if(col >= width || row >= height)
return;
39 ls_eval_map(&p, xu + (
float)col, yu + (
float)row, out);
41 global
float *dst = res + ((size_t)row * width + col) * 6;
42 for(
int k = 0; k < 6; k++) dst[k] = out[k];
47 const int width,
const int height,
48 const float xu,
const float yu,
51 const int col = get_global_id(0);
52 const int row = get_global_id(1);
53 if(col >= width || row >= height)
return;
55 res[(size_t)row * width + col] =
kernel void ls_vignette_map(global float *res, const int width, const int height, const float xu, const float yu, const ls_eval_t p)
kernel void ls_subpixel_geometry(global float *res, const int width, const int height, const float xu, const float yu, const ls_eval_t p)
The closed forms, written once, compiled as C99 and as OpenCL C.
static void ls_eval_map(const ls_eval_t *p, float xu, float yu, float *out)
The map for ONE output pixel: six floats, source coordinates for R, G, B.
static float ls_eval_vignette_factor(const ls_eval_t *p, float xu, float yu)
The vignetting multiplier for ONE output pixel. Multiply the pixel by it.
One lens resolved at one shooting configuration, as a flat block of scalars.