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

Issue 863233003: Avoid divisions creating sample points in the float cube LUT builder (Closed)

Created:
5 years, 11 months ago by Noel Gordon
Modified:
5 years, 10 months ago
Reviewers:
sugoi1, reed1
CC:
chromium-reviews, Stephen White, Mike Lawther (Google)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid divisions creating sample points in the float cube LUT builder Cube samplers create input sample points in some order. Document the QCMS order (x,y,z) which is the same as OSX ColorSync and cube LUT interchange standards such as the Adobe Cube LUT Specification 1.0, 2013. The samples are RGB order with R changing the slowest, B the fastest. Hoist the division out of the sample point creation loop: takes 0.0003939 seconds on MacAir for 32^3 sample points, 0.0001619 with hoisting. That's fine, but small beans compared to the overall costs of cube creation. The majorty of the work is in qcms_chain_transform (8ms) where floating-point is used to maintain transform precision. The output ColorCube LUT produced by qcms_chain_transform is indexed into transform in RGB order (time cost ~0). Add comments about order. BUG=443863 Committed: https://crrev.com/5bc47112d6be524ab82b8f9afc0b67a832e32380 Cr-Commit-Position: refs/heads/master@{#314425}

Patch Set 1 #

Patch Set 2 : Compute the inverse. #

Total comments: 7

Patch Set 3 : Patch for landing. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -9 lines) Patch
M third_party/qcms/README.chromium View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/qcms/src/transform.c View 1 2 2 chunks +12 lines, -9 lines 0 comments Download

Messages

Total messages: 24 (5 generated)
Noel Gordon
5 years, 11 months ago (2015-01-27 13:36:24 UTC) #2
reed1
drive-by: is there an "official" repo for this library? If so, should we submit this ...
5 years, 11 months ago (2015-01-27 14:10:50 UTC) #4
sugoi1
https://codereview.chromium.org/863233003/diff/20001/third_party/qcms/src/transform.c File third_party/qcms/src/transform.c (right): https://codereview.chromium.org/863233003/diff/20001/third_party/qcms/src/transform.c#newcode1135 third_party/qcms/src/transform.c:1135: src[l++] = z * inverse; // b You're going ...
5 years, 11 months ago (2015-01-27 15:42:59 UTC) #5
Noel Gordon
On 2015/01/27 14:10:50, reed1 wrote: > drive-by: is there an "official" repo for this library? ...
5 years, 10 months ago (2015-01-28 04:41:25 UTC) #6
Noel Gordon
https://codereview.chromium.org/863233003/diff/20001/third_party/qcms/src/transform.c File third_party/qcms/src/transform.c (right): https://codereview.chromium.org/863233003/diff/20001/third_party/qcms/src/transform.c#newcode1135 third_party/qcms/src/transform.c:1135: src[l++] = z * inverse; // b On 2015/01/27 ...
5 years, 10 months ago (2015-01-28 05:57:29 UTC) #7
sugoi1
https://codereview.chromium.org/863233003/diff/20001/third_party/qcms/src/transform.c File third_party/qcms/src/transform.c (right): https://codereview.chromium.org/863233003/diff/20001/third_party/qcms/src/transform.c#newcode1135 third_party/qcms/src/transform.c:1135: src[l++] = z * inverse; // b On 2015/01/28 ...
5 years, 10 months ago (2015-01-28 16:44:40 UTC) #8
Noel Gordon
https://codereview.chromium.org/863233003/diff/20001/third_party/qcms/src/transform.c File third_party/qcms/src/transform.c (right): https://codereview.chromium.org/863233003/diff/20001/third_party/qcms/src/transform.c#newcode1135 third_party/qcms/src/transform.c:1135: src[l++] = z * inverse; // b On 2015/01/28 ...
5 years, 10 months ago (2015-01-30 03:04:51 UTC) #9
Noel Gordon
https://codereview.chromium.org/863233003/diff/20001/third_party/qcms/src/transform.c File third_party/qcms/src/transform.c (right): https://codereview.chromium.org/863233003/diff/20001/third_party/qcms/src/transform.c#newcode1135 third_party/qcms/src/transform.c:1135: src[l++] = z * inverse; // b On 2015/01/28 ...
5 years, 10 months ago (2015-01-30 18:52:21 UTC) #10
Noel Gordon
The current patch is orthogonal to the above, so we can go ahead and submit. ...
5 years, 10 months ago (2015-01-31 04:29:26 UTC) #11
sugoi1
On 2015/01/31 04:29:26, noel gordon wrote: > The current patch is orthogonal to the above, ...
5 years, 10 months ago (2015-02-03 12:46:05 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/863233003/40001
5 years, 10 months ago (2015-02-03 13:53:53 UTC) #14
commit-bot: I haz the power
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an ...
5 years, 10 months ago (2015-02-03 13:53:57 UTC) #16
reed1
lgtm
5 years, 10 months ago (2015-02-03 22:54:22 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/863233003/40001
5 years, 10 months ago (2015-02-03 22:55:17 UTC) #19
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years, 10 months ago (2015-02-03 22:59:12 UTC) #20
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/5bc47112d6be524ab82b8f9afc0b67a832e32380 Cr-Commit-Position: refs/heads/master@{#314425}
5 years, 10 months ago (2015-02-03 23:01:38 UTC) #21
Noel Gordon
On 2015/02/03 23:01:38, I haz the power (commit-bot) wrote: > In summary, I'm not proposing ...
5 years, 10 months ago (2015-02-04 01:38:30 UTC) #22
reed1
On 2015/02/04 01:38:30, noel gordon wrote: > On 2015/02/03 23:01:38, I haz the power (commit-bot) ...
5 years, 10 months ago (2015-02-04 01:43:15 UTC) #23
Noel Gordon
5 years, 10 months ago (2015-02-04 02:05:42 UTC) #24
Message was sent while issue was closed.
On 2015/02/04 01:43:15, reed1 wrote:
> On 2015/02/04 01:38:30, noel gordon wrote:

> > ... I guess I will just have to assume the this backwards sampling is
> > skia-team's preference.  I note it's not clear from the code comments in
> > SkColorCubeFilter{.cpp,.h} that the expected sampling order is (z,y,x).
Anyho
> > ...
> 
> Hmmm, my approval was just perfunctory so it could land. I have not considered
> that convention one way or the other.

For now, when I create color cube data in qcms for Skia use, I will use the
(z,y,x) sampling, BGRA order that SkColorCubeFIlter currently expects. Want to
change that to industry-standard ordering in future?  

  https://gist.github.com/anonymous/1d62b4ead69bbebb5814

and the 3- or 4-sided patch dance, and skia gm test rebaselines, etc, etc.

/me moving on the qcms patches that depended on the ordering decision.

Powered by Google App Engine
This is Rietveld 408576698