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

[Feature]: DeepLink HyperEncode for Linux #279

Open
bezirg opened this issue Apr 11, 2023 · 13 comments
Open

[Feature]: DeepLink HyperEncode for Linux #279

bezirg opened this issue Apr 11, 2023 · 13 comments
Assignees
Labels
Feature Request Request a feature or enhancement

Comments

@bezirg
Copy link

bezirg commented Apr 11, 2023

What Feature?

Reading from the following source, it seems that there is only support for Windows for Deep Link Hyper Encode:

FFmpeg/FFmpeg@5002829
https://github.com/oneapi-src/oneVPL-intel-gpu/blob/main/doc/HyperEncode_FeatureDeveloperGuide.md

Since oneVPL is supported for Linux, will also support for HyperEncode in Linux come later?
Or is there some outside dependency that makes this currently infeasible (e.g. Vulkan or VA-API ?)

What's the usage scenario would be benifited?

Transcode for media delivery, Content Creation

What impacted?

No response

Do you want to contribute a patch to develop this feature?

None

@bezirg bezirg added the Feature Request Request a feature or enhancement label Apr 11, 2023
@DenWolf
Copy link
Contributor

DenWolf commented Jul 18, 2023

@daleksan - please help to clarify the plan of enabling HyperEncode on Linux if any

@daleksan
Copy link
Contributor

Hello @bezirg,

Sorry for delay with response. At this moment there are no plans to enable this feature on Linux. Focus on current implementation improvements.

@mswdev
Copy link

mswdev commented Aug 14, 2024

+Support for this to come to Linux. Seems like a no-brainer for this to be supported on Linux for improving transcoding with the iGPU and Intel Arc GPUs working in tandem with Deep Link.

@sauravbandyopadhyay
Copy link
Contributor

Hello @bezirg,
Can you share with us more details and "use cases" for your requirement on "DeepLink HyperEncode for Linux"? May we request you to respond to the other questions left blank i.e. "What impacted?" and "Do you want to contribute a patch to develop this feature?"? Thanks.

@mswdev
Copy link

mswdev commented Aug 20, 2024

Hello @bezirg, Can you share with us more details and "use cases" for your requirement on "DeepLink HyperEncode for Linux"? May we request you to respond to the other questions left blank i.e. "What impacted?" and "Do you want to contribute a patch to develop this feature?"? Thanks.

I'm not @bezirg , but support for Deep Link on Linux would be particularly useful for realistically all the same reasons it is useful for Windows.

Particularly, I would find it useful for transcoding media content on Linux for my personal media library. I have a home server running Unraid which is unix-like Slackware. The next Unraid release 7.0.0 coming this fall supports Intel Arc and with that being added it would be particularly useful to use deep link to pair an Intel iGPU with an Intel Arc GPU.

Aside from my reasons, gaming on Linux is growing quite rapidly with the help from Valve and their project Proton which brings compatibility to Linux for games that are exclusive to Windows. I could also see Linux Deep Link support being useful for creators who produce content or even streamers.

While support for Intel Arc on the Linux Kernel is relatively new I see Intel Arc being a rapidly growing category for Linux especially with the advent of Deep Link being considered.

@PilaScat
Copy link

Is useful for people like me that use Frigate with multiple 4K streams, Plex and tdarr simultaneously, all of them use ffmpeg hw accelerated

@kallaballa
Copy link

Hi!

Would someone be so kind to elaborate a bit on the challenges on porting this? Would make things a lot easier since I might actually do it. I'm in good practice when it comes to porting to linux and i already know the intel gpu ecosystem. e.g.: intel/compute-runtime#166

@nyanmisaka
Copy link

nyanmisaka commented Nov 30, 2024

Hi!

Would someone be so kind to elaborate a bit on the challenges on porting this? Would make things a lot easier since I might actually do it. I'm in good practice when it comes to porting to linux and i already know the intel gpu ecosystem. e.g.: intel/compute-runtime#166

@kallaballa The problem is that the only VPL runtime that supports HyperEncode is part of Intel's GPU driver on Windows, which is obviously closed source. So there is no publicly available runtime code to reference, just VPL header files. So to achieve this, you have to implement them from scratch in vpl-gpu-rt based on the HyperEncode documentation and how it behaves in Windows. This can be challenging but not impossible to do, but you must be well versed in how the QSV encoder and FFmpeg work.

IMO it is necessary to add a mechanism to vpl-gpu-rt so that it can automatically create a sub-device for HyperEncode internally and distribute the YUV/RGB frames submitted by the user (on host or device memory) as encoding tasks to the main device and sub-devices. The caveats are to use closed/strict GOP and ensure that the order of the encoded h26x data packets (DTS & PTS) is not disrupted, and to find the most effective way for encoders to access each other between host and device memory, otherwise PCIe bandwidth may become a bottleneck for high resolution videos. You will also need to prepare two Gen12 devices for testing, one from the iGPU (UHD7xx or Xe) and the other should be an Arc GPU/DG2 or DG1 dGPU.

image
See also, the architecture diagram between i915/xe kernel driver, vpl-gpu-rt, media-driver and applications such as FFmpeg. There is also an abandoned FFmpeg patch that implements it using a hacker method.

@kallaballa
Copy link

wow. that is a very good start. i guess i'll start reading and see what i can do. it sounds interesting :)

thx!

@kallaballa
Copy link

I guess you mean Gen12+? Because I have a Gen12, a Gen13 and a A770.

@nyanmisaka
Copy link

GenX means graphics, it’s not Xth generation processors. There’s no Gen13.

@kallaballa
Copy link

kallaballa commented Dec 1, 2024 via email

@kallaballa
Copy link

For now the project is a bit to big for me, since I am well versed with FFMpeg but not at all with QSV. But i definitely would like to return and give it a try in time. also if others want to contribute i'd be happy to chime in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Request a feature or enhancement
Projects
None yet
Development

No branches or pull requests

9 participants