[Linux/Wayland] Implement HDR video playback for SW video decoding / rendering
Categories
(Core :: Audio/Video: Playback, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox138 | --- | fixed |
People
(Reporter: stransky, Assigned: stransky)
References
(Blocks 1 open bug)
Details
Attachments
(7 files)
|
37.71 KB,
patch
|
Details | Diff | Splinter Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
Right now the HDR rendering uses VA-API only. We need to implement it for SW decode / SW rendering too.
| Assignee | ||
Comment 1•1 year ago
|
||
HDR video is decoded to AV_PIX_FMT_YUV420P10LE by SW decoder and we need to convert it to AV_PIX_FMT_P010LE / dmabuf which can be directly composited by Wayland compositor.
| Assignee | ||
Comment 2•1 year ago
|
||
| Assignee | ||
Comment 3•1 year ago
|
||
YUV420P10 is produced by FFmpeg when we decode HDR video formats by SW decoder.
| Assignee | ||
Comment 4•1 year ago
|
||
| Assignee | ||
Comment 5•1 year ago
|
||
| Assignee | ||
Comment 6•1 year ago
|
||
| Assignee | ||
Comment 7•1 year ago
|
||
- Use new third_party/gbm/gbm.h instead of outdated widget/gtk/gbm.h.
- Remove mBufferModifiers array for RGBA formats as it uses ony one modifier for all planes.
- Remove unused DMABufSurfaceYUV::CreateYUVSurface() for pixel data as we use layers::PlanarYCbCrData now.
- Implement DMABufSurfaceYUV::UpdateYUVData() for layers::PlanarYCbCrData and use conversion from YUV420P10 to P010 (HDR).
- Create YUV dmabuf planes with liner modifier by default
| Assignee | ||
Comment 8•1 year ago
|
||
We wan't to pass HDR produced frames to dmabuf surfaces (YUV420P10 format), convert them on GPU to P010 and pass directly to
Wayland compositor as wl_buffer to enable HDR playback on Linux/Wayland.
| Assignee | ||
Comment 9•1 year ago
|
||
Comment 10•1 year ago
|
||
Comment 11•1 year ago
|
||
| Assignee | ||
Comment 12•1 year ago
|
||
https://treeherder.mozilla.org/jobs?repo=autoland&selectedTaskRun=IYNoMsuBSZe8IUVkiGw_bA.0
/builds/worker/checkouts/gecko/gfx/gl/GLBlitHelper.cpp:174:19: error: unused variable 'kFragSample_TwoPlaneUVP010' [-Werror,-Wunused-const-variable]
/builds/worker/checkouts/gecko/gfx/gl/GLBlitHelper.cpp:266:19: error: unused variable 'kFragConvertYUVP010' [-Werror,-Wunused-const-variable]
Comment 13•1 year ago
•
|
||
Backed out for causing bp-nu bustages @GLBlitHelper.cpp.
Comment 15•1 year ago
|
||
Comment 16•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/018867282c94
https://hg.mozilla.org/mozilla-central/rev/8450e297275d
https://hg.mozilla.org/mozilla-central/rev/9a62416c10da
https://hg.mozilla.org/mozilla-central/rev/9bcfd19641e1
https://hg.mozilla.org/mozilla-central/rev/d231f7e99554
https://hg.mozilla.org/mozilla-central/rev/3ca00c33b586
Comment 17•1 year ago
|
||
Just as a heads up: I started implementing YUV420P10 and similar formats in Mesa now in order to make conversions to P010 unnecessary: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34303
Closely related to that I'm working on a implementation in Gstreamer that allows to directly share buffer between SW-decoders and GPUs by allocating buffer with udmabuf (which since recently is available by default in many distros) which we'll probably want to adopt in FF: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8540
Together that allows to improve playback performance for SW-decoded video quite substantially by avoiding unnecessary copies. Upstreaming the formats and the Mesa support will still take some time though.
Description
•