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

Issue 2670773002: Towards deleting YUV to RGB computation redundancy (Closed)

Created:
3 years, 10 months ago by ccameron
Modified:
3 years, 10 months ago
Reviewers:
hubbe
CC:
chromium-reviews, cc-bugs_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Towards deleting YUV to RGB computation redundancy Make the GetTransferMatrix and GetRangeAdjustMatrix functions part of gfx::ColorSpace instead of gfx::ColorSpaceTransform, and call them from GLRenderer to compute the YUV to RGB matrix and offset. Do not actually use the new computation results yet, because they break pixel tests. Rather, add a DCHECK that the new results are very close to the previous values being used (within 1/255.f). Fix the transfer matrix for SMPTE170M to have Kb=0.114 instead of 0.144. Change the definition of gfx::ColorSpace::CreateJPEG to use the Rec601 transfer matrix, not Rec709. This is necessary for the resulting YUV to RGB conversion to match the previous behavior. BUG=667966 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2670773002 Cr-Commit-Position: refs/heads/master@{#447893} Committed: https://chromium.googlesource.com/chromium/src/+/5f73187dc5b79607d4110d9d0519d1a474f01ee7

Patch Set 1 #

Total comments: 18

Patch Set 2 : Review feedback #

Patch Set 3 : Add unittest #

Patch Set 4 : Explicitly mark constants as float #

Unified diffs Side-by-side diffs Delta from patch set Stats (+294 lines, -124 lines) Patch
M cc/output/gl_renderer.cc View 1 2 3 3 chunks +66 lines, -0 lines 0 comments Download
M ui/gfx/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ui/gfx/color_space.h View 1 chunk +4 lines, -0 lines 0 comments Download
M ui/gfx/color_space.cc View 1 3 chunks +128 lines, -2 lines 0 comments Download
A ui/gfx/color_space_unittest.cc View 1 2 3 1 chunk +83 lines, -0 lines 0 comments Download
M ui/gfx/color_transform.cc View 3 chunks +12 lines, -110 lines 0 comments Download
M ui/gfx/color_transform_unittest.cc View 1 chunk +0 lines, -12 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 29 (19 generated)
ccameron
PTAL. After this, the only remaining instance of this nonsense will be at: https://cs.chromium.org/chromium/src/ui/gl/yuv_to_rgb_converter.cc?rcl=5b2d8899ed66b788a1811b15163dd37bc178f5ca&l=52 Which, ...
3 years, 10 months ago (2017-02-02 03:54:26 UTC) #5
hubbe
> Change the definition of gfx::ColorSpace::CreateJPEG to > use the Rec601 transfer matrix, not Rec709. ...
3 years, 10 months ago (2017-02-02 04:51:37 UTC) #6
ccameron
updated -- ptal https://codereview.chromium.org/2670773002/diff/1/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/2670773002/diff/1/cc/output/gl_renderer.cc#newcode2175 cc/output/gl_renderer.cc:2175: SkMatrix44 full_transform; On 2017/02/02 04:51:37, hubbe ...
3 years, 10 months ago (2017-02-02 17:33:52 UTC) #11
hubbe
All the stuff blow is just expressing opinions on stuff that doesn't have to be ...
3 years, 10 months ago (2017-02-02 18:35:26 UTC) #12
ccameron
Good point -- added unit tests YUV->RGB conversion for the 3 spaces that I've verified.
3 years, 10 months ago (2017-02-02 20:37:53 UTC) #16
hubbe
lgtm
3 years, 10 months ago (2017-02-02 20:53:57 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2670773002/40001
3 years, 10 months ago (2017-02-02 21:02:29 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/359357)
3 years, 10 months ago (2017-02-02 21:51:36 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2670773002/60001
3 years, 10 months ago (2017-02-02 23:02:35 UTC) #26
commit-bot: I haz the power
3 years, 10 months ago (2017-02-03 00:18:54 UTC) #29
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/5f73187dc5b79607d4110d9d0519...

Powered by Google App Engine
This is Rietveld 408576698