Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix potential cuda initialization error #16

Merged
merged 1 commit into from
Jul 2, 2023
Merged

Fix potential cuda initialization error #16

merged 1 commit into from
Jul 2, 2023

Conversation

HolyWu
Copy link
Contributor

@HolyWu HolyWu commented Jul 1, 2023

When using cuda hwaccel, it's likely to hit the following error on high core count systems due to exhausting the maximum frame pool size. Using too much threads for nvdec doesn't give significant performance gain, especially for h264. Hence set the default thread count to 1 for h264, and a maximum of 2 for all the other codecs.

[h264 @ 0000016418585440] decoder->cvdl->cuvidCreateDecoder(&decoder->decoder, params) failed -> CUDA_ERROR_INVALID_VALUE: invalid argument
[h264 @ 0000016418585440] Using more than 32 (46) decode surfaces might cause nvdec to fail.
[h264 @ 0000016418585440] Try lowering the amount of threads. Using 16 right now.
[h264 @ 0000016418585440] Failed setup for format cuda: hwaccel initialisation returned error.

@myrsloik myrsloik merged commit 1b16375 into vapoursynth:master Jul 2, 2023
3 of 4 checks passed
@HolyWu HolyWu deleted the patch/cuda_threads branch July 2, 2023 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants