Commit Graph

7 Commits

Author SHA1 Message Date
Nigel Tao
d8e202c6ce vp8: limit all other partitions to 1<<24 bytes in size, not just N-1 of
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>
2015-05-15 01:02:58 +00:00
Andrew Gerrand
2e99ef522d go.image: use golang.org/x/... import paths
LGTM=bradfitz, rsc
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/169090043
2014-11-10 08:52:14 +11:00
Nigel Tao
ef5e0288ce go.image/webp: implement lossy-with-alpha.
This fixes all three lossy_alpha*.webp conformance tests.

The test data was generated by cwebp/dwebp version 0.4.1:
cwebp yellow_rose.png -o yellow_rose.lossy-with-alpha.webp
dwebp yellow_rose.lossy-with-alpha.webp -pgm -o tmp.pgm
convert tmp.pgm yellow_rose.lossy-with-alpha.webp.nycbcra.png

LGTM=pascal.massimino, r
R=r, pascal.massimino
CC=golang-codereviews
https://golang.org/cl/154350043
2014-10-20 10:46:12 +11:00
Nigel Tao
07fcf9c2fe vp8: skip filtering for all-zero-DC macroblock residuals.
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
2014-06-30 10:36:25 +10:00
Nigel Tao
0424e74a0e go.image/vp8: implement the normal filter.
The testdata was generated via:
cwebp foo.png -o foo.lossy.webp
dwebp -pgm foo.lossy.webp -o tmp.pgm
convert tmp.pgm foo.lossy.webp.ycbcr.png
rm tmp.pgm

TBR=r
R=r
CC=golang-codereviews
https://golang.org/cl/107330043
2014-06-26 13:29:30 +10:00
Nigel Tao
94ba43c478 go.image/vp8l: new package.
The blue-purple-pink image comes from
http://blog.golang.org/gophercon

The tux and yellow_rose images come from
https://developers.google.com/speed/webp/gallery2 and according to
that page, those images are in the public domain.

The gopher-doc images are http://golang.org/doc/gopher/doc.png
after quantizing its palette to 2/4/16/256 colors.

LGTM=r
R=r
CC=golang-codereviews
https://golang.org/cl/109010043
2014-06-17 21:51:57 +10:00
Nigel Tao
72be9c51b1 go.image/vp8: implement the loop filter.
The testdata files were created by:
cwebp video-001.png -o video-001.webp
dwebp -pgm video-001.webp -o tmp.pgm
convert tmp.pgm video-001.webp.ycbcr.png
rm tmp.pgm

LGTM=r
R=r
CC=chaishushan, golang-codereviews
https://golang.org/cl/91700044
2014-05-27 10:52:02 +10:00