Lines Matching defs:config

22 int WebPConfigInitInternal(WebPConfig* config,
27 if (config == NULL) return 0;
29 config->quality = quality;
30 config->target_size = 0;
31 config->target_PSNR = 0.;
32 config->method = 4;
33 config->sns_strength = 50;
34 config->filter_strength = 20; // default: light filtering
35 config->filter_sharpness = 0;
36 config->filter_type = 0; // default: simple
37 config->partitions = 0;
38 config->segments = 4;
39 config->pass = 1;
40 config->show_compressed = 0;
41 config->preprocessing = 0;
42 config->autofilter = 0;
43 config->partition_limit = 0;
44 config->alpha_compression = 1;
45 config->alpha_filtering = 1;
46 config->alpha_quality = 100;
47 config->lossless = 0;
48 config->image_hint = WEBP_HINT_DEFAULT;
53 config->sns_strength = 80;
54 config->filter_sharpness = 4;
55 config->filter_strength = 35;
58 config->sns_strength = 80;
59 config->filter_sharpness = 3;
60 config->filter_strength = 30;
63 config->sns_strength = 25;
64 config->filter_sharpness = 6;
65 config->filter_strength = 10;
68 config->sns_strength = 0;
69 config->filter_strength = 0; // disable filtering to retain sharpness
72 config->sns_strength = 0;
73 config->filter_strength = 0; // disable filtering to retain sharpness
74 config->segments = 2;
80 return WebPValidateConfig(config);
83 int WebPValidateConfig(const WebPConfig* config) {
84 if (config == NULL) return 0;
85 if (config->quality < 0 || config->quality > 100)
87 if (config->target_size < 0)
89 if (config->target_PSNR < 0)
91 if (config->method < 0 || config->method > 6)
93 if (config->segments < 1 || config->segments > 4)
95 if (config->sns_strength < 0 || config->sns_strength > 100)
97 if (config->filter_strength < 0 || config->filter_strength > 100)
99 if (config->filter_sharpness < 0 || config->filter_sharpness > 7)
101 if (config->filter_type < 0 || config->filter_type > 1)
103 if (config->autofilter < 0 || config->autofilter > 1)
105 if (config->pass < 1 || config->pass > 10)
107 if (config->show_compressed < 0 || config->show_compressed > 1)
109 if (config->preprocessing < 0 || config->preprocessing > 1)
111 if (config->partitions < 0 || config->partitions > 3)
113 if (config->partition_limit < 0 || config->partition_limit > 100)
115 if (config->alpha_compression < 0)
117 if (config->alpha_filtering < 0)
119 if (config->alpha_quality < 0 || config->alpha_quality > 100)
121 if (config->lossless < 0 || config->lossless > 1)
123 if (config->image_hint >= WEBP_HINT_LAST)