new backend: don't assume center of blur kernel is 1
Also fill the center of parsed kernel with 1. This shouldn't change the behavior of the old backends since they will modify the center of the kernels. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
@ -139,7 +139,7 @@ conv *parse_blur_kern(const char *src, const char **endptr, bool *hasneg) {
|
||||
for (int i = 0; i < width * height; ++i) {
|
||||
// Ignore the center element
|
||||
if (i == skip) {
|
||||
matrix->data[i] = 0;
|
||||
matrix->data[i] = 1;
|
||||
continue;
|
||||
}
|
||||
if (src == (pc = parse_readnum(src, &val))) {
|
||||
|
Reference in New Issue
Block a user