Current on windows, I read webcam data through directshow into system memory, then copy then data to video memory, and then use intel media sdk for encoding.
The data pipeline is: webcam -> sys mem -> gpu mem
Because system memory data copy cost many cpu time, how to copy data from webcam to gpu? (Maybe it called zero copy)
The pipeline may like: webcam -> gpu mem
- Development Tools
- Intel® Media SDK
- Intel® Media Server Studio
- Media Processing
Sorry for the late response, if somehow you can make the webcam writes its output frame to video memory directly, then you could avoid copying.
One thing I want to clarify since your pipe line description seems imply to copy system memory to video memory: you can put system memory as the direct input to Media SDK, the copying will be handled automatically inside the MSDK component, you don't have to copy it.
Thanks for replay.
I want to know how to make the webcam writes its output frame to video memory directly?
Well, using system memory as input of Meida SDK still will cost cpu time when doing the memory through system memory.
Any ideas to avoid using system memory?
I hope there should be a good hardware design can combine the camera memory and video memory, as I remembered, Linux might have a solution with V4l2 but I am not sure if that surface can be supported by MSDK
Answer to this solution is out of the scope of Media SDK, I was just clarify how Media SDK could handle the input surface.