[PR] Load nvEncodeAPI.dll for Windows ARM64 builds (PR #5)

Diego de Souza via ffmpeg-devel <[email protected]>
Newsgroups gmane.comp.video.ffmpeg.devel
Message-ID <178282131744.59.4192358717388849222@29965ddac10e>
PR #5 opened by Diego de Souza (ddesouza)
URL: https://code.ffmpeg.org/FFmpeg/nv-codec-headers/pulls/5
Patch URL: https://code.ffmpeg.org/FFmpeg/nv-codec-headers/pulls/5.patch

Windows on ARM installs nvEncodeAPI.dll as the compatibility entry
point, dispatching native ARM64 callers to nvEncodeAPIa64.dll. Keep
using nvEncodeAPI64.dll for other 64-bit Windows builds.

Signed-off-by: Diego de Souza <[email protected]>


>From b92081f5b295db6bbf04dc037d155226268abd2c Mon Sep 17 00:00:00 2001
From: Diego de Souza <[email protected]>
Date: Fri, 26 Jun 2026 22:59:03 +0200
Subject: [PATCH] Load nvEncodeAPI.dll for Windows ARM64 builds

Windows on ARM installs nvEncodeAPI.dll as the compatibility entry
point, dispatching native ARM64 callers to nvEncodeAPIa64.dll. Keep
using nvEncodeAPI64.dll for other 64-bit Windows builds.

Signed-off-by: Diego de Souza <[email protected]>
---
 include/ffnvcodec/dynlink_loader.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/ffnvcodec/dynlink_loader.h b/include/ffnvcodec/dynlink_loader.h
index 6d6a0ec..1be0dbf 100644
--- a/include/ffnvcodec/dynlink_loader.h
+++ b/include/ffnvcodec/dynlink_loader.h
@@ -50,7 +50,11 @@
 # define CUDA_LIBNAME "nvcuda.dll"
 # define NVCUVID_LIBNAME "nvcuvid.dll"
 # if defined(_WIN64) || defined(__CYGWIN64__)
-#  define NVENC_LIBNAME "nvEncodeAPI64.dll"
+#  if defined(_M_ARM64) || defined(__aarch64__)
+#   define NVENC_LIBNAME "nvEncodeAPI.dll"
+#  else
+#   define NVENC_LIBNAME "nvEncodeAPI64.dll"
+#  endif
 # else
 #  define NVENC_LIBNAME "nvEncodeAPI.dll"
 # endif
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.