Closed Bug 1677124 Opened 5 years ago Closed 5 years ago

vaapi not working

Categories

(Core :: Audio/Video: Playback, defect, P3)

Firefox 82
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: janpieter.sollie, Unassigned)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0

Steps to reproduce:

play Youtube VP9 video on a Raven ridge APU using Firefox in 4K and 2K mode (using enhanced-h264ify).
Flags to enable VAAPI:
gfx.webrender.all=true
gfx.webrender.compositor=true
gfx.webrender.compositor.force-enabled=true
gfx.webrender.enabled=true
media.ffmpeg.enabled=true
media.ffmpeg.vaapi-drm-display.enabled=true
media.ffmpeg.vaapi.enabled=true
media.ffvpx.enabled=false
media.av1.enabled=false
and run with MOZ_X11_EGL=1 firefox
(the other way around to disable vaapi)

Actual results:

The CPU load for both configurations was exactly the same:
50% for 2k VP9, 200 for 4K VP9

Expected results:

VAAPI should have taken over, decreasing CPU load. The VAAPI state was confirmed to be working using the following command:
ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -i my_test_h264.mp4 -c:v rawvideo -c:a copy -f matroska - | ffplay -i -
and vainfo shows:
libva info: VA-API version 1.7.0
libva info: Trying to open /usr/lib64/va/drivers/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.7 (libva 2.7.1)
vainfo: Driver version: Mesa Gallium driver 20.2.2 for AMD RAVEN (DRM 3.39.0, 5.9.8, LLVM 10.0.1)
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

Martin, would you mind having a look?

Severity: -- → S3
Flags: needinfo?(stransky)
Priority: -- → P3

small update about this bug:
This Firefox version was installed on gentoo linux.
When enabling wayland support for this package, it offloads vaapi with the options specified above.
installation file is located here: https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/firefox/firefox-82.0.3.ebuild
Whereas the conflict is solved, requiring wayland support for an X11 setup is definitely ugly.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME

(In reply to jpsollie from comment #3)

Whereas the conflict is solved, requiring wayland support for an X11 setup is definitely ugly.

We need to split dmabuf setup from wayland config. I filed bug 1677855 for it and we welcome any help here, as usual.

Flags: needinfo?(stransky)
You need to log in before you can comment on or make changes to this bug.