I integrate MediaSDK into video surveillance system.
The Idea is to avail HD Graphics for video channels decoding. I decided to start with MediaSDKs sample_decode.
Our system design requires the decoded frame to reside in system memory.
So, initially, I used SYSTEM_MEMORY for decoded surfaces.
While benchmarking I feed H.264 frames with constant framerate.
What I see? The MediaSDK with hardware implementation has higher CPU load than FFMPEG H.264 decoder.
Both decoders have single copying output frame from decoder buffer to target buffer.
Then, I found, that the maximum performance can be acheved with D3D memory.
So, I switched memory to D3D9_MEMORY and got CPU load ... increased about twice :(
All allocators are original drom sample_decode sample.
Why CPU load has grown? What can be wrong?
Another observation is very strange for me:
Initially I feed compressed frames to decoder until first decoded frame received at output.
Then, I stop to feed frames. I just drop data instead feeding it without closing decoding session.
CPU load remains high. Even higher than while decoding. So, decoding is less expensive than idle.
How is it possible?