Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Issue 2060823003: Implement fast, correct gamma conversion for color xforms (Closed)

Created:
4 years, 6 months ago by msarett
Modified:
4 years, 6 months ago
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Implement fast, correct gamma conversion for color xforms 201295.jpg on HP z620 (300x280, most common form of sRGB profile) QCMS Xform 0.495 ms Skia Old Xform 0.235 ms Skia NEW Xform 0.423 ms Vs Old Code 0.56x Vs QCMS 1.17x So to summarize, we are now much slower than before, but still a bit faster than QCMS. And now we are also far more accurate than QCMS :). BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2060823003 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Committed: https://skia.googlesource.com/skia/+/dea0340cadb759932e53416a657f5ea75fee8b5f

Patch Set 1 #

Total comments: 19

Patch Set 2 : Improvements #

Total comments: 4

Patch Set 3 : Should be 0xFF #

Total comments: 21

Patch Set 4 : Naming and organization improvements #

Total comments: 2

Patch Set 5 : Fix comments #

Patch Set 6 : Win test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+366 lines, -149 lines) Patch
M bench/ColorCodecBench.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M dm/DMSrcSink.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/core/SkColorSpaceXform.h View 2 chunks +21 lines, -8 lines 0 comments Download
M src/core/SkColorSpaceXform.cpp View 1 2 3 4 chunks +63 lines, -29 lines 0 comments Download
M src/core/SkOpts.h View 1 2 3 1 chunk +5 lines, -4 lines 0 comments Download
M src/core/SkOpts.cpp View 1 chunk +4 lines, -2 lines 0 comments Download
M src/opts/SkColorXform_opts.h View 1 2 3 4 5 2 chunks +265 lines, -102 lines 0 comments Download
M src/opts/SkOpts_sse41.cpp View 1 2 chunks +4 lines, -0 lines 0 comments Download
M tests/ColorSpaceXformTest.cpp View 1 chunk +1 line, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 32 (13 generated)
msarett
https://codereview.chromium.org/2060823003/diff/20001/src/core/SkColorSpaceXform.cpp File src/core/SkColorSpaceXform.cpp (right): https://codereview.chromium.org/2060823003/diff/20001/src/core/SkColorSpaceXform.cpp#newcode40 src/core/SkColorSpaceXform.cpp:40: if (SkColorSpace::k2Dot2Curve_GammaNamed == dstSpace->gammaNamed() && I plan to add ...
4 years, 6 months ago (2016-06-14 22:52:56 UTC) #5
Brian Osman
lgtm, but I'll defer to the CPU experts on the SSE implementation details. https://codereview.chromium.org/2060823003/diff/20001/src/opts/SkColorXform_opts.h File ...
4 years, 6 months ago (2016-06-15 14:02:01 UTC) #6
msarett
https://codereview.chromium.org/2060823003/diff/20001/src/opts/SkColorXform_opts.h File src/opts/SkColorXform_opts.h (right): https://codereview.chromium.org/2060823003/diff/20001/src/opts/SkColorXform_opts.h#newcode292 src/opts/SkColorXform_opts.h:292: static uint8_t clamp_float_to_byte(float v) { On 2016/06/15 14:02:01, Brian ...
4 years, 6 months ago (2016-06-15 14:05:27 UTC) #7
mtklein
We don't absolutely require SSE2 or NEON, but in turn we do not care how ...
4 years, 6 months ago (2016-06-15 14:31:36 UTC) #8
mtklein
https://codereview.chromium.org/2060823003/diff/20001/src/opts/SkColorXform_opts.h File src/opts/SkColorXform_opts.h (right): https://codereview.chromium.org/2060823003/diff/20001/src/opts/SkColorXform_opts.h#newcode160 src/opts/SkColorXform_opts.h:160: __m128 x64 = _mm_rsqrt_ps(x32); If I remember my high ...
4 years, 6 months ago (2016-06-15 15:10:46 UTC) #9
msarett
https://codereview.chromium.org/2060823003/diff/20001/src/opts/SkColorXform_opts.h File src/opts/SkColorXform_opts.h (right): https://codereview.chromium.org/2060823003/diff/20001/src/opts/SkColorXform_opts.h#newcode160 src/opts/SkColorXform_opts.h:160: __m128 x64 = _mm_rsqrt_ps(x32); On 2016/06/15 15:10:46, mtklein wrote: ...
4 years, 6 months ago (2016-06-15 17:55:03 UTC) #11
mtklein
https://codereview.chromium.org/2060823003/diff/40001/src/core/SkColorSpaceXform.h File src/core/SkColorSpaceXform.h (right): https://codereview.chromium.org/2060823003/diff/40001/src/core/SkColorSpaceXform.h#newcode28 src/core/SkColorSpaceXform.h:28: * Apply the color conversion to a src buffer, ...
4 years, 6 months ago (2016-06-15 20:39:43 UTC) #12
msarett
https://codereview.chromium.org/2060823003/diff/40001/src/core/SkColorSpaceXform.h File src/core/SkColorSpaceXform.h (right): https://codereview.chromium.org/2060823003/diff/40001/src/core/SkColorSpaceXform.h#newcode28 src/core/SkColorSpaceXform.h:28: * Apply the color conversion to a src buffer, ...
4 years, 6 months ago (2016-06-15 21:20:24 UTC) #13
mtklein_C
https://codereview.chromium.org/2060823003/diff/60001/src/core/SkColorSpaceXform.cpp File src/core/SkColorSpaceXform.cpp (right): https://codereview.chromium.org/2060823003/diff/60001/src/core/SkColorSpaceXform.cpp#newcode41 src/core/SkColorSpaceXform.cpp:41: 0.0f == srcToDst.getFloat(3, 0) && So the idea is ...
4 years, 6 months ago (2016-06-16 13:27:41 UTC) #15
mtklein
https://codereview.chromium.org/2060823003/diff/60001/src/core/SkOpts.h File src/core/SkOpts.h (right): https://codereview.chromium.org/2060823003/diff/60001/src/core/SkOpts.h#newcode72 src/core/SkOpts.h:72: // Color xform RGB1 input into SkPMColor ordered 8888 ...
4 years, 6 months ago (2016-06-16 13:29:28 UTC) #16
msarett
https://codereview.chromium.org/2060823003/diff/20001/src/opts/SkColorXform_opts.h File src/opts/SkColorXform_opts.h (right): https://codereview.chromium.org/2060823003/diff/20001/src/opts/SkColorXform_opts.h#newcode160 src/opts/SkColorXform_opts.h:160: __m128 x64 = _mm_rsqrt_ps(x32); On 2016/06/15 17:55:03, msarett wrote: ...
4 years, 6 months ago (2016-06-16 15:46:12 UTC) #17
mtklein
lgtm https://codereview.chromium.org/2060823003/diff/80001/src/opts/SkColorXform_opts.h File src/opts/SkColorXform_opts.h (right): https://codereview.chromium.org/2060823003/diff/80001/src/opts/SkColorXform_opts.h#newcode200 src/opts/SkColorXform_opts.h:200: // Splat rX, rY, rZ, and rQ each ...
4 years, 6 months ago (2016-06-16 16:46:04 UTC) #18
msarett
https://codereview.chromium.org/2060823003/diff/80001/src/opts/SkColorXform_opts.h File src/opts/SkColorXform_opts.h (right): https://codereview.chromium.org/2060823003/diff/80001/src/opts/SkColorXform_opts.h#newcode200 src/opts/SkColorXform_opts.h:200: // Splat rX, rY, rZ, and rQ each across ...
4 years, 6 months ago (2016-06-16 17:05:08 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2060823003/100001
4 years, 6 months ago (2016-06-16 17:05:18 UTC) #21
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Build-Win-MSVC-x86_64-Debug-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Win-MSVC-x86_64-Debug-Trybot/builds/9228)
4 years, 6 months ago (2016-06-16 17:11:29 UTC) #23
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2060823003/120001
4 years, 6 months ago (2016-06-16 17:34:50 UTC) #25
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-16 17:49:05 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2060823003/120001
4 years, 6 months ago (2016-06-16 17:50:00 UTC) #30
commit-bot: I haz the power
4 years, 6 months ago (2016-06-16 17:50:59 UTC) #32
Message was sent while issue was closed.
Committed patchset #6 (id:120001) as
https://skia.googlesource.com/skia/+/dea0340cadb759932e53416a657f5ea75fee8b5f

Powered by Google App Engine
This is Rietveld 408576698