Closed Bug 1671071 Opened 4 years ago Closed 4 years ago

sw-wr: webrender software doesn't handle bit depth other than 8 bits

Categories

(Core :: Graphics: WebRender, defect, P3)

defect

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox81 --- unaffected
firefox82 --- disabled
firefox83 --- disabled
firefox84 --- fixed

People

(Reporter: jya, Assigned: lsalzman)

References

(Blocks 1 open bug, Regression, )

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

Attached image image.png

Created some reftest in bug 1660727.

When webrender-software is enabled, the rendered image is green.

Looking at the code of RenderBufferTextureHostSWGL , it only seems to carry across the colorspace; bit depth and video range (limited or full) is dropped.

The code treats all planes as being 8 bits which isn't always the case.

See Also: → 1670815

Gnome X11, Debian Testing
This seems to have a different range than bug 1670815.

Before bug 1622966: This video is green.

After bug 1622966: Video is so transparent that I can look through the window.
mozregression --launch 2020-08-27 --pref gfx.webrender.all:true gfx.webrender.software:true -a https://hg.mozilla.org/integration/autoland/raw-file/2f20b441ceb2ed0704a70bcfd0e9affaece4f4a5/dom/media/test/reftest/av1hdr2020.mp4

Today: Corrupted like bug 1670815.

Has STR: --- → yes
OS: Unspecified → All
Hardware: Unspecified → All
Summary: webrender software doesn't handle bit depth other than 8 bits → sw-wr: webrender software doesn't handle bit depth other than 8 bits

Set release status flags based on info from the regressing bug 1622966

Severity: -- → S3
Priority: -- → P3

How does the non sw-wr code path handle non 8 bit?

Flags: needinfo?(jyavenard)

(In reply to Jeff Muizelaar [:jrmuizel] from comment #4)

How does the non sw-wr code path handle non 8 bit?

The bit depth, color space and color range is carried all the way from the TextureHost and the YUV->RGB shader handles conversion to 8 bits RGB.
https://searchfox.org/mozilla-central/source/gfx/webrender_bindings/WebRenderAPI.cpp#1303-1342

Color range information is provided, but not acted upon.

This isn't full 10/12 bits support, just that the conversion to 8 bits RGB is correct.

Flags: needinfo?(jyavenard)

The information is available to RenderBufferTextureHostSWGL ; it contains the YCbCrDescriptor which has all the data necessary

Assignee: nobody → lsalzman
Status: NEW → ASSIGNED

The non-WR basic codepath reduces HD YUV data to 8bpp low def. We need to
mimic this behavior in SWGL. GL does not have 10/12 bit planar formats, so
SWGL also needs to add a couple innocent format extensions to handle this
format of data coming in. SWGL then transparently does the lossy conversion
into an internal buffer, which allows texture fetching and compositing to
work as normal for an 8bpp texture.

Attachment #9182531 - Attachment is obsolete: true
Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f7b8bcc63183
support HDR formats in SWGL. r=mattwoodrow
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: