Closed Bug 1723207 Opened 3 years ago Closed 2 years ago

Avoid copying hardware decoded video data if possible on Windows

Categories

(Core :: Audio/Video: Playback, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
100 Branch
Tracking Status
firefox100 --- fixed

People

(Reporter: jrmuizel, Assigned: sotaro)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file, 1 obsolete file)

This is the copy here:
https://searchfox.org/mozilla-central/rev/9c91451cc2392d942a42493fc895f5aeeddde45d/dom/media/platforms/wmf/DXVA2Manager.cpp#911

We currently reuse the device on AMD hardware and could potentially elsewhere if this turns out to work well.

Depends on: 1722987
Blocks: video-perf

On my Skylake machine, this copy takes about 2ms of GPU time for a 4k frame.

Blocks: 1746496
Depends on: 1745976
Assignee: nobody → sotaro.ikeda.g
Blocks: 1663585
Blocks: 1751144

Video overlay could be 3 types. And decode swap chains do not support shared resources. It causes a problem to video rendering to WebGL texture.

WebGL uses different D3D11Device, then we need to get SharedHandle from ID3D11Texture2D.

Then for now, I am going to disable DecodeSwapChain overlay for using SharedHandle of ID3D11Texture2D.

Depends on: 1757698
Attachment #9258936 - Attachment is obsolete: true
Summary: Avoid copying video data into shared texture when decoder device and compositor device match → Avoid copying hardware decoded video data when decoder device and compositor device match

Current implementation uses shared handle for ID3D11Texture2D. Then, Bug 1722987 is not necessary for now.

No longer depends on: 1722987
Attachment #9266270 - Attachment description: WIP: Bug 1723207 - Avoid copying hardware decoded video data if possible on Windows → Bug 1723207 - Avoid copying hardware decoded video data if possible on Windows
Pushed by sikeda.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3ad7a42b1ad1
Avoid copying hardware decoded video data if possible on Windows r=media-playback-reviewers,gfx-reviewers,jrmuizel,alwu
Summary: Avoid copying hardware decoded video data when decoder device and compositor device match → Avoid copying hardware decoded video data
Summary: Avoid copying hardware decoded video data → Avoid copying hardware decoded video data if possible on Windows
Regressions: 1758606
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
Regressions: 1759323
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: