I’m tring to make a Codec for full HD video encoding using GPU.
I made a codec that has 50% lossless compression and 1,000 fps(frame per sec).
But, here is the problem.
The encoded result is in the GPU memory, and I need to move it to HDD.
In the case of full HD video, the size of a compressed frame is about 3MB.
And my codec can do 1,000 fps, so I think that there will be about 3GB I/O per second.
What do you recommend to me for transfering the encoded data from GPU to HDD?
Please let me know your opinion or suggestion.
There’s no way to transfer directly from GPU memory to hard disk without going through CPU memory (maybe we should put a SATA controller on the card!). The only advice I can think of is:
use asynchronous transfers so that you can overlap the transfer of the previous frame with the computation of the next.
use large transfers (batch frames together) to make best use of the bandwidth
Using mmaped host memory works pretty well if you want to just dump raw data from device memory to disk. For big data sets or more data structure complexity, I have been using pycuda with pytables to write through from device memory into hdf5 files.