Commit b3224d5b authored by Salamandar's avatar Salamandar Committed by Øyvind "pippin" Kolås

Cleanup after meson port.

* As the build is always out-of-source, we don't need gitignores
  everywhere. I added sane defaults in the top-level gitignore.

* Remove auto-generated sources (*.cl.h) as they are *not* used at build
  time (the ones in the build directory are)
parent 4e31e833
*.orig
*.rej
*.sw?
*~
/.cdtproject
/.project
/.tm_project.cache
/ABOUT-NLS
/ChangeLog
/INSTALL
/Makefile
/Makefile.in
/README
/aclocal.m4
/autom4te.cache
/compile
/confdefs.h
/config.cache
/config.guess
/config.h
/config.h.in
/config.log
/config.rpath
/config.status
/config.sub
/configure
/depcomp
/gegl-config
/gegl-uninstalled.pc
/gegl-*.pc
/gegl.prj
/gegl.pws
/gegl.spec
/install-sh
/libtool
/ltconfig
/ltmain.sh
/mingw32-config.cache
/missing
/mkinstalldirs
/py-compile
/share
/stamp-h
/stamp-h.in
/stamp-h1
/test-driver
/tests/*/*.log
/tests/*/*.trs
cscope.files
cscope.out
/*.project
/docs/NEWS.html
/docs/gcut.html
/docs/gegl-chain.html
tests/simple/test-node-exponential
# Meson build system
/_build
/compile_commands.json
# Atom
/.vscode
/.deps
/.libs
/Makefile
/Makefile.in
/gegl*
/*.o
/Makefile
/Makefile.in
/TODO.html
/api.html
/brightness-contrast.c.html
/class-hierarchy.html
/development.html
/gegl-operation-area-filter.h.html
/gegl-operation-composer.h.html
/gegl-operation-filter.h.html
/gegl-operation-meta.h.html
/gegl-operation-point-composer.h.html
/gegl-operation-point-filter.h.html
/gegl-operation-point-render.h.html
/gegl-operation-sink.h.html
/gegl-operation-source.h.html
/gegl-operation-temporal.h.html
/gegl-operation.h.html
/gegl-plugin.h.html
/gegl.devhelp
/gegl.h.html
/index-static.html
/index-static.txt
/index.html
/runinfo
/copyright.txt
/hello-world.txt
/index.txt
/abyss_policy.html
/bugzilla.html
/build.html
/commandline.html
/contribute.html
/copyright.html
/editor.html
/environment.html
/features.html
/glossary.html
/hello-world.html
/journal.html
/operation-api.html
/operations.json
/source-overview.html
/todo.html
/operations
/inheritance.png
/inheritance.png
/examples
/*.lo
/*.la
/*.o
/.deps
/.libs
/Makefile
/Makefile.in
/*.exe
/2geglbuffer
/frame-counter
/gegl-convert
/gegl-slicer
/geglbuffer-add-image
/geglbuffer-clock
/hello-world
/sdl-draw
/video-invert
/gegl-video
/*.lo
/*.la
/.deps
/.libs
/gegl
/gegl-version.h
/Makefile
/Makefile.in
/*.gir
/*.typelib
/*.vapi
/*.deps
/*.metadata
/Makefile
/Makefile.in
/.deps
/.libs
/*.lo
/*.la
/.deps
/.libs
/Makefile
/Makefile.in
/*.lo
/*.la
/Makefile
/Makefile.in
/.deps
/.libs
/*.lo
/*.la
/*.lo
/*.la
/.deps
/.libs
/Makefile
/Makefile.in
/.deps
/.libs
/Makefile
/Makefile.in
/*.lo
/*.la
/.deps
/.libs
/Makefile
/Makefile.in
/*.lo
/*.la
/.deps
/.libs
/Makefile
/Makefile.in
/*.lo
/*.la
/Makefile
/Makefile.in
/Makefile
/Makefile.in
/.deps/
/.libs/
/*.lo
/*.la
\ No newline at end of file
/.deps
/.libs
/Makefile
/Makefile.in
/librgbe.la
/librgbe_la-rgbe.lo
/Makefile
/Makefile.in
/.deps
/.libs
/*.lo
/*.la
static const char* alien_map_cl_source =
"/* This file is an image processing operation for GEGL \n"
" * \n"
" * GEGL is free software; you can redistribute it and/or \n"
" * modify it under the terms of the GNU Lesser General Public \n"
" * License as published by the Free Software Foundation; either \n"
" * version 3 of the License, or (at your option) any later version. \n"
" * \n"
" * GEGL is distributed in the hope that it will be useful, \n"
" * but WITHOUT ANY WARRANTY; without even the implied warranty of \n"
" * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU \n"
" * Lesser General Public License for more details. \n"
" * \n"
" * You should have received a copy of the GNU Lesser General Public \n"
" * License along with GEGL; if not, see <https://www.gnu.org/licenses/>. \n"
" * \n"
" * Copyright 2013 Carlos Zubieta <czubieta.dev@gmail.com> \n"
" */ \n"
" \n"
"__kernel void cl_alien_map(__global const float4 *in, \n"
" __global float4 *out, \n"
" float3 freq, \n"
" float3 phaseshift, \n"
" int3 keep) \n"
"{ \n"
" int gid = get_global_id(0); \n"
" float4 in_v = in[gid]; \n"
" float3 unit = (float3) (1.0f, 1.0f, 1.0f); \n"
" float3 tmp = 0.5f * (unit \n"
" + sin((2.0f * in_v.xyz - unit) * freq.xyz + phaseshift.xyz));\n"
" float4 out_v; \n"
" \n"
" out_v.xyz = keep.xyz ? in_v.xyz : tmp; \n"
" out_v.w = in_v.w; \n"
" out[gid] = out_v; \n"
"} \n"
;
This diff is collapsed.
static const char* bilateral_filter_cl_source =
"#define POW2(a) ((a) * (a)) \n"
"kernel void bilateral_filter(global float4 *in, \n"
" global float4 *out, \n"
" const float radius, \n"
" const float preserve) \n"
"{ \n"
" int gidx = get_global_id(0); \n"
" int gidy = get_global_id(1); \n"
" int n_radius = ceil(radius); \n"
" int dst_width = get_global_size(0); \n"
" int src_width = dst_width + n_radius * 2; \n"
" \n"
" int u, v, i, j; \n"
" float4 center_pix = \n"
" in[(gidy + n_radius) * src_width + gidx + n_radius]; \n"
" float4 accumulated = 0.0f; \n"
" float4 tempf = 0.0f; \n"
" float count = 0.0f; \n"
" float diff_map, gaussian_weight, weight; \n"
" \n"
" for (v = -n_radius;v <= n_radius; ++v) \n"
" { \n"
" for (u = -n_radius;u <= n_radius; ++u) \n"
" { \n"
" i = gidx + n_radius + u; \n"
" j = gidy + n_radius + v; \n"
" \n"
" int gid1d = i + j * src_width; \n"
" tempf = in[gid1d]; \n"
" \n"
" diff_map = exp ( \n"
" - ( POW2(center_pix.x - tempf.x) \n"
" + POW2(center_pix.y - tempf.y) \n"
" + POW2(center_pix.z - tempf.z)) \n"
" * preserve); \n"
" \n"
" gaussian_weight = \n"
" exp( - 0.5f * (POW2(u) + POW2(v)) / radius); \n"
" \n"
" weight = diff_map * gaussian_weight; \n"
" \n"
" accumulated += tempf * weight; \n"
" count += weight; \n"
" } \n"
" } \n"
" out[gidx + gidy * dst_width] = accumulated / count; \n"
"} \n"
;
static const char* box_blur_cl_source =
"__kernel void kernel_blur_hor (__global const float4 *in, \n"
" __global float4 *aux, \n"
" int width, int radius) \n"
"{ \n"
" const int in_index = get_global_id(0) * (width + 2 * radius) \n"
" + (radius + get_global_id (1)); \n"
" \n"
" const int aux_index = get_global_id(0) * width + get_global_id (1); \n"
" int i; \n"
" float4 mean; \n"
" \n"
" mean = (float4)(0.0f); \n"
" \n"
" if (get_global_id(1) < width) \n"
" { \n"
" for (i=-radius; i <= radius; i++) \n"
" { \n"
" mean += in[in_index + i]; \n"
" } \n"
" aux[aux_index] = mean / (float)(2 * radius + 1); \n"
" } \n"
"} \n"
" \n"
"__kernel void kernel_blur_ver (__global const float4 *aux, \n"
" __global float4 *out, \n"
" int width, int radius) \n"
"{ \n"
" const int out_index = get_global_id(0) * width + get_global_id (1); \n"
" int i; \n"
" float4 mean; \n"
" \n"
" mean = (float4)(0.0f); \n"
" int aux_index = get_global_id(0) * width + get_global_id (1); \n"
" \n"
" if (get_global_id(1) < width) \n"
" { \n"
" for (i=-radius; i <= radius; i++) \n"
" { \n"
" mean += aux[aux_index]; \n"
" aux_index += width; \n"
" } \n"
" out[out_index] = mean / (float)(2 * radius + 1); \n"
" } \n"
"} \n"
" \n"
"__kernel \n"
"__attribute__((reqd_work_group_size(256,1,1))) \n"
"void kernel_box_blur_fast (__global const float4 *in, \n"
" __global float4 *out, \n"
" __local float4 *column_sum, \n"
" const int width, \n"
" const int height, \n"
" const int radius, \n"
" const int size) \n"
"{ \n"
" const int local_id0 = get_local_id(0); \n"
" const int twice_radius = 2 * radius; \n"
" const int in_width = twice_radius + width; \n"
" const int in_height = twice_radius + height; \n"
" const int start = max( -radius, -local_id0 ); \n"
" const int stop = min( radius, (int)get_local_size(0) - local_id0 ); \n"
" const float4 area = (float4) ( ((stop - start) + 1) * (twice_radius + 1) ); \n"
" int column_index_start,column_index_end; \n"
" int y = get_global_id(1) * size; \n"
" const int out_x = get_group_id(0) \n"
" * ( get_local_size(0) - twice_radius ) + local_id0 - radius;\n"
" const int in_x = out_x + radius; \n"
" int tmp_size = size; \n"
" int tmp_index = 0; \n"
" float4 tmp_sum = (float4)0.0f; \n"
" float4 total_sum = (float4)0.0f; \n"
" \n"
" if (in_x < in_width) \n"
" { \n"
" column_index_start = y; \n"
" column_index_end = y + twice_radius; \n"
" \n"
" for (int i = 0; i < twice_radius + 1; ++i) \n"
" { \n"
" tmp_sum += in[(y + i) * in_width + in_x]; \n"
" } \n"
" \n"
" column_sum[local_id0] = tmp_sum; \n"
" } \n"
" \n"
" barrier(CLK_LOCAL_MEM_FENCE); \n"
" \n"
" while (1) \n"
" { \n"
" if (out_x < width) \n"
" { \n"
" total_sum = (float4)0.0f; \n"
" \n"
" for (int i = start; i < stop; ++i) \n"
" { \n"
" total_sum += column_sum[local_id0 + i]; \n"
" } \n"
" \n"
" out[y * width + out_x] = total_sum / area; \n"
" } \n"
" \n"
" if (--tmp_size == 0 || y == height - 1) \n"
" break; \n"
" \n"
" barrier(CLK_LOCAL_MEM_FENCE); \n"
" \n"
" ++y; \n"
" \n"
" if (in_x < in_width) \n"
" { \n"
" tmp_sum = column_sum[local_id0]; \n"
" tmp_sum -= in[(column_index_start) * in_width + in_x]; \n"
" tmp_sum += in[(column_index_end + 1) * in_width + in_x]; \n"
" ++column_index_start; \n"
" ++column_index_end; \n"
" column_sum[local_id0] = tmp_sum; \n"
" } \n"
" \n"
" barrier(CLK_LOCAL_MEM_FENCE); \n"
" } \n"
"} \n"
;
static const char* box_max_cl_source =
"__kernel void kernel_max_hor (__global const float4 *in, \n"
" __global float4 *aux, \n"
" int width, int radius) \n"
"{ \n"
" const int in_index = get_global_id(0) * (width + 2 * radius) \n"
" + (radius + get_global_id (1)); \n"
" \n"
" const int aux_index = get_global_id(0) * width + get_global_id (1); \n"
" int i; \n"
" float4 max; \n"
" float4 in_v; \n"
" \n"
" max = (float4)(-FLT_MAX); \n"
" \n"
" if (get_global_id(1) < width) \n"
" { \n"
" for (i=-radius; i <= radius; i++) \n"
" { \n"
" in_v = in[in_index + i]; \n"
" max = max < in_v ? in_v : max; \n"
" } \n"
" aux[aux_index] = max; \n"
" } \n"
"} \n"
" \n"
"__kernel void kernel_max_ver (__global const float4 *aux, \n"
" __global float4 *out, \n"
" int width, int radius) \n"
"{ \n"
" \n"
" const int out_index = get_global_id(0) * width + get_global_id (1); \n"
" int aux_index = out_index; \n"
" int i; \n"
" float4 max; \n"
" float4 aux_v; \n"
" \n"
" max = (float4)(-FLT_MAX); \n"
" \n"
" if(get_global_id(1) < width) \n"
" { \n"
" for (i=-radius; i <= radius; i++) \n"
" { \n"
" aux_v = aux[aux_index]; \n"
" max = max < aux_v ? aux_v : max; \n"
" aux_index += width; \n"
" } \n"
" out[out_index] = max; \n"
" } \n"
"} \n"
;
static const char* box_min_cl_source =
"__kernel void kernel_min_hor (__global const float4 *in, \n"
" __global float4 *aux, \n"
" int width, int radius) \n"
"{ \n"
" const int in_index = get_global_id(0) * (width + 2 * radius) \n"
" + (radius + get_global_id (1)); \n"
" \n"
" const int aux_index = get_global_id(0) * width + get_global_id (1); \n"
" int i; \n"
" float4 min; \n"
" float4 in_v; \n"
" \n"
" min = (float4)(FLT_MAX); \n"
" \n"
" if (get_global_id(1) < width) \n"
" { \n"
" for (i=-radius; i <= radius; i++) \n"
" { \n"
" in_v = in[in_index + i]; \n"
" min = min > in_v ? in_v : min; \n"
" } \n"
" aux[aux_index] = min; \n"
" } \n"
"} \n"
" \n"
"__kernel void kernel_min_ver (__global const float4 *aux, \n"
" __global float4 *out, \n"
" int width, int radius) \n"
"{ \n"
" \n"
" const int out_index = get_global_id(0) * width + get_global_id (1); \n"
" int aux_index = out_index; \n"
" int i; \n"
" float4 min; \n"
" float4 aux_v; \n"
" \n"
" min = (float4)(FLT_MAX); \n"
" \n"
" if(get_global_id(1) < width) \n"
" { \n"
" for (i=-radius; i <= radius; i++) \n"
" { \n"
" aux_v = aux[aux_index]; \n"
" min = min > aux_v ? aux_v : min; \n"
" aux_index += width; \n"
" } \n"
" out[out_index] = min; \n"
" } \n"
"} \n"
;
static const char* boxblur_1d_cl_source =
"__kernel void box_blur_hor (__global const float4 *in, \n"
" __global float4 *out, \n"
" const int radius) \n"
"{ \n"
" const int size = 2 * radius + 1; \n"
" const int gidx = get_global_id (0); \n"
" const int gidy = get_global_id (1); \n"
" const int src_rowstride = get_global_size (0) + size - 1; \n"
" const int dst_rowstride = get_global_size (0); \n"
" \n"
" const int src_offset = gidx + gidy * src_rowstride + radius; \n"
" const int dst_offset = gidx + gidy * dst_rowstride; \n"
" \n"
" const int src_start_ind = src_offset - radius; \n"
" \n"
" float4 mean = 0.0f; \n"
" \n"
" for (int i = 0; i < size; i++) \n"
" { \n"
" mean += in[src_start_ind + i]; \n"
" } \n"
" \n"
" out[dst_offset] = mean / (float)(size); \n"
"} \n"
" \n"
"__kernel void box_blur_ver (__global const float4 *in, \n"
" __global float4 *out, \n"
" const int radius) \n"
"{ \n"
" const int size = 2 * radius + 1; \n"
" const int gidx = get_global_id (0); \n"
" const int gidy = get_global_id (1); \n"
" const int src_rowstride = get_global_size (0); \n"
" const int dst_rowstride = get_global_size (0); \n"
" \n"
" const int src_offset = gidx + (gidy + radius) * src_rowstride; \n"
" const int dst_offset = gidx + gidy * dst_rowstride; \n"
" \n"
" const int src_start_ind = src_offset - radius * src_rowstride; \n"
" \n"
" float4 mean = 0.0f; \n"
" \n"
" for (int i = 0; i < size; i++) \n"
" { \n"
" mean += in[src_start_ind + i * src_rowstride]; \n"
" } \n"
" \n"
" out[dst_offset] = mean / (float)(size); \n"
"} \n"
;
static const char* brightness_contrast_cl_source =
"__kernel void gegl_brightness_contrast(__global const float4 *in, \n"
" __global float4 *out, \n"
" float contrast, \n"
" float brightness) \n"
"{ \n"
" int gid = get_global_id(0); \n"
" float4 in_v = in[gid]; \n"
" float4 out_v; \n"
" out_v.xyz = (in_v.xyz - 0.5f) * contrast + brightness + 0.5f; \n"
" out_v.w = in_v.w; \n"
" out[gid] = out_v; \n"
"} \n"
;
static const char* c2g_cl_source =
"#define ANGLE_PRIME 95273 \n"
"#define RADIUS_PRIME 29537 \n"
" \n"
"void sample_min_max(const __global float4 *src_buf, \n"
" int src_width, \n"
" int src_height, \n"
" const __global float *radiuses, \n"
" const __global float *lut_cos, \n"
" const __global float *lut_sin, \n"
" int x, \n"
" int y, \n"
" int radius, \n"
" int samples, \n"
" float4 *min, \n"
" float4 *max, \n"
" int j, \n"
" int iterations) \n"
"{ \n"
" float4 best_min; \n"
" float4 best_max; \n"
" float4 center_pix = *(src_buf + src_width * y + x); \n"
" int i; \n"
" \n"
" best_min = center_pix; \n"
" best_max = center_pix; \n"
" \n"
" int angle_no = (src_width * y + x) * (iterations) * \n"
" samples + j * samples; \n"
" int radius_no = angle_no; \n"
" angle_no %= ANGLE_PRIME; \n"
" radius_no %= RADIUS_PRIME; \n"
" for(i=0; i<samples; i++) \n"
" { \n"
" int angle; \n"
" float rmag; \n"
" /* if we've sampled outside the valid image \n"
" area, we grab another sample instead, this \n"
" should potentially work better than mirroring \n"
" or extending the image */ \n"
" \n"
" angle = angle_no++; \n"
" rmag = radiuses[radius_no++] * radius; \n"