Hello.
Video Codec SDK doesn’t allow to create more then 5 decoders per process. The 6th call to cuvidCreateDecoder returns CUDA_ERROR_OUT_OF_MEMORY though there is free video memory available (about 700 MB). At the same time it is possible to spawn another process and create five more decoders. So it doesn’t look like insufficient hardware resources. Also this number doesn’t depend on videostream resolution (Though I didn’t try to use 4K video).
This only happens on NVidia GeForce GT 720. I didn’t manage to reproduce the issue on more modern graphics cards.
The easiest way to reproduce is to modify sample Samples/AppDecode/AppDecMultiInput/AppDecMultiInput.cpp from Video_Codec_SDK_11.0.10
line 134:
// Number of decoders
const int n = 4; —> const int n = 8;
line 146:
int axCenter[] = { nWidth / 4, nWidth / 4 * 3, nWidth / 4, nWidth / 4 * 3 }; int ayCenter[] = { nHeight / 4, nHeight / 4, nHeight / 4 * 3, nHeight / 4 * 3 };
—>
int axCenter[] = { nWidth / 4, nWidth / 4 * 3, nWidth / 4, nWidth / 4 * 3 , nWidth / 4, nWidth / 4 * 3, nWidth / 4, nWidth / 4 * 3 }; int ayCenter[] = { nHeight / 4, nHeight / 4, nHeight / 4 * 3, nHeight / 4 * 3, nHeight / 4, nHeight / 4, nHeight / 4 * 3, nHeight / 4 * 3 };
line 195:
//LaunchMerge(0, dpImage, apNv12, n, nWidth, nHeight);
Should be commented (looks like kernel wasn’t supposed to be used with parameter n=8)
Graphics card: NVidia GeForce GT 720, 1 GB video memory
Driver Version: 465.89
CUDA Version: 11.3
Operating System: Windows 10 Pro 64-bit
What is the nature of this limitation? Any hints would be appreciated.
Thanks for the help.