Closed Bug 2091879 Opened 6 days ago Closed 4 days ago

Grey tint over youtube videos

Categories

(Core :: Audio/Video: Playback, defect, P3)

Firefox 159
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: mozilla.org.8653298, Unassigned)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

Attached image Firefox Youtube.png —

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:159.0) Gecko/20100101 Firefox/159.0

Steps to reproduce

Watch a video on youtube.

Actual results

Videos have a grey tint that appears after a frection of a second.

The tint disappears when switching tabs, but reappears when switching back.

Expected results

No tint.

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

Thanks for the screenshot.

Analysis

In the lower half of the screenshot, the white areas of the video show as light grey. The red bar is also less saturated than in the upper half. The page around the player keeps its normal colors, so the change is only in the video area.

Next steps

Chris, could you please copy the text of about:support and attach it to this bug? Click "Copy text to clipboard" on that page to get it.

For this problem, choose the "Graphics" preset in step 2 in place of "Media playback".

Please capture a profile:

  1. Open about:logging.
  2. Under Log module selection, choose "Media playback" in the Logging preset: drop-down.
  3. Under Logging output, select "Logging to the Firefox Profiler".
  4. Click Start Logging.
  5. Reload the page. Then do the steps that show the problem.
  6. Click Stop Logging. The profile opens in the Firefox Profiler.
  7. Click Upload Local Profile. This is the share button.
  8. Copy the share URL. Add it to this bug.

The instruction video shows these steps.

Chris, does this happen on all videos, or only certain ones?


If you'd like to provide feedback on this comment, please use the 👍 or 👎 reaction.

Blocks: yt-playback
Severity: -- → S3
Flags: needinfo?(mozilla.org.8653298)
Priority: -- → P3

Logging-output:
https://share.firefox.dev/4BVOtYR

I do get a "who is not a valid parameter for the Bugzilla::FlagActivity::create function. " error, when I try to upload the about:support data.

Flags: needinfo?(mozilla.org.8653298)

Could you set gfx.webrender.overlay-hdr to false in about:config, restart, and tell us if the tint goes away?

:tnikkel could this be fixed by bug 2091358?

Flags: needinfo?(tnikkel)
Flags: needinfo?(mozilla.org.8653298)

(In reply to Dianna Smith [:diannaS] from comment #4)

:tnikkel could this be fixed by bug 2091358?

Probably not. The patch in bug 2091358 only changes what happens when the video is tagged HDR (HLG or PQ transfer function). The profile in comment 3 shows this video is 8-bit SDR VP9, tagged BT.709 for primaries, transfer and matrix, with limited range (codecs="vp09.00.51.08.01.01.01.01.00"). The patch doesn't change anything for that video.

The tint showing up a fraction of a second after playback starts and going away on a tab switch does point at the video overlay. The video is software decoded, so it goes down the SW overlay path.

Flags: needinfo?(tnikkel)

Chris, thanks for the screenshot. Measuring it, black goes from 0 to 16 and white from 254 to 234 in the tinted half, which is what limited-range (16-235) video output looks like when it's shown as full range. Could you try these, restarting Firefox after each change and resetting each pref to its default before trying the next one?

  1. Set gfx.webrender.dcomp-video-sw-overlay-win to false. Does the tint go away?
  2. Set gfx.webrender.overlay-vp-super-resolution to false. Does the tint go away?
  3. Does the same video show the tint in Edge or Chrome?
  4. Which GPU do you have? Does its control panel (NVIDIA Control Panel, AMD Software, Intel Graphics Command Center) have video color or dynamic range settings, and what are they set to?
  5. Do you know when this started, for example after a Firefox update or a graphics driver update?

For about:support, you can paste the text straight into a comment, which avoids the upload error you got.

Timothy Nikkel leads the analysis of this bug (comments 5 and 6). The bug waits for the answers from Chris to comment 6, which include about:support. Below are confirmed facts from the profile in comment 3 and from the code.

Facts from the profile in comment 3

  • FFVPX decodes the VP9 video in software in the RDD process. The decoder log shows "YUV colorspace: BT709, color range: LIMITED".
  • The profile has no Renderer, RenderBackend or Compositor thread from the GPU process. So the profile does not show if the video overlay was in use when the tint appeared.
  • The profile shows an Intel Core i5-5300U CPU. It does not show the GPU, so the GPU is not known yet.
  • The media log has no decode error that relates to the tint.

Facts from the code

  • A software-decoded frame goes to the overlay only as an NV12 texture with limited range. TextureHostWrapperD3D11.cpp refuses other ranges.
  • On the overlay path, DCLayerTree.cpp maps this video to DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709. The D3D11 video processor gets this limited-range tag through VideoProcessorSetStreamColorSpace1.
  • On the path without an overlay, WebRender does the limited-range conversion in its own shader.
  • For this texture, TextureD3D11.cpp allows the overlay when gfx.webrender.dcomp-video-sw-overlay-win is on. So test 1 in comment 6 separates the two paths.
  • SetVpSuperResolution in DCLayerTree.cpp calls the driver only for NVIDIA (vendor 0x10DE). For other vendors, it returns E_NOTIMPL. If the GPU is Intel, test 2 in comment 6 cannot change the result.
  • No code was found that explains why the tint starts a fraction of a second after playback starts.

Open points for Timothy

  • Firefox tags the overlay input as studio range. If the tint goes away with test 1, where does the range get lost?
  • A "Graphics" preset profile that keeps the GPU process threads can show if the overlay is in use when the tint appears.
  • It is not known if a hardware-decoded H.264 video shows the same tint.

Bug 2091358 and bug 2023466 also show washed-out or grey video in the overlay area, with different triggers. The code above is in Core :: Graphics and Core :: Graphics: WebRender. This bug stays on the YouTube meta bug 1904915.


If you'd like to provide feedback on this comment, please use the 👍 or 👎 reaction.

See Also: → 2091358, 2023466

gfx.webrender.overlay-hdr and gfx.webrender.overlay-vp-super-resolution did not change the tint.
But gfx.webrender.dcomp-video-sw-overlay-win did remove it.
The GPU is the integrated intel HD Graphics 5500.

Flags: needinfo?(mozilla.org.8653298)

Thanks Chris, that pins it to the software-decoded video overlay on the Intel HD Graphics 5500.

Could you paste the text of about:support into a comment? Open about:support, click "Copy text to clipboard", then paste it here as a comment. It has the graphics driver version, which we need.

Two more things that would help:

  1. Does the Intel graphics control panel (Intel Graphics Control Panel or Intel Graphics Command Center) have a Video section with an "Input Range" or color setting? If so, what is it set to, and does changing it to "Application Settings" or "Full Range" change the tint (with gfx.webrender.dcomp-video-sw-overlay-win back at its default)?
  2. Do you know roughly when this started, for example after a Firefox update or a driver update?
Flags: needinfo?(mozilla.org.8653298)

For some reason the driver was set to Driver Settings.
Switching it to Application Settings seems to have solved it.

I know it did appeared over a year ago for some time.
But back then I thougt it was a youtube-quirk, as it only happened when hovering the mouse over one of the recommendations while a video was playing.

Flags: needinfo?(mozilla.org.8653298)

Thanks Chris, that explains it. With the video color setting at "Driver Settings", the Intel driver outputs limited-range video, which shows up as grey blacks and whites. Firefox only shows it when the video goes through the video overlay, and the overlay uses the driver's video processing. The tint you saw over a year ago when hovering recommendations would be the same thing, since the preview videos also go through the overlay.

Since "Application Settings" fixes it and nothing needs to change in Firefox, I'm closing this bug. Thanks for testing everything so quickly.

Status: UNCONFIRMED → RESOLVED
Closed: 4 days ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: