aboutsummaryrefslogtreecommitdiff
path: root/src/kernel.h
diff options
context:
space:
mode:
authorallusive-dev <[email protected]>2023-09-19 17:46:20 +1000
committerallusive-dev <[email protected]>2023-09-19 17:46:20 +1000
commit5650d887357bf2a3fac8c5fd4f467bf8795b5fc4 (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /src/kernel.h
parentUpdate picom.sample.conf (diff)
downloadcompfy-5650d887357bf2a3fac8c5fd4f467bf8795b5fc4.tar.xz
compfy-5650d887357bf2a3fac8c5fd4f467bf8795b5fc4.zip
reset
Diffstat (limited to 'src/kernel.h')
-rw-r--r--src/kernel.h39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/kernel.h b/src/kernel.h
deleted file mode 100644
index 251d127..0000000
--- a/src/kernel.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// SPDX-License-Identifier: MPL-2.0
-// Copyright (c) Yuxuan Shui <[email protected]>
-
-#pragma once
-#include <stdlib.h>
-#include "compiler.h"
-
-/// Code for generating convolution kernels
-
-typedef struct conv {
- int w, h;
- double *rsum;
- double data[];
-} conv;
-
-/// Calculate the sum of a rectangle part of the convolution kernel
-/// the rectangle is defined by top left (x, y), and a size (width x height)
-double attr_pure sum_kernel(const conv *map, int x, int y, int width, int height);
-double attr_pure sum_kernel_normalized(const conv *map, int x, int y, int width, int height);
-
-/// Create a kernel with gaussian distribution with standard deviation `r`, and size
-/// `size`.
-conv *gaussian_kernel(double r, int size);
-
-/// Create a gaussian kernel with auto detected standard deviation. The choosen standard
-/// deviation tries to make sure the outer most pixels of the shadow are completely
-/// transparent.
-///
-/// @param[in] shadow_radius the radius of the shadow
-conv *gaussian_kernel_autodetect_deviation(int shadow_radius);
-
-/// preprocess kernels to make shadow generation faster
-/// shadow_sum[x*d+y] is the sum of the kernel from (0, 0) to (x, y), inclusive
-void sum_kernel_preprocess(conv *map);
-
-static inline void free_conv(conv *k) {
- free(k->rsum);
- free(k);
-}