diff --git a/NEWS b/NEWS index 7c4be654..43b39e7b 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ - next version: * WebPINewRGB/WebPINewYUVA accept being passed a NULL output buffer and will perform auto-allocation. + * default filter option is now '-strong -f 60' - 10/30/12: version 0.2.1 * Various security related fixes diff --git a/README b/README index 990661cd..9a56abe4 100644 --- a/README +++ b/README @@ -151,7 +151,8 @@ options: -sns ............. Spatial Noise Shaping (0:off, 100:max) -f ............... filter strength (0=off..100) -sharpness ....... filter sharpness (0:most .. 7:least sharp) - -strong ................ use strong filter instead of simple. + -strong ................ use strong filter instead of simple (default). + -nostrong .............. use simple filter instead of strong. -partition_limit . limit quality to fit the 512k limit on the first partition (0=no degradation ... 100=full) -pass ............ analysis pass number (1..10) @@ -211,8 +212,8 @@ Namely: in-loop processing. The higher the value, the smoother the highly-compressed area will look. This is particularly useful when aiming at very small files. Typical values are around 20-30. Note that using the - option -strong will change the type of filtering. Use "-f 0" to turn - filtering off. + option -strong/-nostrong will change the type of filtering. Use "-f 0" to + turn filtering off. * 'm' controls the trade-off between encoding speed and quality. Default is 4. You can try -m 5 or -m 6 to explore more (time-consuming) encoding possibilities. A lower value will result in faster encoding at the expense diff --git a/examples/cwebp.c b/examples/cwebp.c index 213edffe..3d81e25f 100644 --- a/examples/cwebp.c +++ b/examples/cwebp.c @@ -537,7 +537,9 @@ static void HelpLong(void) { printf(" -f ............... filter strength (0=off..100)\n"); printf(" -sharpness ....... " "filter sharpness (0:most .. 7:least sharp)\n"); - printf(" -strong ................ use strong filter instead of simple.\n"); + printf(" -strong ................ use strong filter instead " + "of simple (default).\n"); + printf(" -nostrong .............. use simple filter instead of strong.\n"); printf(" -partition_limit . limit quality to fit the 512k limit on\n"); printf(" " "the first partition (0=no degradation ... 100=full)\n"); @@ -724,6 +726,8 @@ int main(int argc, const char *argv[]) { config.emulate_jpeg_size = 1; } else if (!strcmp(argv[c], "-strong")) { config.filter_type = 1; + } else if (!strcmp(argv[c], "-nostrong")) { + config.filter_type = 0; } else if (!strcmp(argv[c], "-sharpness") && c < argc - 1) { config.filter_sharpness = strtol(argv[++c], NULL, 0); } else if (!strcmp(argv[c], "-pass") && c < argc - 1) { diff --git a/man/cwebp.1 b/man/cwebp.1 index cce82b2c..5d1b3bbb 100644 --- a/man/cwebp.1 +++ b/man/cwebp.1 @@ -1,5 +1,5 @@ .\" Hey, EMACS: -*- nroff -*- -.TH CWEBP 1 "February 6, 2013" +.TH CWEBP 1 "February 15, 2013" .SH NAME cwebp \- compress an image file to a WebP file .SH SYNOPSIS @@ -94,8 +94,12 @@ Specify the sharpness of the filtering (if used). Range is 0 (sharpest) to 7 (least sharp). Default is 0. .TP .B \-strong -Use a stronger filtering than the default one (if filtering is being -used thanks to the \fB\-f\fP option). Strong filtering is off by default. +Use strong filtering (if filtering is being used thanks to the +\fB\-f\fP option). Strong filtering is on by default. +.TP +.B \-nostrong +Disable strong filtering (if filtering is being used thanks to the +\fB\-f\fP option) and use simple filtering instead. .TP .BI \-segments " int Change the number of partitions to use during the segmentation of the @@ -224,7 +228,7 @@ cwebp \-q 50 -lossless picture.png \-o picture_lossless.webp .br cwebp \-q 70 picture_with_alpha.png \-o picture_with_alpha.webp .br -cwebp \-sns 70 \-f 50 \-strong \-af \-size 60000 picture.png \-o picture.webp +cwebp \-sns 70 \-f 50 \-size 60000 picture.png \-o picture.webp .SH AUTHORS \fBcwebp\fP was written by the WebP team. diff --git a/src/enc/config.c b/src/enc/config.c index 7053bee5..9ef9d327 100644 --- a/src/enc/config.c +++ b/src/enc/config.c @@ -31,9 +31,9 @@ int WebPConfigInitInternal(WebPConfig* config, config->target_PSNR = 0.; config->method = 4; config->sns_strength = 50; - config->filter_strength = 20; // default: light filtering + config->filter_strength = 60; // rather high filtering, helps w/ gradients. config->filter_sharpness = 0; - config->filter_type = 0; // default: simple + config->filter_type = 1; // default: strong (so U/V is filtered too) config->partitions = 0; config->segments = 4; config->pass = 1;