Welcome back to the oneAPI channel.
In previous video we have introduced the oneVPL The oneAPI Video processing library
oneVPL will allow you to accelerate your video pipeline processing, on various opening systems
and devices
The high-level functionality is that oneVPL can be used by your application
To accelerate video processing on multiple devices,
could be CPU, GPU, or any other device that implemented the oneVPL open spec..
A dispatcher is basically choosing the right implementation for the device at hand during
run time.
That means that even though all these architectures are so different, you can run the same code
on all of them And offload video processing from the CPU
to another XPU for example..
oneVPL is an evolution of Media-SDK You can read all about it in the transition
guide..
Here is the QR code..
Most API calls are exactly the same, but some were deprecated, mainly the ones that were
hardly used Please read all about it in the user guide
And some new API calls were added..
For improved memory management, which is so important when handling streaming video and
trying to build a heterogeneous workload That can transfer large memory chunks between
devices, like CPU and GPU
you can find here low latency synchronization and efficient zero-copy memory sharing operations
and more
The new memory interface allows access to surfaces (unlike opaque memory),
allowing low latency or zero copy apps to be built.
And a new category of system capabilities detection calls
These API calls enable the application to discover in real time the available capabilities
of the system.
So, your application can tell during run time, which media or video accelerator are at your
disposal and can use it dynamically accordingly There are several options on how to choose
the right implementation or to allow oneVPL to choose automatically
There are few ways to get the oneVPL.
First one is to simply download and install the oneAPI Base toolkit.
It’s available for installation in multiple ways, check the Base toolkit video..
You can find the oneVPL code samples and more on github of course
And install using apt, yum and other packages
And maybe the easiest way, in case you just would like to look at samples
or try out new hardware before purchasing it is using the intel dev cloud..
It really takes minutes to get started, no need to install or download anything, let
me show you
I google intel devcloud.
Choose the oneAPI cloud Fill out few details and I’m getting an
email with a connection link Which opens a juyter notebook with multiple
options to get started
I’ll open a terminal "Lscpu",
I got a Xeon machine Let’s check the oneVPL version
I type “vpl-inspect” And I’m getting all the information I need
Versions, supported codecs, resolutions, formats and so on
Let’s see how many implementations we have And we have only one version..
For CPU, as there is no GPU in this system
And now I’ll log in into a DG1 discrete GPU node..
And here, we have 2 implementations on the system, the Media-SDK that will run on the
GPU and the oneVPL for CPU.
For that specific system..
Of course oneVPL will work on all future Intel GPUs
And let’s run the sample..
Under oneAPI, VPL, Latest I’ll run the decode sample, on a video with
format h265
My input video is under “examples”, “content” It’s a very small, very short cars video
And it’s running You can see the input and output formats,
It was decoded by Media-sdk on the GPU..
So “Hardware” implementation
Let’s take a look at the decode sample code I’m looking at the oneVPL git hub, examples,
hello_decode, source, It’s a C example
If you need the full documentation, please check oneAPI.com
You can find here the spec For oneVPL
And the full programming guide and documentations
The basic flow of oneVPL is not very different that of the Media-SDK
You need to set all the parameters and initialize
Then the main loop that decode frame after frame
And when done, drain all the buffers and exit.
Initialization has few steps, First is to use the loader to load all the
available run-times for the various devices in my system.
As we said, there could be multiple implementation for a system
Now I have to choose the desired implementation, do I want to use the CPU or the GPU or other?
In this example we are looking, filtering, the implementations and looking for one that
supports HEVC for example
And now we create a oneVPL session
A session can include decode, encode, VPP –video processing, or even all of them..
In this example we initialize decode only And we are all set for the main loop
A lot is happening here, but in general you can see that as long as the stream is not
ended, we keep on bringing frames, surfaces, lock
and release them asynchronously and decode them one by one..
This is the oneVPL, state of the art video processing On multiple devices, open source, open spec
Please find more information in these links, register to a deep dive webinar or just connect
to the dev cloud and start working.
I hope you find it useful and use it to create amazing products..
Thank you