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.

Intel Quick Sync related

Ankush_W_
New Contributor I
442 Views

I have a few questions to ask some of which might be pointless but let me know even if they mean nothing

a) Can I use a single MFXVideoSession object for creating a MFXVideoDECODE and MFXVideoVPP objects?
b) And if I had to deocde multiple streams simultaneously then do I need to create multiple MFXVideoSession objects, like one for each stream? If yes then possibly how many can i create considering the streams to be HD(1920x1080) 30fps on a i7 4gen?
c) And do I need to allocate the surfaces seperately for each stream, because if i am trying to decode 5-6 streams along with colour conversion using vpp and I am allocating surfaces for each one seperately then the memory usage shoots up. Is there a way to fix it?

Thank you.

-Ankush

0 Kudos
1 Solution
Jeffrey_M_Intel1
Employee
442 Views

Hi Ankush,

a) a session can contain one each of decode, VPP, and encode.  You can choose the combination.  Decode only, encode only, VPP only, Decode+VPP, VPP+encode, decode+encode, etc.  Multiple sessions can also work together.

b) to decode multiple streams you would need multiple decoders in multiple sessions.  Assuming no corner cases like large decode -> resize -> small encode, decode tends to be the least expensive part of the pipeline.  Since Media SDK is asynchronous the decode time can be "hidden" in other pipelines.  We don't have a lot of data for multiple decodes since the decode itself is usually not the bottleneck.  You can see for yourself how many FPS your system can decode with sample_decode specifying no output file.  (You will want to use the HW implementation and video memory though.)   Timing multiple processes of the decode sample should give you a reasonable estimate of how many an application with your specific hardware can handle in real time.

c) For each session you will need to query the surfaces needed.  If memory is a concern, async depth is probably the easiest way to minimize memory use.  Asynchronous implementation and higher async depth is important for single stream performance.  For multiple streams you can still get good performance with minimized memory footprint using async depth=1.

Regards, Jeff

 

View solution in original post

0 Kudos
2 Replies
Jeffrey_M_Intel1
Employee
443 Views

Hi Ankush,

a) a session can contain one each of decode, VPP, and encode.  You can choose the combination.  Decode only, encode only, VPP only, Decode+VPP, VPP+encode, decode+encode, etc.  Multiple sessions can also work together.

b) to decode multiple streams you would need multiple decoders in multiple sessions.  Assuming no corner cases like large decode -> resize -> small encode, decode tends to be the least expensive part of the pipeline.  Since Media SDK is asynchronous the decode time can be "hidden" in other pipelines.  We don't have a lot of data for multiple decodes since the decode itself is usually not the bottleneck.  You can see for yourself how many FPS your system can decode with sample_decode specifying no output file.  (You will want to use the HW implementation and video memory though.)   Timing multiple processes of the decode sample should give you a reasonable estimate of how many an application with your specific hardware can handle in real time.

c) For each session you will need to query the surfaces needed.  If memory is a concern, async depth is probably the easiest way to minimize memory use.  Asynchronous implementation and higher async depth is important for single stream performance.  For multiple streams you can still get good performance with minimized memory footprint using async depth=1.

Regards, Jeff

 

0 Kudos
Ankush_W_
New Contributor I
442 Views

Hi Jeffrey

Thank you so much for the quick reply and the your answer was very helpful for getting things clearer.

Thank you much once again Jeffrey.

0 Kudos
Reply