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:
@ -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);
|
||||
|
Reference in New Issue
Block a user