Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.
3058 Discussions

oneVPL example "Hello-Encode" seems to not work when hardware Implementation is chosen.

IVAC
Beginner
2,631 Views

Dear Community, 

in my project, I finally want to use the hardware acceleration capabilities of Intel processors for grayscale JPEG encoding and decoding. My development environment is

Processor: Intel Core i5-8600 CPU @ 3.10GHz, 6 Cores, 6 Logical Processors

Graphics: Intel UHD Graphics 630 + NVIDIA Quadro P400

MS Windows 10, 64 Bit.

Visual Studio 2017

 

Question 1: What can I expect from the oneVPL library when it comes to "hardware accelerated JPEG encoding/decoding"? Will it a) keep the full load on the CPU and just exploit the CPU capabilities or will it b) relieve the CPU from encoding/decoding work and outsource the work to the UHD graphics?

 

To get started with oneVPL, I a) updated all the drivers, b) installed oneVPL 2022.1 (64Bit) c) enabled GPU processing on my system (in Windows settings and in BIOS) and built the example Hello-encode from github. 

However, the example works only as long as I use the software implementation, i.e. as long as I call it with [-sw -i ".\cars_128x96.i420" -w 128 -h 96]

As soon as I try to call with the hardware implementation [-hw -i ".\cars_128x96.nv12" -w 128 -h 96] or [-hw -i ".\cars_128x96.i420" -w 128 -h 96], the MfxCreateSession command fails ("Cannot create session -- no implementations meet selection criteria").

Question 2: Does anybody have an idea what I am doing wrong?

 

Any help is appreciated. I hope that this question helps also other users who struggle with similar problems.

 

Marc.

 

 

 

 

 

 

 

0 Kudos
9 Replies
AlekhyaV_Intel
Moderator
2,603 Views

Hi,


Thank you for posting in Intel Communities. Please find our responses for your questions below:


Question 1:

In OneVPL Library, "hardware accelerated JPEG encoding/decoding" means the video processing(encoding/decoding) is done on Video memory i.e. on GPU and not on CPU. Or if it is mentioned as "software implementation", the processing is done on System memory i.e. CPU resources are used.


Question 2:

Currently the oneVPL code samples that you've mentioned, including hello_encode sample, are targeted to CPU acceleration. We've provided the link to readme file of the hello_encode sample below:

https://github.com/oneapi-src/oneAPI-samples/blob/master/Libraries/oneVPL/hello-encode/README.md You can find CPU as target device under the "Key Implementations Details" tab


Hope this helps!


Regards,

Alekhya


0 Kudos
IVAC
Beginner
2,571 Views

Hello AlekhyaV_Intel,

 

thank you for your kind answers. However, I have some doubts that the code samples are for CPU acceleration only, because

1.) The "Purpose" section of the README.md file contains a hint on the raw frame input format for GPU, i.e. "Native raw frame input format: CPU=I420, GPU=NV12".

2.) There is an "-hw" option in these samples.

3.) Lines 180 to 185 of hello-encode.cpp distinguish between software and hardware implementation, i.e.

if (MFX_IMPL_SOFTWARE == cliParams.impl) {
encodeParams.mfx.FrameInfo.FourCC = MFX_FOURCC_I420;
}
else {
encodeParams.mfx.FrameInfo.FourCC = MFX_FOURCC_NV12;
}

 

If I misinterpret these things, could you please tell me where I can find a code sample that supports hardware accelerated JPEG compression?

 

Thank you very much

Marc.

 

 

 

0 Kudos
AlekhyaV_Intel
Moderator
2,572 Views

Hi,


Has the solution provided helped? Could you please give an update regarding this issue?


Regards,

Alekhya


0 Kudos
IVAC
Beginner
2,563 Views

Hello Alekhya,

I'm afraid that the provided solution helped only partially, because it left doubts and open questions. Please have a look at the response to the provided solution that I posted today at 09:43 AM.

 

Thank you

Marc.

 

0 Kudos
AlekhyaV_Intel
Moderator
2,486 Views

Hi Marc,

 

Thank you for sharing your observations with us. Let me explain it to you.

Currently, there are oneVPL code samples in Linux(only) which are targeted to GPU acceleration. As you are using Windows, we didn't mention this. We apologize for the confusion caused.

 

1) The Readme files for both Ubuntu & Windows are same. If you could observe your readme file, there are few instructions for implementing code samples on Linux systems too. Hence, the purpose section of the Readme.md file contains both CPU & GPU input formats. But the oneVPL GPU implementation is compatible only for linux. In the below provided screenshot, there is a GitHub link which is optimized only for Ubuntu. You could refer that highlighted link for more clarification. Here is that link: https://github.com/oneapi-src/oneVPL-intel-gpu

 

2) In oneVPL library, the code and the readme files are same. However, these samples implementation changes with respect to the OS that its running on. Though there's a "-hw" option in these samples, oneVPL GPU implementation wouldn't work on Windows for now.

 

3) We checked both the hello-encode.cpp file in Ubuntu & Windows. Both the files are same. However, as mentioned above, the implementation changes with respect to the OS that its running on.

 

And we are sorry to inform you that, currently, we don't have any oneVPL code samples that supports hardware accelerated JPEG compression.

 

Hope our response would clarify your doubts. 

 

Regards,

Alekhya

 

0 Kudos
IVAC
Beginner
2,472 Views

Hello Alekhya, 

what I got now is that

a) the provided oneVPL code samples can make use of Intel processor graphics on Linux systems only and

b) that, in order to make use of Intel processor graphics on Windows, these oneVPL code samples need to be modified.

Can you please confirm my understanding? Do you have any hints on what needs to be modified in the code samples to use Intel processor graphics on Windows systems? Or is it in general not possible with oneVPL to use Intel processor graphics on Windows systems?

Thank you very much 

Marc.

 

0 Kudos
AlekhyaV_Intel
Moderator
2,383 Views

Hey Marc,


Please find my responses for your queries below:


a) Yes. Currently, we have GPU implementation for oneVPL code samples in Linux systems.

b) Yes the samples needs some modification.


But we have no update from the admin team regarding the modifications for GPU implementations on Windows systems. Currently, oneVPL samples cannot make use of GPU on windows systems but you need not worry about it. OneVPL samples are designed to be run fast on CPU implementation as well.

Hope this helps!


Regards,

Alekhya



0 Kudos
AlekhyaV_Intel
Moderator
2,326 Views

Hi Marc,


Has the solution provided helped? Could you please give us an update regarding this issue?


Regards,

Alekhya


0 Kudos
AlekhyaV_Intel
Moderator
2,281 Views

Hi Marc,


We assume that your issue is resolved. If you need any further assistance, please post a new question as this thread will no longer be monitored by Intel.


Regards,

Alekhya


0 Kudos
Reply