Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable Allwinner HW acceleration support #103

Open
Cyborgscode opened this issue Feb 25, 2021 · 1 comment
Open

enable Allwinner HW acceleration support #103

Cyborgscode opened this issue Feb 25, 2021 · 1 comment

Comments

@Cyborgscode
Copy link

We need: libva-v4l2-request on the image, it's already compiled and packaged in fedora, so no big deal.

Changes in Desktopfiles are needed, as we can't overwrite them, we need wrapper-packages like "firefox-wayland" for wayland versions of firefox options.

TEST:

"LIBVA_DRIVER_NAME=v4l2_request LIBVA_V4L2_REQUEST_VIDEO_PATH=/dev/video0 LIBVA_V4L2_REQUEST_MEDIA_PATH=/dev/media0 vainfo "
gives:

libva info: VA-API version 1.10.0
libva info: User environment variable requested driver 'v4l2_request'
libva info: Trying to open /usr/lib64/dri/v4l2_request_drv_video.so
libva info: Found init function __vaDriverInit_1_8
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.10 (libva 2.10.0)
vainfo: Driver version: v4l2-request
vainfo: Supported profile and entrypoints

MPV:

TESTED && WORKS

change in desktopfile is enough

Exec=env LIBVA_DRIVER_NAME=v4l2_request LIBVA_V4L2_REQUEST_VIDEO_PATH=/dev/video0 LIBVA_V4L2_REQUEST_MEDIA_PATH=/dev/media0 mpv --osd-duration=3000 --fs --hwdec=vaapi-copy --vo=gpu,drm --player-operation-mode=pseudo-gui -- %U

Firefox: untested yet.

change in desktopfile:

Exec=env LIBVA_DRIVER_NAME=v4l2_request LIBVA_V4L2_REQUEST_VIDEO_PATH=/dev/video0 LIBVA_V4L2_REQUEST_MEDIA_PATH=/dev/media0 MOZ_ENABLE_WAYLAND=1 firefox %u
Exec=env LIBVA_DRIVER_NAME=v4l2_request LIBVA_V4L2_REQUEST_VIDEO_PATH=/dev/video0 LIBVA_V4L2_REQUEST_MEDIA_PATH=/dev/media0 MOZ_ENABLE_WAYLAND=1 firefox --new-window %u
Exec=env LIBVA_DRIVER_NAME=v4l2_request LIBVA_V4L2_REQUEST_VIDEO_PATH=/dev/video0 LIBVA_V4L2_REQUEST_MEDIA_PATH=/dev/media0 MOZ_ENABLE_WAYLAND=1 firefox --private-window %u
Exec=env LIBVA_DRIVER_NAME=v4l2_request LIBVA_V4L2_REQUEST_VIDEO_PATH=/dev/video0 LIBVA_V4L2_REQUEST_MEDIA_PATH=/dev/media0 MOZ_ENABLE_WAYLAND=1 firefox --ProfileManager

Also we need to change the default prefs.js

widget.wayland-dmabuf-vaapi.enabled in about:config.

PROBLEM: no such option in firefox or firefox-wayland

M. Stransky was informed, answere incoming

and the following packages:

ffmpeg libva libva-utils

ATM... FF NOT WORKING

CHROMIUM:
FF NOT WORKING
change in desktopfile:

Exec=env LIBVA_DRIVER_NAME=v4l2_request LIBVA_V4L2_REQUEST_VIDEO_PATH=/dev/video0 LIBVA_V4L2_REQUEST_MEDIA_PATH=/dev/media0 /usr/bin/chromium-browser %U

it showed a better performance on WEBRTC than before, but had problem rendering incoming streams.

ATM... UNCERTAIN if it really works

@Cyborgscode
Copy link
Author

Update:

firefox still searches for gpus on the pci bus, not on a phone-soc.
As long as mozilla devs do not change this, firefox won't be able to use hw acceleration for decoding. ( not to speak of hw acceleration for encoding)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant