This article suggests how to port application code that builds against an older NTV2 SDK to the most recent SDK.
(Last updated: October, 2024)
These four steps will cover 80% of the porting effort:
- Port “NTV2RoutingEntry” to use “NTV2InputCrosspointID”s
- Port “CNTV2Task” to new “AutoCirculateTransfer” API
- Replace old AutoCirculate calls with the new ones:
- Replace all calls to
InitAutoCirculatewithAutoCirculateInitForInputorAutoCirculateInitForOutput - Replace all calls to
StartAutoCirculatewithAutoCirculateStart - Replace all calls to
StopAutoCirculatewithAutoCirculateStop - Replace all calls to
AbortAutoCirculatewithAutoCirculateStop(channel, true) - Replace all calls to
PauseAutoCirculatewithAutoCirculatePauseorAutoCirculateResume - Replace all calls to
TransferWithAutoCirculatewithAutoCirculateTransfer - Replace all calls to
FlushAutoCirculatewithAutoCirculateFlush - Replace all calls to
PrerollAutoCirculatewithAutoCirculatePreRoll - Replace all calls to
GetAutoCirculatewithAutoCirculateGetStatus - Replace all calls to
GetFrameStampwithAutoCirculateGetFrame
- Heed all compile-time deprecation warnings (e.g., “‘XXX’ is deprecated, use ‘YYY’ instead”).
If it compiles and links without error, congratulations! — your application is compliant with the latest SDK.
If not, make note of the symbols in the compilation errors. This article will show you how to fix them.
NOTE: You can always try to build with a new SDK, but turn off (comment-out) the
#define NTV2_DEPRECATE…macros inajatypes.hwhich restores most of the old symbols and APIs — but this is not a permanent solution.
SDK version 13.0 was the first to have the source directories match on all three platforms (Linux, MacOS and Windows). In addition, the SDK was shipped as a .zip file on Windows and Linux for the first time.
- Projects that referred to
ntv2projects/classesnow should refer toajalibraries/ajantv2/src. - Projects that referred to
ntv2projects/includesnow should refer toajalibraries/ajantv2/includes. - Projects that referred to
ajastuff/includesnow should refer toajalibraries/ajabase/includes. - Replace any occurrences of
#include "ajastuff/with#include "ajabase/.
The contents of a number of source and header files have become obsolete and/or assumed into other source/header files. The obsolete files may be removed in a future SDK.
Obsolete/superceded implementation files:
ntv2colorcorrection.cppntv2procamp.cppntv2status.cppntv2testpattern.cppxena2vidproc.cpp
Obsolete/superceded headers:
ntv2boardscan.h-- Replace all occurrences of#include "ntv2boardscan.h"with#include "ntv2devicescanner.h"ntv2boardfeatures.h-- Replace all occurrences of#include "ntv2boardfeatures.h"with#include "ntv2devicefeatures.h"ntv2choosableboard.hntv2colorcorrection.h-- Replace all occurrences of#include "ntv2colorcorrection.h"with#include "ntv2card.h"ntv2procamp.h-- Replace all occurrences of#include "ntv2procamp.h"with#include "ntv2card.h"ntv2status.h-- Replace all occurrences of#include "ntv2status.h"with#include "ntv2card.h"ntv2testpattern.h-- Replace all occurrences of#include "ntv2testpattern.h"with#include "ntv2card.h"ntv2vidproc.h-- Replace all occurrences of#include "ntv2vidproc.h"with#include "ntv2card.h"ntv2vidprocmasks.hresample.h-- Replace all occurrences of#include "resample.h"with#include "ntv2resample.h"testpatterndata.htestpatterngendata.htranscode.h-- Replace all occurrences of#include "transcode.h"with#include "ntv2transcode.h"verticalfilter.h-- Replace all occurrences of#include "verticalfilter.h"with#include "ntv2verticalfilter.h"xena2routing.h-- Replace all occurrences of#include "xena2routing.h"with#include "ntv2signalrouter.h"xena2vidproc.h-- Replace all occurrences of#include "xena2vidproc.h"with#include "ntv2card.h"xenaserialcontrol.h-- Replace all occurrences of#include "xenaserialcontrol.h"with#include "ntv2serialcontrol.h"
It’s a good practice to start at the Knowledgebase article for the SDK version your application is currently built for, then “walk” forward through the Knowledgebase to each successive SDK, noting the API Changes. This section condenses many of these changes into a series of search/replace steps, for your convenience.
- Replace all occurrences of
NTV2_TCDEST_…withNTV2_TCINDEX_… - Replace all occurrences of
NTV2_TCSOURCE_…withNTV2_TCINDEX_… - Replace all occurrences of
NTV2DeviceGetNumAudioStreamswithNTV2DeviceGetNumAudioSystems - Replace all uses of
NTV2DeviceCanDoLTCOutN(id,N)withNTV2DeviceGetNumLTCOutputs(id) > N - Replace all occurrences of
NTV2BoardCanDo…withNTV2DeviceCanDo… - Replace all occurrences of
NTV2BoardGetNum…withNTV2DeviceGetNum… - Remove all occurrences of
NTV2BoardType. - Remove all uses of
NTV2DeviceType,DEVICETYPE_UNKNOWNand/orDEVICETYPE_NTV2. - Any/all
CNTV2Card::Opencalls should have at most two parameters: the index number and an optional host name (now astd::string). - Remove all calls to the
NTV2DeviceTypeStringfunction. - Remove all uses of
BOARDTYPE_SCANNABLE. - Remove all uses of
BOARDTYPE_NTV2. - Remove all uses of
BOARDTYPE_AS_COMPILED. - Replace all occurrences of
BOARD_ID_…withDEVICE_ID_…. - Remove all uses of
NTV2BoardSubType. - Remove all uses of
BOARDSUBTYPE_…. - Replace all occurrences of
NTV2_V2_STANDARD_…withNTV2_STANDARD_…. - Replace all occurrences of
NTV2V2StandardwithNTV2Standard. - Replace all occurrences of
IS_PROGRESSIVE_NTV2StandardandIS_PROGRESSIVE_STANDARDwithNTV2_IS_PROGRESSIVE_STANDARD. - Replace all occurrences of
NTV2_IS_VALID_NTV2StandardandNTV2_IS_VALID_NTV2V2StandardwithNTV2_IS_VALID_STANDARD. - Anywhere an
NTV2FrameDimensionsvalue was used, replace all occurrences of.cxor.cywith.Width()and.Height()respectively. - Replace calls to
IsKonaIPDevicewithIsIPDevice. - Replace all occurrences of
AJATestPatternGenwithNTV2TestPatternGen. - Replace calls to
getTestPatternListwith calls togetTestPatternNames. - Replace all uses of
AJATestPattern…data types withNTV2TestPattern…ones. - Replace all uses of
AJATestPattEx…enums withNTV2_TestPatt_…ones. - Un-numbered
HDMIInoutput crosspoint IDs are now numbered, so replaceNTV2_XptHDMIIn…with e.g.NTV2_XptHDMIIn1.
- Any source file that contains
NTV2FormatDescriptormust#include "ntv2formatdescriptor.h"(or include another header file that includes it). - Any use of two booleans for “vancEnabled” and “wideVanc” (or “tallerVanc”) should simply use a single
NTV2VANCMode. - Replace calls to
GetFormatDescriptorwith the equivalentNTV2FormatDescriptorconstructor. - Replace calls to
GetVideoWriteSize (videoFormat, pixelFormat, isVancEnabled, isWideVanc)withGetVideoWriteSize(videoFormat, pixelFormat, vancMode) - Replace calls to
SetEnableVANCDatawithSetVANCMode. - Replace calls to
GetEnableVANCData (&isVancEnabled, &isTallVanc, channel)withGetVANCMode (vancMode, channel)
- Replace all calls to
IsCaptionChannelwith call toIsLine21CaptionChannel - Replace all calls to
IsTextChannelwith call toIsLine21TextChannel - In SDK 14.2, caption library logging changed substantially to use the vastly more convenient AJA Logger utility.
- Most of the
kCaptionLog_constants were removed. GetDefaultCaptionLogOutputStreamandSetDefaultCaptionLogOutputStreamwere removed.- The
Log,LogIfandSetLogStreammethods are deprecated. Don’t use them.
- Replace all uses of
CXena2VidProcclass withCNTV2Card. - Replace all calls to
GetXena2VidProcMode,GetXena2VidProc2Mode,GetXena2VidProc3Mode, etc. withGetMixerMode, specifying the Mixer index number 0, 1, 2, etc. as appropriate. - Replace all calls to
SetXena2VidProcMode,SetXena2VidProc2Mode,SetXena2VidProc3Mode, etc. withSetMixerMode, specifying the Mixer index number 0, 1, 2, etc. as appropriate. - Replace all calls to
GetMixCoefficient,GetMix2Coefficient,GetMix3Coefficient, etc. withGetMixerCoefficient, specifying the Mixer index number 0, 1, 2, etc. as appropriate. - Replace all calls to
SetMixCoefficient,SetMix2Coefficient,SetMix3Coefficient, etc. withSetMixerCoefficient, specifying the Mixer index number 0, 1, 2, etc. as appropriate. - Replace all calls to
GetXena2VidProcInputControl,GetXena2VidProc2InputControl,GetXena2VidProc3InputControl, etc. withGetMixerFGInputControlforNTV2_CHANNEL1orGetMixerBGInputControlforNTV2_CHANNEL2, specifying the Mixer index number 0, 1, 2, etc. as appropriate. - Replace all calls to
SetXena2VidProcInputControl,SetXena2VidProc2InputControl,SetXena2VidProc3InputControl, etc. withSetMixerFGInputControlfor NTV2_CHANNEL1 orSetMixerBGInputControlfor NTV2_CHANNEL2, specifying the Mixer index number 0, 1, 2, etc. as appropriate. - Remove all calls to
GetSplitMode,SetSplitMode, andSetSplitParameters-- this feature is no longer supported by AJA devices.
When a “getter” method has a non-constant-reference return argument, we recommend using that instead of pointers --- e.g., replace GetXXXX(&variable) with GetXXXX(variable).
- The SDK now produces compile-time warnings when deprecated APIs are used (on most compilers).
CNTV2Task-based timecode capture/playout (seeAutoCircTimeCodeTask) is no longer supported in 12.4 (or later) drivers. TheCNTV2TaskandAUTOCIRCULATE_TASK_STRUCTAPI was hacked into the SDK many years ago to allow AutoCirculate clients to frame-accurately set/get timecode to/from SDI spigots other than the channel being circulated. This added a great deal of complexity to the driver and was impossible to scale in order to fix the absence of embedded Field2 VITC in interlaced video. Given our limited resources, we had to simplify the kernel driver and didn’t have sufficient time to back-port the old task-based behavior. We apologize for the inconvenience. If you must frame-accurately set/get timecode to/from SDI spigots that don’t correspond to the AutoCirculate channel, you MUST use the newAUTOCIRCULATE_TRANSFERclass andAutoCirculateTransferfunction. A porting guide is here.- SDI input signal monitoring (e.g., VPID valid detect, RX lock tally, TRS error detect, CRC error tally, etc.) on select hardware (e.g. Corvid44) is now implemented on all platforms.
- New device support:
- Corvid HEVC — On Windows, support is built into the driver and SDK. On Linux, use the HEVC-specific SDK.
- Kona IP — AJA’s first foray into SMPTE 2022 (video-over-IP)
- API Changes:
CNTV2ColorCorrection,CNTV2TestPattern,CNTV2VidProc,CXena2VidProc, andCNTV2ProcAmphave all been deprecated, and their residual functions and member data has been folded intoCNTV2Card. Henceforth,CNTV2Cardis now the only class to be used to talk to an AJA device.- New
NTV2DeviceCanDoPCMDetectionfunction and “per-audio-channel-pair” PCM detection member functions ofCNTV2Cardnow operate with some newer AJA devices (Corvid44, Kona4 … with newer firmware installed). - APIs are now ready to support 128 audio channels (i.e., up to 64 audio channel pairs) per SDI spigot (awaiting future firmware support).
CNTV2AncPacketandCNTV2AncPacketsclasses were finally removed from the ‘ajacc’ library. TheNTV2CCPlayerdemo now uses the ‘ajaanc’ library.
- HDR support
- SMPTE 2022-7 support on KONA IP
- VPID — major driver improvements to transmit correct VPID, especially for SMPTE 425 (Tsi).
- 64-bit-only on macOS — The libraries supplied with the SDK now only contain the x86_64 architecture (not both i386 and x86_64, as before). If a 32-bit executable is required, ‘classes’ (and possibly ‘ajastuff’, if needed) must be recompiled for i386.
- On macOS, the supplied ‘classes’ and ‘ajastuff’ libraries don’t support the new C++11 LLVM standard library. If you need to link with C++11 support, you must rebuild the libraries.
- API Changes:
- API changes are now tracked using separate per-release macros.
NTV2_DEPRECATE_12_5is defined inajatypes.hfor this release (and can be undefined there, if necessary, to avoid having to make any code changes to accommodate API changes). NTV2_DEPRECATEis now defined by default (inajatypes.h). The old, deprecated APIs will be disappearing!- Enhanced:
NTV2_POINTER: NewCopyFrom,SwapWith, andGetRingChangedByteRangemethods.IsContentEqualhas been enhanced with new byte offset & count parameters.AUTOCIRCULATE_STATUS: New inquiry methods:GetAudioSystem,IsStopped,WithAudio,IsInput,IsOutputandGetChannel.CNTV2Card::AutoCirculateGetFrameStamp— now returns full complement of captured timecodes.CNTV2Card::WaitForOutputVerticalInterruptandCNTV2Card::WaitForInputVerticalInterrupt— now have an optional repeatCount parameter (defaults to 1).CNTV2Card::BankSelectReadRegisters— has been replaced byBankSelectReadRegister.CNTV2Card::BankSelectWriteRegisters— has been replaced byBankSelectWriteRegister.NTV2RegInfo— added several new convenience methods.NTV2FormatDescriptor— added several new constructors, plusGetFirstChangedRow,GetChangedLines, and other convenience methods.NTV2SMPTELineNumber— added several new convenience methods.HevcCommand&HevcDeviceCommand— several new “change encode parameter” options, “change picture type”, etc.
- Deprecated:
NTV2V2Standard(rolled into existingNTV2Standard)NTV2RoutingEntry— This will likely require simple code changes. A handy porting guide is here.CNTV2Card::DownloadLUTToHWNTV2BankRegPair— no longer needed.
- New:
NTV2VANCMode— enum to permit deprecation of APIs using the “tall” and “taller” booleans.NTV2DoubleArray— for greater ease in getting/setting LUTs.NTV2RegisterExpert— one-stop-shopping for register info.CNTV2Card::LoadLUTTablesandCNTV2Card::GetLUTTablesmethods — which acceptNTV2DoubleArrays.CNTV2Card::GetAESOutputSourceandCNTV2Card::SetAESOutputSourcemethods — missing from the API until now.CNTV2Card::IsAudioChannelPairPresentandCNTV2Card::GetDetectedAudioChannelPairsmethods — missing from the API until now.CNTV2Card::GetDieTemperature— now you can read the FPGA die temperature in anyNTV2DieTempScaleyou like!AJAAncillaryList::AddVANCData— for “tall” and “taller” VANC geometries in 10-bit YCbCr frame buffers.NTV2RasterLineOffsets— an ordered sequence of zero-based line offsets into a frame buffer.NTV2InputSourceSet— a set of distinctNTV2InputSourcevalues.
- Driver Changes:
- New
FRAME_STAMPmessage — to see all timecodes being carried in any AutoCirculate frame.
- New
- New Device Support:
- Corvid HB-R — HDBaseT ingest board with VISCA/RS-232 control, 10W of power, captures up to 4K/60p video and 8-channels of audio over Cat5e/6
- API changes are now tracked using separate per-release macros.
- JPEG-2000 (J2K) support on KONA IP
- NEW SDK LAYOUT:
- ajaapps — Application sources
- crossplatform — Sources for platform-independent applications
- demoapps — Sources for the demonstration apps
- crossplatform — Sources for platform-independent applications
- ajalibraries — Sources for all SDK libraries
- ajaanc — The AJA Ancillary Data library
- ajabase — The AJA “Base” library (formerly “ajastuff”)
- ajantv2 — The NTV2 library (formerly “ntv2projects” and “classes”)
- gpustuff — OpenGL and other GPU support (Linux and Windows only)
- ajaapps — Application sources
- API Changes:
NTV2FormatDescriptor— Added support for some planar pixel formats.CNTV2Cardclass- New
SetAudio20BitModeandGetAudio20BitModefunctions — enables or disables 20-bit mode for a given audio engine’s embedder/de-embedder (disabled is the normal 24-bit mode). - New
GetAudioOutputEmbedderStateandSetAudioOutputEmbedderStatefunctions — to enable or disable an SDI output’s audio embedder. - New optional “inClearDropCount” parameter in
AutoCirculateResumeandAutoCirculateFlushfunctions — to optionally clear the “dropped frames” tally for an active AutoCirculate channel. - New
GetConnectedInputfunction — to discover theNTV2InputCrosspointa givenNTV2OutputCrosspointis feeding. - New
EnableHDMIHDRDolbyVisionandGetHDMIHDRDolbyVisionEnabledfunctions. GetFBSizeAndCountFromHWis now private.- New “Device Features” API — NOTE: work-in-progress — We would eventually like to eliminate the dichotomy between the what the SDK claims a device can do (determined at compile-time) and what the device can actually do (determined by its firmware at run-time).
- New
- New
j2kDecoderConfigandj2kDecoderConfigclasses CNTV2ConfigTs2022,CNTV2MailBoxandCNTV2MBControllerclasses — many changesTSGenerator,PESGen,PATGen,PMTGen, andADPGenclasses replaced theCNTV2MBControllerclass- Device Features API:
NTV2DeviceCanDoJ2KfunctionNTV2DeviceCanDo2110function
- Driver Changes:
- All Platforms
- Virtual register space has been expanded to store up to 1,024 32-bit values. Clients can use
WriteRegister/ReadRegisterto store/retrieve arbitrary 4-byte values in “registers” starting atkVRegFirstOEMup tokVRegLast. - Bug fixes for timecode, VITC and Anc ingest/playout.
- Virtual register space has been expanded to store up to 1,024 32-bit values. Clients can use
- Linux
- Improved DMA transfer performance from multithreaded applications using AJA devices having NWL DMA engines.
- The ancient “xena” name for the kernel module (
.ko) has finally been replaced with “ajantv2” to match the naming used on macOS and Windows.
- All Platforms
- KONA-IP: SMPTE 2022 IGMP v3 Implementation — When the source IP address is included in the Rx match selection, source specific IGMP subscriptions are made.
- API Changes:
- New
CNTV2CardfunctionsGetRunningFirmwareDate,GetRunningFirmwareTimeandGetRunningFirmwareRevisionfunctions — to detect if the installed device firmware is the firmware that‘s currently running.
- New
- Introducing Io4K-Plus — Thunderbolt III, 4-lane gen3 PCIe, 6G/12G SDI input/output, XLR microphone input, HDMI 2.0
- Introducing IoIP — Thunderbolt III, 4-lane gen3 PCIe, HDMI 2.0
- Audio Mixer for Kona 4, Io4K and Io4K+ (Quad firmware only)
- Note that on Kona4 and Io4K, quadrant-mode HMDI monitoring for 4K/UHD was removed to fit the new audio mixer functionality into the FPGA.
- API Changes:
NTV2FormatDescriptor:- More planar support: new
PlaneToStringandByteOffsetToPlanefunctions - Other changes:
- New
ByteOffsetToRasterLine,RasterLineToByteOffsetandIsAtLineStartfunctions. - New
GetLineOffsetFromSMPTELinefunction. - New
IsSDFormatfunction.
- New
- More planar support: new
CNTV2Card:- New
DeviceCanDoAudioMixerandDeviceHasMicInputfunctions, to detect if the audio mixer firmware and/or microphone input hardware is present or not. - New
GetAudioMixer…andSetAudioMixer…functions — to support the new audio mixer firmware in the Io4K and Io4K-Plus. - New
GetSDIInput6GPresentandGetSDIInput12GPresentfunctions — to support the new 6G/12G SDI connectors on the Io4K-Plus. - New
GetSDIOut6GEnable/SetSDIOut6GEnableand GetSDIOut12GEnable/SetSDIOut12GEnable` functions — to support the new 6G/12G SDI connectors on the Io4K-Plus. - New
GetAnalogAudioIOConfiguration/SetAnalogAudioIOConfigurationfunctions — to support the new analog audio connector on the Io4K-Plus. - New
CanConnectfunction now implemented - validates internal xpt routes. - New
GetEnableHDMIOutUserOverride,EnableHDMIOutUserOverride,GetEnableHDMIOutCenterCropandEnableHDMIOutCenterCropfunctions (only for devices that support HDMI 2.0). - New
VirtualDataWriteandVirtualDataReadfunctions writing/reading HDMI metadata. - New
GetAncExtractorRunStateandGetAncInserterRunStatefunctions (for devices with custom Anc inserter/extractor firmware).
- New
AUTOCIRCULATE_TRANSFER:- New
acHDR10PlusDynamicMetaDatamember for optionally transmitting HDR10+ dynamic metadata per-frame.
- New
- Device Features API
- New
NTV2DeviceCanDo12GOutfunction - New
NTV2DeviceHasSPIv5function - New
NTV2DeviceCanDoAudioMixerfunction - New
NTV2DeviceHasLEDAudioMeters,NTV2DeviceHasHeadphoneJack,NTV2DeviceHasAudioMonitorRCAJacks, andNTV2DeviceHasBiDirectionalAnalogAudiofunctions - New
NTV2DeviceGetAudioMixerSystem,NTV2DeviceCanDoAudioOutandNTV2DeviceCanDoAudioInfunctions
- New
- Miscellaneous
- New
NTV2StandardSetcollection andNTV2DeviceGetSupportedStandardsfunction. - New
FindFirstMatchingRegisterNumberandGetNormalizedFrameGeometryfunctions. - New
GetFirstMatchingVideoFormatandGetNormalizedFrameGeometryfunctions. - New
NTV2IpErrorEnumToStringfunction.
- New
CNTV2SignalRouter- New
ResetFromRegisters,GetWidgetIDs,GetAllWidgetInputsandGetAllRoutingRegInfofunctions.
- New
CNTV2Config2022,CNTV2Config2110andCNTV2MBControllerclasses & cousins- extensive changes — too many to list
- Enums
NTV2Streamhas newNTV2_METADATA_STREAMandNTV2_UNUSED_STREAMvalues (NTV2_AUDIO2_STREAMwas dropped).NTV2AudioSourcehas a newNTV2_AUDIO_MICvalue.NTV2InputAudioSelecthas a newNTV2_MicInSelectvalue.NTV2SDITransportTypehas newNTV2_SDITransport_6GandNTV2_SDITransport_12Gvalues.NTV24kTransportTypehas a newNTV2_4kTransport_12g_6g_1wirevalue.- New
NTV2WidgetIDvalues:NTV2_Wgt12GSDIIn1…4andNTV2_Wgt12GSDIOut1…4,NTV2_WgtHDMIIn1v4andNTV2_WgtHDMIOut1v4. - New
NTV2AudioMixerChannelenum. - New
NTV2AnalogAudioIOenum to describe Io4K+’s analog audio connector configuration (8-in, 8-out, 4-in/4-out, or 4-out/4-in). - The
VPIDStandardvalues have changed. - New
NTV2IpErrorenum to describe IP errors. - Changed several
NTV2FrameBufferFormats that were unused in our supported devices to support new 3-plane planar formats in the Corvid44:NTV2_FBF_8BIT_QREZis nowNTV2_FBF_8BIT_YCBCR_420PL3;NTV2_FBF_UNUSED_23is nowNTV2_FBF_8BIT_YCBCR_422PL3;NTV2_FBF_UNUSED_26is nowNTV2_FBF_10BIT_YCBCR_420PL3_LE;NTV2_FBF_UNUSED_27is nowNTV2_FBF_10BIT_YCBCR_422PL3_LE;- Renamed the 2-plane planar formats — supported only by the Corvid HEVC — to clarify they have only two planes:
NTV2_FBF_10BIT_YCBCR_420PLis nowNTV2_FBF_10BIT_YCBCR_420PL2;NTV2_FBF_10BIT_YCBCR_422PLis nowNTV2_FBF_10BIT_YCBCR_422PL2;NTV2_FBF_8BIT_YCBCR_420PLis nowNTV2_FBF_8BIT_YCBCR_420PL2;NTV2_FBF_8BIT_YCBCR_422PLis nowNTV2_FBF_8BIT_YCBCR_422PL2.
- Driver Changes:
- All Platforms: New
NTV2VirtualDatamessage. - macOS: HDMI input detection moved from the ‘AJAAgent’ service daemon into the driver. This comports with Linux and Windows.
- All Platforms: New
- Kona IP Changes
- Support is added for SMPTE 2110. Beta – video Tx & audio Tx only (no Anc, no Rx)
- A new API class
CNTV2Config2110is used to set up the card. The 2110 firmware is designed to operate locked to PTP timing. - On an experimental basis, support is added for use of SDPs with 2110. For Tx, SDPs are served using HTTP protocol for active channels. For Rx, SDPs can be obtained using HTTP directly by the KonaIP card or from a file given to the Config class. Thes SDPs are parsed and used to configure Rx channels for video and audio.
- This is an emerging technology and the current implementation should be regarded as experimental.
- A new API class
- All KonaIP firmware versions now support IGMP v3. For Rx when a 'source IP match' is enabled, a V3 IGMP source subscription will be made for the source IP address.
- The 2022 firmware package supports both 2022-6 and 2022-7 operation.
- 2022-7 is now configured globally for all channels. Also, the network path differential is global rather than per channel as it was previously
- For 2022-6 operation, inputs and outputs can be assigned to either link-A (top SFP) or link-B (bottom SFP). Previously the assignments were fixed and different firmware was required to use link-B for 2022-6. In this release all channels can be routed to either SFP link.
- The
ntv2konaipjsonsetupprogram has been enhanced for both 2022 and 2110 use. For 2022 J2K, it should be used in conjunction with thentv2konaipj2ksetupprogram. A-koption has been added which lists the fields supported for each protocol. The changes in 2022-7 and 2022-6 configuration described above are reflected in these programs too. - For both 2022 and 2110 Config classes, when the IP addresses are configured, the Config class validates that the installed firmware is a match for the SDK. If there is a mismatch then the IP addresses are not configured and the call returns false. This ensures that there is a fimware/software match and effectively disables the IP I/O for the board on a mismatch.
- Functions have been added to 2022 and 2110 Config classes to gather information on SFPs.
- Support is added for SMPTE 2110. Beta – video Tx & audio Tx only (no Anc, no Rx)
- New Device Support:
- KONA 1 — A modern replacement for the Corvid 1
- KONA HDMI — 4-input HDMI capture card
- API Changes:
CNTV2Card:- New
DMAReadAnc/DMAWriteAncmethods; GetHDMIInputVideoFormat,GetHDMIInputStatusRegisterandGetHDMIInputColornow accept an optionalNTV2Channelnumber.
- New
NTV2_POINTER:- New methods to Set/Get to/from
std::vectors ofuint64_t,uint32_t,uint16_tanduint8_t. - New
Dumpmethod
- New methods to Set/Get to/from
- New
CNTV2SupportLoggerclass — Generates NTV2 support log files for debug purposes AJAAncillaryListandAJAAncillaryData: — many changes to support SMPTE 2110 Ancillary data streams.- Tsi (2-sample interleave) is now the default scheme for 4K/UHD over 3G SDI on boards newer than Kona3G/Corvid24 (Kona4, Io4K, Corvid44, etc.).
- Removed
using namespacestatement inntv2rp188.h
- Demo Apps
- NTV2Capture — Tweaked to work with the new Kona HDMI.
- NTV2Capture4K — Now can capture Tsi instead of just quads/squares.
- NTV2CCPlayer — Fixed schmutz in top lines of video when using
--vanccommand-line option. - NTV2KonaIPJSONSetup — Many changes to support new IP capabilities.
- NTV2Player4K — Now can play 4K using Tsi instead of only quads/squares. Now works with KonaIP.
- NTV2QtCapture & NTV2QtMultiInput — Improvements and bug fixes in
AJAPreviewWidgetandNTV2FrameGrabberclasses.
- The ‘ajabase’ and ‘ajaanc’ class libraries have been merged into the ‘ajantv2’ library.
- On Windows, this may require linking with additional Windows libraries.
- On Linux, this may require linking with additional libraries (e.g.
-lrt).
- KONA 5 — our first Gen3×8 PCIe ingest/playout board with 4GB SDRAM and 4×12Gbps SDI connectors
- Two-Sample-Interleave (Tsi) 4K video formats for the 12g KONA 5 — which greatly simplifies 4K routing:
- Just call
SetVideoFormatwith one of the new Tsi video formats (e.g.NTV2_FORMAT_4096x2160p_2400). - “Square Division” mode is now the exception. Call
SetVideoFormatwith one of the “4x” video formats (e.g.NTV2_FORMAT_4x2048x1080p_2400).
- Just call
- Most
CNTV2Cardfunctions that return a value using a pointer parameter have been deprecated. We’ve standardized on the use of non-constant reference parameters instead.
- New Device Support:
- Corvid44-12G — OEM version of KONA 5 — 4×12g connectors (but no HDMI out or breakout cable/box)
- UHD2 Support — UHD2 (4×UHD) ingest/playout support for KONA 12G and Corvid44-12G
- S-2110 Anc Support: — Seamless ancillary data stream support for KONA IP and IoIP.
- API Changes:
- The
NTV2DeviceIDof the KONA 5 (12G firmware) has changed fromDEVICE_ID_KONA5_12GtoDEVICE_ID_KONA5_4X12G. - The
NTV2DeviceIDof the Corvid44-12G, currentlyDEVICE_ID_CORVID44_12G, is subject to change. - Demos:/
- NTV2Capture4K now emits ancillary data by default.
- New NTV2Capture8K and NTV2Player8K demos.
- ‘ajaanc’ Library:
- Supporting S2110 Ancillary Data streams for KONA IP and IoIP has necessitated some API changes to this library.
AJAAncillaryList:SetFromIPAncDataandSetFromSDIAncDatahave been deprecated in favor of the new, genericSetFromDeviceAncBuffersfunction.GetSDITransmitDatahas been deprecated in favor of the SDI-defaultGetTransmitDatafunction. If RTP is needed/desired, then theGetIPTransmitDatafunction can be used instead.- The “Analog” (“raw”) ancillary data type map is now global (instead of per-
AJAAncillaryListinstance). - New thread-safe global setting API (
IsIncludingZeroLengthPackets,SetIncludeZeroLengthPackets,GetExcludedZeroLengthPacketCount,ResetExcludedZeroLengthPacketCount) that controls whether or notAddVANCData/AddReceivedAncillaryDatawill add zero-length packets.
AJAAncillaryDataLocation:- Use of
AJAAncillaryDataSpacehas been deprecated in favor of the new, special Horizontal Offset and Line Number constants (e.g.AJAAncDataHorizOffset_AnyHanc). Setfunction (with 6 parameters, one of which is ignored now) has been deprecated in favor of using the existingSetDataLink,SetDataStream,SetDataChannel, etc. functions.
- Use of
AJAAncillaryData:- Multi-parameter versions of
SetDataLocation,GetDataLocation(and friends) have been deprecated in favor of independently manipulating/interrogatingAJAAncillaryDataLocation. - Added 32-bit frame identifier and
AJAAncillaryBufferFormatmembers toAJAAncillaryDatainstances.
- Multi-parameter versions of
CNTV2Card:SetRP188Sourcehas been renamedSetRP188SourceFilterto better reflect what it actually does.- Added new
GetRP188BypassSource/SetRP188BypassSourcefunctions. - Added new
AUTOCIRCULATE_WITH_HDMIAUXoption to enable ingest/playout of HDMI InfoFrame auxiliary data (e.g. HDR data). - Added new
GetQuadQuadSquaresEnable/SetQuadQuadSquaresEnablefunctions to support UHD2. DMAReadAnc/DMAWriteAncnow have an optionalNTV2Channelparameter for S2110 IP devices to specify which Anc FrameStore and extractor/inserter is being used.- Added new
AncInsertSetIPParamsfunction for configuring the S2110 ancillary data inserter. - Added new
GetMixerFGMatteEnabled/SetMixerFGMatteEnabled,GetMixerBGMatteEnabled/SetMixerBGMatteEnabled, andGetMixerMatteColor/SetMixerMatteColorfunctions. - Added new
GetAudioOutputAESSyncModeBit/SetAudioOutputAESSyncModeBitfunctions for falsifying the AES “Sync Mode” in outgoing embedded SDI audio. - Added new
DMABufferLock/DMABufferUnlockAllfunctions for long-term locking of host buffer memory in kernel space. - Added new
SetVPIDTransferCharacteristics,SetVPIDColorimetryandSetVPIDVPIDLuminancefunctions.
- Device Features:
- Added new
NTV2DeviceCanDoWarmBootFPGAandNTV2DeviceCanDo8KVideofunctions.
- Added new
- Enum Types:
- Added new
NTV2VPIDTransferCharacteristics,NTV2VPIDColorimetryandNTV2VPIDLuminanceenum types.
- Added new
NTV2FormatDescriptor:- Added new
GetWriteableRowAddressfunction.
- Added new
NTV2_POINTER:- New
Dumpfunction (tostd::string).
- New
AUTOCIRCULATE_TRANSFER:SetAllOutputTimeCodescan now be told whether to set VITC2 or not.
- Utilities:
- Added new
NTV2DeviceGetSupportedGeometries,HasVANCGeometries,GetRelatedGeometries,GetVANCModeForGeometry,GetStandardFromGeometryfunctions. - Added new
Is8KFormatfunction. - Added new
NTV2MixerKeyerModeToString,NTV2MixerInputControlToString, andNTV2VideoLimitingToStringfunctions. GetFirstMatchingVideoFormatnow takes into account psf.
- Added new
NTV2TestPatternGen:- Added new 12-bit RGB test patterns (Zone Plate, Linear Ramp, HLG Narrow, PQ Narrow, and PQ Wide).
- Transcode: — New functions:
ConvertLine_8bitABGR_to_48bitRGBConvertLine_8bitABGR_to_10bitABGRConvertLine_2vuy_to_yuy2ConvertLine_8bitABGR_to_10bitRGBDPXLEConvertLine_8bitABGR_to_24bitRGBConvertLine_8bitABGR_to_24bitBGR
- The
- API Changes:
CNTV2Card::SetFrameBufferFormathas three new, optional parameters for setting the HDR characteristics of the FrameStore/Channel, which allows the driver to properly decorate the output VPID for any output fed by the FrameStore. They default toNTV2_VPID_TC_SDR_TV,NTV2_VPID_Color_Rec709andNTV2_VPID_Luminance_YCbCr.CNTV2Card::GetNTV2VideoFormatwas changed to correctly detect 1080i/psf 23.98/24.00 fps dual-link 3G RGB. Unfortunately, this breaks 1080i@4798/4800 detection, since they’re electrically identical. This will be corrected in a future SDK by consulting the input VPID.
- New Firmware Bitfiles:
- Corvid44-12G 8KMK Bitfile —
DEVICE_ID_CORVID44_8KMKreplacesNTV2DeviceID DEVICE_ID_CORVID44_12G— same capabilities:- Up to 8K YUV in/out
- Up to 4K using CSCs & mixer/keyers
- Corvid44-12G 8K Bitfile —
DEVICE_ID_CORVID44_8K:- Up to 8K YUV or RGB in/out
- No CSCs, no Mixer/Keyers
- KONA 5 8KMK Bitfile —
DEVICE_ID_KONA5_8KMK:- Up to 8K YUV in/out
- Up to 4K using CSCs & mixer/keyers
- No audio mixer
- KONA 5 8K Bitfile —
DEVICE_ID_KONA5_8KreplacesNTV2DeviceID DEVICE_ID_KONA5_4X12G— same capabilities:- Up to 8K YUV or RGB in/out
- No CSCs, no Mixer/Keyers, no audio mixer
- Corvid44-12G 8KMK Bitfile —
- API Changes:
AJAAncillaryList:- Added new overloaded function
AddAncillaryDatafor appending packets from anotherAJAAncillaryList. - Added new
GetIPTransmitDataLengthfunction.
- Added new overloaded function
AJAAncillaryData:- Added new
IS_KNOWN_AJAAncillaryDataTypemacro. - Numerous changes to the
AJARTPAncPayloadHeaderclass.
- Added new
CNTV2Card:- New
NTV2_POINTER-based version of theDMABufferLockfunction. - New
DMAClearAncRegion,GetAncRegionOffsetAndSizeandGetAncRegionOffsetFromBottomfunctions. - Added missing
GetRawAudioTimerfunction. - All-new, corrected Audio Mixer API, that also introduces new functions to get/set muting for the mixer’s output audio channels. The original input-specific APIs introduced in SDK 15.2 will be deprecated.
AutoCirculateInitForInput,AutoCirculateInitForOutputandFindUnallocatedFramesnow useUWords instead ofUBytes for frame numbers, in order to handle frame numbers over 255.- New
GetConnectedInputsrouting function. GetLTCInputPresentcan now answer for a second LTC input port, for devices that have them.AncExtractGetDefaultDIDscan now optionally return DIDs for SD audio packets instead of just HD ones.- It was necessary to remove the
LocalLoadBarsTestPatternfunction.
- New
- Device Features:
- Added new
NTV2DeviceCanDoHFRRGBfunction to test if the device supports RGB 1080p at more than 50Hz.
- Added new
- Data Types:
DEVICE_ID_CORVID44_12Ghas been deprecated and replaced byDEVICE_ID_CORVID44_8KMK.- Added new
DEVICE_ID_CORVID44_8Kdevice ID for the new bitfile that supports up to 8K YUV or RGB in/out with no CSCs or Mixer/Keyers. DEVICE_ID_KONA5_4X12Ghas been deprecated and replaced byDEVICE_ID_KONA5_8K.- Added new
DEVICE_ID_KONA5_8KMKdevice ID for the new KONA 5 bitfile. - Added new
NTV2_FBF_12BIT_RGB_PACKEDframe buffer format, an AJA-specific 12-bit uncompressed RGB format. - Added new
NTV2_IS_UHD2_FULL_VIDEO_FORMATmacro. - Enumerated types and constants that were tied to AJA’s “retail” software — not the OEM SDK — have been consolidated and slated for deprecation under the
R2_DEPRECATEmacro. - Added new
NTV2AncillaryDataRegionenum. - Added new
UByteSequencedata type, astd::vectorofUBytevalues. - Added new
HDRDriverValuesstruct. - Defined new
RP188SourceFilterSelectto eventually replace the poorly-namedRP188SourceSelectenum type.
NTV2FormatDescriptor:- SMPTE line numbering fixes for 4K & 8K standards.
- Added support for new
NTV2_FBF_12BIT_RGB_PACKEDpixel format.
AUTOCIRCULATE_STATUS:- Added handy new
GetModefunction.
- Added handy new
- Utilities:
- Added new
NTV2BreakoutTypeToStringandNTV2AncDataRgnToStrfunctions. GetNTV2HDMIInputSourceForIndexis now slated for eventual deprecation.
- Added new
NTV2TestPatternGen:- Added new
DrawTestPatternfunction that conveniently accepts anNTV2FormatDescriptor. - Added handy new
canDrawTestPatternfunction. - Added new
NTV2_IS_VALID_PATTERNmacro.
- Added new
- Transcode:
- Added new
Convert16BitARGBTo12BitRGBPackedfunction.
- Added new
CNTV2VPID:- Added new “to string” conversion functions: VersionString, StandardString, PictureRateString, SamplingString, ChannelString, DynamicRangeString, BitDepthString, LinkString, AudioString.
- Demo Changes:/
- Removed redundant switching of bidirectional SDI connector to receive mode in
NTV2Capture::SetupVideo. - NTV2CCPlayer can optionally force multiple RTP packets per-frame on IP devices.
- NTV2Player4K has been cleaned up and now shows how to play 4K through 6G and 12G SDI spigots on Io4K+, KONA 5 and Corvid44-12g.
- Fixed several compile-time warnings.
- Removed redundant switching of bidirectional SDI connector to receive mode in
- Driver Changes:
- HDMI input detection improvements.
- Added HDR info to SDI output VPID.
- Added ability to configure maximum PCIe read request size to improve 8K transfer speed for KONA 5, Corvid44-12G.
- Linux: Fixed a serious long-standing race condition in the Linux driver that could cause multiple processes waiting on the same interrupt (e.g.
eOutput1) to time-out. - Windows: Fixed a serious issue in the audio driver that could cause blue screens when system audio output is routed through the AJA device.
New Device Support:
- T-Tap Pro — A very much improved 4K-capable version of the T-Tap
- API Changes:
CNTV2Card:- To improve 8K/UHD2 DMA performance: There’s a new “map” option on the
DMABufferLockfunctions to have the driver also lock down the segment map in kernel memory; NewDMABufferUnlockfunction to unlock buffers locked byDMABufferLock; NewDMABufferAutoLockfunction. - To better accommodate new 8K/UHD2 and 12-bit workflows, we’ve introduced Fast Bitfile Switching (aka “dynamic reconfig”) and new per-device bitfile sets for KONA 5 and Corvid44-12G. This includes a new switchbitfile command-line tool, and new “dynamic device" API functions (e.g.
IsDynamicDevice,LoadDynamicDevice, etc.). - New
GetDeviceFrameInfoandDeviceAddressToFrameNumberfunctions. - New
GetTsiMuxSyncFailfunction (requires firmware support). - The “inFrameCount” parameter of
AutoCirculateInitForInputandAutoCirculateInitForOutputfunctions is now ignored if a legitimate frame range is specified in the “inStartFrameNumber” and “inEndFrameNumber” parameters. - New
ApplySignalRoutefunction that accepts astd::mapof input-to-output crosspoint connections. - New SDI Bypass Relay API that deprecates the old per-relay functions, replacing them with generic functions that have an index parameter for specifying the relay (connector-pair).
- New
GetBitfileInfoStringfunction. - New HDR “getter” functions:
GetVPIDTransferCharacteristics,GetVPIDColorimetry,GetVPIDVPIDLuminance. - Several methods now accept
NTV2ChannelSets, for configuring multiple channels or SDI connectors in one API call.
- To improve 8K/UHD2 DMA performance: There’s a new “map” option on the
- Signal Router:
- Added new
ResetFromfunction to reset theCNTV2SignalRouterinstance from a givenNTV2XptConnectionsmap. - Added new
GetConnectionsFromRegs,CompareConnectionsandCreateFromStringclass methods.
- Added new
- Data Types:
- Defined new
NTV2XptConnectionto augment theNTV2Connectionpair. - Defined new
NTV2XptConnectionsto replace the poorly-namedNTV2ActualConnectionsmapping.
- Defined new
NTV2FormatDescriptor:- New
GetTotalBytesfunction returns the total number of bytes required to hold the raster, including all planes of planar formats (which used to require multiple calls toGetTotalRasterBytes).
- New
AUTOCIRCULATE_STATUS:- Added handy new
OptionFlags,WithCustomAnc,WithRP188,WithLTC,IsFieldModeandWithHDMIAuxDatafunctions.
- Added handy new
- Utilities:
- Added new
GetNTV2FrameRateFromNumeratorDenominatorfunction. - Enlarged rowBytes parameters of
Make10BitBlackLine,Make10BitWhiteLine,Make10BitLine,SetRasterLinesBlack, andCopyRasterfunctions toULWords (uint32_t) to accommodate larger 8K/UHD2 rasters.
- Added new
- Misc:
- C++11: — This is AJAʼs first SDK that requires a C++11 compliant compiler by default. Instructions on how to build the SDK without C++11 compiler support are in the Getting Started guide.
- Added
SetLLDPInfoandGetLLDPInfofunctions toCNTV2Config2110class. - Added MultiLinkOut virtual widget in 12G-routable devices (KONA 5, Corvid44-12G).
- Transcode:
- Added new
Convert16BitARGBTo12BitRGBPackedfunction.
- Added new
CNTV2VPID:- Added new “to string” conversion functions:
VersionString,StandardString,PictureRateString,SamplingString,ChannelString,DynamicRangeString,BitDepthString,LinkString,AudioString.
- Added new “to string” conversion functions:
- Demos:
- All:
- The
-b|--boardcommand line option used in most demos has been deprecated in favor of-d|--device. - Specifying
?for-d|--devicelists all available devices and exits the demo. - Enhanced logging: All capture demos log into a new DemoCapture category; playout demos log into a new DemoPlayout category.
- NTV2Burn and NTV2LLBurn now use new Bypass Relay API (see above).
- NTV2LLBurn now demonstrates a new custom HANC playout capability available on some OEM devices.
- The
- NTV2Capture:
- Now grabs all available input timecodes. When anc capture is enabled, fixed
--ancto record the number of F1 & F2 anc bytes captured per-frame. - The
-aoption still enables anc capture, but the--ancoption now requires a filePath parameter, and it records the raw captured anc data into a binary data file (that can be played using ntv2player).
- Now grabs all available input timecodes. When anc capture is enabled, fixed
- NTV2Player:
- Added a new
--ancoption that will inject/play raw anc data supplied by the binary data file specified as its parameter. (ntv2capture can now create such binary anc files.)
- Added a new
- NTV2OutputTestPattern:
-p|--patternoption now accepts pattern names or standard web color names.- New
-v|--videoFormatoption for specifying video format to override current device video format. - New
--vancoption for specifying vanc mode. - New
--pixelFormatoption for specifying frame buffer pixel format.
- All:
- Driver:
- Numerous DMA performance improvements to support 8K/UHD2 on KONA 5, Corvid44-12G.
- New Device Support:
- IoX3 — `DEVICE_ID_IOX3 — A modern replacement for the IoXT
- Improved 12-Bit RGB and 4:4:4 workflow support for 4K/UHD (Kona5, Corvid44-12G)
- Expanded 64/32 audio channel support over multi-link SDI (Kona5, Corvid44/12G, Corvid88 and Corvid44)
- API Changes:
- Bumped the actively-deprecated APIs and data types from SDK 14.3 to 15.2. If your code compiled under SDK 16.1, and fails to compile under SDK 16.2:
- Scroll up to “SDK 15.0”, then apply each listed change to your code, if applicable.
- Repeat step 1 for “SDK 15.1” and “SDK 15.2”.
CNTV2Card:- New detailed
GetDeviceFrameInfooverload. - New
AncInsertGetReadInfoandAncExtractGetWriteInfomember functions. - New overloads for
SetVANCShiftMode,SetNumberAudioChannels,SetAudioBufferSize,SetAudioLoopBack, andSetSDIOutputAudioSystemto operate on more than one channel, audio system or widget in a single function call. - Deprecated
GetActiveFrameDimensions,GetNumberActiveLines,SetPCIAccessFrame,GetPCIAccessFrameandFlipFlopPage. - Members
GetBaseAddress,GetRegisterBaseAddressandGetXena2FlashBaseAddressfirst deprecated in SDK 16.0 now produce compile-time warnings when used.
- New detailed
- New
SDRAMAuditorclass used byCNTV2SupportLoggerto detect device SDRAM utilization clashes or conflicts. - New
NTV2BitfileHeaderParserclass is now used commonly by all firmware-related classes for bitfile header parsing. NTV2TestPatternGen:- Two overloaded members
DrawTestPattern, first deprecated in SDK 16.0, now produce compile-time warnings when used.
- Two overloaded members
NTV2FormatDescriptor:- New
GetVideoWriteSizefunction.
- New
- Utilities:
- New
GetAudioSamplesPerSecond,NTV2BitfileTypeToStringfunctions.
- New
- Device Features API:
- New
NTV2DeviceCanDoMultiLinkAudio,NTV2DeviceGetNumLUTBanksfunctions.
- New
- Bumped the actively-deprecated APIs and data types from SDK 14.3 to 15.2. If your code compiled under SDK 16.1, and fails to compile under SDK 16.2:
The NTV2 SDK became open-source as of version 17.0. See the open-source documentation for SDK changes after 17.0.