Quantcast
Channel: Intel® Software - Media
Viewing all articles
Browse latest Browse all 2185

How to setup the value of "AsyncDepth",and how to calculate the number of surfaces used by vpp out & enc in?

$
0
0

What's the meaning of "AsyncDepth" parameter of "mfxVideoParam",is it means how many asynchronous tasks in a session? For example,I create a session has vpp(do color convert & image scale) and enc tasks,I should set "AsyncDepth" as 2(or 4?),if the session has dec,vpp & enc tasks,I should set it as 3,is it right?

From the SDK's doc said,if a session had more than one asynchronous tasks,every task should share the some surface pool to catch better performance,my session has vpp and enc task,so I allocate a surface pool for vpp out & enc in.From <<mediask-man.pdf>>,the number of the common surface pool should be calculated like below:
async_depth=4;
init_param_v.AsyncDepth=async_depth;
MFXVideoVPP_QueryIOSurf(session, &init_param_v, response_v);
init_param_e.AsyncDepth=async_depth;
MFXVideoENCODE_QueryIOSurf(session, &init_param_e, &response_e);
num_surfaces= response_v[1].NumFrameSuggested+response_e.NumFrameSuggested-async_depth; /* double counted in ENCODE & VPP*/

but the demo "sample_encode" calculate it in another way:
nEncSurfNum = EncRequest.NumFrameSuggested + MSDK_MAX(VppRequest[1].NumFrameSuggested, 1) - 1 + (m_nAsyncDepth - 1);

manual said should exclute "async_depth",but demo include "async_depth",which one is right? which formula should I use?


Viewing all articles
Browse latest Browse all 2185

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>