Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
multimedia/intel-media-sdk: unbreak runtime after f4faca9
$ ffmpeg ... -c:v hevc_qsv ... [AVHWDeviceContext @ 0x8062d0140] Error initializing an MFX session: -3. Device creation failed: -1313558101. PR: 258976 Reported by: Yuichiro NAITO
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/sys/class/drm/renderD*/device/device is Linux-only, so default to | ||
INTEL_MEDIA_RUNTIME=MSDK on other systems. | ||
|
||
$ ffmpeg -hide_banner -init_hw_device qsv=auto -i foo.y4m -vf hwupload=extra_hw_frames=64,format=qsv -c:v h264_qsv -y foo.mkv | ||
[AVHWDeviceContext @ 0x8062d0140] Error initializing an MFX session: -3. | ||
Device creation failed: -1313558101. | ||
Failed to set value 'qsv=auto' for option 'init_hw_device': Unknown error occurred | ||
Error parsing global options: Unknown error occurred | ||
|
||
--- api/mfx_dispatch/linux/mfxloader.cpp.orig 2021-09-29 15:58:50 UTC | ||
+++ api/mfx_dispatch/linux/mfxloader.cpp | ||
@@ -181,11 +181,16 @@ mfxStatus LoaderCtx::Init(mfxInitParam& par) | ||
return MFX_ERR_UNSUPPORTED; | ||
} | ||
|
||
+#ifdef __linux__ | ||
eMFXHWType platform = MFX_HW_UNKNOWN; | ||
auto devices = get_devices(); | ||
if (devices.size()) { | ||
platform = devices[devices.size() - 1].platform; | ||
} | ||
+#else | ||
+ // Assume a legacy generation not supported by oneVPL-intel-gpu | ||
+ eMFXHWType platform = MFX_HW_SKL; | ||
+#endif | ||
|
||
std::vector<std::string> libs; | ||
|