bootlin / libva-v4l2-request

LibVA implementation for the Linux Video4Linux2 Request API
Other
76 stars 59 forks source link

Problems compiling libva-v4l2-request #13

Closed villalvilla closed 5 years ago

villalvilla commented 5 years ago

Dear developers of the libva-v4l2-request,

I tried to compile your driver from a new fresh installed debian, configured with kernel 4.20.12 and also with headers installed and libva and libdrm in the version that you suggested, but I'm receiving this final message when ./autogen.sh finishes:

v4l2_request configuration summary:

VA-API version ................... : 1.4.0 VA-API drivers path .............. : /usr/lib/arm-linux-gnueabihf/dri H.264 support .................... : no H.265 support .................... : no MPEG2 support .................... : no

So digging a little bit in configure, I concluded that libva driver checks in file linux/videodev2.h if V4L2_PIX_FMT_MPEG2_SLICE, V4L2_PIX_FMT_H264_SLICE and V4L2_PIX_FMT_HEVC_SLICE are defined. My first conclusion was thinking that maybe linux headers weren't propertly, but after taking a look at: /usr/src/linux-headers-4.20.12/include/uapi/linux/videodev2.h I realized that correct headers were there...

What am I missing then? should I reference anywhere in your configure.ac file where linux headers reside?

I have also double checked that this file: /usr/include/linux/videodev2.h is diferent than the one in the linux headers installation path.

Thanks for your help, Miguel Amez

villalvilla commented 5 years ago

I answer myself, because after posting to this github and linux-sunxi list, and waiting 1 week or so, I can't see any kind of help for new developers that want to contribute giving you feedback to this iniciative:

As I could see, you have some mistakes in your configure.ac that make it imposible to find linux kernel headers installed in the system. As a matter of fact, you should consider adding the declaration AC_CONFIG_MACRO_DIRS([m4]) to you configure.ac and asking for installed linux headers in the system in your aclocal.m4 file. That way, the needed macros V4L2_PIX_FMT_MPEG2_SLICE, V4L2_PIX_FMT_H264_SLICE and V4L2_PIX_FMT_HEVC_SLICE will be available. It seems like you continue using de deprecated way of adding new paths with ACLOCAL_AMFLAGS, so newer distros won't be able to detect those new macros defined in the installed linux headers.

I could help patching the required configuration files of the driver. I use debian, so I could only warrantee issues related to this distro.

Thanks for your help, Miguel

mripard commented 5 years ago

Not all the patches are upstream yet, so if you're using the debian kernel as is, it's totally expected that the libva doesn't work.

You'll either need to apply our patches yourself, or use one of the branches we have, as documented there: https://linux-sunxi.org/Sunxi-cedrus#Linux

Beware that this is very much a work in progress right now.