Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2001)

Issue 6308049: code review 6308049: go.image/tiff: use optimized routines for RGBA and NRGBA (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 11 months ago by bsiegert
Modified:
11 years, 9 months ago
Reviewers:
CC:
nigeltao, rsc, golang-dev
Visibility:
Public.

Description

go.image/tiff: use optimized routines for RGBA and NRGBA Performance for an RGBA image: benchmark old ns/op new ns/op delta BenchmarkEncode 1633495 7897 -99.52% benchmark old MB/s new MB/s speedup BenchmarkEncode 37.83 7824.96 206.85x NRGBA images are now encoded as such, the spec calls it "unassociated alpha".

Patch Set 1 #

Patch Set 2 : diff -r 37300243245c https://code.google.com/p/go.image #

Patch Set 3 : diff -r 37300243245c https://code.google.com/p/go.image #

Total comments: 2

Patch Set 4 : diff -r 37300243245c https://code.google.com/p/go.image #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -9 lines) Patch
M tiff/reader_test.go View 1 2 3 1 chunk +9 lines, -6 lines 0 comments Download
M tiff/writer.go View 1 2 3 4 chunks +30 lines, -3 lines 0 comments Download
M tiff/writer_test.go View 1 2 3 1 chunk +18 lines, -0 lines 0 comments Download

Messages

Total messages: 8
bsiegert
Hello nigeltao@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go.image
11 years, 11 months ago (2012-06-07 13:01:27 UTC) #1
rsc
You're encoding at 8 GB/s? Sounds too good to be true. Russ
11 years, 11 months ago (2012-06-07 13:03:14 UTC) #2
bsiegert
On Thu, Jun 7, 2012 at 3:02 PM, Russ Cox <rsc@golang.org> wrote: > You're encoding ...
11 years, 11 months ago (2012-06-07 14:15:17 UTC) #3
rsc
Aha. I'm a little surprised we're writing uncompressed TIFFs but carry on. Russ
11 years, 11 months ago (2012-06-07 14:24:15 UTC) #4
nigeltao
http://codereview.appspot.com/6308049/diff/3002/tiff/writer.go File tiff/writer.go (right): http://codereview.appspot.com/6308049/diff/3002/tiff/writer.go#newcode79 tiff/writer.go:79: if _, err := w.Write(m.Pix[y*m.Stride : y*m.Stride+linelen]); err != ...
11 years, 11 months ago (2012-06-08 01:56:35 UTC) #5
bsiegert
Thank you very much for your comments. PTAL. http://codereview.appspot.com/6308049/diff/3002/tiff/writer.go File tiff/writer.go (right): http://codereview.appspot.com/6308049/diff/3002/tiff/writer.go#newcode79 tiff/writer.go:79: if ...
11 years, 11 months ago (2012-06-12 14:04:31 UTC) #6
nigeltao
LGTM.
11 years, 11 months ago (2012-06-13 00:39:29 UTC) #7
nigeltao
11 years, 11 months ago (2012-06-13 00:40:47 UTC) #8
*** Submitted as
http://code.google.com/p/go/source/detail?r=f0ba5bdeeb1a&repo=image ***

go.image/tiff: use optimized routines for RGBA and NRGBA

Performance for an RGBA image:

benchmark          old ns/op    new ns/op    delta
BenchmarkEncode      1633495         7897  -99.52%

benchmark           old MB/s     new MB/s  speedup
BenchmarkEncode        37.83      7824.96  206.85x

NRGBA images are now encoded as such, the spec calls it
"unassociated alpha".

R=nigeltao, rsc
CC=golang-dev
http://codereview.appspot.com/6308049

Committer: Nigel Tao <nigeltao@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b