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:
Yuxuan Shui
2019-06-09 01:01:53 +01:00
parent f64ac97a91
commit 1da726047a
3 changed files with 11 additions and 10 deletions

View File

@ -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))) {