New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 767926 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 1
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug


Participants' hotlists:
high-bit-depth


Sign in to add a comment

4 MediaTest.Yuv* fail on Linux

Project Member Reported by sugoi@chromium.org, Sep 22 2017

Issue description

Tests 4 tests are currently disabled on Linux:

MediaColorTest.Yuv420pH264 (similar to  http://crbug.com/649199 )
MediaColorTest.Yuv420pTheora
MediaColorTest.Yuv420pVp8
MediaColorTest.Yuvj420pH264 (similar to  http://crbug.com/647818  and  http://crbug.com/647838 )


 

Comment 1 by sugoi@chromium.org, Sep 22 2017

Description: Show this description

Comment 2 by sugoi@chromium.org, Sep 22 2017

Cc: w...@chromium.org xhw...@chromium.org

Comment 3 by xhw...@chromium.org, Sep 22 2017

Cc: -w...@chromium.org hubbe@chromium.org
+hubbe
Components: Internals>Media>Video
I've stumbled upon this too and can be reproduced by running

out/gn/content_shell file://...src/media/test/data/blackwhite.html --allow-file-access-from-files 

which fails in most cases showing different pixels, despite the playback
looking fine (see attached picture), so I think it's a test issue, or 
perhaps the way we read back from the canvas is borked? The test dumps 
the <video> contents on a <canvas> from which the pixels are read [1], 
maybe using an offscreen canvas is causing the issue?


[1] https://cs.chromium.org/chromium/src/media/test/data/blackwhite.html?q=blackwhite.+html&sq=package:chromium&dr=C&l=123
420p.mp4.png
42.2 KB View Download
Labels: OS-Linux
I dug a bit further on this; what the test does is, in a nutshell:

<img>   --> <canvas> --> context2D --> getImageData() -
                                                       \
<video> --> <canvas> --> context2D --> getImageData() --+--> compare

which works to the naked eye and mathematically on certain platforms,
but not on Linux. In the attached pic, for MAYBE_Yuvj420pH264,
I've pumped up the diffs (3rd drawing) and followed the code and 
indeed values are different. Beats me, because the same tests 
work in e.g. Mac and Windows o_O
MAYBE_Yuvj420pH264.png
69.4 KB View Download
Cc: dcasta...@chromium.org kbr@chromium.org
Components: Internals>GPU>Video
Owner: mcasas@chromium.org
Status: Assigned (was: Untriaged)
I was a bit confused by the html file: if you look closely,
some of those comparisons that fail miserably still get the
label "ENDED" which means that the test would pass. So that's
not the ticket.
What makes really the difference is if the GpuMemoryBufferVideoFramePool
is engaged: all the failing cases do use them, and if we disable
the use of the said ones via UseSoftwareCompositing() [1] then they
work fine.

So, Linux + GpuMemoryBuffers + content_browsertest(s0 is the
failing combination.

kbr@, dcastagna@ does it ring a bell...?



[1] https://cs.chromium.org/chromium/src/content/public/test/browser_test_base.h?type=cs&sq=package:chromium&l=127

Comment 7 by kbr@chromium.org, Jan 4 2018

Cc: ccameron@chromium.org junov@chromium.org zakerinasab@chromium.org xlai@chromium.org
Is color correction being done along one code path but not the other?

Comment 8 by hubbe@chromium.org, Jan 8 2018

I think software compositing turns off more than just gpu memory buffers.
I think we use libyuv to convert the frame to RGB, and we don't do any color management in that case.

Software compositing does not do color correct rendering (it is far too expensive to do color correction in software in current schemes).
Cc: mcasas@chromium.org
Owner: ----
Status: Available (was: Assigned)
https://chromium-review.googlesource.com/c/chromium/src/+/1003230/
When GpuMemoryBufferVideoFramePool is enabled, it fails on windows too.

Cc: -junov@chromium.org
Project Member

Comment 13 by bugdroid1@chromium.org, Jul 30

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d2610fdbfe23ad2be4b771a98707b5036300b4d0

commit d2610fdbfe23ad2be4b771a98707b5036300b4d0
Author: Fredrik Hubinette <hubbe@google.com>
Date: Mon Jul 30 19:37:19 2018

enable color tests on linux

As far as I can tell, these tests were never really broken,
but at some point they started failing because they don't
ask for pixel output.

Bug:  767926 
Change-Id: I80e6934b2c6b07c99a75aec68b0ba6fb3880d193
Reviewed-on: https://chromium-review.googlesource.com/1151715
Commit-Queue: Fredrik Hubinette <hubbe@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579121}
[modify] https://crrev.com/d2610fdbfe23ad2be4b771a98707b5036300b4d0/content/browser/media/media_color_browsertest.cc
[modify] https://crrev.com/d2610fdbfe23ad2be4b771a98707b5036300b4d0/media/renderers/paint_canvas_video_renderer.cc

Owner: hubbe@chromium.org
Status: Fixed (was: Available)
Project Member

Comment 15 by bugdroid1@chromium.org, Aug 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e4d342ff7249dedc8e6e581d742eea533173072b

commit e4d342ff7249dedc8e6e581d742eea533173072b
Author: Fredrik Hubinette <hubbe@google.com>
Date: Thu Aug 02 18:14:16 2018

missed enabling one color test on linux

In https://chromium-review.googlesource.com/c/chromium/src/+/1151715
I missed one of the tests. Enable it now.

Bug:  767926 
Change-Id: I6c8aaa9c6e5a955be747df4fba1f8a3e95166ca7
Reviewed-on: https://chromium-review.googlesource.com/1159348
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Fredrik Hubinette <hubbe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580253}
[modify] https://crrev.com/e4d342ff7249dedc8e6e581d742eea533173072b/content/browser/media/media_color_browsertest.cc

Sign in to add a comment