them.
Also check for int32 overflow in the webp package.
Fixes#10790.
Change-Id: Id1162fad8a467a72a5379c7f4432d64ef25bc37a
Reviewed-on: https://go-review.googlesource.com/10072
Reviewed-by: Rob Pike <r@golang.org>
This fixes the lossy_extreme_probabilities.webp conformance test.
LGTM=pascal.massimino, r
R=r, pascal.massimino
CC=golang-codereviews
https://golang.org/cl/145600043
This makes the Go code match the libwebp C code's output on
blue-purple-pink-large.*-filter.lossy.webp
Also make the various WEBP benchmarks all decode a similar image,
the image at http://blog.golang.org/gophercon/image01.jpg, to make
it more meaningful to e.g. compare the simple filter's numbers with
the normal filter's numbers.
Also fix a "go vet" warning in webp/decode.go.
The test data was generated by:
wget http://blog.golang.org/gophercon/image01.jpg -O blue-purple-pink-large.jpeg
convert blue-purple-pink-large.jpeg blue-purple-pink-large.png
cwebp -lossless blue-purple-pink-large.png -o blue-purple-pink-large.lossless.webp
cwebp -q 80 -f 0 blue-purple-pink-large.png -o blue-purple-pink-large.no-filter.lossy.webp
cwebp -q 80 -strong blue-purple-pink-large.png -o blue-purple-pink-large.normal-filter.lossy.webp
cwebp -q 80 -nostrong blue-purple-pink-large.png -o blue-purple-pink-large.simple-filter.lossy.webp
dwebp -pgm blue-purple-pink-large.no-filter.lossy.webp -o tmp.pgm && convert tmp.pgm blue-purple-pink-large.no-filter.lossy.webp.ycbcr.png && rm tmp.pgm
dwebp -pgm blue-purple-pink-large.normal-filter.lossy.webp -o tmp.pgm && convert tmp.pgm blue-purple-pink-large.normal-filter.lossy.webp.ycbcr.png && rm tmp.pgm
dwebp -pgm blue-purple-pink-large.simple-filter.lossy.webp -o tmp.pgm && convert tmp.pgm blue-purple-pink-large.simple-filter.lossy.webp.ycbcr.png && rm tmp.pgm
LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/106230044
This change seems to restore performance to
the level before CL 108140045.
benchmark old ns/op new ns/op delta
BenchmarkDecodeVP8SimpleFilter 796416 784394 -1.51%
BenchmarkDecodeVP8NormalFilter 4931138 4693078 -4.83%
BenchmarkDecodeVP8L 7820030 7821796 +0.02%
LGTM=nigeltao, r
R=nigeltao, r
CC=golang-codereviews
https://golang.org/cl/107340047
The benchmarks are a little slower, but the code is shorter.
benchmark old ns/op new ns/op delta
BenchmarkDecodeVP8SimpleFilter 621950 644184 +3.57%
BenchmarkDecodeVP8NormalFilter 4045745 4269431 +5.53%
LGTM=r
R=r, minux, ruiu
CC=golang-codereviews
https://golang.org/cl/108140045
code.google.com/p/vp8-go
This is a straight copy, followed by import path updates.
LGTM=r
R=r, mirtchovski, oleku.konko
CC=golang-codereviews
https://golang.org/cl/79320043