VAAPI hardware decoding does not work for 10-bit VP9 files (aka. VP9 profile 2)
Categories
(Core :: Audio/Video: Playback, defect, P5)
Tracking
()
Tracking | Status | |
---|---|---|
firefox98 | --- | verified |
People
(Reporter: benjamin.j.grant, Assigned: stransky)
References
(Blocks 1 open bug)
Details
Attachments
(4 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0
Steps to reproduce:
- Open a WebM file containing VP9 video with 4:2:0 chroma subsampling and 10 bits per channel (yuv420p10le)
Actual results:
It says "Video can't be played because the file is corrupt."
The following errors are printed to the console:
Media resource file:///home/ben/bbb-10bit.webm could not be decoded, error: Error Code: NS_ERROR_OUT_OF_MEMORY (0x8007000e)
Details: mozilla::MediaResult mozilla::FFmpegVideoDecoder<58>::CreateImageDMABuf(int64_t, int64_t, int64_t, MediaDataDecoder::DecodedData &): Unable to get DMABufSurfaceYUV
If I switch VP9 to use software decoding by setting media.ffvpx.enabled
to true
, the file plays normally.
Expected results:
It should play using hardware decoding. I'm running on a Ryzen 5 3500U with the integrated Vega 8 GPU, which does support 10-bit VP9 decoding:
$ vainfo
vainfo: VA-API version: 1.11 (libva 2.11.1)
vainfo: Driver version: Mesa Gallium driver 21.0.2 for AMD Radeon(TM) Vega 8 Graphics (RAVEN, DRM 3.40.0, 5.11.14-arch1-1, LLVM 11.1.0)
vainfo: Supported profile and entrypoints
[...]
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
I can also play the same file with mpv and it uses VAAPI decoding.
Reporter | ||
Comment 1•4 years ago
|
||
Comment 2•4 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Assignee | ||
Comment 3•4 years ago
|
||
Please run Firefox with MOZ_LOG="PlatformDecoderModule:5" env variable and attach full output here. We support NV12 with VAAPI only right now and I expect it's mapped to something else.
Reporter | ||
Comment 4•4 years ago
|
||
Here you go. I can also attach the file I tried playing if you'd like. It plays perfectly with hardware decoding in mpv.
Assignee | ||
Comment 5•3 years ago
|
||
We failed to create EGLImage for it:
[Parent 11859: Renderer]: D/Dmabuf DMABufSurfaceYUV::CreateTexture() UID 1 plane 0
[Parent 11859: Renderer]: D/Dmabuf EGLImageKHR creation failed
[Parent 11859: Renderer]: D/Dmabuf DMABufSurfaceYUV::CreateTexture() UID 1 plane 1
[Parent 11859: Renderer]: D/Dmabuf EGLImageKHR creation failed
It's generally Bug 1724385 although we may support that.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 6•3 years ago
|
||
Comment 8•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Comment 9•3 years ago
•
|
||
I managed to reproduce this by setting media.ffvpx.enabled to false in the about:config tab on Firefox 87(20210318103112) on Linux x86_64(Ubuntu 20.04). This issue is fixed on the latest Firefox beta 98.0b4(20220213185901) and Nightly 99.0a1(20220214092817) builds on the same OS; hardware decoding works as expected.
Description
•