mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-19 20:08:28 +01:00
change default filtering parameters:
* type is now 'strong' * strength is now '60' These help with gradients and blocking Change-Id: Ie1c8265c557306ef5e9ccefacf43e10946e55370
This commit is contained in:
parent
b7490f8553
commit
92668da6f2
1
NEWS
1
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
|
||||
|
7
README
7
README
@ -151,7 +151,8 @@ options:
|
||||
-sns <int> ............. Spatial Noise Shaping (0:off, 100:max)
|
||||
-f <int> ............... filter strength (0=off..100)
|
||||
-sharpness <int> ....... 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 <int> . limit quality to fit the 512k limit on
|
||||
the first partition (0=no degradation ... 100=full)
|
||||
-pass <int> ............ 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
|
||||
|
@ -537,7 +537,9 @@ static void HelpLong(void) {
|
||||
printf(" -f <int> ............... filter strength (0=off..100)\n");
|
||||
printf(" -sharpness <int> ....... "
|
||||
"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 <int> . 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) {
|
||||
|
12
man/cwebp.1
12
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.
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user