Community
cancel
Showing results for 
Search instead for 
Did you mean: 
BMart1
New Contributor II
37 Views

How many surfaces should I create?

The simple_encode_d3d_async sample does

EncRequest.NumFrameSuggested = EncRequest.NumFrameSuggested + mfxEncParams.AsyncDepth;

to determine how many surfaces to create. But if you call QueryIOSurf with a larger AsyncDepth, it returns a larger NumFrameSuggested​, suggesting it already accounts for AsyncDepth internally. In my testing, the original value of NumFrameSuggested is insufficient and makes my program run out of surfaces. Adding a single surface seems to fix this.

How many surfaces should I create?
Bruno

0 Kudos
4 Replies
BMart1
New Contributor II
37 Views

BTW, with video memory surfaces QueryIOSurf returns one more and may be enough to avert trouble.

Mark_L_Intel1
Moderator
37 Views

Thanks so much for the suggesting and testing,

Our tutorial code was created a long time ago, so the API behavior might already be changed. We are in a process to update it and I will record this suggestion also validate it when we update.

So I think your suggestion should be correct for now. 

Mark

BMart1
New Contributor II
37 Views

Hi Mark,

I think not only documentation should be improved. It doesn't make sense to me that NumFrameSuggested ​varies between system memory and video memory. It could be a bug in the code.

Regards,
Bruno

Mark_L_Intel1
Moderator
37 Views

Thanks so much,

We are developing new tutorial code and we will double check this during the development. Also please check our sample code for the correct usage since it is updated more frequently than the tutorial code.

Mark 

Reply