bootlin / libva-v4l2-request

LibVA implementation for the Linux Video4Linux2 Request API
Other
78 stars 60 forks source link

"tiled_to_planar: symbol not found" runtime error on aarch64 #24

Open Mis012 opened 5 years ago

Mis012 commented 5 years ago

issue

It seems I get a problem similar to #18. Although compilation runs fine, the same error is now thrown on runtime. Since the original issue was closed, I assume this is something new?
If aarch64 is not supported, it seems like a shame given this looks like the only immediate solution for vlc hw acceleration on most aarch64 platforms.

steps to reproduce:

on aarch64 device:

  1. compile and install
  2. run vlc and maki it use libva-v4l2-request

error log:

libva info: VA-API version 1.4.1
libva info: va_getDriverName() returns -1
libva info: User requested driver 'v4l2_request'
libva info: Trying to open /usr/lib/dri/v4l2_request_drv_video.so
libva error: dlopen of /usr/lib/dri/v4l2_request_drv_video.so failed: Error relocating /usr/lib/dri/v4l2_request_drv_video.so: tiled_to_planar: symbol not found
libva info: va_openDriver() returns -1
dossalab commented 4 years ago

I was struggling with this issue too and it seems like the problem is in upstream libva, which does not have this tiled_to_planar function. I guess you should use libva from here: https://github.com/bootlin/cedrus. Personally I use another approach and took patched ffmpeg with support for cedrus(mentioned in another issue): https://github.com/Kwiboo/ffmpeg. I tested it with ffplay and a couple of videos and it works nicely.

redchenjs commented 4 years ago

The problem also exists on my H6 board.

redchenjs commented 4 years ago

Remove these lines in src/image.c and the runtime error disappears, but I don't know if the library will still work...

tiled_to_planar(surface_object->destination_data[i],
                buffer_object->data + image->offsets[i],
                image->pitches[i], image->width,
                i == 0 ? image->height :
                         image->height / 2);
AndreVallestero commented 4 years ago

I also get the same error: [vaapi] libva: dlopen of /usr/lib/dri/v4l2_request_drv_video.so failed: /usr/lib/dri/v4l2_request_drv_video.so: undefined symbol: tiled_to_planar

AndreVallestero commented 4 years ago

@dossalab Would you be able tell us how you set up ffmpeg + your player of choice to work with Kwiboo's ffmpeg? I'm also using Kwiboo's ffmpeg but every video output mode + decoder combination in VLC results in an error and falls back to software decoding.

FuyuriSeiichi commented 4 years ago

So I bumped into this as well. I'm now at kernel 5.4 with a gentoo rootfs. Kodi isn't decoding smoothly. Unfortunately, the document https://linux-sunxi.org/Sunxi-Cedrus is kind of outdated.

Anyone know how to reproduce successful hardware decoding for AllwinnerH6 recenly?

zavorka commented 4 years ago

Aarch64 allows running 32-bit (ARMv7) code

kwizart commented 4 years ago

You can have an aarch64 kernel with an armv7hl userspace in some cases where the aarch32 execution state is implemented in the CPU at EL0, but it's not necessarily the case for all aarch64 CPU. At least you cannot have aarch64/armv7 interop in the userspace level (like i686 with x86_64).

I'm trying to test this project using amlogic soc (la frite) on aarch64 (kernel/userspace), but still hit this. I wonder by the tiled_to_planar could be avoided on aarch64 and not on armv7hl. It seems to me that either a pure c implementation have to be done or a related aarch64 ASM.

Until then anyone with a PR to either fix or workaround the issue ?

kwizart commented 4 years ago

See also my attempt https://github.com/bootlin/libva-v4l2-request/pull/32