]> Cypherpunks repositories - gostls13.git/commit
image/jpeg: add DCT tests, do a small optimization (common sub-expression
authorNigel Tao <nigeltao@golang.org>
Sat, 6 Oct 2012 23:21:17 +0000 (10:21 +1100)
committerNigel Tao <nigeltao@golang.org>
Sat, 6 Oct 2012 23:21:17 +0000 (10:21 +1100)
commit12e343f372c03b6fec9d5da6cd83833c79812bc9
treec1b51e5c447b2032faa4293d50280aefbea5a959
parent0b2ca9e62f778adb95c31e57e120ef1cbfc42b25
image/jpeg: add DCT tests, do a small optimization (common sub-expression
elimination) in idct.go.

benchmark                   old ns/op    new ns/op    delta
BenchmarkIDCT                    5649         5610   -0.69%
BenchmarkDecodeRGBOpaque      2948607      2941051   -0.26%

The "type block" declaration moved so that idct.go is compilable
as a stand-alone file: "go tool 6g -S idct.go" works.

R=r
CC=golang-dev
https://golang.org/cl/6619056
src/pkg/image/jpeg/dct_test.go [new file with mode: 0644]
src/pkg/image/jpeg/idct.go
src/pkg/image/jpeg/reader.go
src/pkg/image/jpeg/writer_test.go