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

hardware and software (OS, libva, driver) requirements #21

Open
bmegli opened this issue Mar 18, 2020 · 4 comments
Open

hardware and software (OS, libva, driver) requirements #21

bmegli opened this issue Mar 18, 2020 · 4 comments
Labels
maintenance Documentation and future-proof concepts

Comments

@bmegli
Copy link
Owner

bmegli commented Mar 18, 2020

The situation is quite complex.

Support depends on:

  • hardware (generation like KabyLake, AmberLake Y, CoffeLake)
  • used driver (version and type, there are at least two: i965_drv_video.so, and iHD_drv_video.so)
  • libva
  • ffmpeg

KabyLake (7th gen)

The library is tested with KabyLake on 18.04, everything works here.

AmberLake Y (8th gen)

Here the situation is funny.
VAAPI:

  • doesn't seem to work in 18.04 in OS
  • works in 19.04
  • works in 20.04 but without profiles for HEVC and HEVC Main10 encoding with both iHD and i965 drivers, with iHD HEVC and HEVC Main10 encoding is not supported may also depend on driver build (full featured vs free kernel)

Also from what I remember in 18.04 and 19.04 it uses i965 and in 20.04 iHD dirver by default.

18.04

By default VAAPI doesn't work in the OS.
Through 965_drv_video.so.

Needs more investigation.

vainfo --display drm --device /dev/dri/renderD128 

libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit

19.04

I used it on m3-8100Y with GPD Win2, worked out of the box with:
Ubuntu MATE 19.04 for GPD Pocket 2 & GPD WIN 2

H264 and HEVC Main10 worked however I had doubts whether bitrate control worked correctly. Didn't seem so.

20.04 (daily build 18.03.20)

VAAPI works through iHD_drv_video.so however there are no entry points for encoding HEVC and HEVC Main10 (only decoding).


Edit:

  • 20.04 has both drivers.
  • everything seems to work when selecting i965 driver manually
  • see posts below for the details
  • it is possible that HEVC would work with Full Feature iHD build (I haven't tried with AmberfLake-Y yet)

vainfo --display drm --device /dev/dri/renderD128

libva info: VA-API version 1.6.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_6
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.6 (libva 2.6.0)
vainfo: Driver version: Intel iHD driver - 19.4.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSliceLP
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSliceLP
      VAProfileJPEGBaseline           :	VAEntrypointVLD
      VAProfileJPEGBaseline           :	VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileHEVCMain10             :	VAEntrypointVLD
      VAProfileVP9Profile0            :	VAEntrypointVLD
      VAProfileVP9Profile2            :	VAEntrypointVLD

Edit:

  • CoffeLake -> AmberLake Y (correct for m3-8100Y)
  • it seems I am using 19.04, not 19.10
  • i965 is used by default in 19.04 (not iHD), just with different version than in 18.04
  • added information about both drivers working in 20.04
@bmegli
Copy link
Owner Author

bmegli commented Mar 18, 2020

On 19.04 and m3-8100Y

uname -a
Linux GPDWIN2 5.0.0-38-generic #41-Ubuntu SMP Tue Dec 3 00:27:35 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
vainfo --display drm --device /dev/dri/renderD128 
libva info: VA-API version 1.4.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_4
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.4 (libva 2.4.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Kaby Lake - 2.3.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Simple            :	VAEntrypointEncSlice
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSliceLP
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSlice
      VAProfileH264Main               :	VAEntrypointEncSliceLP
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSlice
      VAProfileH264High               :	VAEntrypointEncSliceLP
      VAProfileH264MultiviewHigh      :	VAEntrypointVLD
      VAProfileH264MultiviewHigh      :	VAEntrypointEncSlice
      VAProfileH264StereoHigh         :	VAEntrypointVLD
      VAProfileH264StereoHigh         :	VAEntrypointEncSlice
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileNone                   :	VAEntrypointVideoProc
      VAProfileJPEGBaseline           :	VAEntrypointVLD
      VAProfileJPEGBaseline           :	VAEntrypointEncPicture
      VAProfileVP8Version0_3          :	VAEntrypointVLD
      VAProfileVP8Version0_3          :	VAEntrypointEncSlice
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointEncSlice
      VAProfileHEVCMain10             :	VAEntrypointVLD
      VAProfileHEVCMain10             :	VAEntrypointEncSlice
      VAProfileVP9Profile0            :	VAEntrypointVLD
      VAProfileVP9Profile0            :	VAEntrypointEncSlice
      VAProfileVP9Profile2            :	VAEntrypointVLD

@bmegli
Copy link
Owner Author

bmegli commented Mar 19, 2020

20.04 and m3-8100Y

Actually 20.04 has both drivers iHD and i965.

It is possible to force i965, and everything seems to work with m3-8100Y through i965
(needs more testing to be certain)

LIBVA_DRIVER_NAME=i965 vainfo --display drm --device /dev/dri/renderD128

libva info: VA-API version 1.6.0
libva info: User environment variable requested driver 'i965'
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_6
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.6 (libva 2.6.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Kaby Lake - 2.4.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Simple            :	VAEntrypointEncSlice
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSliceLP
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSlice
      VAProfileH264Main               :	VAEntrypointEncSliceLP
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSlice
      VAProfileH264High               :	VAEntrypointEncSliceLP
      VAProfileH264MultiviewHigh      :	VAEntrypointVLD
      VAProfileH264MultiviewHigh      :	VAEntrypointEncSlice
      VAProfileH264StereoHigh         :	VAEntrypointVLD
      VAProfileH264StereoHigh         :	VAEntrypointEncSlice
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileNone                   :	VAEntrypointVideoProc
      VAProfileJPEGBaseline           :	VAEntrypointVLD
      VAProfileJPEGBaseline           :	VAEntrypointEncPicture
      VAProfileVP8Version0_3          :	VAEntrypointVLD
      VAProfileVP8Version0_3          :	VAEntrypointEncSlice
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointEncSlice
      VAProfileHEVCMain10             :	VAEntrypointVLD
      VAProfileHEVCMain10             :	VAEntrypointEncSlice
      VAProfileVP9Profile0            :	VAEntrypointVLD
      VAProfileVP9Profile0            :	VAEntrypointEncSlice
      VAProfileVP9Profile2            :	VAEntrypointVLD

Also HEVC Main10 encoding through HVE works this way (by setting environment variable)

LIBVA_DRIVER_NAME=i965 ./hve-encode-raw-hevc10 10 /dev/dri/renderD128

@bmegli
Copy link
Owner Author

bmegli commented Mar 22, 2020

In general, for Intel there are two drivers:

Driver Generation Repository
i965 driver gen5 to gen9.5 https://github.com/intel/intel-vaapi-driver
iHD driver gen8+ https://github.com/intel/media-driver

For i965 support for version/generation may be found in intel-vaapi-driver NEWS

For iHD see this table noting that:

  • there are two driver builds
    • Full Feature Build (closed source)
    • Free Kernel Build (fully open source with limited functionality)
  • with Free Kernel Build encoding support generally comes later (generation wise)

Some devices (between gen8 and gen9.5) are supported by both drivers which means at least 3 possibilities (i965 and two builds of iHD), not counting other factors like GuC/HuC and low power encoding.

@bmegli
Copy link
Owner Author

bmegli commented Sep 22, 2020

20.04 and Icelake

Tested with i5-1035G7.
Seems to work only with iHD driver.

HEVC Main10 encoding required Full Feature Build to work.

sudo apt install intel-media-va-driver-non-free

Maybe it would also work by loading GuC/HuC.

HEVC Main10 decoding:

  • works from 20.04 -> 20.04, 20.04 -> 18.04
  • doesn't work 18.04 -> 20.04 (see HVS#10)

Update:

  • updated HEVC Main10 decoding info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Documentation and future-proof concepts
Projects
None yet
Development

No branches or pull requests

1 participant