An error occurred fetching the project authors.
  1. 17 Feb, 2015 1 commit
  2. 16 Feb, 2015 1 commit
  3. 14 Jan, 2015 1 commit
  4. 20 Dec, 2014 1 commit
  5. 08 Sep, 2014 1 commit
  6. 11 Jul, 2013 1 commit
  7. 10 Jul, 2013 1 commit
  8. 18 Oct, 2012 1 commit
  9. 14 Mar, 2012 1 commit
  10. 19 Jan, 2012 2 commits
    • Nigel Tao's avatar
      image: change the YCbCr image's pixel buffers to start at Rect.Min · ab2ea94c
      Nigel Tao authored
      instead of the origin.
      
      This makes YCbCr match the other image types (e.g. RGBA, Gray) in
      that an image's bounds is not restricted to the positive quadrant.
      
      Also optimize the YCbCr draw code by hoisting some computation
      outside of the loop.
      
      benchmark              old ns/op    new ns/op    delta
      draw.BenchmarkYCbCr      2544418      2373558   -6.72%
      
      Like https://golang.org/cl/4681044/ I don't think a gofix is
      feasible. People will have to make manual changes. On the other hand,
      directly manipulating YCbCr images is relatively rare, compared to
      RGBA images, and if other code just uses the jpeg and draw packages
      instead of messing directly with a YCbCr's []byte representations,
      then things should just continue to work.
      
      R=r
      CC=golang-dev
      https://golang.org/cl/5558048
      ab2ea94c
    • Nigel Tao's avatar
      image: add PixOffset methods; use them in image/draw and image/tiff. · af08cfa4
      Nigel Tao authored
      image/draw benchmarks show <1% change for the fast paths.
      The slow paths got worse by 1-4%, but they're the slow paths.
      I don't care so much about them, and presumably compiler improvements
      could claw it back.
      
      IIUC 6g's inlining is enabled by default now.
      
      benchmark                        old ns/op    new ns/op    delta
      draw.BenchmarkFillOver             2988384      2999624   +0.38%
      draw.BenchmarkFillSrc               153141       153262   +0.08%
      draw.BenchmarkCopyOver             2155756      2170831   +0.70%
      draw.BenchmarkCopySrc                72591        72646   +0.08%
      draw.BenchmarkNRGBAOver            2487372      2491576   +0.17%
      draw.BenchmarkNRGBASrc             1361306      1409180   +3.52%
      draw.BenchmarkYCbCr                2540712      2562359   +0.85%
      draw.BenchmarkGlyphOver            1004879      1023308   +1.83%
      draw.BenchmarkRGBA                 8746670      8844455   +1.12%
      draw.BenchmarkGenericOver         31860960     32512960   +2.05%
      draw.BenchmarkGenericMaskOver     16369060     16435720   +0.41%
      draw.BenchmarkGenericSrc          13128540     13127810   -0.01%
      draw.BenchmarkGenericMaskSrc      30059300     28883210   -3.91%
      
      R=r, gri
      CC=golang-dev, rsc
      https://golang.org/cl/5536059
      af08cfa4
  11. 20 Dec, 2011 1 commit
  12. 04 Oct, 2011 1 commit
    • Nigel Tao's avatar
      image: spin off a new color package out of the image package. · a2846e65
      Nigel Tao authored
      The spin-off renames some types. The new names are simply better:
      image.Color              -> color.Color
      image.ColorModel         -> color.Model
      image.ColorModelFunc     -> color.ModelFunc
      image.PalettedColorModel -> color.Palette
      image.RGBAColor          -> color.RGBA
      image.RGBAColorModel     -> color.RGBAModel
      image.RGBA64Color        -> color.RGBA64
      image.RGBA64ColorModel   -> color.RGBA64Model
      (similarly for NRGBAColor, GrayColorModel, etc)
      
      The image.ColorImage type stays in the image package, but is renamed:
      image.ColorImage -> image.Uniform
      
      The image.Image implementations (image.RGBA, image.RGBA64, image.NRGBA,
      image.Alpha, etc) do not change their name, and gain a nice symmetry:
      an image.RGBA is an image of color.RGBA, etc.
      
      The image.Black, image.Opaque uniform images remain unchanged (although
      their type is renamed from image.ColorImage to image.Uniform). The
      corresponding color types (color.Black, color.Opaque, etc) are new.
      
      Nothing in the image/ycbcr is renamed yet. The ycbcr.YCbCrColor and
      ycbcr.YCbCrImage types will eventually migrate to color.YCbCr and
      image.YCbCr, but that will be a separate CL.
      
      R=r, bsiegert
      CC=golang-dev
      https://golang.org/cl/5132048
      a2846e65
  13. 30 Sep, 2011 1 commit
  14. 12 Jul, 2011 3 commits
    • Nigel Tao's avatar
      image: remove superfluous if condition. · 851ded96
      Nigel Tao authored
      DrawMask already returns early if r.Empty().
      
      R=r
      CC=golang-dev
      https://golang.org/cl/4703041
      851ded96
    • Nigel Tao's avatar
      image: re-organize draw.go. · caaa6764
      Nigel Tao authored
      There are no behavioral changes, only some copy-and-pastes.
      
      Before, drawFillOver was next to drawCopyOver.
      
      After, drawFillOver is next to drawFillSrc, which is more similar to
      drawFillOver than drawCopyOver is.
      
      Similarly, drawCopyOver is now next to drawCopySrc, etc.
      
      R=r
      CC=golang-dev
      https://golang.org/cl/4695045
      caaa6764
    • Nigel Tao's avatar
      image: change Pix from []FooColor to []uint8. · 8bd50895
      Nigel Tao authored
      Some benchmark numbers below. The image/draw fast-paths show dramatic
      improvement, the generic slow-paths show a smaller slow-down.
      
      BEFORE
      png.BenchmarkEncodePaletted      200       8203800 ns/op      37.45 MB/s
      png.BenchmarkEncodeRGBOpaque         100      26940440 ns/op      45.61 MB/s
      png.BenchmarkEncodeRGBA       20      73821000 ns/op      16.65 MB/s
      jpeg.BenchmarkEncodeRGBOpaque         50      35598640 ns/op      34.52 MB/s
      draw.BenchmarkFillOver	     500	   4024226 ns/op
      draw.BenchmarkFillSrc	   10000	    152736 ns/op
      draw.BenchmarkCopyOver	     500	   3452824 ns/op
      draw.BenchmarkCopySrc	   50000	     73218 ns/op
      draw.BenchmarkNRGBAOver	     500	   3941234 ns/op
      draw.BenchmarkNRGBASrc	    1000	   2484400 ns/op
      draw.BenchmarkYCbCr	    1000	   2609005 ns/op
      draw.BenchmarkGlyphOver	    2000	   1169575 ns/op
      draw.BenchmarkRGBA	     200	   9031390 ns/op
      draw.BenchmarkGenericOver	      50	  34636620 ns/op
      draw.BenchmarkGenericMaskOver	     100	  16561150 ns/op
      draw.BenchmarkGenericSrc	     100	  13873760 ns/op
      draw.BenchmarkGenericMaskSrc	     100	  25198860 ns/op
      
      AFTER
      png.BenchmarkEncodePaletted      200       8206600 ns/op      37.43 MB/s
      png.BenchmarkEncodeRGBOpaque         100      26129530 ns/op      47.03 MB/s
      png.BenchmarkEncodeRGBA       20      75776750 ns/op      16.22 MB/s
      jpeg.BenchmarkEncodeRGBOpaque         50      37192940 ns/op      33.04 MB/s
      draw.BenchmarkFillOver	     500	   3008134 ns/op
      draw.BenchmarkFillSrc	   10000	    154214 ns/op
      draw.BenchmarkCopyOver	    1000	   2169988 ns/op
      draw.BenchmarkCopySrc	   50000	     73095 ns/op
      draw.BenchmarkNRGBAOver	    1000	   2491079 ns/op
      draw.BenchmarkNRGBASrc	    2000	   1361244 ns/op
      draw.BenchmarkYCbCr	    1000	   2554269 ns/op
      draw.BenchmarkGlyphOver	    2000	   1042225 ns/op
      draw.BenchmarkRGBA	     100	  10233340 ns/op
      draw.BenchmarkGenericOver	      50	  38421560 ns/op
      draw.BenchmarkGenericMaskOver	     100	  17521190 ns/op
      draw.BenchmarkGenericSrc	     100	  16351200 ns/op
      draw.BenchmarkGenericMaskSrc	     100	  26538190 ns/op
      
      R=r
      CC=golang-dev
      https://golang.org/cl/4675076
      8bd50895
  15. 10 Jul, 2011 1 commit
  16. 16 Jun, 2011 1 commit
  17. 05 Jun, 2011 1 commit
  18. 03 Jun, 2011 1 commit
  19. 04 May, 2011 1 commit
    • Nigel Tao's avatar
      exp/draw: fast paths for drawing a YCbCr or an NRGBA onto an RGBA. · 13f08cd8
      Nigel Tao authored
      On my laptop, I had an 800x600 jpeg and an 800x600 png (with
      transparency). I timed how long it took to draw each image onto an
      equivalently sized, zeroed RGBA image.
      
      Previously, the jpeg took 75ms and the png took 70ms, going through
      the medium-fast path, i.e. func drawRGBA in draw.go.
      
      After this CL, the jpeg took 14ms, and the png took 21ms with the
      Over operator and 12ms with the Src operator.
      
      It's only a rough estimate basd on one image file, but it should
      give an idea of the order of magnitude of improvement.
      
      R=rsc, r
      CC=adg, golang-dev
      https://golang.org/cl/4468044
      13f08cd8
  20. 16 Dec, 2010 1 commit
  21. 09 Dec, 2010 1 commit
  22. 12 Oct, 2010 1 commit
  23. 24 Sep, 2010 1 commit
  24. 10 Sep, 2010 2 commits
  25. 09 Sep, 2010 1 commit
  26. 11 Aug, 2010 1 commit
  27. 10 Aug, 2010 3 commits
  28. 14 Jun, 2010 1 commit
  29. 05 Jun, 2010 1 commit
  30. 04 Jun, 2010 1 commit
    • Nigel Tao's avatar
      draw.Draw fast paths for the Over operator. · 20066679
      Nigel Tao authored
      Time (us) to draw a 200x200 src onto an image.RGBA dst with the Over
      operator. Each case was measured three separate times, and the sorted
      times are reported.
      
      Fill case (where src is an image.ColorImage):
      Before:
      7438, 7511, 7526
      After:
      3073, 3087, 3102
      
      Copy case (where src is an image.RGBA):
      Before:
      9506, 9510, 9563
      After:
      5262, 5300, 5344
      
      R=rsc
      CC=golang-dev
      https://golang.org/cl/1532041
      20066679
  31. 28 May, 2010 1 commit
  32. 20 May, 2010 1 commit
    • Nigel Tao's avatar
      Fast-ish path for drawing onto an image.RGBA destination. · efda3aba
      Nigel Tao authored
      Time to draw.Draw a 200x200 image fell from 18.4ms (and 1 malloc) to
      5.6ms (and 0 mallocs). It's still relatively slow since it assumes
      nothing about the src or mask images, but it does remove the malloc.
      There are existing faster, more specialized paths for copies, fills
      and image glyph masks.
      
      Also added a "compare to a slow but obviously correct implementation"
      check to draw_test.go.
      
      R=rsc, r
      CC=golang-dev
      https://golang.org/cl/1223044
      efda3aba
  33. 11 May, 2010 1 commit
  34. 10 May, 2010 1 commit
    • Nigel Tao's avatar
      exp/draw fast path for glyph images. · d7a6d228
      Nigel Tao authored
      To draw.Draw a 32x32 image.Alpha 10000 times,
      Before: 633ms with 10000 mallocs
      After: 49ms with 0 mallocs
      
      These times are just blitting an image.Alpha, and do not include
      rasterizing a glyph's vector contours to an image.Alpha.
      
      The "generic" test case in draw_test.go tests this fast path.
      
      R=rsc
      CC=golang-dev
      https://golang.org/cl/1122043
      d7a6d228