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

Issue 1008493002: Increase YUV video clamping (Closed)

Created:
5 years, 9 months ago by magjed_chromium
Modified:
5 years, 8 months ago
CC:
cc-bugs_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Increase YUV video clamping The current clamping is not enough to avoid bleeding issues. This is exposed when changing the background color in CreateEdgeBleedPass from black to gray. The reason it works now is because interpolating U/V textures from black (YUV = 0, 0, 0) to green (YUV = 149, 43, 21) will still result in saturated green pixels (RGB = 0, 255, 0). All YUV values in the range (149, 0-43, 0-21) will end up as RGB = (0, 255, 0). The current clamping is not enough, because the calculation '0.5f / quad->tex_size.width()' is using the Y texture size, the highest resolution plane, but the U/V texture size is only half of that. This CL adds individual sizes for the Y/A and U/V textures. BUG=429640, 467283 Committed: https://crrev.com/4be817dd606efdba1614d32608ddd6e16bfa687d Cr-Commit-Position: refs/heads/master@{#320567} Committed: https://crrev.com/7364ff94a2bd814dd198f609f8d5bacabe1d563b Cr-Commit-Position: refs/heads/master@{#322541}

Patch Set 1 : Change background to gray in bleed test #

Patch Set 2 : Increase clamp to 0.99 #

Patch Set 3 : Increase clamp to 1.0 #

Total comments: 6

Patch Set 4 : change tex_size instead #

Patch Set 5 : individual ya and uv texture size #

Total comments: 3

Patch Set 6 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -58 lines) Patch
M cc/layers/video_layer_impl.cc View 1 2 3 4 1 chunk +14 lines, -2 lines 0 comments Download
M cc/output/gl_renderer.cc View 1 2 3 4 5 4 chunks +26 lines, -10 lines 0 comments Download
M cc/output/renderer_pixeltest.cc View 1 2 3 4 5 2 chunks +15 lines, -2 lines 0 comments Download
M cc/output/shader.h View 1 2 3 4 4 chunks +8 lines, -4 lines 0 comments Download
M cc/output/shader.cc View 1 2 3 4 7 chunks +29 lines, -16 lines 0 comments Download
M cc/quads/draw_quad_unittest.cc View 1 2 3 4 4 chunks +17 lines, -11 lines 0 comments Download
M cc/quads/yuv_video_draw_quad.h View 1 2 3 4 5 3 chunks +6 lines, -3 lines 0 comments Download
M cc/quads/yuv_video_draw_quad.cc View 1 2 3 4 5 chunks +10 lines, -5 lines 0 comments Download
M cc/test/data/yuv_stripes_offset.png View 1 2 3 4 Binary file 0 comments Download
M cc/test/render_pass_test_common.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M content/common/cc_messages.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M content/common/cc_messages_unittest.cc View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
M mojo/converters/surfaces/surfaces_type_converters.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 37 (10 generated)
magjed_chromium
Please take a look.
5 years, 9 months ago (2015-03-12 20:25:55 UTC) #2
enne (OOO)
https://codereview.chromium.org/1008493002/diff/40001/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/1008493002/diff/40001/cc/output/gl_renderer.cc#newcode2015 cc/output/gl_renderer.cc:2015: const float inset_x = 1.0f / quad->tex_size.width(); Can you ...
5 years, 9 months ago (2015-03-12 21:33:45 UTC) #3
magjed_chromium
https://codereview.chromium.org/1008493002/diff/40001/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/1008493002/diff/40001/cc/output/gl_renderer.cc#newcode2015 cc/output/gl_renderer.cc:2015: const float inset_x = 1.0f / quad->tex_size.width(); On 2015/03/12 ...
5 years, 9 months ago (2015-03-12 21:49:47 UTC) #4
enne (OOO)
https://codereview.chromium.org/1008493002/diff/40001/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/1008493002/diff/40001/cc/output/gl_renderer.cc#newcode2015 cc/output/gl_renderer.cc:2015: const float inset_x = 1.0f / quad->tex_size.width(); On 2015/03/12 ...
5 years, 9 months ago (2015-03-12 21:53:57 UTC) #5
magjed_chromium
https://codereview.chromium.org/1008493002/diff/40001/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/1008493002/diff/40001/cc/output/gl_renderer.cc#newcode2015 cc/output/gl_renderer.cc:2015: const float inset_x = 1.0f / quad->tex_size.width(); On 2015/03/12 ...
5 years, 9 months ago (2015-03-13 19:49:05 UTC) #6
enne (OOO)
lgtm, thanks! Can you also wrap your change description to 72 columns so it plays ...
5 years, 9 months ago (2015-03-13 19:53:16 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1008493002/60001
5 years, 9 months ago (2015-03-13 20:04:39 UTC) #9
magjed_chromium
danakj - Can you take a look?
5 years, 9 months ago (2015-03-13 20:25:15 UTC) #12
danakj
content/ changes LGTM
5 years, 9 months ago (2015-03-13 20:26:09 UTC) #13
magjed_chromium
Will Harris - Can you review content/common/cc_messages.h?
5 years, 9 months ago (2015-03-13 20:28:39 UTC) #15
Will Harris
On 2015/03/13 20:28:39, magjed wrote: > Will Harris - Can you review content/common/cc_messages.h? content/common/cc_messages.h lgtm
5 years, 9 months ago (2015-03-13 20:35:06 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1008493002/60001
5 years, 9 months ago (2015-03-13 20:45:15 UTC) #18
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 9 months ago (2015-03-13 20:48:52 UTC) #19
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/4be817dd606efdba1614d32608ddd6e16bfa687d Cr-Commit-Position: refs/heads/master@{#320567}
5 years, 9 months ago (2015-03-13 20:49:37 UTC) #20
pdr.
A revert of this CL (patchset #4 id:60001) has been created in https://codereview.chromium.org/1007953003/ by pdr@chromium.org. ...
5 years, 9 months ago (2015-03-14 04:24:38 UTC) #21
magjed_chromium
enne - Please take another look. I had to add another texture size to YUVVideoDrawQuad ...
5 years, 9 months ago (2015-03-14 18:13:22 UTC) #22
magjed_chromium
Ping. enne - Can you take a look again?
5 years, 9 months ago (2015-03-18 16:08:34 UTC) #23
enne (OOO)
lgtm https://codereview.chromium.org/1008493002/diff/80001/cc/layers/video_layer_impl.cc File cc/layers/video_layer_impl.cc (right): https://codereview.chromium.org/1008493002/diff/80001/cc/layers/video_layer_impl.cc#newcode239 cc/layers/video_layer_impl.cc:239: DCHECK(ya_tex_size == DCHECK_EQ https://codereview.chromium.org/1008493002/diff/80001/cc/output/renderer_pixeltest.cc File cc/output/renderer_pixeltest.cc (right): https://codereview.chromium.org/1008493002/diff/80001/cc/output/renderer_pixeltest.cc#newcode258 ...
5 years, 9 months ago (2015-03-18 19:25:58 UTC) #24
magjed_chromium
danakj, Will Harris - Can you take another look? https://codereview.chromium.org/1008493002/diff/80001/cc/layers/video_layer_impl.cc File cc/layers/video_layer_impl.cc (right): https://codereview.chromium.org/1008493002/diff/80001/cc/layers/video_layer_impl.cc#newcode239 cc/layers/video_layer_impl.cc:239: ...
5 years, 9 months ago (2015-03-18 21:38:43 UTC) #26
danakj
content/ still lgtm
5 years, 9 months ago (2015-03-18 21:40:23 UTC) #27
Will Harris
content/common/cc_messages.h lgtm looks like you still need a reviewer for the mojo code.
5 years, 9 months ago (2015-03-18 21:40:29 UTC) #28
magjed_chromium
jamesr - Can you take a look at mojo/converters/surfaces/surfaces_type_converters.cc?
5 years, 9 months ago (2015-03-18 21:48:06 UTC) #30
magjed_chromium
Ping. jamesr - Can you take a look?
5 years, 8 months ago (2015-03-26 17:07:40 UTC) #31
jamesr
On 2015/03/26 17:07:40, magjed wrote: > Ping. jamesr - Can you take a look? lgtm
5 years, 8 months ago (2015-03-26 19:18:42 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1008493002/120001
5 years, 8 months ago (2015-03-27 08:03:03 UTC) #35
commit-bot: I haz the power
Committed patchset #6 (id:120001)
5 years, 8 months ago (2015-03-27 09:11:21 UTC) #36
commit-bot: I haz the power
5 years, 8 months ago (2015-03-27 09:11:58 UTC) #37
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/7364ff94a2bd814dd198f609f8d5bacabe1d563b
Cr-Commit-Position: refs/heads/master@{#322541}

Powered by Google App Engine
This is Rietveld 408576698