Introduce a 'fast' alpha mode

.. where only 2 filtering modes are potentially
tried, instead of all of them. This is fast than the exhaustive 'best'
mode, and not much worse.

Options for cwebp are:
 -alpha_filter none
 -alpha_filter fast      (<- default)
 -alpha_filter best      (<- slow)

Change-Id: I8cb90ee11b8f981811e013ea4ad5bf72ba3ea7d4
This commit is contained in:
Pascal Massimino
2012-01-08 19:27:21 -08:00
parent ad1e163a0d
commit 8ca2076de1
9 changed files with 179 additions and 153 deletions

View File

@ -41,11 +41,13 @@ Specify the compression factor for alpha compression between 0 and 100.
Lossless compression of alpha is achieved using a value of 100, while the lower
values result in a lossy compression. The default is 100.
.TP
.B \-alpha_filter int
Specify the predictive filtering method (between 0 and 5) for alpha plane.
These correspond to prediction modes none, horizontal, vertical, gradient and
paeth filters. The prediction mode 5 will try all the prediction modes (0 to 4)
and pick the best prediction mode. The default value is 0 (no prediction).
.B \-alpha_filter string
Specify the predictive filtering method for alpha plane. One of 'none', 'fast'
or 'best', in increasing complexity and slowness order. Default is 'fast'.
Internally, alpha filtering is performed using four possible predictions (none,
horizontal, vertical, gradient). The 'best' mode will try each modes in turn and
pick the one which gives the smaller size. The 'fast' mode will just try to
form an a-priori guess without testing all modes.
.TP
.B \-f int
Specify the strength of the deblocking filter, between 0 (no filtering)