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

Issue 881963002: Clamp YUV videos to their visible size in the shader (Closed)

Created:
5 years, 11 months ago by enne (OOO)
Modified:
5 years, 10 months ago
CC:
cc-bugs_chromium.org, chrishtr, chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Clamp YUV videos to their visible size in the shader Video textures can be larger than the visible size of the video. Because they have bilinear filtering turned on for them, if the video is scaled, then the this means that the part of the texture outside of the video itself can be sampled, causing odd visible artifacts like hairlines on the side of the image. To fix this, pass in a clamp value of half a pixel (because of bilinear filtering) inside of the visible rect and clamp all texture coordinates to this maximum value in the fragment shader. BUG=429640 Committed: https://crrev.com/a2a2970d72e7856444896600874fca9594f55437 Cr-Commit-Position: refs/heads/master@{#314200}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Add test, fix bugs #

Total comments: 5

Patch Set 3 : Rebase #

Patch Set 4 : danakj review, build fix #

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

Messages

Total messages: 14 (3 generated)
enne (OOO)
5 years, 11 months ago (2015-01-28 00:38:48 UTC) #2
danakj
Can we pixeltest it? https://codereview.chromium.org/881963002/diff/1/cc/output/shader.cc File cc/output/shader.cc (right): https://codereview.chromium.org/881963002/diff/1/cc/output/shader.cc#newcode229 cc/output/shader.cc:229: uniform TexCoordPrecision vec2 clampSize; void ...
5 years, 11 months ago (2015-01-28 01:02:00 UTC) #3
enne (OOO)
The new yuv_striped_offset.png is because that test also no longer has bleed through on the ...
5 years, 10 months ago (2015-01-31 01:32:14 UTC) #4
danakj
LGTM https://codereview.chromium.org/881963002/diff/20001/cc/output/renderer_pixeltest.cc File cc/output/renderer_pixeltest.cc (right): https://codereview.chromium.org/881963002/diff/20001/cc/output/renderer_pixeltest.cc#newcode463 cc/output/renderer_pixeltest.cc:463: void CreateTestYUVVideoDrawQuad_TwoColor(const SharedQuadState* shared_state, can you leave a ...
5 years, 10 months ago (2015-02-02 18:43:03 UTC) #5
enne (OOO)
danakj: take another look if you want (or not) jamesr: mojo/ OWNERS wfh: content/common/cc_messages.h OWNERS
5 years, 10 months ago (2015-02-02 19:37:39 UTC) #7
Will Harris
On 2015/02/02 19:37:39, enne wrote: > danakj: take another look if you want (or not) ...
5 years, 10 months ago (2015-02-02 19:41:57 UTC) #8
danakj
lgtm
5 years, 10 months ago (2015-02-02 19:42:09 UTC) #9
jamesr
lgtm
5 years, 10 months ago (2015-02-02 20:23:11 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/881963002/60001
5 years, 10 months ago (2015-02-02 20:51:30 UTC) #12
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 10 months ago (2015-02-02 22:21:59 UTC) #13
commit-bot: I haz the power
5 years, 10 months ago (2015-02-02 22:23:09 UTC) #14
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/a2a2970d72e7856444896600874fca9594f55437
Cr-Commit-Position: refs/heads/master@{#314200}

Powered by Google App Engine
This is Rietveld 408576698