<canvas> color is different than <video> color |
||||||||||
Issue descriptionChrome Version : 72.0.3623.3 OS Version: 11307.0.0 What steps will reproduce the problem? 1. Go to https://beaufortfrancois.github.io/sandbox/media/picture-in-picture-timer?canvas-visible 2. Click "Start" button 3. Observe canvas color and pip video color What is the expected result? They should be the same What happens instead of that? Video color is different than canvas color
,
Dec 5
I can't repro on Linux too. We may want to check on Mac and Windows to see if that's Chrome OS only. +edcourtney@ +oshimo@ FYI and in case of they can think of anything CrOS specific.
,
Dec 6
On macOS, according to "Digital Color Meter" app with "Display in sRGB" selected: canvas color RGB is [159,166,162] PiP video color RGB is [160,167,162] Note that I personally didn't notice that much difference. It may be a result of the RGBA > YUV conversion.
,
Dec 6
On Window 10, here's what I get: canvas color RGB is [159,168,163] PiP video color RGB is [159,167,164] Same as macOS, I personally didn't notice that much difference. It may be a result of the RGBA > YUV conversion.
,
Dec 6
On Chrome OS, values that actually make a real difference to my eyes are: canvas color RGB is [157,166,162] PiP video color RGB is [159,169,163]
,
Dec 6
,
Dec 6
When running Chrome with --disable-features=UseMonitorColorSpace in Chrome OS, the difference in colors is not noticeable anymore as you can see: canvas color RGB is [159,168,163] PiP video color RGB is [159,169,163]
,
Dec 6
,
Dec 6
,
Dec 6
A given <canvas> and a <video> fed with a <canvas>.captureStream() produce the same colors; but a <canvas> and a PiP <video> fed with a <canvas>.captureStream() do not, so we're probably not sending the PiP the raster ColorSpace information as we do for the "normal" <video> element. lethalantidote@, ccameron@ do you know how is this PiP <video> associated LayerTree(HostImpl) created? I think we need to plug the RasterColorSpace info there (like we do in https://cs.chromium.org/chromium/src/content/renderer/render_widget.cc?type=cs&q=+GetRasterColorSpace%5C(%5C)&sq=package:chromium&g=0&l=1575 )
,
Dec 6
,
Dec 6
Argh! According to https://beaufortfrancois.github.io/sandbox/media/picture-in-picture-timer?canvas-and-video-visible where canvas, video, and pip video are shown to the screen: - video and pip video are the same color - only canvas is different See screenshot attached.
,
Dec 6
I will transfer SkImage colorspace to media::VideoFrame as I mentioned in #1 as the first step. Based on the last test, that might explain why <canvas> is different than others. Still, I would expect us to lose a bit of accuracy between <canvas> and <video> because of RGBA->YUV conversion.
,
Dec 6
|
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by emir...@chromium.org
, Dec 587.8 KB
87.8 KB View Download