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

Issue 810591 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug

Blocking:
issue 624436



Sign in to add a comment

HDR video bugs on macOS

Project Member Reported by ccameron@chromium.org, Feb 9 2018

Issue description

HDR video has several issues on macOS

To reproduce
1. Download the video at [1] (requires Google login)
https://drive.google.com/file/d/15v1YCIOTEMkFLvmovbJ0Ww40C2gUdoqu/view?usp=sharing
2. Try opening the video in Chrome using any of the flags
    --disable-gpu-memory-buffer-video-frames 
    --disable-mac-overlays

With GMBs disabled, it doesn't run (regressed in r512615).

GMBs are enabled by default at r528549.
 
Cc: kbr@chromium.org piman@chromium.org zmo@chromium.org vmi...@chromium.org
Spoke with several folks here.

It looks like sized LUMINANCE_F16 might not be supported on mac. On mac, we're on GL 4.1 core profile, which includes float format support, and we rely on ARB_texture_storage for tex storage. That extension doesn't talk about float formats at all. In the command buffer we assume the semantics of EXT_texture_storage which does support sized float formats. Furthermore, we don't emulate legacy LUMINANCE formats (UNSIGNED_BYTE) which are required by webgl 2 and don't seem to have conformance tests.

I'm trying to confirm my hypotheses by running with tex storage disabled. kbr@ also suggested enabling R16 on mac, which should be supported by command buffer but seems to be gated on use-r16-texture finch feature[1]. I'm going to try that too.

[1] https://cs.chromium.org/chromium/src/media/base/media_switches.cc?type=cs&q=use-r16-texture&sq=package:chromium&l=278
Ran a few tests:
1. ToT default: video is green, GL error detected on BindTexImage2D presumably because TexStorage2D fails
2. tex storage disabled in LayerTreeResourceProvider: video is ok
3. tex storage enabled, r16 finch restriction removed: compositor tries to use GMB backed textures (TexStorage2DImageCHROMIUM) but that fails on service side because we don't support R16 IO surfaces there
4. same as 3 (r16 with tex storage) but make client not use GMB backed textures for r16: video works


Comment 3 by kbr@chromium.org, Feb 9 2018

Blocking: 624436
For a little history, I think this code path was added in Issue 624436 and specifically https://chromium-review.googlesource.com/663660 .

It looks like the R16 code path was specifically added because LUMINANCE_F16 is deprecated. Since R16 is needed for correctness, I think we should make the switch rather than trying to send it through a Finch trial (which wasn't working anyway).

sunnyps@: yeah, LUMINANCE_F16 is not supported, see crbug.com/792295#c13 and 
crbug.com/792295#c16, where we tracked the high-bit-depth videos not playing
in Mac (before r528549).

Also, for a 10bpc video not marked as HDR you could use 
http://crosvideo.appspot.com/?codec=vp9.2&loop=true

And for a 10bpc video marked as HDR (which should play faded now in Mac),
we're using [1] (the cut.334/335 concretely, compare with the cut.247/248,
in particular the vividness of the red flowers at the right in the first 
frames).

[1] https://drive.google.com/drive/folders/1hOUaL-9RHuOmIOQ_1YKCtSMqQXBb7P3U?usp=sharing

Comment 5 by hubbe@chromium.org, Feb 9 2018

Cc: hubbe@chromium.org

Comment 6 by hubbe@chromium.org, Feb 9 2018

R16 should work great for HDR, but there are some issues to resolve. In particular I'm not sure if it works on both the passthrough and validating decoder. If it does, then we can switch mac over to use R16. With further testing, we can also switch other things over to R16. I'm not sure if we can eliminate the LUMINANCE_F16 path though. LUMINANCE_F16 is provided by an extension on a lot of ES2 devices, and I'm not sure if those devices also have R16.


Components: -Blink>Compositing
Btw, the original context of the bug is b/72867296 -- that bug links over to this crbug after the bisects.
Project Member

Comment 9 by bugdroid1@chromium.org, Feb 28 2018

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

commit 17c1754e30f39a23a5819fb533a5bf0f8e5efe60
Author: Sunny Sachanandani <sunnyps@chromium.org>
Date: Wed Feb 28 02:06:24 2018

gpu: Luminance/alpha emulation for TexStorage

Make legacy, sized, half-float, and float luminance/alpha emulation work
with TexStorage. We noticed that this was broken because LUMINANCE_F16
textures are used with TexStorage for HDR video on Mac when overlays are
disabled. Add tests for legacy luminance/alpha formats since those are
easy to test.

R=zmo,piman
TEST=TextureStorageTest.LuminanceAlphaEmulation

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Iae9cefd772536cc6dc419f226634ae07429d265b
Bug: 810591
Reviewed-on: https://chromium-review.googlesource.com/921401
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539653}
[modify] https://crrev.com/17c1754e30f39a23a5819fb533a5bf0f8e5efe60/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/17c1754e30f39a23a5819fb533a5bf0f8e5efe60/gpu/command_buffer/service/texture_manager.cc
[modify] https://crrev.com/17c1754e30f39a23a5819fb533a5bf0f8e5efe60/gpu/command_buffer/service/texture_manager.h
[modify] https://crrev.com/17c1754e30f39a23a5819fb533a5bf0f8e5efe60/gpu/command_buffer/tests/gl_texture_storage_unittest.cc

Sign in to add a comment