Commit Graph

2 Commits

Author SHA1 Message Date
Nigel Tao
6b7a488d1e draw: tweak the YCbCr to RGBA conversion formula.
This is the golang.org/x equivalent of the golang.org/cl/12220 change to
the standard library.

Change-Id: I220d1398902dec374472ef5b08db8501607cc971
Reviewed-on: https://go-review.googlesource.com/12222
Reviewed-by: Rob Pike <r@golang.org>
2015-07-15 05:30:06 +00:00
Nigel Tao
96b77d5c7a draw: new package, a superset of the standard library's image/draw
package, including the ability to scale an image.

Design discussion:
https://groups.google.com/forum/#!topic/golang-dev/B7-OrWdheic

Previous code review (when Go used hg instead of git):
https://codereview.appspot.com/101670045

New benchmarks:
BenchmarkScaleLargeDownNN	     300	   5935174 ns/op
BenchmarkScaleLargeDownAB	     100	  14482372 ns/op
BenchmarkScaleLargeDownBL	       1	1383805986 ns/op
BenchmarkScaleLargeDownCR	       1	2724631789 ns/op
BenchmarkScaleDownNN     	    1000	   1850500 ns/op
BenchmarkScaleDownAB     	     300	   4413499 ns/op
BenchmarkScaleDownBL     	      50	  30498748 ns/op
BenchmarkScaleDownCR     	      20	  58349653 ns/op
BenchmarkScaleUpNN       	      20	  92306475 ns/op
BenchmarkScaleUpAB       	       5	 220103753 ns/op
BenchmarkScaleUpBL       	      10	 122635195 ns/op
BenchmarkScaleUpCR       	      10	 183275927 ns/op

Change-Id: I69d397e68897bae024c7b330a9375fa3e7688591
Reviewed-on: https://go-review.googlesource.com/4210
Reviewed-by: Rob Pike <r@golang.org>
2015-02-17 23:20:02 +00:00