Remember the number of blur kernels
Don't count the number of blur kernels everytime. Fixes #188 Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
@ -710,7 +710,8 @@ void get_cfg(options_t *opt, int argc, char *const *argv, bool shadow_enable,
|
||||
break;
|
||||
case 301:
|
||||
// --blur-kern
|
||||
opt->blur_kerns = parse_blur_kern_lst(optarg, &conv_kern_hasneg);
|
||||
opt->blur_kerns = parse_blur_kern_lst(optarg, &conv_kern_hasneg,
|
||||
&opt->blur_kernel_count);
|
||||
if (!opt->blur_kerns) {
|
||||
exit(1);
|
||||
}
|
||||
@ -819,8 +820,10 @@ void get_cfg(options_t *opt, int argc, char *const *argv, bool shadow_enable,
|
||||
// Fill default blur kernel
|
||||
if (opt->blur_method == BLUR_METHOD_KERNEL &&
|
||||
(!opt->blur_kerns || !opt->blur_kerns[0])) {
|
||||
opt->blur_kerns = parse_blur_kern_lst("3x3box", &conv_kern_hasneg);
|
||||
opt->blur_kerns = parse_blur_kern_lst("3x3box", &conv_kern_hasneg,
|
||||
&opt->blur_kernel_count);
|
||||
CHECK(opt->blur_kerns);
|
||||
CHECK(opt->blur_kernel_count);
|
||||
}
|
||||
|
||||
if (opt->resize_damage < 0) {
|
||||
|
Reference in New Issue
Block a user