Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
64966c7
Issue sw/ntv2/top#537: added notice to README that next SDK release w…
mrbillaja Jun 27, 2024
d6d42bc
linux disable dma statistics
davids635 Jun 27, 2024
9556a50
Add mbedtls as external repo, turn back on plugin load.
Jul 5, 2024
fbdb099
Fixed compile-time deprecation warnings
mrbillaja Jul 11, 2024
0af737f
SDK: Fixed plugin validation to seek 'OU' in x509 cert 'Subject'
mrbillaja Jul 16, 2024
fb82fd5
Fixed build
mrbillaja Jul 16, 2024
23cac8a
Fix ntv2qtmultiinput CMake build
handledexception Jul 17, 2024
4f7951d
Added issuer cert fingerprint (serial) verification
mrbillaja Jul 18, 2024
7a53c59
Fixed cert serial validation (make lower case)
mrbillaja Jul 18, 2024
a960f37
Docs cleanup
mrbillaja Jul 8, 2024
d8e58e2
Issue sw/ntv2/top#865: Merged from main: fixed AJAAncillaryList::Stri…
mrbillaja Aug 8, 2024
cd73266
Issue sw/ntv2/top#863: fixed StripNativeInserterGUMPPackets
mrbillaja Aug 13, 2024
c9a6ef2
Roll to 17.1.1
Aug 16, 2024
5a437d3
Update README to explain AJANTV2_DISABLE_PLUGIN_LOAD and some specifi…
Aug 20, 2024
1f5aea3
fix for 6.10 kernel
davids635 Aug 22, 2024
748230a
linux_driver: move kernel check for 6.10.0 fix into buildenv.h
seanblit Aug 23, 2024
1d00c80
linux_driver: Fix RHEL 9 compile with kernel 5.14.0-513
seanblit Oct 7, 2024
5800a33
bump version to 17.2.0
Oct 22, 2024
d67f0df
Roll version 17.1.2
Oct 23, 2024
3e9298e
fix cudalowlatency buffer alignment
davids635 Jun 10, 2024
e1afc0d
work with latest nvidia igpu changes
davids635 Jul 15, 2024
5011834
fix rdma igpu make error
davids635 Jul 18, 2024
4fe3503
fix jetson agx rdma build
davids635 Jul 23, 2024
074f02d
check gpu before p2p
davids635 Jul 23, 2024
99a73da
try rdma funcs in nvidia.ko first
davids635 Jul 24, 2024
6eb59bc
remove rdma build warnings
davids635 Aug 20, 2024
d0b7a83
return failure code to user mode for reg read/write
davids635 Oct 1, 2024
7505885
detect root processes as valid
davids635 Oct 1, 2024
1162ab1
rdma updates from nvidia
davids635 Oct 9, 2024
b52974a
fix ntv4 frame store size on format change
davids635 Oct 10, 2024
7232ac0
fix uhd ntv4 raster
davids635 Oct 16, 2024
82da869
fix linux valid process detection
davids635 Oct 18, 2024
1d7e845
add default for CMAKE_CUDA_ARCHITECTURES
davids635 Oct 30, 2024
eb27149
fix cuda architecture default for old versions
davids635 Oct 31, 2024
efa1826
add option to build cudalowlatency without rdma
davids635 Oct 31, 2024
c24c638
fix linux driver build warnings
davids635 Nov 5, 2024
e1d1ea4
better cmake cuda architectures
davids635 Nov 5, 2024
48a53f0
Bump ver to 17.1.3
Nov 6, 2024
8d7e7a0
linux_driver: bump SDKVER_PNT to 3 for the 17.1.3 release
seanblit Nov 19, 2024
bf5649f
Issue sw/ntv2/top#1004: fixed ccgrabber burn to also use 6g/12g SDIOut
mrbillaja Nov 26, 2024
eacea1f
linux disable dma statistics
davids635 Jun 27, 2024
d786fab
SDK: Fixed plugin validation to seek 'OU' in x509 cert 'Subject'
mrbillaja Jul 16, 2024
f642d3d
Added issuer cert fingerprint (serial) verification
mrbillaja Jul 18, 2024
e760d41
Roll to 17.1.1
Aug 16, 2024
74777da
better cmake cuda architectures
davids635 Nov 5, 2024
aa4d482
Fix merge conflicts with release branch after rebase on ntv2_17_5
paulh-aja Apr 15, 2025
90d6613
cpp26
mccakit Oct 25, 2025
fb3627d
cpp26
mccakit Oct 25, 2025
7e17860
cpp26
mccakit Oct 25, 2025
2b76c38
fix install
mccakit Oct 26, 2025
96424f7
mingw fix
mccakit Oct 31, 2025
63aa58e
mingw fix 2
mccakit Oct 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
/driver/linux/ajardma.mod
/driver/linux/ajardma.mod.c
.DS_Store
/.cache
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "thirdparty/wutils"]
path = thirdparty/wutils
url = git@github.com:mccakit/wutils.git
16 changes: 10 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.15)

# For CMAKE_MSVC_RUNTIME_LIBRARY compatability. Per note: This must be before the first project()
# For CMAKE_MSVC_RUNTIME_LIBRARY compatability. Per note: This must be before the first project()
if(POLICY CMP0091)
cmake_policy(SET CMP0091 NEW)
endif()
Expand All @@ -25,14 +25,18 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
if (DEFINED AJA_MSVC_RUNTIME_LIBRARY)
set(CMAKE_MSVC_RUNTIME_LIBRARY "${AJA_MSVC_RUNTIME_LIBRARY}" PARENT_SCOPE)
endif()

if(NOT CMAKE_MSVC_RUNTIME_LIBRARY)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded")
endif()
endif()

option(AJANTV2_BUILD_OPENSOURCE "Build libajantv2 as open-source (MIT license)?" ON)
option(AJANTV2_BUILD_SHARED "Build libajantv2 shared libraries?" OFF)
option(AJANTV2_BUILD_SHARED "Build libajantv2 shared libraries?" ON)

option(AJANTV2_DISABLE_DEMOS "Disable building libajantv2 demo apps?" OFF)
option(AJANTV2_DISABLE_DEMOS "Disable building libajantv2 demo apps?" ON)
option(AJANTV2_DISABLE_DRIVER "Disable building libajantv2 driver (Linux-only)?" OFF)
option(AJANTV2_DISABLE_TESTS "Disable building libajantv2 tests?" OFF)
option(AJANTV2_DISABLE_TESTS "Disable building libajantv2 tests?" ON)
option(AJANTV2_DISABLE_TOOLS "Disable building libajantv2 tools?" OFF)
option(AJANTV2_DISABLE_PLUGIN_LOAD "Disable NTV2 3rd party plugin loading?" OFF)
option(AJANTV2_DISABLE_RDMA "Disable building with Nvidia RDMA?" OFF)
Expand Down Expand Up @@ -69,9 +73,9 @@ endif()
if(DEFINED AJA_DISABLE_PLUGIN_LOAD)
set(AJANTV2_DISABLE_PLUGIN_LOAD ${AJA_DISABLE_PLUGIN_LOAD})
endif()

add_subdirectory(thirdparty/wutils)
add_subdirectory(ajantv2)
add_subdirectory(demos)
#add_subdirectory(demos)
add_subdirectory(tools)
add_subdirectory(driver)

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ Please follow the instructions below to build `libajantv2` on the supported plat
$ cmake -S . -B bld-x86 -G Xcode -DCMAKE_OSX_ARCHITECTURES=x86_64
$ cmake -S . -B bld-fat -G Xcode -DCMAKE_OSX_ARCHITECTURES=arm64;x86_64
```

1. Build the `libajantv2` static library from the **Terminal**, via the generated XCode Project:
```
$ cmake --build build
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
17.5.0
17.5.0
2 changes: 1 addition & 1 deletion ajaanc/src/ancillarylist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1762,7 +1762,7 @@ bool AJAAncillaryList::StripNativeInserterGUMPPackets (const NTV2Buffer & inSrc,
::memcpy(tgtPtr, srcPtr, uncopied); // Copy last uncopied bytes
// cout << DEC(numStripped) << " pkts removed, " << DEC(bytesRemoved) << " bytes removed" << endl;
return true;
} // StripNativeInserterPackets
} // StripNativeInserterGUMPPackets


//////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
8 changes: 3 additions & 5 deletions ajabase/common/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include <stdlib.h>
#include <wchar.h>

#include "wutils.hpp"
// check for C++11 compatibility
#if defined(_MSC_VER) && _MSC_VER >= 1800
// Visual Studio 2013 (_MSC_VER 1800) has the C++11 support we
Expand Down Expand Up @@ -249,8 +249,7 @@ bool string_to_wstring (const std::string & str, std::wstring & wstr)
{
// use C++11 functionality if available
#if defined(AJA_BASE_USECPP_11)
std::wstring_convert<std::codecvt_utf8<wchar_t>, wchar_t> converterX;
wstr = converterX.from_bytes(str);
wstr = wutils::ws(str).value;
return true;
#else
#if defined(AJA_WINDOWS)
Expand Down Expand Up @@ -286,8 +285,7 @@ bool wstring_to_string (const std::wstring & wstr, std::string & str)
{
// use C++11 functionality if available
#if defined(AJA_BASE_USECPP_11)
std::wstring_convert<std::codecvt_utf8<wchar_t>, wchar_t> converterX;
str = converterX.to_bytes(wstr);
str = wutils::s(wstr).value;
return true;
#else
#if defined(AJA_WINDOWS)
Expand Down
8 changes: 4 additions & 4 deletions ajantv2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ else()
GIT_TAG fix-win-dll-cmake
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${MBEDTLS_INSTALL_DIR}
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DENABLE_TESTING=OFF
-DENABLE_TESTING=OFF
-DENABLE_PROGRAMS=OFF
-DCMAKE_C_FLAGS=${MBEDTLS_C_FLAGS}
-DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}
Expand Down Expand Up @@ -671,7 +671,7 @@ if (NOT TARGET ${PROJECT_NAME})
aja_ntv2_log_build_info()

add_library(${PROJECT_NAME} SHARED ${TARGET_SOURCES})

if (NOT AJANTV2_DISABLE_PLUGIN_LOAD)
add_dependencies(${PROJECT_NAME} mbedtls)
endif()
Expand All @@ -698,7 +698,7 @@ if (NOT TARGET ${PROJECT_NAME})
${TARGET_COMPILE_DEFS_STATIC}
${AJANTV2_TARGET_COMPILE_DEFS})
endif()

target_link_libraries(${PROJECT_NAME} PRIVATE wutils)
set(_compiler_id_c_or_cxx_msvc $<OR:$<C_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:MSVC>>)
set(_compiler_is_gnu_or_clang $<OR:$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:Clang>>)
set(_compile_options_win_debug /Od /RTC1 /W3)
Expand Down Expand Up @@ -806,7 +806,7 @@ if (AJA_INSTALL_MISC)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/../legacy/build/targets.mk DESTINATION ${CMAKE_INSTALL_PREFIX}/libajantv2/legacy/build)
endif()

install(TARGETS ${PROJECT_NAME}
install(TARGETS ${PROJECT_NAME} wutils
EXPORT ajantv2-targets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
Expand Down
12 changes: 6 additions & 6 deletions ajantv2/includes/ajatypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@file ajatypes.h
@brief Declares the most fundamental data types used by NTV2. Since Windows NT was the first principal
development platform, many typedefs are Windows-centric.
@copyright (C) 2004-2022 AJA Video Systems, Inc.
@copyright (C) 2004-2022 AJA Video Systems, Inc.
**/
#ifndef AJATYPES_H
#define AJATYPES_H
Expand Down Expand Up @@ -83,7 +83,7 @@

Introduced in SDK 12.4.
**************************************************************************************************************/
//#define NTV2_NULL_DEVICE
//#define NTV2_NULL_DEVICE


/**************************************************************************************************************
Expand All @@ -107,7 +107,7 @@

Introduced in SDK 12.4.
**************************************************************************************************************/
#define NTV2_NUB_CLIENT_SUPPORT
#define NTV2_NUB_CLIENT_SUPPORT


/**************************************************************************************************************
Expand Down Expand Up @@ -136,7 +136,7 @@
Introduced in SDK 16.0.
**************************************************************************************************************/
#if !defined(NTV2_USE_CPLUSPLUS11)
#define NTV2_USE_CPLUSPLUS11
#define NTV2_USE_CPLUSPLUS11
#endif // !defined(NTV2_USE_CPLUSPLUS11)


Expand Down Expand Up @@ -278,13 +278,13 @@
#define WIN32_LEAN_AND_MEAN
#endif

#include <Windows.h>
#include <windows.h>

#if defined(DeviceCapabilities)
#undef DeviceCapabilities
#endif
#endif
#include <Basetsd.h>
#include <basetsd.h>
typedef unsigned char Boolean;
typedef __int64 LWord64;
typedef unsigned __int64 ULWord64;
Expand Down
60 changes: 28 additions & 32 deletions ajantv2/src/ntv2config2110.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
@file ntv2config2110.cpp
@brief Implements the CNTV2Config2110 class.
@copyright (C) 2014-2022 AJA Video Systems, Inc.
@copyright (C) 2014-2022 AJA Video Systems, Inc.
**/

#include "ntv2config2110.h"
Expand Down Expand Up @@ -75,25 +75,18 @@ bool tx_2110Config::operator != ( const tx_2110Config &other )
return !(*this == other);
}

bool tx_2110Config::operator == ( const tx_2110Config &other )
bool tx_2110Config::operator==(const tx_2110Config &other)
{
if ((localPort == other.localPort) &&
(remotePort == other.remotePort) &&
(remoteIP == other.remoteIP) &&
(videoFormat == other.videoFormat) &&
(videoSamples == other.videoSamples) &&
(numAudioChannels == other.numAudioChannels) &&
(firstAudioChannel == other.firstAudioChannel) &&
(audioPktInterval == other.audioPktInterval))
{
return true;
}
else
{
return false;
}
return
std::memcmp(localPort, other.localPort, sizeof(localPort)) == 0 &&
std::memcmp(remotePort, other.remotePort, sizeof(remotePort)) == 0 &&
std::memcmp(remoteIP, other.remoteIP, sizeof(remoteIP)) == 0 &&
(videoFormat == other.videoFormat) &&
(videoSamples == other.videoSamples) &&
(numAudioChannels == other.numAudioChannels) &&
(firstAudioChannel== other.firstAudioChannel) &&
(audioPktInterval == other.audioPktInterval);
}

void rx_2110Config::init()
{
rxMatch = 0;
Expand Down Expand Up @@ -529,14 +522,18 @@ void CNTV2Config2110::SetVideoFormatForRxTx(const NTV2Stream stream, const NTV2V

uint32_t reg, reg2;
if (rx)
{
reg = stream - NTV2_CHANNEL1 + kRegRxVideoDecode1;
reg2 = stream - NTV2_CHANNEL1 + kRegRxNtv2VideoDecode1;
}
{
reg = static_cast<RegisterNum>(
static_cast<uint32_t>(stream) - static_cast<uint32_t>(NTV2_CHANNEL1) + static_cast<uint32_t>(kRegRxVideoDecode1)
);
reg2 = static_cast<RegisterNum>(
static_cast<uint32_t>(stream) - static_cast<uint32_t>(NTV2_CHANNEL1) + static_cast<uint32_t>(kRegRxNtv2VideoDecode1)
);
}
else
{
reg = stream - NTV2_CHANNEL1 + kRegTxVideoDecode1;
reg2 = stream - NTV2_CHANNEL1 + kRegTxNtv2VideoDecode1;
reg = static_cast<uint32_t>(stream) - static_cast<uint32_t>(NTV2_CHANNEL1) + static_cast<uint32_t>(kRegTxVideoDecode1);
reg2 = static_cast<uint32_t>(stream) - static_cast<uint32_t>(NTV2_CHANNEL1) + static_cast<uint32_t>(kRegTxNtv2VideoDecode1);
}

// Write the format for the firmware and also tuck it away in NTV2 flavor so we can retrieve it easily
Expand All @@ -552,13 +549,13 @@ void CNTV2Config2110::GetVideoFormatForRxTx(const NTV2Stream stream, NTV2VideoFo
uint32_t reg, reg2, value;
if (rx)
{
reg = stream - NTV2_CHANNEL1 + kRegRxVideoDecode1;
reg2 = stream - NTV2_CHANNEL1 + kRegRxNtv2VideoDecode1;
reg = static_cast<uint32_t>(stream) - static_cast<uint32_t>(NTV2_CHANNEL1) + static_cast<uint32_t>(kRegRxVideoDecode1);
reg2 = static_cast<uint32_t>(stream) - static_cast<uint32_t>(NTV2_CHANNEL1) + static_cast<uint32_t>(kRegRxNtv2VideoDecode1);
}
else
{
reg = stream - NTV2_CHANNEL1 + kRegTxVideoDecode1;
reg2 = stream - NTV2_CHANNEL1 + kRegTxNtv2VideoDecode1;
reg = static_cast<uint32_t>(stream) - static_cast<uint32_t>(NTV2_CHANNEL1) + static_cast<uint32_t>(kRegTxVideoDecode1);
reg2 = static_cast<RegisterNum>(static_cast<uint32_t>(stream) - static_cast<uint32_t>(NTV2_CHANNEL1) + static_cast<uint32_t>(kRegTxNtv2VideoDecode1));
}

// Write the format for the firmware and also tuck it away in NTV2 flavor so we can retrieve it easily
Expand Down Expand Up @@ -1623,7 +1620,7 @@ uint32_t CNTV2Config2110::GetPacketizerAddress(const NTV2Stream stream, const VP
uint32_t index = Get2110TxStreamIndex(stream);
mDevice.WriteRegister(kReg3190_pkt_chan_num + basePacketizer, index);
}

return basePacketizer;
}

Expand Down Expand Up @@ -1916,7 +1913,7 @@ bool CNTV2Config2110::GenSDP(const bool enableSfp1, const bool enableSfp2,
GetPTPStatus(ptpStatus);

char gmInfo[32];
snprintf(gmInfo, sizeof(gmInfo), "%02X-%02X-%02X-%02X-%02X-%02X-%02X-%02X:%d",
sprintf(gmInfo, "%02X-%02X-%02X-%02X-%02X-%02X-%02X-%02X:%d",
ptpStatus.PTP_gmId[0], ptpStatus.PTP_gmId[1], ptpStatus.PTP_gmId[2], ptpStatus.PTP_gmId[3],
ptpStatus.PTP_gmId[4], ptpStatus.PTP_gmId[5], ptpStatus.PTP_gmId[6], ptpStatus.PTP_gmId[7], ptpStatus.PTP_domain);

Expand All @@ -1937,7 +1934,7 @@ bool CNTV2Config2110::GenSDP(const bool enableSfp1, const bool enableSfp2,
{
GenAncStreamSDP(sdp, enableSfp1, enableSfp2, stream, &gmInfo[0]);
}

//cout << "SDP --------------- " << stream << endl << sdp.str() << endl;

bool rv = true;
Expand Down Expand Up @@ -3404,4 +3401,3 @@ uint64_t CNTV2Config2110::GetNTPTimestamp()
{
return CNTV2MBController::GetNTPTimestamp();
}

6 changes: 4 additions & 2 deletions ajantv2/src/ntv2enhancedcsc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,10 @@ bool CNTV2EnhancedCSC::SendToHardware (CNTV2Card & inDevice, const NTV2Channel i
cscRegs [11] = ConvertCoeffDoubleToULWord (Matrix().GetCoefficient (NTV2CSCCoeffIndex_C2));
cscRegs [12] = (ULWord(Matrix().GetOffset (NTV2CSCOffsetIndex_PostB)) << 16) | (ULWord(Matrix().GetOffset (NTV2CSCOffsetIndex_PostA)&0xFFFF));
cscRegs [13] = ULWord(Matrix().GetOffset (NTV2CSCOffsetIndex_PostC));
cscRegs [14] = ULWord((mKeyOutputRange & kK2RegMaskEnhancedCSCKeyOutputRange) << kK2RegShiftEnhancedCSCKeyOutputRange) |
ULWord((mKeySource & kK2RegMaskEnhancedCSCKeySource) << kK2RegShiftEnhancedCSCKeySource);
cscRegs[14] =
ULWord((static_cast<uint32_t>(mKeyOutputRange) & static_cast<uint32_t>(kK2RegMaskEnhancedCSCKeyOutputRange)) << kK2RegShiftEnhancedCSCKeyOutputRange) |
ULWord((static_cast<uint32_t>(mKeySource) & static_cast<uint32_t>(kK2RegMaskEnhancedCSCKeySource)) << kK2RegShiftEnhancedCSCKeySource);

cscRegs [15] = (ULWord(mKeyOutputOffset) << 16) | ULWord(mKeyInputOffset);
cscRegs [16] = (ULWord(mKeyGain * 4096.0));

Expand Down
5 changes: 5 additions & 0 deletions ajantv2/src/ntv2nubaccess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1800,6 +1800,11 @@ bool NTV2PluginLoader::validate (void)
<< "Issuer serial: " << fingerprint << "|AJA serial: " << ajaFingerprint);
return fail(); // fail
}
if (fingerprint != ajaFingerprint)
{ P_FAIL(pluginPath() << " not authorized/signed by AJA: Issuer serial mismatch: " << fingerprint
<< " vs " << ajaFingerprint);
return false; // fail
}

// Green light
mValidated = true;
Expand Down
Loading