-
Notifications
You must be signed in to change notification settings - Fork 281
MPV 64bit : added cflag -DARCH_X86_64=1 to use correct "nvEncodeAPI64.dll #832
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
Conversation
….dll" When compiling MPV 64bit, you'll notice a warning that "if ARCH_X86_64" evaluates to zero (wundef). If you look at the code from \build\nv-codec-headers-git\include\ffnvcodec\dynlink_loader.h you will see that this prevents using the 64 bit version from "nvEncodeAPI64.dll" and instead the 32 bit version"nvEncodeAPI.dll"will be used to compile a 64 bit program! Obviously this can never work. Adding the cflag -DARCH_X86_64=1 solves this problem. #if defined(_WIN32) || defined(__CYGWIN__) # define CUDA_LIBNAME "nvcuda.dll" # define NVCUVID_LIBNAME "nvcuvid.dll" # if ARCH_X86_64 # define NVENC_LIBNAME "nvEncodeAPI64.dll" # else # define NVENC_LIBNAME "nvEncodeAPI.dll" # endif #else # define CUDA_LIBNAME "libcuda.so.1" # define NVCUVID_LIBNAME "libnvcuvid.so.1" # define NVENC_LIBNAME "libnvidia-encode.so.1" #endif
|
Also, mpv doesn't use nvenc directly, so I don't think they'll care about it either. |
|
We might as well remove the ffnvcodec-headers from the suite as we both know by now it can never work. |
|
What do you mean? It works fine for me. ffmpeg uses both nvdec and nvenc and mpv uses just nvdec. |
|
The related file "nvEncodeAPI64.dll" is only used for encoding ; FFmpeg figures out on his own when we're compiling 64bit and adds this c-flag automatically. If you look at the ffmpeg code, it has a lot of such "if ARCH_X86_64" statements. MPV could use the nvEncodeAPI for encoding if it has the right architecture flag to see if the 32bit nvEncodeAPI or the 64 bit nvEncodeAPI64 should be called. |
|
BTW, I would understand your wontfix if there were major disadvantages to my patch, but AFAIK there are zero/zip/ null/nada disadvantages. |
|
Why the hell would mpv use nvenc? It uses libavcodec/libavformat for every part relative to encoding. mpv isn't mencoder. You've compiled FFmpeg with nvenc support, then mpv uses that, it doesn't recompile every fucking shit again like mencoder, Your patch is pointless since mpv doesn't use nvenc directly, so that define being undefined amounts to fucking nothing being wrong. |
|
There you go, the nvcodec maintainer fixed it. |
|
Fixed what ? You just said that there was nothing wrong ...? |
|
He fixed your non-issue. And hope you enjoyed your last comment. |
When compiling MPV 64bit, you'll notice a warning that "if ARCH_X86_64" evaluates to zero (wundef).
If you look at the code from \build\nv-codec-headers-git\include\ffnvcodec\dynlink_loader.h you will see that this prevents using the 64 bit version from "nvEncodeAPI64.dll" and instead the 32 bit version"nvEncodeAPI.dll"will be used to compile a 64 bit program!
Obviously this can never work.
Adding the cflag -DARCH_X86_64=1 solves this problem.