Closed Bug 1736692 Opened 1 month ago Closed 1 month ago

Netflix is not using video IOSurfaces

Categories

(Core :: Audio/Video, defect, P2)

All
macOS
defect

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- verified

People

(Reporter: mstange, Assigned: mstange)

References

Details

Attachments

(1 file)

When playing Netflix on macOS, we seem to upload the video as textures and do the conversion to RGB in WebRender.

Matt Woodrow found the following:

It looks like the GMP decoder (the Widevine/DRM decoder) isn't passing the needed aAllocator param - https://searchfox.org/mozilla-central/rev/8130ddcaa7e214d341371194bb1d2f97078cab00/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp#63-67

Fixing that (it's available in the CreateDecoderParams passed to the ctor) will likely improve performance even without [Brad's] changes, as well as hopefully fixing [the issue with Netflix not hitting detached mode]!

Assignee: nobody → mstange.moz
Status: NEW → ASSIGNED
Component: Graphics: WebRender → Audio/Video

There are a few more callers of VideoData::CreateAndCopyData which don't pass an aAllocator param, which means that none of them will get IOSurface upload or detached mode: AOMDecoder, OmxDataDecoder, and BlankDecoderModule. I'll make the parameter non-optional and change these callers to pass nullptr.

The call to VideoData::CreateAndCopyData in ChromiumCDMParent::CreateVideoFrame is the one that needs to not be null.

Attachment #9246736 - Attachment description: WIP: Bug 1736692 - wip, does not work → WIP: Bug 1736692. Use IOSurfaces for Netflix
Attachment #9246736 - Attachment description: WIP: Bug 1736692. Use IOSurfaces for Netflix → Bug 1736692 - Make GMP and ChromiumCDM decoders pass a non-null KnowsCompositor instance to VideoData::CreateAndCopyData, so that we can do optimized video frame upload. r=jrmuizel

Triaging, please adjust values as you see fit.

Severity: -- → S3
Priority: -- → P2
Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/00d8ff18f852
Make GMP and ChromiumCDM decoders pass a non-null KnowsCompositor instance to VideoData::CreateAndCopyData, so that we can do optimized video frame upload. r=jrmuizel
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch

NI? myself for QA verification.

Flags: needinfo?(timea.babos)

Verified-fixed on the latest Nightly 95.0a1 (2021-10-21) (64-bit) on MacOS 11 M1.
After the video is in fullscreen and all the overlays disappear (age rating, skip recapp, etc) the video will be detached.

Edit: Also works only if subtitles are disabled.

Flags: needinfo?(timea.babos)
Duplicate of this bug: 1731650
You need to log in before you can comment on or make changes to this bug.