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

Issue 1645353003: VideoLayerImpl: subtract 1 from visible size when calculating tex stretch. (Closed)

Created:
4 years, 10 months ago by wuchengli
Modified:
4 years, 10 months ago
CC:
cc-bugs_chromium.org, chromium-reviews, DaleCurtis, feature-media-reviews_chromium.org, Pawel Osciak
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

VideoLayerImpl: subtract 1 from visible size when calculating tex stretch. The video texture only has "visible rect" valid and we're sampling outside of that visible rect and into garbage texture space due to bilinear filtering. The fix is to stretch the video such that it will always have an extra set of texels to sample from. Subtract one from the visible size when calculating the tex stretch x and y scale. BUG=575587 TEST=Test youtube.com/watch?v=CoOFjXk4xLY on nyan_big and peach_pi. Run cc_unittests. CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/64647caadd62fc639f6a3bb194557d8447f6d419 Cr-Commit-Position: refs/heads/master@{#373478}

Patch Set 1 #

Total comments: 1

Patch Set 2 : check visible rect > 1,1 #

Total comments: 5

Patch Set 3 : rebase #

Patch Set 4 : also stretch the video for YUV_RESOURCE #

Total comments: 1

Patch Set 5 : do not stretch visible_rect of IO_SURFACE #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -8 lines) Patch
M cc/layers/video_layer_impl.cc View 1 2 3 4 2 chunks +14 lines, -8 lines 0 comments Download

Messages

Total messages: 31 (13 generated)
wuchengli
PTAL
4 years, 10 months ago (2016-01-30 00:52:10 UTC) #3
Pawel Osciak
https://codereview.chromium.org/1645353003/diff/1/cc/layers/video_layer_impl.cc File cc/layers/video_layer_impl.cc (right): https://codereview.chromium.org/1645353003/diff/1/cc/layers/video_layer_impl.cc#newcode189 cc/layers/video_layer_impl.cc:189: static_cast<float>(visible_rect.width() - 1) / coded_size.width(); I'm wondering if we ...
4 years, 10 months ago (2016-02-01 00:40:58 UTC) #5
wuchengli
On 2016/02/01 00:40:58, Pawel Osciak wrote: > https://codereview.chromium.org/1645353003/diff/1/cc/layers/video_layer_impl.cc > File cc/layers/video_layer_impl.cc (right): > > https://codereview.chromium.org/1645353003/diff/1/cc/layers/video_layer_impl.cc#newcode189 ...
4 years, 10 months ago (2016-02-01 03:12:23 UTC) #7
wuchengli
Tested on nyan-big and it worked. PTAL.
4 years, 10 months ago (2016-02-01 03:12:34 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1645353003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1645353003/20001
4 years, 10 months ago (2016-02-01 03:15:13 UTC) #10
wuchengli
https://codereview.chromium.org/1645353003/diff/20001/cc/layers/video_layer_impl.cc File cc/layers/video_layer_impl.cc (right): https://codereview.chromium.org/1645353003/diff/20001/cc/layers/video_layer_impl.cc#newcode192 cc/layers/video_layer_impl.cc:192: visible_width -= 1.f; Do we want this for RGB_RESOURCE ...
4 years, 10 months ago (2016-02-01 03:29:52 UTC) #11
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-01 04:22:53 UTC) #13
wuchengli
I tested this CL on veyron_jerry, which used STREAM_TEXTURE_RESOURCE.
4 years, 10 months ago (2016-02-01 08:22:33 UTC) #15
enne (OOO)
Can you write a renderer pixel test, with a video frame that is green inside ...
4 years, 10 months ago (2016-02-01 21:00:03 UTC) #16
wuchengli
PTAL. I discussed with enne@ yesterday. I'll try if I can write a test today. ...
4 years, 10 months ago (2016-02-02 05:37:27 UTC) #17
wuchengli
By the way, since the issue only happens when scaling up, not scaling down. Do ...
4 years, 10 months ago (2016-02-02 08:54:50 UTC) #18
wuchengli
I didn't have enough time to write the test today. I'll try writing it tomorrow. ...
4 years, 10 months ago (2016-02-02 14:42:10 UTC) #19
wuchengli
PTAL. I looked at renderer_pixeltest.cc. I think the tests don't call into VideoLayerImpl::AppendQuads at all. ...
4 years, 10 months ago (2016-02-03 15:38:27 UTC) #20
enne (OOO)
lgtm
4 years, 10 months ago (2016-02-03 22:17:52 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1645353003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1645353003/80001
4 years, 10 months ago (2016-02-04 05:32:54 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1645353003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1645353003/80001
4 years, 10 months ago (2016-02-04 07:46:11 UTC) #27
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 10 months ago (2016-02-04 08:12:25 UTC) #29
commit-bot: I haz the power
4 years, 10 months ago (2016-02-04 08:13:44 UTC) #31
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/64647caadd62fc639f6a3bb194557d8447f6d419
Cr-Commit-Position: refs/heads/master@{#373478}

Powered by Google App Engine
This is Rietveld 408576698