Rectangle kernels

Replace conv::size with conv::{w,h}.

Shadow kernels are still squares, though.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-02-17 21:54:35 +00:00
parent cea010afec
commit b2750b26e0
4 changed files with 32 additions and 32 deletions

View File

@ -8,7 +8,7 @@
/// Code for generating convolution kernels
typedef struct conv {
int size;
int w, h;
double *rsum;
double data[];
} conv;
@ -23,7 +23,7 @@ conv *gaussian_kernel(double r);
/// 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 shadow_preprocess(conv *map);
void sum_kernel_preprocess(conv *map);
static inline void free_conv(conv *k) {
free(k->rsum);