8K video + high device pixel ratio leads to distorted aspect ratio |
|||||||||||
Issue descriptionChrome Version: 58, 60 (seen for a loooong time tho) OS: Win, Mac, Linux - Start playing an 8K video (e.g. https://www.youtube.com/watch?v=1La4QzGeaaQ ), in 8K - Fullscreen it - Increase the device pixel ratio by zooming in (e.g. using Ctrl-+) - Notice that the video aspect ratio becomes distorted This is really obvious on an 8K display which will default out-of-the-box to zoom settings that trigger it, but I can easily reproduce it on a 4K display by zooming in past 2.5x. I can reproduce this behavior by navigating directly to an 8K transcode outside of the YouTube player (internal only example: go/8k-video-for-crbug ), so it's not a YouTube or video sizing problem.
,
May 31 2017
Nope, 8K images are apparently immune.
,
May 31 2017
Interesting, I'll try it out tomorrow when I'm back at my desk and see what I can find out. +hubbe since he has a 4K display as well.
,
May 31 2017
I can't seem to trigger this bug on chrome stable on Linux with a 4K display.
,
May 31 2017
I just tried on a friend's machine and reproduced on a 1440p display; had to go up to 400% (or maybe 500%) zoom there before it reproduced.
,
May 31 2017
I forgot to lock the video resolution to 8K. Once I did that it reproduces on all my screens...
,
Jun 1 2017
For what I can tell, the <video> element aspect ratio stays the same (1.77) and it seems that Chrome adds letter boxing when hitting 500%. I can't tell if that's on the layout or compositing side.
,
Jun 1 2017
+some compositing and layout folks.
,
Jun 2 2017
This would be a direct composited video, I think. Looping in those folks and Blink's video folks (that might be the same set of people already following).
,
Jun 2 2017
schenney@ those folk are already on this bug :) As mounir notes in c#7 there seems to be some sort of letterbox being applied at high zoom levels.
,
Jun 2 2017
I know pretty much nothing about how the video element is painted when it's directly composited. Is the issue the layer size that we're requesting of the GPU and/or the layout of the video tag? Out of interest, what's the pixel width/height on a 8K display? Could we be trying to avoid short integer overflow of some kind at high zoom levels?
,
Jun 2 2017
7680×4320 is the standard 8K resolution. The bug also reproduces on 1440p screens at higher zoom levels.
,
Jun 2 2017
,
Aug 16 2017
Been a minute. It's still embarrassing to demo 8K on Chrome, and I'd like to get in a fix in Stable before CES next January where 8K will likely be ubiquitous. Is there anything I can do to help this?
,
Aug 16 2017
+liberato since he's been interested in getting into the compositing side of things more.
,
Aug 16 2017
there is a VideoLayer on my linux box, and it does show the problem. the bounds of the VideoLayer change abruptly from a ratio of 1.77 to 2.43 at 500% zoom on my linux machine. makes me think that it's on the blink side, since the bounds are set pretty much directly. if nobody's picked this up by the beginning of next week, then i'll look further.
,
Oct 12 2017
Frank, want to pick this up or delegate for this Q?
,
Oct 12 2017
cc:beccahughes since I see her fixing zoom issues :)
,
Oct 12 2017
i'll take another look.
,
Nov 14 2017
Frank, any updates here? Going to go ahead and tag this with a milestone and up the pri so it doesn't fall off our plate again.
,
Nov 14 2017
no, i haven't gotten back to this yet.
,
Nov 15 2017
seems to be bad math in LayoutUnit. in a case with proper aspect ratio, LayoutSize::FitToAspectRatio computes the height as 1704*17280/30720 = 958.5 which is 1.77 aspect ratio (1704 / 958). in a bad case, it computes the height as 1704*21600/38400 = 873, which is the wrong aspect ratio. it's also just plain wrong. bc tells me that it equals the same 958.5 . probably could fix it with a call to ToFloat(), but i want to be sure that the overloaded ops aren't just broken.
,
Nov 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/53479ca91ac63d89a22c06db86a4292edcb2fa65 commit 53479ca91ac63d89a22c06db86a4292edcb2fa65 Author: liberato@chromium.org <liberato@chromium.org> Date: Tue Nov 28 19:19:33 2017 Avoid saturation when computing LayoutSize aspect ratio. 8k video could cause LayoutUnit to saturate multiplication when computing the correct aspect ratio. This CL does the calculation in floating point, instead. Bug: 728303 Test: LayoutSizeTest Change-Id: I632777e2f140b8203577b3e5e0761f3e7f891aa2 Reviewed-on: https://chromium-review.googlesource.com/773108 Reviewed-by: Philip Rogers <pdr@chromium.org> Reviewed-by: Dale Curtis <dalecurtis@chromium.org> Commit-Queue: Frank Liberato <liberato@chromium.org> Cr-Commit-Position: refs/heads/master@{#519784} [modify] https://crrev.com/53479ca91ac63d89a22c06db86a4292edcb2fa65/third_party/WebKit/Source/platform/BUILD.gn [modify] https://crrev.com/53479ca91ac63d89a22c06db86a4292edcb2fa65/third_party/WebKit/Source/platform/geometry/LayoutSize.h [add] https://crrev.com/53479ca91ac63d89a22c06db86a4292edcb2fa65/third_party/WebKit/Source/platform/geometry/LayoutSizeTest.cpp
,
Nov 28 2017
|
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by dalecur...@chromium.org
, May 31 2017