Skip to content
This repository has been archived by the owner on Jan 31, 2025. It is now read-only.

This driver is incompatible with oneVPL #556

Open
kkartaltepe opened this issue Feb 12, 2023 · 2 comments
Open

This driver is incompatible with oneVPL #556

kkartaltepe opened this issue Feb 12, 2023 · 2 comments

Comments

@kkartaltepe
Copy link

kkartaltepe commented Feb 12, 2023

I happen to be on an i3-7100U and can use both the legacy intel-vaapi-driver/i945 and the mediasdk/iHD driver. It seems that when trying to use oneVPL/mfx/QSV EncodeFrameAsync/SyncOperation will fail on this driver but encoding succeeds when run on mediasdk/iHD.

Example pipeline was the oneVPL sample at https://github.com/oneapi-src/oneVPL in tools/legacy/sample_encode

This sample can be run with LIBVA_DRIVER_NAME=i965 ./sample_encode h264 -i bbb.yuv -o bbb.h264 -f 25 -w 1280 -h 720 -vaapi -api_ver_init::1x to show the broken behavior.

You can run the same command without overriding the driver to successfully encode data (or force via LIBVA_DRIVER_NAME=iHD).

Though this legacy driver seems mostly unmaintained, due to the nature of intel's driver naming many users on transitional hardware may still be on it. It would be nice if the driver could be made to support oneVPL/mfx/QSV.

Example output:

libva info: VA-API version 1.16.0
libva info: User environment variable requested driver 'i965'
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_15
libva info: va_openDriver() returns 0
Encoding Sample Version 8.4.27.0

Input file format	YUV420
Output video		AVC 
Source picture:
	Resolution	1280x720
	Crop X,Y,W,H	0,0,1280,720
Destination picture:
	Resolution	1280x720
	Crop X,Y,W,H	0,0,1280,720
Frame rate	25.00
Bit rate(Kbps)	3161
Gop size	0
Ref dist	4
Ref number	0
Idr Interval	0
Target usage	balanced
Memory type	vaapi
Media SDK impl		hw
Media SDK version	1.35

Processing started

[ERROR], sts=MFX_ERR_DEVICE_FAILED(-17), Run, m_pmfxENC->EncodeFrameAsync failed at /home/kk/projects/oneVPL/tools/legacy/sample_encode/src/pipeline_encode.cpp:2435

ERROR: Hardware device was lost or returned an unexpected error. Recovering...

[ERROR], sts=MFX_ERR_DEVICE_FAILED(-17), Run, m_pmfxENC->EncodeFrameAsync failed at /home/kk/projects/oneVPL/tools/legacy/sample_encode/src/pipeline_encode.cpp:2435

ERROR: Hardware device was lost or returned an unexpected error. Recovering...

[ERROR], sts=MFX_ERR_DEVICE_FAILED(-17), SynchronizeFirstTask, SyncOperation fail or timeout at /home/kk/projects/oneVPL/tools/legacy/sample_encode/src/pipeline_encode.cpp:178

[ERROR], sts=MFX_ERR_DEVICE_FAILED(-17), GetFreeTask, m_TaskPool.SynchronizeFirstTask failed at /home/kk/projects/oneVPL/tools/legacy/sample_encode/src/pipeline_encode.cpp:2187

[ERROR], sts=MFX_ERR_DEVICE_FAILED(-17), Run, m_pmfxENC->EncodeFrameAsync failed at /home/kk/projects/oneVPL/tools/legacy/sample_encode/src/pipeline_encode.cpp:2435

ERROR: Hardware device was lost or returned an unexpected error. Recovering...
@kwizart
Copy link
Contributor

kwizart commented Mar 13, 2023

Can you confirm that one can still use VAAPI when relevant ?

@kkartaltepe
Copy link
Author

Can you confirm that one can still use VAAPI when relevant ?

If you mean other implementations on top of vaapi, for example ffmpeg's vaapi backend? Then yes it works as expected.

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

No branches or pull requests

2 participants