- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Our application creates 33 by QueryIOSurf now, I tried to modify through Request.NumFrameMin, but failed (decoder does not output frames at all). How can lower down this number?How does MFXVideoDECODE to calculate the number of surfaces required for decoder? What do these surfaces do?
Thanks in advance
Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi juixiang,
QueryIOSurf will tell you the minimum number of surfaces the decoder or encoder needs. You cannot use less surfaces than reported by Request.NumFrameMin. However, by configuring the decoder component by explicitly setting the AsyncDepth parameter you can reduce the number of surfaces needed. AsyncDepth = 1 will result in least amount of surfaces, but note that this setting will likely also affect performance due to limited internal caching and multi-tasking.
The actual number of surfaces needed depends on the stream that is being decoded. Besides the memory needed for each surface the decoder/encoder also requires some additional memory for scratch buffers.
Regards,
QueryIOSurf will tell you the minimum number of surfaces the decoder or encoder needs. You cannot use less surfaces than reported by Request.NumFrameMin. However, by configuring the decoder component by explicitly setting the AsyncDepth parameter you can reduce the number of surfaces needed. AsyncDepth = 1 will result in least amount of surfaces, but note that this setting will likely also affect performance due to limited internal caching and multi-tasking.
The actual number of surfaces needed depends on the stream that is being decoded. Besides the memory needed for each surface the decoder/encoder also requires some additional memory for scratch buffers.
Regards,
Petter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Petter,
I used AsyncDepth =1, Request.NumFrameMin becomes 17, memory usage is lower and FPS gains 2~4 and video visual effect looks like same as before. Thank you very much.
Once I change to AsyncDepth = 2, Request.NumFrameMin becomes 30.I am still new to Media. Could you give more explain about AsyncDepth?
Thanks.
Jiuxiang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jiuxiang,
In general, a greater AsyncDepth means that the codec component will schedule more tasks to the HW before requiring explicit synchronization. With more asynchronous tasks in flight the HW can work more efficiently (greater throughput) vs. an approach where only one task is processed at a time.Note that if you set AsyncDepth to 0, Media SDK will select an appropriate value to achieve good performance. Also note that if low latency is more important than optimal performance then it is suggested to set AsyncDepth to 1 as explained in the SDK manual appendix covering video conferencing use case.
Regards,
Petter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Petter,
Thanks. I got it. This is why the pair of AsyncDepth with the number of surface is (0, 33,) (1, 17) and (2, 30).
If seting low latency (this is with low AsyncDepth), does this lower down video quality (such as drop frames, with larger masic)?
Thanks.
Jiuxiang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Modifying AsyncDepth does not impact quality or drop frames. The only impact is on overall frame processing performance.
If you are interested in low latency usages please refer to the Media SDK 2012 sample_decode and sample_videoconf samples.
If you are interested in low latency usages please refer to the Media SDK 2012 sample_decode and sample_videoconf samples.
Regards,
Petter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Petter,
Thanks. I already refered to Media SDK 2012 sample_decode.
Jiuxiang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Petter,
My experience with MSDK shows that if there more than one session running at the same time (joined or not) it's better to set AsyncDepth to value which depends on framerate and resolution, then QueryIOSurf returns appropriate number of surfaces, so all sessions runs smoothly and it doesn't have to drop frames (I speak about live encoding, where timing is very important). I've tested for total (for all sessions) framerate of 825 fps with loss of frames less than 0.02%.
Regards,
Vassili
My experience with MSDK shows that if there more than one session running at the same time (joined or not) it's better to set AsyncDepth to value which depends on framerate and resolution, then QueryIOSurf returns appropriate number of surfaces, so all sessions runs smoothly and it doesn't have to drop frames (I speak about live encoding, where timing is very important). I've tested for total (for all sessions) framerate of 825 fps with loss of frames less than 0.02%.
Regards,
Vassili
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page