Implement dmabuf VA-API surface copy
Categories
(Core :: Widget: Gtk, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox111 | --- | fixed |
People
(Reporter: stransky, Assigned: stransky)
References
(Blocks 1 open bug)
Details
Attachments
(5 files, 3 obsolete files)
Implement dmabuf VA-API surface copy so we don't need to block dmabuf ffmpeg frames recycle.
Assignee | ||
Comment 1•2 months ago
|
||
Assignee | ||
Comment 2•2 months ago
|
||
Depends on D166328
Assignee | ||
Comment 3•2 months ago
|
||
- Move DMABufSurfaceYUV::CreateYUVPlane to DMABufSurfaceYUV::CreateLinearYUVPlane. That's used for debugging purposes only and may be removed later.
- Implement ImportPRIMESurfaceDescriptor() which files DMABufSurfaceYUV with data from PRIMESurfaceDescriptor except dmabuf file descriptors.
- Implement DMABufSurfaceYUV::CreateYUVPlane(int aPlane) which creates YUV surface plane according to data imported from PRIMESurfaceDescriptor.
- Implement DMABufSurfaceYUV::UpdateYUVDataImpl(). That moves all dmabuf surface data from PRIMESurfaceDescriptor to DMABufSurfaceYUV,
i.e. DMABufSurfaceYUV and PRIMESurfaceDescriptor points to the same GPU memory. - Implement DMABufSurfaceYUV::CopyYUVDataImpl(). That copies dmabuf surface from PRIMESurfaceDescriptor to DMABufSurfaceYUV,
i.e. DMABufSurfaceYUV and PRIMESurfaceDescriptor points to different GPU memory parts with the same content. - DMABufSurfaceYUV::UpdateYUVData() now takes extra "copy" param to request dmabuf copy.
Depends on D166329
Assignee | ||
Comment 4•2 months ago
|
||
Depends on D166330
Assignee | ||
Comment 5•2 months ago
|
||
If we're asked to copy dmabuf surface, don't lock VA-API data. That enables ffmpeg to recycle VA-API surface faster and prevent rendering artifacts on some hardware.
Depends on D166331
Assignee | ||
Comment 6•2 months ago
|
||
D166328 does only basic config. Bug 1809167 is a follow up to extend it for multiple GPU scenario.
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/4692e64be33b [Linux] Implement GetAndConfigureDMABufDevice() to configure dmabuf backend without gfxPlatform on RDD process r=emilio https://hg.mozilla.org/integration/autoland/rev/84503cda04f3 [Linux] Fixed ClaimSnapshotGLContext() logs r=emilio https://hg.mozilla.org/integration/autoland/rev/2d88d3f5c01f [Linux] Implement dmabuf YUV surface copy r=emilio https://hg.mozilla.org/integration/autoland/rev/bb0ff84365ad [Linux] Add media.ffmpeg.vaapi.surface-copy.enabled to enable VA-API surface copy r=emilio https://hg.mozilla.org/integration/autoland/rev/0034c0451d9b [Linux] Utilize dmabuf surface copy in VideoFramePool r=alwu
Comment 8•2 months ago
•
|
||
Backed out 5 changesets (Bug 1809162) for causing bustages on FFmpegVideoFramePool.cpp.
Backout link
Push with failures <--> Bp-hybrid
Failure Log
Updated•2 months ago
|
Assignee | ||
Comment 9•2 months ago
|
||
Set FEATURE_HW_DECODED_VIDEO_ZERO_COPY on Linux and enable it for Intel hardware.
Depends on D166332
Assignee | ||
Updated•2 months ago
|
Updated•2 months ago
|
Assignee | ||
Comment 10•2 months ago
|
||
I was wrong and surface copy does not fix the rendering artifacts (Bug 1802844), at least from my latest testing.
But we need surface copy for Bug 1809026 - upload dmabuf surfaces as textures to WebGL. WebGL rendering pipeline is too long and causes decoder frame exhaustion without surface copy.
Assignee | ||
Updated•2 months ago
|
Assignee | ||
Updated•2 months ago
|
Updated•2 months ago
|
Assignee | ||
Comment 11•2 months ago
|
||
If we're asked to copy dmabuf surface, don't lock VA-API data. That enables ffmpeg to recycle VA-API surface faster and prevent rendering artifacts on some hardware.
Depends on D166330
Comment 12•2 months ago
|
||
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/82b73378753b [Linux] Implement GetAndConfigureDMABufDevice() to configure dmabuf backend without gfxPlatform on RDD process r=emilio https://hg.mozilla.org/integration/autoland/rev/1a21a0a52583 [Linux] Fixed ClaimSnapshotGLContext() logs r=emilio https://hg.mozilla.org/integration/autoland/rev/1cb0dda1e2c0 [Linux] Implement dmabuf YUV surface copy r=emilio https://hg.mozilla.org/integration/autoland/rev/a6db25087429 [Linux] Utilize dmabuf surface copy in VideoFramePool
Assignee | ||
Comment 13•2 months ago
|
||
Comment 14•2 months ago
|
||
Pushed by csabou@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0df1e0ac058f [Linux] Type DMABufSurfaceYUV* to RefPtr to avoid build bustage. a=bustage-fix CLOSED TREE
Comment 15•2 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/82b73378753b
https://hg.mozilla.org/mozilla-central/rev/1a21a0a52583
https://hg.mozilla.org/mozilla-central/rev/1cb0dda1e2c0
https://hg.mozilla.org/mozilla-central/rev/a6db25087429
https://hg.mozilla.org/mozilla-central/rev/0df1e0ac058f
Updated•2 months ago
|
Description
•