diff --git a/.gitmodules b/.gitmodules index 88198314dd0..0852e2652e1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -26,10 +26,18 @@ path = third-party/nanors url = https://github.com/sleepybishop/nanors.git branch = master -[submodule "third-party/nv-codec-headers"] - path = third-party/nv-codec-headers - url = https://github.com/FFmpeg/nv-codec-headers +[submodule "third-party/nvenc-headers/1100"] + path = third-party/nvenc-headers/1100 + url = https://github.com/FFmpeg/nv-codec-headers.git + branch = sdk/11.0 +[submodule "third-party/nvenc-headers/1200"] + path = third-party/nvenc-headers/1200 + url = https://github.com/FFmpeg/nv-codec-headers.git branch = sdk/12.0 +[submodule "third-party/nvenc-headers/1202"] + path = third-party/nvenc-headers/1202 + url = https://github.com/FFmpeg/nv-codec-headers.git + branch = master [submodule "third-party/nvapi-open-source-sdk"] path = third-party/nvapi-open-source-sdk url = https://github.com/LizardByte/nvapi-open-source-sdk diff --git a/cmake/compile_definitions/common.cmake b/cmake/compile_definitions/common.cmake index a2260595c9a..ad63b6c2671 100644 --- a/cmake/compile_definitions/common.cmake +++ b/cmake/compile_definitions/common.cmake @@ -48,10 +48,6 @@ elseif(UNIX) endif() endif() -include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/nv-codec-headers/include") -file(GLOB NVENC_SOURCES CONFIGURE_DEPENDS "src/nvenc/*.cpp" "src/nvenc/*.h") -list(APPEND PLATFORM_TARGET_FILES ${NVENC_SOURCES}) - configure_file("${CMAKE_SOURCE_DIR}/src/version.h.in" version.h @ONLY) include_directories("${CMAKE_CURRENT_BINARY_DIR}") # required for importing version.h diff --git a/cmake/compile_definitions/windows.cmake b/cmake/compile_definitions/windows.cmake index 7643d1d9efc..1bb2088e2c1 100644 --- a/cmake/compile_definitions/windows.cmake +++ b/cmake/compile_definitions/windows.cmake @@ -30,6 +30,11 @@ file(GLOB NVPREFS_FILES CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/src/platform/windows/nvprefs/*.cpp" "${CMAKE_SOURCE_DIR}/src/platform/windows/nvprefs/*.h") +include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/nvenc-headers") +file(GLOB_RECURSE NVENC_SOURCES CONFIGURE_DEPENDS + "${CMAKE_SOURCE_DIR}/src/nvenc/*.h" + "${CMAKE_SOURCE_DIR}/src/nvenc/*.cpp") + # vigem include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include") @@ -57,7 +62,8 @@ set(PLATFORM_TARGET_FILES "${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include/ViGEm/Common.h" "${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include/ViGEm/Util.h" "${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/include/ViGEm/km/BusShared.h" - ${NVPREFS_FILES}) + ${NVPREFS_FILES} + ${NVENC_SOURCES}) set(OPENSSL_LIBRARIES libssl.a diff --git a/docs/configuration.md b/docs/configuration.md index 98bab79a060..5b2bba679d7 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -1774,6 +1774,46 @@ editing the `conf` file in a text editor. Use the examples as reference. +### [nvenc_split_encode](https://localhost:47990/config/#nvenc_split_encode) + +
Description | ++ Split the encoding of each video frame over multiple NVENC hardware units. + Significantly reduces encoding latency with a marginal compression efficiency penalty. + This option is ignored if your GPU has a singular NVENC unit. + @note{This option only applies when using NVENC [encoder](#encoderhttpslocalhost47990configencoder).} + @note{Applies to Windows only.} + | +|
Default | +@code{} + driver_decides + @endcode | +|
Example | +@code{} + nvenc_split_encode = driver_decides + @endcode | +|
Choices | +disabled | +Disabled | +
driver_decides | +NVIDIA driver makes the decision whether to enable it | +|
enabled | +Enabled | +