Closed Bug 1763782 Opened 2 years ago Closed 2 years ago

HDR video playback support does not work for AV1 codec

Categories

(Core :: Graphics, defect)

Desktop
macOS
defect

Tracking

()

VERIFIED FIXED
101 Branch
Tracking Status
firefox99 --- disabled
firefox100 + verified
firefox101 --- verified

People

(Reporter: ailea, Assigned: bradwerth)

References

(Blocks 2 open bugs)

Details

Attachments

(4 files)

Affected Versions:

Nightly 101.0a1, Beta 100.0b3 (this feature was implemented in Fx100, in Release 99 it is disabled).

Tested on:

macOS 12.3 (iMac Retina 4k, 16-inch, 2019)
macOS 11 (MacBook Pro 16-inch, 2019)

Preconditions:

Access: https://drive.google.com/drive/u/0/folders/1S-E4WeKO6y6UySHnSWvfAuCB7N6URdCj and download the files locally on your computer.

Steps to reproduce:

  1. Launch Firefox.
  2. Open a new tab and drag&drop the "Sparks-5994fps-AV1-10bit-1920x1080-2194kbps.webm" or "all_in_one_hdr.mp4" (both are AV1) video saved in preconditions, from the computer to FF window.
  3. Play the video.

Expected Results:

The video should play in HDR.

Actual Results:

The video is not playing in HDR mode.

Has STR: --- → yes
Assignee: nobody → bwerth

This stubs in decode support for 10-bit AV1. The result has the right
proportion but is color-shifted, indicating that the packing of the data
doesn't match the expectations of the P010 format, which is a MSB format.
So probably each uint16 needs to be left-shifted 6 bits.

Attachment #9271828 - Attachment description: WIP: Bug 1763782 Part 1: Allow AV1 10-bit to be decoded. → Bug 1763782 Part 1: Allow AV1 10-bit to be decoded.

This derives sane values for color primaries and transfer functions from
the colorspace value. A better solution would be to extract those values
from the video itself, but these are good enough for common encodings and
match the behavior for hardware-decoded video in AppleVTDecoder.

Depends on D143436

See Also: → 1764618

Depends on D143542

Blocks: 1764618
See Also: 1764618
Pushed by bwerth@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2f02711a485f
Part 1: Allow AV1 10-bit to be decoded. r=gfx-reviewers,jgilbert
https://hg.mozilla.org/integration/autoland/rev/fefcfb0559bf
Part 2: Set color primaries and transfer functions for HD and HDR. r=gfx-reviewers,jgilbert
https://hg.mozilla.org/integration/autoland/rev/b38b90bc7a4d
Part 3: Update test expectations. r=jgilbert,gfx-reviewers

Backed out for causing reftest failures.

Flags: needinfo?(bwerth)
No longer blocks: 1765138
Blocks: hdr-youtube
Flags: needinfo?(bwerth)
See Also: → 1763781
Pushed by bwerth@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e39c412b7041
Part 1: Allow AV1 10-bit to be decoded. r=gfx-reviewers,jgilbert
https://hg.mozilla.org/integration/autoland/rev/0ad6c07468fa
Part 2: Set color primaries and transfer functions for HD and HDR. r=gfx-reviewers,jgilbert
https://hg.mozilla.org/integration/autoland/rev/424e46671d4f
Part 3: Update test expectations. r=jgilbert,gfx-reviewers

Verified - Fixed in latest Nightly 101.0a1 (2022-04-19), using macOS 12.3 and macOS 11. The AV1 video is properly rendered in HDR.

Comment on attachment 9271828 [details]
Bug 1763782 Part 1: Allow AV1 10-bit to be decoded.

Beta/Release Uplift Approval Request

  • User impact if declined: HDR capability reporting is in-tree, but support for AV1 is not. Users might get served HDR AV1 content by YouTube and get a bad visual experience.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: Bug 1765396
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This has been tested thoroughly by QA. It is also "merely" a visual fidelity feature and has not led to any blocking problems.
  • String changes made/needed:
  • Is Android affected?: No
Attachment #9271828 - Flags: approval-mozilla-beta?
Attachment #9272010 - Flags: approval-mozilla-beta?
Attachment #9272218 - Flags: approval-mozilla-beta?

Comment on attachment 9271828 [details]
Bug 1763782 Part 1: Allow AV1 10-bit to be decoded.

Approved for 100.0b9

Attachment #9271828 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9272010 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9272218 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Dianna, as mentioned in the request, Bug 1765396 should travel with it. Can you mark that approved for uplift as well?

Flags: needinfo?(dsmith)

yes, i was waiting on the nomination before the push, but that is complete now.

Flags: needinfo?(dsmith)
Blocks: 1765396

Verified - Fixed in latest Beta 100.0 (build id: 20220425210429). The AV1 video is properly rendered in HDR.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: