AJA NTV2 SDK  18.0.0.2122
NTV2 SDK 18.0.0.2122
ntv2utils.cpp File Reference

Implementations for the NTV2 utility functions. More...

#include "ajatypes.h"
#include "ntv2utils.h"
#include "ntv2formatdescriptor.h"
#include "ntv2registerexpert.h"
#include "ntv2videodefines.h"
#include "ntv2audiodefines.h"
#include "ntv2endian.h"
#include "ntv2debug.h"
#include "ntv2transcode.h"
#include "ntv2version.h"
#include "ntv2devicefeatures.h"
#include "ajabase/system/lock.h"
#include "ajabase/system/info.h"
#include "ajabase/common/common.h"
#include <algorithm>
#include <sstream>
#include <iomanip>
#include <iterator>
#include <map>
#include "math.h"
#include <fstream>
Include dependency graph for ntv2utils.cpp:

Go to the source code of this file.

Macros

#define NTV2UTILS_ENUM_CASE_RETURN_STR(enum_name)   case(enum_name): return #enum_name
 
#define NTV2UTILS_ENUM_CASE_RETURN_VAL_OR_ENUM_STR(condition, retail_name, enum_name)   case(enum_name): return condition ? retail_name : #enum_name
 
#define M_PI   (3.14159265358979323846)
 

Typedefs

typedef std::set< NTV2FrameRateNTV2FrameRates
 
typedef NTV2FrameRates::const_iterator NTV2FrameRatesConstIter
 
typedef std::vector< NTV2FrameRatesNTV2FrameRateFamilies
 
typedef NTV2FrameRateFamilies::const_iterator NTV2FrameRateFamiliesConstIter
 

Functions

uint32_t CalcRowBytesForFormat (const NTV2FrameBufferFormat inPixelFormat, const uint32_t inPixelWidth)
 
bool UnpackLine_10BitYUVtoUWordSequence (const void *pIn10BitYUVLine, UWordSequence &out16BitYUVLine, ULWord inNumPixels)
 Unpacks a line of NTV2_FBF_10BIT_YCBCR video into 16-bit-per-component YUV data. More...
 
bool UnpackLine_10BitYUVtoUWordSequence (const void *pIn10BitYUVLine, const NTV2FormatDescriptor &inFormatDesc, UWordSequence &out16BitYUVLine)
 Unpacks a line of NTV2_FBF_10BIT_YCBCR video into 16-bit-per-component YUV data. More...
 
bool UnpackLine_10BitARGBtoUWordSequence (const void *pIn10BitARGBLine, const NTV2FormatDescriptor &inFormatDesc, UWordSequence &out16BitARGBLine)
 Unpacks a line of NTV2_FBF_10BIT_ARGB video into 16-bit-per-component ARGB data. More...
 
void UnPack10BitYCbCrBuffer (uint32_t *packedBuffer, uint16_t *ycbcrBuffer, uint32_t numPixels)
 
void PackTo10BitYCbCrBuffer (const uint16_t *ycbcrBuffer, uint32_t *packedBuffer, const uint32_t numPixels)
 
void MakeUnPacked10BitYCbCrBuffer (uint16_t *buffer, uint16_t Y, uint16_t Cb, uint16_t Cr, uint32_t numPixels)
 
void ConvertLineTo8BitYCbCr (const uint16_t *ycbcr10BitBuffer, uint8_t *ycbcr8BitBuffer, const uint32_t numPixels)
 
void ConvertUnpacked10BitYCbCrToPixelFormat (uint16_t *unPackedBuffer, uint32_t *packedBuffer, uint32_t numPixels, NTV2FrameBufferFormat pixelFormat, bool bUseSmpteRange, bool bAlphaFromLuma)
 
void MaskUnPacked10BitYCbCrBuffer (uint16_t *ycbcrUnPackedBuffer, uint16_t signalMask, uint32_t numPixels)
 
void StackQuadrants (uint8_t *pSrc, uint32_t srcWidth, uint32_t srcHeight, uint32_t srcRowBytes, uint8_t *pDst)
 
void CopyFromQuadrant (uint8_t *srcBuffer, uint32_t srcHeight, uint32_t srcRowBytes, uint32_t srcQuadrant, uint8_t *dstBuffer, uint32_t quad13Offset)
 
void CopyToQuadrant (uint8_t *srcBuffer, uint32_t srcHeight, uint32_t srcRowBytes, uint32_t dstQuadrant, uint8_t *dstBuffer, uint32_t quad13Offset)
 
void UnpackLine_10BitYUVto16BitYUV (const ULWord *pIn10BitYUVLine, UWord *pOut16BitYUVLine, const ULWord inNumPixels)
 Unpacks a line of 10-bit-per-component YCbCr video into 16-bit-per-component YCbCr (NTV2_FBF_10BIT_YCBCR) data. More...
 
void PackLine_16BitYUVto10BitYUV (const UWord *pIn16BitYUVLine, ULWord *pOut10BitYUVLine, const ULWord inNumPixels)
 Packs a line of 16-bit-per-component YCbCr (NTV2_FBF_10BIT_YCBCR) video into 10-bit-per-component YCbCr data. More...
 
bool PackLine_UWordSequenceTo10BitYUV (const UWordSequence &in16BitYUVLine, ULWord *pOut10BitYUVLine, const ULWord inNumPixels)
 Packs a line of 16-bit-per-component YCbCr (NTV2_FBF_10BIT_YCBCR) video into 10-bit-per-component YCbCr data. More...
 
bool YUVComponentsTo10BitYUVPackedBuffer (const vector< uint16_t > &inYCbCrLine, NTV2Buffer &inFrameBuffer, const NTV2FormatDescriptor &inDescriptor, const UWord inLineOffset)
 Packs up to one raster line of uint16_t YUV components into an NTV2_FBF_10BIT_YCBCR frame buffer. More...
 
bool UnpackLine_10BitYUVtoU16s (vector< uint16_t > &outYCbCrLine, const NTV2Buffer &inFrameBuffer, const NTV2FormatDescriptor &inDescriptor, const UWord inLineOffset)
 Unpacks up to one raster line of an NTV2_FBF_10BIT_YCBCR frame buffer into an array of uint16_t values containing the 10-bit YUV data. More...
 
void RePackLineDataForYCbCrDPX (ULWord *packedycbcrLine, ULWord numULWords)
 
void UnPack10BitDPXtoRGBAlpha10BitPixel (RGBAlpha10BitPixel *rgba10BitBuffer, const ULWord *DPXLinebuffer, ULWord numPixels, bool bigEndian)
 
void UnPack10BitDPXtoForRP215withEndianSwap (UWord *rawrp215Buffer, ULWord *DPXLinebuffer, ULWord numPixels)
 
void UnPack10BitDPXtoForRP215 (UWord *rawrp215Buffer, ULWord *DPXLinebuffer, ULWord numPixels)
 
void MaskYCbCrLine (UWord *ycbcrLine, UWord signalMask, ULWord numPixels)
 
void Make10BitBlackLine (UWord *pOutLineData, const ULWord inNumPixels)
 Writes a line of unpacked, legal SMPTE 10-bit Y/C black values into the given buffer. More...
 
void Make10BitWhiteLine (UWord *pOutLineData, const ULWord inNumPixels)
 Writes a line of unpacked, legal SMPTE 10-bit Y/C white values into the given buffer. More...
 
void Make10BitLine (UWord *pOutLineData, const UWord Y, const UWord Cb, const UWord Cr, const ULWord inNumPixels)
 
bool Fill10BitYCbCrVideoFrame (void *pBaseVideoAddress, const NTV2Standard inStandard, const NTV2FrameBufferFormat inFBF, const YCbCr10BitPixel inPixelColor, const NTV2VANCMode inVancMode)
 
void Make8BitBlackLine (UByte *lineData, ULWord numPixels, NTV2FrameBufferFormat fbFormat)
 
void Make8BitWhiteLine (UByte *lineData, ULWord numPixels, NTV2FrameBufferFormat fbFormat)
 
void Make8BitLine (UByte *lineData, UByte Y, UByte Cb, UByte Cr, ULWord numPixels, NTV2FrameBufferFormat fbFormat)
 
bool Fill8BitYCbCrVideoFrame (void *pBaseVideoAddress, const NTV2Standard inStandard, const NTV2FrameBufferFormat inFBF, const YCbCrPixel inPixelColor, const NTV2VANCMode inVancMode)
 
void Fill4k8BitYCbCrVideoFrame (PULWord _baseVideoAddress, NTV2FrameBufferFormat frameBufferFormat, YCbCrPixel color, bool vancEnabled, bool b4k, bool wideVANC)
 
void CopyRGBAImageToFrame (ULWord *pSrcBuffer, ULWord srcWidth, ULWord srcHeight, ULWord *pDstBuffer, ULWord dstWidth, ULWord dstHeight)
 
static bool SetRasterLinesBlack8BitYCbCr (UByte *pDstBuffer, const ULWord inDstBytesPerLine, const UWord inDstTotalLines)
 
static bool SetRasterLinesBlack10BitYCbCr (UByte *pDstBuffer, const ULWord inDstBytesPerLine, const UWord inDstTotalLines)
 
static bool SetRasterLinesWhite8BitYCbCr (UByte *pDstBuffer, const ULWord inDstBytesPerLine, const UWord inDstTotalLines)
 
static bool SetRasterLinesWhite10BitYCbCr (UByte *pDstBuffer, const ULWord inDstBytesPerLine, const UWord inDstTotalLines)
 
bool SetRasterLinesBlack (const NTV2PixelFormat inPixelFormat, UByte *pDstBuffer, const ULWord inDstBytesPerLine, const UWord inDstTotalLines)
 Sets all or part of a destination raster image to legal black. More...
 
bool SetRasterLinesWhite (const NTV2PixelFormat inPixelFormat, UByte *pDstBuffer, const ULWord inDstBytesPerLine, const UWord inDstTotalLines)
 Sets all or part of a destination raster image to legal white. More...
 
static const UByteGetReadAddress_2vuy (const UByte *pInFrameBuffer, const ULWord inBytesPerVertLine, const UWord inVertLineOffset, const UWord inHorzPixelOffset, const UWord inBytesPerHorzPixel)
 
static UByteGetWriteAddress_2vuy (UByte *pInFrameBuffer, const ULWord inBytesPerVertLine, const UWord inVertLineOffset, const UWord inHorzPixelOffset, const UWord inBytesPerHorzPixel)
 
static bool CopyRaster4BytesPer2Pixels (UByte *pDstBuffer, const ULWord inDstBytesPerLine, const UWord inDstTotalLines, const UWord inDstVertLineOffset, const UWord inDstHorzPixelOffset, const UByte *pSrcBuffer, const ULWord inSrcBytesPerLine, const UWord inSrcTotalLines, const UWord inSrcVertLineOffset, const UWord inSrcVertLinesToCopy, const UWord inSrcHorzPixelOffset, const UWord inSrcHorzPixelsToCopy)
 
static bool CopyRaster16BytesPer6Pixels (UByte *pDstBuffer, const ULWord inDstBytesPerLine, const UWord inDstTotalLines, const UWord inDstVertLineOffset, const UWord inDstHorzPixelOffset, const UByte *pSrcBuffer, const ULWord inSrcBytesPerLine, const UWord inSrcTotalLines, const UWord inSrcVertLineOffset, const UWord inSrcVertLinesToCopy, const UWord inSrcHorzPixelOffset, const UWord inSrcHorzPixelsToCopy)
 
static bool CopyRaster20BytesPer16Pixels (UByte *pDstBuffer, const ULWord inDstBytesPerLine, const UWord inDstTotalLines, const UWord inDstVertLineOffset, const UWord inDstHorzPixelOffset, const UByte *pSrcBuffer, const ULWord inSrcBytesPerLine, const UWord inSrcTotalLines, const UWord inSrcVertLineOffset, const UWord inSrcVertLinesToCopy, const UWord inSrcHorzPixelOffset, const UWord inSrcHorzPixelsToCopy)
 
static bool CopyRaster36BytesPer8Pixels (UByte *pDstBuffer, const ULWord inDstBytesPerLine, const UWord inDstTotalLines, const UWord inDstVertLineOffset, const UWord inDstHorzPixelOffset, const UByte *pSrcBuffer, const ULWord inSrcBytesPerLine, const UWord inSrcTotalLines, const UWord inSrcVertLineOffset, const UWord inSrcVertLinesToCopy, const UWord inSrcHorzPixelOffset, const UWord inSrcHorzPixelsToCopy)
 
static bool CopyRaster5BytesPerPixel (UByte *pDstBuffer, const ULWord inDstBytesPerLine, const UWord inDstTotalLines, const UWord inDstVertLineOffset, const UWord inDstHorzPixelOffset, const UByte *pSrcBuffer, const ULWord inSrcBytesPerLine, const UWord inSrcTotalLines, const UWord inSrcVertLineOffset, const UWord inSrcVertLinesToCopy, const UWord inSrcHorzPixelOffset, const UWord inSrcHorzPixelsToCopy)
 
static bool CopyRaster4BytesPerPixel (UByte *pDstBuffer, const ULWord inDstBytesPerLine, const UWord inDstTotalLines, const UWord inDstVertLineOffset, const UWord inDstHorzPixelOffset, const UByte *pSrcBuffer, const ULWord inSrcBytesPerLine, const UWord inSrcTotalLines, const UWord inSrcVertLineOffset, const UWord inSrcVertLinesToCopy, const UWord inSrcHorzPixelOffset, const UWord inSrcHorzPixelsToCopy)
 
static bool CopyRaster3BytesPerPixel (UByte *pDstBuffer, const ULWord inDstBytesPerLine, const UWord inDstTotalLines, const UWord inDstVertLineOffset, const UWord inDstHorzPixelOffset, const UByte *pSrcBuffer, const ULWord inSrcBytesPerLine, const UWord inSrcTotalLines, const UWord inSrcVertLineOffset, const UWord inSrcVertLinesToCopy, const UWord inSrcHorzPixelOffset, const UWord inSrcHorzPixelsToCopy)
 
static bool CopyRaster6BytesPerPixel (UByte *pDstBuffer, const ULWord inDstBytesPerLine, const UWord inDstTotalLines, const UWord inDstVertLineOffset, const UWord inDstHorzPixelOffset, const UByte *pSrcBuffer, const ULWord inSrcBytesPerLine, const UWord inSrcTotalLines, const UWord inSrcVertLineOffset, const UWord inSrcVertLinesToCopy, const UWord inSrcHorzPixelOffset, const UWord inSrcHorzPixelsToCopy)
 
bool CopyRaster (const NTV2PixelFormat inPixelFormat, UByte *pDstBuffer, const ULWord inDstBytesPerLine, const UWord inDstTotalLines, const UWord inDstVertLineOffset, const UWord inDstHorzPixelOffset, const UByte *pSrcBuffer, const ULWord inSrcBytesPerLine, const UWord inSrcTotalLines, const UWord inSrcVertLineOffset, const UWord inSrcVertLinesToCopy, const UWord inSrcHorzPixelOffset, const UWord inSrcHorzPixelsToCopy)
 Copies all or part of a source raster image into a destination raster at a given position. More...
 
double GetFramesPerSecond (const NTV2FrameRate inFrameRate)
 
bool GetFramesPerSecond (const NTV2FrameRate inFrameRate, ULWord &outFractionNumerator, ULWord &outFractionDenominator)
 Answers with the given frame rate, in frames per second, as two components: the numerator and denominator of the fractional rate. More...
 
NTV2Standard GetNTV2StandardFromScanGeometry (const UByte inScanGeometry, const bool inIsProgressiveTransport)
 
NTV2VideoFormat GetFirstMatchingVideoFormat (const NTV2FrameRate inFrameRate, const UWord inHeightLines, const UWord inWidthPixels, const bool inIsInterlaced, const bool inIsLevelB, const bool inIsPSF)
 
NTV2VideoFormat GetQuarterSizedVideoFormat (const NTV2VideoFormat inVideoFormat)
 
NTV2VideoFormat GetQuadSizedVideoFormat (const NTV2VideoFormat inVideoFormat, const bool isSquareDivision)
 
NTV2FrameGeometry GetQuarterSizedGeometry (const NTV2FrameGeometry inGeometry)
 
NTV2FrameGeometry Get4xSizedGeometry (const NTV2FrameGeometry inGeometry)
 
NTV2Standard GetQuarterSizedStandard (const NTV2Standard inStandard)
 
NTV2Standard Get4xSizedStandard (const NTV2Standard inStandard, const bool bIs4k)
 
NTV2Standard GetNTV2StandardFromVideoFormat (const NTV2VideoFormat inVideoFormat)
 
NTV2VideoFormat GetSupportedNTV2VideoFormatFromInputVideoFormat (const NTV2VideoFormat inVideoFormat)
 
NTV2FrameGeometry GetNTV2FrameGeometryFromVideoFormat (const NTV2VideoFormat inVideoFormat)
 
ULWord GetVideoActiveSize (const NTV2VideoFormat inVideoFormat, const NTV2FrameBufferFormat inFBFormat, const NTV2VANCMode inVancMode)
 
ULWord GetVideoWriteSize (const NTV2VideoFormat inVideoFormat, const NTV2FrameBufferFormat inFBFormat, const NTV2VANCMode inVancMode)
 Identical to the GetVideoActiveSize function, except rounds the result up to the nearest 4K page size multiple. More...
 
ULWord GetAudioSamplesPerFrame (const NTV2FrameRate inFrameRate, const NTV2AudioRate inAudioRate, ULWord inCadenceFrame, const bool inIsSMPTE372Enabled)
 Returns the number of audio samples for a given video frame rate, audio sample rate, and frame number. This is useful since AJA devices use fixed audio sample rates (typically 48KHz), and some video frame rates will necessarily result in some frames having more audio samples than others. More...
 
LWord64 GetTotalAudioSamplesFromFrameNbrZeroUpToFrameNbr (const NTV2FrameRate inFrameRate, const NTV2AudioRate inAudioRate, const ULWord inFrameNumNonInclusive)
 
double GetAudioSamplesPerSecond (const NTV2AudioRate inAudioRate)
 Returns the audio sample rate as a number of audio samples per second. More...
 
ULWord GetVaricamRepeatCount (const NTV2FrameRate inSequenceRate, const NTV2FrameRate inPlayRate, const ULWord inCadenceFrame)
 
ULWord GetScaleFromFrameRate (const NTV2FrameRate inFrameRate)
 
NTV2FrameRate GetFrameRateFromScale (long scale, long duration, NTV2FrameRate playFrameRate)
 
NTV2FrameRate GetNTV2FrameRateFromNumeratorDenominator (const ULWord inNumerator, const ULWord inDenominator)
 
NTV2FrameRate GetNTV2FrameRateFromVideoFormat (const NTV2VideoFormat videoFormat)
 
NTV2FrameGeometry GetNormalizedFrameGeometry (const NTV2FrameGeometry inFrameGeometry)
 
NTV2FrameGeometry GetVANCFrameGeometry (const NTV2FrameGeometry inFrameGeometry, const NTV2VANCMode inVancMode)
 
NTV2FrameGeometry GetGeometryFromFrameDimensions (const NTV2FrameSize &inFD)
 
bool HasVANCGeometries (const NTV2FrameGeometry inFG)
 
NTV2GeometrySet GetRelatedGeometries (const NTV2FrameGeometry inFG)
 
NTV2VANCMode GetVANCModeForGeometry (const NTV2FrameGeometry inFG)
 
NTV2FrameGeometry GetGeometryFromStandard (const NTV2Standard inStandard)
 
NTV2Standard GetStandardFromGeometry (const NTV2FrameGeometry inGeometry, const bool inIsProgressive)
 
bool NTV2DeviceCanDoFormat (const NTV2DeviceID inDeviceID, const NTV2FrameRate inFrameRate, const NTV2FrameGeometry inFrameGeometry, const NTV2Standard inStandard)
 
ULWord GetNTV2FrameGeometryHeight (const NTV2FrameGeometry inGeometry)
 
ULWord GetNTV2FrameGeometryWidth (const NTV2FrameGeometry inGeometry)
 
ULWord GetDisplayWidth (const NTV2VideoFormat inVideoFormat)
 
ULWord GetDisplayHeight (const NTV2VideoFormat inVideoFormat)
 
int RecordCopyAudio (PULWord pAja, PULWord pSR, int iStartSample, int iNumBytes, int iChan0, int iNumChans, bool bKeepAudio24Bits)
 
bool AddAudioTone (ULWord &outNumBytesWritten, NTV2Buffer &inAudioBuffer, ULWord &inOutCurrentSample, const ULWord inNumSamples, const double inSampleRate, const double inAmplitude, const double inFrequency, const ULWord inNumBitsPerSample, const bool inByteSwap, const ULWord inNumChannels)
 Fills the given buffer with 32-bit (ULWord) audio tone samples. More...
 
ULWord AddAudioTone (ULWord *pAudioBuffer, ULWord &inOutCurrentSample, const ULWord inNumSamples, const double inSampleRate, const double inAmplitude, const double inFrequency, const ULWord inNumBits, const bool inByteSwap, const ULWord inNumChannels)
 Fills the given buffer with 32-bit (ULWord) audio tone samples. More...
 
ULWord AddAudioTone (UWord *pAudioBuffer, ULWord &inOutCurrentSample, const ULWord inNumSamples, const double inSampleRate, const double inAmplitude, const double inFrequency, const ULWord inNumBits, const bool inByteSwap, const ULWord inNumChannels)
 Fills the given buffer with 16-bit (UWord) audio tone samples. More...
 
ULWord AddAudioTone (ULWord *pAudioBuffer, ULWord &inOutCurrentSample, const ULWord inNumSamples, const double inSampleRate, const double *pInAmplitudes, const double *pInFrequencies, const ULWord inNumBits, const bool inByteSwap, const ULWord inNumChannels)
 Fills the given buffer with 32-bit (ULWord) audio tone samples with a different frequency in each audio channel. More...
 
ULWord AddAudioTestPattern (ULWord *pAudioBuffer, ULWord &inOutCurrentSample, const ULWord inNumSamples, const ULWord inModulus, const bool inEndianConvert, const ULWord inNumChannels)
 
std::string NTV2DeviceIDToString (const NTV2DeviceID inValue, const bool inForRetailDisplay)
 
NTV2Channel GetNTV2ChannelForIndex (const ULWord inIndex)
 
ULWord GetIndexForNTV2Channel (const NTV2Channel inChannel)
 
NTV2Channel NTV2CrosspointToNTV2Channel (const NTV2Crosspoint inCrosspointChannel)
 
NTV2Crosspoint GetNTV2CrosspointChannelForIndex (const ULWord index)
 
ULWord GetIndexForNTV2CrosspointChannel (const NTV2Crosspoint channel)
 
NTV2Crosspoint GetNTV2CrosspointInputForIndex (const ULWord index)
 
ULWord GetIndexForNTV2CrosspointInput (const NTV2Crosspoint channel)
 
NTV2Crosspoint GetNTV2CrosspointForIndex (const ULWord index)
 
ULWord GetIndexForNTV2Crosspoint (const NTV2Crosspoint channel)
 
bool IsNTV2CrosspointInput (const NTV2Crosspoint inChannel)
 
bool IsNTV2CrosspointOutput (const NTV2Crosspoint inChannel)
 
NTV2EmbeddedAudioInput NTV2ChannelToEmbeddedAudioInput (const NTV2Channel inChannel)
 Converts the given NTV2Channel value into its equivalent NTV2EmbeddedAudioInput. More...
 
NTV2AudioSystem NTV2ChannelToAudioSystem (const NTV2Channel inChannel)
 Converts the given NTV2Channel value into its equivalent NTV2AudioSystem. More...
 
NTV2EmbeddedAudioInput NTV2InputSourceToEmbeddedAudioInput (const NTV2InputSource inInputSource)
 Converts a given NTV2InputSource to its equivalent NTV2EmbeddedAudioInput value. More...
 
NTV2AudioSource NTV2InputSourceToAudioSource (const NTV2InputSource inInputSource)
 
NTV2Crosspoint NTV2ChannelToInputCrosspoint (const NTV2Channel inChannel)
 
NTV2Crosspoint NTV2ChannelToOutputCrosspoint (const NTV2Channel inChannel)
 
INTERRUPT_ENUMS NTV2ChannelToInputInterrupt (const NTV2Channel inChannel)
 Converts the given NTV2Channel value into the equivalent input INTERRUPT_ENUMS value. More...
 
INTERRUPT_ENUMS NTV2ChannelToOutputInterrupt (const NTV2Channel inChannel)
 Converts the given NTV2Channel value into the equivalent output INTERRUPT_ENUMS value. More...
 
NTV2TCIndex NTV2ChannelToTimecodeIndex (const NTV2Channel inChannel, const bool inEmbeddedLTC, const bool inIsF2)
 Converts the given NTV2Channel value into the equivalent NTV2TCIndex value. More...
 
NTV2TCIndexes GetTCIndexesForSDIConnector (const NTV2Channel inSDI)
 
NTV2Channel NTV2TimecodeIndexToChannel (const NTV2TCIndex inTCIndex)
 Converts the given NTV2TCIndex value into the appropriate NTV2Channel value. More...
 
NTV2InputSource NTV2TimecodeIndexToInputSource (const NTV2TCIndex inTCIndex)
 Converts the given NTV2TCIndex value into the appropriate NTV2InputSource value. More...
 
NTV2Crosspoint NTV2InputSourceToChannelSpec (const NTV2InputSource inInputSource)
 Converts a given NTV2InputSource to its equivalent NTV2Crosspoint value. More...
 
NTV2ReferenceSource NTV2InputSourceToReferenceSource (const NTV2InputSource inInputSource)
 Converts a given NTV2InputSource to its equivalent NTV2ReferenceSource value. More...
 
NTV2Channel NTV2InputSourceToChannel (const NTV2InputSource inInputSource)
 Converts a given NTV2InputSource to its equivalent NTV2Channel value. More...
 
NTV2AudioSystem NTV2InputSourceToAudioSystem (const NTV2InputSource inInputSource)
 Converts a given NTV2InputSource to its equivalent NTV2AudioSystem value. More...
 
NTV2TimecodeIndex NTV2InputSourceToTimecodeIndex (const NTV2InputSource inInputSource, const bool inEmbeddedLTC)
 Converts a given NTV2InputSource to its equivalent NTV2TimecodeIndex value. More...
 
NTV2InputSource NTV2ChannelToInputSource (const NTV2Channel inChannel, const NTV2IOKinds inSourceType)
 
NTV2Channel NTV2OutputDestinationToChannel (const NTV2OutputDestination inOutputDest)
 Converts a given NTV2OutputDestination to its equivalent NTV2Channel value. More...
 
NTV2OutputDestination NTV2ChannelToOutputDestination (const NTV2Channel inChannel, const NTV2IOKinds inKinds)
 Converts the given NTV2Channel value into its ordinary equivalent NTV2OutputDestination. More...
 
NTV2VideoFormat GetTransportCompatibleFormat (const NTV2VideoFormat inFormat, const NTV2VideoFormat inTargetFormat)
 
bool IsTransportCompatibleFormat (const NTV2VideoFormat inFormat1, const NTV2VideoFormat inFormat2)
 
NTV2InputSource GetNTV2InputSourceForIndex (const ULWord inIndex0, const NTV2IOKinds inKinds)
 
NTV2IOKinds GetNTV2InputSourceKind (const NTV2InputSource inSrc)
 
NTV2InputSource GetNTV2HDMIInputSourceForIndex (const ULWord inIndex0)
 
ULWord GetIndexForNTV2InputSource (const NTV2InputSource inValue)
 
ULWord NTV2FramesizeToByteCount (const NTV2Framesize inFrameSize)
 Converts the given NTV2Framesize value into an exact byte count. More...
 
ULWord NTV2AudioBufferSizeToByteCount (const NTV2AudioBufferSize inBufferSize)
 Converts the given NTV2BufferSize value into its exact byte count. More...
 
static bool CheckFrameRateFamiliesInitialized (void)
 
NTV2FrameRate GetFrameRateFamily (const NTV2FrameRate inFrameRate)
 
bool IsMultiFormatCompatible (const NTV2FrameRate inFrameRate1, const NTV2FrameRate inFrameRate2)
 Compares two frame rates and returns true if they are "compatible" (with respect to a multiformat-capable device). More...
 
bool IsMultiFormatCompatible (const NTV2VideoFormat inFormat1, const NTV2VideoFormat inFormat2)
 Compares two video formats and returns true if they are "compatible" (with respect to a multiformat-capable device). More...
 
bool IsPSF (const NTV2VideoFormat format)
 
bool IsProgressivePicture (const NTV2VideoFormat format)
 
bool IsProgressiveTransport (const NTV2VideoFormat format)
 
bool IsProgressiveTransport (const NTV2Standard standard)
 
bool IsRGBFormat (const NTV2FrameBufferFormat format)
 
bool IsYCbCrFormat (const NTV2FrameBufferFormat format)
 
bool IsAlphaChannelFormat (const NTV2FrameBufferFormat format)
 
bool Is2KFormat (const NTV2VideoFormat format)
 
bool Is4KFormat (const NTV2VideoFormat format)
 
bool Is8KFormat (const NTV2VideoFormat format)
 
bool IsRaw (const NTV2FrameBufferFormat frameBufferFormat)
 
bool Is8BitFrameBufferFormat (const NTV2FrameBufferFormat format)
 
bool IsVideoFormatA (const NTV2VideoFormat format)
 
bool IsVideoFormatB (const NTV2VideoFormat format)
 
bool IsVideoFormatJ2KSupported (const NTV2VideoFormat format)
 
NTV2ConversionMode GetConversionMode (const NTV2VideoFormat inFormat, const NTV2VideoFormat outFormat)
 
NTV2VideoFormat GetInputForConversionMode (const NTV2ConversionMode conversionMode)
 
NTV2VideoFormat GetOutputForConversionMode (const NTV2ConversionMode conversionMode)
 
ostream & operator<< (ostream &inOutStream, const NTV2FrameSize &inFrameDimensions)
 
ostream & operator<< (ostream &inOutStream, const NTV2SmpteLineNumber &inSmpteLineNumber)
 
string NTV2ChannelToString (const NTV2Channel inValue, const bool inForRetailDisplay)
 
string NTV2AudioSystemToString (const NTV2AudioSystem inValue, const bool inCompactDisplay)
 
string NTV2AudioRateToString (const NTV2AudioRate inValue, const bool inForRetailDisplay)
 
string NTV2AudioBufferSizeToString (const NTV2AudioBufferSize inValue, const bool inForRetailDisplay)
 
string NTV2AudioLoopBackToString (const NTV2AudioLoopBack inValue, const bool inForRetailDisplay)
 
string NTV2EmbeddedAudioClockToString (const NTV2EmbeddedAudioClock inValue, const bool inForRetailDisplay)
 
string NTV2CrosspointToString (const NTV2Crosspoint inChannel)
 
string NTV2InputCrosspointIDToString (const NTV2InputCrosspointID inValue, const bool inForRetailDisplay)
 
string NTV2OutputCrosspointIDToString (const NTV2OutputCrosspointID inValue, const bool inForRetailDisplay)
 
string NTV2WidgetIDToString (const NTV2WidgetID inValue, const bool inCompactDisplay)
 
string NTV2WidgetTypeToString (const NTV2WidgetType inValue, const bool inCompactDisplay)
 
string NTV2TaskModeToString (const NTV2TaskMode inValue, const bool inCompactDisplay)
 
string NTV2RegNumSetToString (const NTV2RegisterNumberSet &inObj)
 
ostream & operator<< (ostream &inOutStr, const NTV2RegisterNumberSet &inObj)
 
NTV2RegisterNumberSetoperator<< (NTV2RegisterNumberSet &inOutSet, const ULWord inRegisterNumber)
 Adds the given register number to the specified NTV2RegisterNumberSet. More...
 
string NTV2TCIndexToString (const NTV2TCIndex inValue, const bool inCompactDisplay)
 
string NTV2AudioChannelPairToString (const NTV2AudioChannelPair inValue, const bool inCompactDisplay)
 
string NTV2AudioChannelQuadToString (const NTV2Audio4ChannelSelect inValue, const bool inCompactDisplay)
 
string NTV2AudioChannelOctetToString (const NTV2Audio8ChannelSelect inValue, const bool inCompactDisplay)
 
string NTV2FramesizeToString (const NTV2Framesize inValue, const bool inCompactDisplay)
 
string NTV2ModeToString (const NTV2Mode inValue, const bool inCompactDisplay)
 
string NTV2VANCModeToString (const NTV2VANCMode inValue, const bool inCompactDisplay)
 
string NTV2MixerKeyerModeToString (const NTV2MixerKeyerMode inValue, const bool inCompactDisplay)
 
string NTV2MixerInputControlToString (const NTV2MixerKeyerInputControl inValue, const bool inCompactDisplay)
 
string NTV2VideoLimitingToString (const NTV2VideoLimiting inValue, const bool inCompactDisplay)
 
string NTV2BreakoutTypeToString (const NTV2BreakoutType inValue, const bool inCompactDisplay)
 
string NTV2AncDataRgnToStr (const NTV2AncDataRgn inValue, const bool inCompactDisplay)
 
string NTV2UpConvertModeToString (const NTV2UpConvertMode inValue, const bool inCompact)
 
string NTV2DownConvertModeToString (const NTV2DownConvertMode inValue, const bool inCompact)
 
string NTV2ScanMethodToString (const NTV2ScanMethod inValue, const bool inCompact)
 
string NTV2IsoConvertModeToString (const NTV2IsoConvertMode inValue, const bool inCompact)
 
string NTV2HDMIBitDepthToString (const NTV2HDMIBitDepth inValue, const bool inCompact)
 
string NTV2HDMIAudioChannelsToString (const NTV2HDMIAudioChannels inValue, const bool inCompact)
 
string NTV2HDMIProtocolToString (const NTV2HDMIProtocol inValue, const bool inCompact)
 
string NTV2HDMIRangeToString (const NTV2HDMIRange inValue, const bool inCompact)
 
string NTV2HDMIColorSpaceToString (const NTV2HDMIColorSpace inValue, const bool inCompact)
 
string NTV2AudioFormatToString (const NTV2AudioFormat inValue, const bool inCompact)
 
string NTV2EmbeddedAudioInputToString (const NTV2EmbeddedAudioInput inValue, const bool inCompactDisplay)
 
string NTV2AudioSourceToString (const NTV2AudioSource inValue, const bool inCompactDisplay)
 
string NTV2VideoFormatToString (const NTV2VideoFormat inFormat, const bool inUseFrameRate)
 
string NTV2StandardToString (const NTV2Standard inValue, const bool inForRetailDisplay)
 
string NTV2FrameBufferFormatToString (const NTV2FrameBufferFormat inValue, const bool inForRetailDisplay)
 
string NTV2M31VideoPresetToString (const M31VideoPreset inValue, const bool inForRetailDisplay)
 
string NTV2FrameGeometryToString (const NTV2FrameGeometry inValue, const bool inForRetailDisplay)
 defined(NTV2_DEPRECATE_17_6) More...
 
string NTV2FrameRateToString (const NTV2FrameRate inValue, const bool inForRetailDisplay)
 
string NTV2InputSourceToString (const NTV2InputSource inValue, const bool inForRetailDisplay)
 
string NTV2OutputDestinationToString (const NTV2OutputDestination inValue, const bool inForRetailDisplay)
 
string NTV2ReferenceSourceToString (const NTV2ReferenceSource inValue, const bool inForRetailDisplay)
 
string NTV2RegisterWriteModeToString (const NTV2RegisterWriteMode inValue, const bool inForRetailDisplay)
 
std::string NTV2InterruptEnumToString (const INTERRUPT_ENUMS inInterruptEnumValue)
 
std::string NTV2IpErrorEnumToString (const NTV2IpError inIpErrorEnumValue)
 
ostream & operator<< (ostream &inOutStream, const RP188_STRUCT &inObj)
 
string NTV2GetBitfileName (const NTV2DeviceID inBoardID)
 
bool NTV2IsCompatibleBitfileName (const string &inBitfileName, const NTV2DeviceID inDeviceID)
 
NTV2DeviceID NTV2GetDeviceIDFromBitfileName (const string &inBitfileName)
 
string NTV2GetFirmwareFolderPath (const bool inAddTrailingPathDelim)
 
string NTV2GetPluginsFolderPath (const bool inAddTrailingPathDelim)
 
string NTV2GetVDevFolderPath (const bool inAddTrailingPathDelim)
 
NTV2DeviceIDSet NTV2GetSupportedDevices (const NTV2DeviceKinds inKinds)
 Returns an NTV2DeviceIDSet of devices supported by the SDK. More...
 
ostream & operator<< (std::ostream &inOutStr, const NTV2DeviceIDList &inList)
 Handy ostream writer for NTV2DeviceIDList. More...
 
ostream & operator<< (ostream &inOutStr, const NTV2DeviceIDSet &inSet)
 
std::string NTV2GetVersionString (const bool inDetailed)
 
UWord NTV2GetSDKVersionComponent (const int inVersionComponent)
 Returns an SDK version component value. More...
 
string NTV2RegisterNumberToString (const NTV2RegisterNumber inValue)
 
string AutoCircVidProcModeToString (const AutoCircVidProcMode inValue, const bool inCompactDisplay)
 
string NTV2ColorCorrectionModeToString (const NTV2ColorCorrectionMode inValue, const bool inCompactDisplay)
 
string NTV2BitfileTypeToString (const NTV2BitfileType inValue, const bool inCompactDisplay)
 
string NTV2DieTempScaleToString (const NTV2DieTempScale inValue, const bool inUseUTF8)
 
bool convertHDRFloatToRegisterValues (const HDRFloatValues &inFloatValues, HDRRegValues &outRegisterValues)
 
bool convertHDRRegisterToFloatValues (const HDRRegValues &inRegisterValues, HDRFloatValues &outFloatValues)
 
void setHDRDefaultsForBT2020 (HDRRegValues &outRegisterValues)
 
void setHDRDefaultsForDCIP3 (HDRRegValues &outRegisterValues)
 
ostream & operator<< (ostream &inOutStr, const NTV2OutputCrosspointIDs &inList)
 
ostream & operator<< (ostream &inOutStream, const NTV2StringList &inData)
 
ostream & operator<< (ostream &inOutStream, const NTV2StringSet &inData)
 
NTV2RegisterReads FromRegNumSet (const NTV2RegNumSet &inRegNumSet)
 
NTV2RegNumSet ToRegNumSet (const NTV2RegisterReads &inRegReads)
 
bool GetRegNumChanges (const NTV2RegNumSet &inBefore, const NTV2RegNumSet &inAfter, NTV2RegNumSet &outGone, NTV2RegNumSet &outSame, NTV2RegNumSet &outNew)
 
bool GetChangedRegisters (const NTV2RegisterReads &inBefore, const NTV2RegisterReads &inAfter, NTV2RegNumSet &outChanged)
 
string PercentEncode (const string &inStr)
 
string PercentDecode (const string &inStr)
 
bool StringToSerialNum64 (const string &inSerNumStr, uint64_t &outSerNum)
 
string SerialNum64ToString (const uint64_t &inSerNum)
 
static const string AJAMacDriverInfoPlistPath ("/Library/Extensions/AJANTV2.kext/Contents/Info.plist")
 
bool GetInstalledMacDriverVersion (UWord &outMaj, UWord &outMin, UWord &outPt, UWord &outBld, UWord &outType)
 

Variables

static const NTV2TCIndex gChanVITC1 [] = { NTV2_TCINDEX_SDI1, NTV2_TCINDEX_SDI2, NTV2_TCINDEX_SDI3, NTV2_TCINDEX_SDI4, NTV2_TCINDEX_SDI5, NTV2_TCINDEX_SDI6, NTV2_TCINDEX_SDI7, NTV2_TCINDEX_SDI8}
 
static const NTV2TCIndex gChanVITC2 [] = { NTV2_TCINDEX_SDI1_2, NTV2_TCINDEX_SDI2_2, NTV2_TCINDEX_SDI3_2, NTV2_TCINDEX_SDI4_2, NTV2_TCINDEX_SDI5_2, NTV2_TCINDEX_SDI6_2, NTV2_TCINDEX_SDI7_2, NTV2_TCINDEX_SDI8_2}
 
static const NTV2TCIndex gChanATCLTC [] = { NTV2_TCINDEX_SDI1_LTC, NTV2_TCINDEX_SDI2_LTC, NTV2_TCINDEX_SDI3_LTC, NTV2_TCINDEX_SDI4_LTC, NTV2_TCINDEX_SDI5_LTC, NTV2_TCINDEX_SDI6_LTC, NTV2_TCINDEX_SDI7_LTC, NTV2_TCINDEX_SDI8_LTC}
 
static NTV2FrameRateFamilies sFRFamilies
 
static AJALock sFRFamMutex
 
static const char * m31Presets [M31_NUMVIDEOPRESETS]
 

Detailed Description

Implementations for the NTV2 utility functions.

Definition in file ntv2utils.cpp.

Macro Definition Documentation

◆ M_PI

#define M_PI   (3.14159265358979323846)

Definition at line 4409 of file ntv2utils.cpp.

◆ NTV2UTILS_ENUM_CASE_RETURN_STR

#define NTV2UTILS_ENUM_CASE_RETURN_STR (   enum_name)    case(enum_name): return #enum_name

Definition at line 37 of file ntv2utils.cpp.

◆ NTV2UTILS_ENUM_CASE_RETURN_VAL_OR_ENUM_STR

#define NTV2UTILS_ENUM_CASE_RETURN_VAL_OR_ENUM_STR (   condition,
  retail_name,
  enum_name 
)    case(enum_name): return condition ? retail_name : #enum_name

Definition at line 39 of file ntv2utils.cpp.

Typedef Documentation

◆ NTV2FrameRateFamilies

typedef std::vector<NTV2FrameRates> NTV2FrameRateFamilies

Definition at line 5312 of file ntv2utils.cpp.

◆ NTV2FrameRateFamiliesConstIter

typedef NTV2FrameRateFamilies::const_iterator NTV2FrameRateFamiliesConstIter

Definition at line 5313 of file ntv2utils.cpp.

◆ NTV2FrameRates

typedef std::set<NTV2FrameRate> NTV2FrameRates

Definition at line 5310 of file ntv2utils.cpp.

◆ NTV2FrameRatesConstIter

typedef NTV2FrameRates::const_iterator NTV2FrameRatesConstIter

Definition at line 5311 of file ntv2utils.cpp.

Function Documentation

◆ AddAudioTestPattern()

ULWord AddAudioTestPattern ( ULWord pAudioBuffer,
ULWord inOutCurrentSample,
const ULWord  inNumSamples,
const ULWord  inModulus,
const bool  inEndianConvert,
const ULWord  inNumChannels 
)

Definition at line 4587 of file ntv2utils.cpp.

◆ AddAudioTone() [1/4]

bool AddAudioTone ( ULWord outNumBytesWritten,
NTV2Buffer inAudioBuffer,
ULWord inOutCurrentSample,
const ULWord  inNumSamples,
const double  inSampleRate,
const double  inAmplitude,
const double  inFrequency,
const ULWord  inNumBits,
const bool  inByteSwap,
const ULWord  inNumChannels 
)

Fills the given buffer with 32-bit (ULWord) audio tone samples.

Parameters
[out]outNumBytesWrittenReceives the number of bytes written into the buffer.
[in]inAudioBufferSpecifies the buffer to be filled with audio samples. Must be at least 4 x numSamples x numChannels bytes in size.
inOutCurrentSampleOn entry, specifies the sample where waveform generation is to resume. On exit, receives the sample number where waveform generation left off. Zero should be specified for the first invocation of this function.
[in]inNumSamplesSpecifies the number of samples to generate.
[in]inSampleRateSpecifies the sample rate, in samples per second.
[in]inAmplitudeSpecifies the amplitude of the generated tone.
[in]inFrequencySpecifies the frequency of the generated tone, in cycles per second (Hertz).
[in]inNumBitsSpecifies the number of bits per sample. Should be between 8 and 32 (inclusive).
[in]inByteSwapIf true, byte-swaps each 32-bit sample before copying it into the destination buffer.
[in]inNumChannelsSpecifies the number of audio channels to produce.
Returns
True if successful; otherwise false.

Definition at line 4413 of file ntv2utils.cpp.

◆ AddAudioTone() [2/4]

ULWord AddAudioTone ( ULWord pAudioBuffer,
ULWord inOutCurrentSample,
const ULWord  inNumSamples,
const double  inSampleRate,
const double  inAmplitude,
const double  inFrequency,
const ULWord  inNumBits,
const bool  inByteSwap,
const ULWord  inNumChannels 
)

Fills the given buffer with 32-bit (ULWord) audio tone samples.

Parameters
pAudioBufferIf non-NULL, must be a valid pointer to the buffer to be filled with audio samples, and must be at least 4 x numSamples x numChannels bytes in size. Callers may specify NULL to have the function return the required size of the buffer.
inOutCurrentSampleOn entry, specifies the sample where waveform generation is to resume. If audioBuffer is non-NULL, on exit, receives the sample number where waveform generation left off. Callers should specify zero for the first invocation of this function.
[in]inNumSamplesSpecifies the number of samples to generate.
[in]inSampleRateSpecifies the sample rate, in samples per second.
[in]inAmplitudeSpecifies the amplitude of the generated tone.
[in]inFrequencySpecifies the frequency of the generated tone, in cycles per second (Hertz).
[in]inNumBitsSpecifies the number of bits per sample. Should be between 8 and 32 (inclusive).
[in]inByteSwapIf true, byte-swaps each 32-bit sample before copying it into the destination buffer.
[in]inNumChannelsSpecifies the number of audio channels to produce.
Returns
The total number of bytes written into the destination buffer (or if audioBuffer is NULL, the minimum required size of the destination buffer, in bytes).

Definition at line 4461 of file ntv2utils.cpp.

◆ AddAudioTone() [3/4]

ULWord AddAudioTone ( UWord pAudioBuffer,
ULWord inOutCurrentSample,
const ULWord  inNumSamples,
const double  inSampleRate,
const double  inAmplitude,
const double  inFrequency,
const ULWord  inNumBits,
const bool  inByteSwap,
const ULWord  inNumChannels 
)

Fills the given buffer with 16-bit (UWord) audio tone samples.

Parameters
pAudioBufferIf non-NULL, must be a valid pointer to the buffer to be filled with audio samples, and must be at least numSamples*2*numChannels bytes in size. Callers may specify NULL to have the function return the required size of the buffer.
inOutCurrentSampleOn entry, specifies the sample where waveform generation is to resume. If audioBuffer is non-NULL, on exit, receives the sample number where waveform generation left off. Callers should specify zero for the first invocation of this function.
[in]inNumSamplesSpecifies the number of samples to generate.
[in]inSampleRateSpecifies the sample rate, in samples per second.
[in]inAmplitudeSpecifies the amplitude of the generated tone.
[in]inFrequencySpecifies the frequency of the generated tone, in cycles per second (Hertz).
[in]inNumBitsSpecifies the number of bits per sample. Should be between 8 and 16 (inclusive).
[in]inByteSwapIf true, byte-swaps each 16-bit sample before copying it into the destination buffer.
[in]inNumChannelsSpecifies the number of audio channels to produce.
Returns
The total number of bytes written into the destination buffer (or if audioBuffer is NULL, the minimum required size of the destination buffer, in bytes).

Definition at line 4500 of file ntv2utils.cpp.

◆ AddAudioTone() [4/4]

ULWord AddAudioTone ( ULWord pAudioBuffer,
ULWord inOutCurrentSample,
const ULWord  inNumSamples,
const double  inSampleRate,
const double *  pInAmplitudes,
const double *  pInFrequencies,
const ULWord  inNumBits,
const bool  inByteSwap,
const ULWord  inNumChannels 
)

Fills the given buffer with 32-bit (ULWord) audio tone samples with a different frequency in each audio channel.

Parameters
pAudioBufferIf non-NULL, must be a valid pointer to the buffer to be filled with audio samples, and must be at least 4 x numSamples x numChannels bytes in size. Callers may specify NULL to have the function return the required size of the buffer.
inOutCurrentSampleOn entry, specifies the sample where waveform generation is to resume. If audioBuffer is non-NULL, on exit, receives the sample number where waveform generation left off. Callers should specify zero for the first invocation of this function.
[in]inNumSamplesSpecifies the number of samples to generate.
[in]inSampleRateSpecifies the sample rate, in samples per second.
[in]pInAmplitudesA valid, non-NULL pointer to an array of per-channel amplitude values. This array must contain at least "inNumChannels" entries.
[in]pInFrequenciesA valid, non-NULL pointer to an array of per-channel frequency values, in cycles per second (Hertz). This array must contain at least "inNumChannels" entries.
[in]inNumBitsSpecifies the number of bits per sample. Should be between 8 and 32 (inclusive).
[in]inByteSwapIf true, byte-swaps each 32-bit sample before copying it into the destination buffer.
[in]inNumChannelsSpecifies the number of audio channels to produce.
Returns
The total number of bytes written into the destination buffer (or if audioBuffer is NULL, the minimum required size of the destination buffer, in bytes).

Definition at line 4539 of file ntv2utils.cpp.

◆ AJAMacDriverInfoPlistPath()

static const string AJAMacDriverInfoPlistPath ( "/Library/Extensions/AJANTV2.kext/Contents/Info.plist"  )
static

◆ AutoCircVidProcModeToString()

string AutoCircVidProcModeToString ( const AutoCircVidProcMode  inValue,
const bool  inCompactDisplay 
)

Definition at line 7900 of file ntv2utils.cpp.

◆ CalcRowBytesForFormat()

uint32_t CalcRowBytesForFormat ( const NTV2FrameBufferFormat  inPF,
const uint32_t  pixWidth 
)
Deprecated:
This function doesn't support planar pixel formats. Use NTV2FormatDescriptor instead.

Definition at line 46 of file ntv2utils.cpp.

◆ CheckFrameRateFamiliesInitialized()

static bool CheckFrameRateFamiliesInitialized ( void  )
static

Definition at line 5319 of file ntv2utils.cpp.

◆ convertHDRFloatToRegisterValues()

bool convertHDRFloatToRegisterValues ( const HDRFloatValues inFVals,
HDRRegValues outRegVals 
)
Deprecated:
Use HDRFloatValues::toRegValues instead

Definition at line 8018 of file ntv2utils.cpp.

◆ convertHDRRegisterToFloatValues()

bool convertHDRRegisterToFloatValues ( const HDRRegValues inRegVals,
HDRFloatValues outFloatVals 
)
Deprecated:
Use HDRFloatValues::setFromRegValues instead

Definition at line 8023 of file ntv2utils.cpp.

◆ ConvertLineTo8BitYCbCr()

void ConvertLineTo8BitYCbCr ( const uint16_t *  ycbcr10BitBuffer,
uint8_t *  ycbcr8BitBuffer,
const uint32_t  numPixels 
)

Definition at line 244 of file ntv2utils.cpp.

◆ ConvertUnpacked10BitYCbCrToPixelFormat()

void ConvertUnpacked10BitYCbCrToPixelFormat ( uint16_t *  unPackedBuffer,
uint32_t *  packedBuffer,
uint32_t  numPixels,
NTV2FrameBufferFormat  pixelFormat,
bool  bUseSmpteRange,
bool  bAlphaFromLuma 
)

Definition at line 255 of file ntv2utils.cpp.

◆ CopyFromQuadrant()

void CopyFromQuadrant ( uint8_t *  srcBuffer,
uint32_t  srcHeight,
uint32_t  srcRowBytes,
uint32_t  srcQuadrant,
uint8_t *  dstBuffer,
uint32_t  quad13Offset 
)

Definition at line 491 of file ntv2utils.cpp.

◆ CopyRaster()

bool CopyRaster ( const NTV2PixelFormat  inPixelFormat,
UByte pDstBuffer,
const ULWord  inDstBytesPerLine,
const UWord  inDstTotalLines,
const UWord  inDstVertLineOffset,
const UWord  inDstHorzPixelOffset,
const UByte pSrcBuffer,
const ULWord  inSrcBytesPerLine,
const UWord  inSrcTotalLines,
const UWord  inSrcVertLineOffset,
const UWord  inSrcVertLinesToCopy,
const UWord  inSrcHorzPixelOffset,
const UWord  inSrcHorzPixelsToCopy 
)

Copies all or part of a source raster image into a destination raster at a given position.

Parameters
[in]inPixelFormatSpecifies the NTV2PixelFormat of both the destination and source buffers. (Note that many pixel formats are not currently supported.)
pDstBufferSpecifies the starting address of the destination buffer to be modified. Must be non-NULL.
[in]inDstBytesPerLineThe number of bytes per raster line of the destination buffer. Note that this value is used to compute the maximum pixel width of the destination raster. Also note that some pixel formats set constraints on this value (e.g., NTV2_FBF_10BIT_YCBCR requires this be a multiple of 16, while NTV2_FBF_8BIT_YCBCR requires an even number). Must exceed zero.
[in]inDstTotalLinesThe maximum height of the destination buffer, in raster lines. Must exceed zero.
[in]inDstVertLineOffsetSpecifies the vertical line offset into the destination raster where the top edge of the source image will appear. This value must be less than the inDstTotalLines value (i.e., at least one line of the source must appear in the destination).
[in]inDstHorzPixelOffsetSpecifies the horizontal pixel offset into the destination raster where the left edge of the source image will appear. This value must be less than the maximum width of the destination raster (as stipulated by the inDstBytesPerLine parameter). Thus, at least one pixel of the source (the leftmost edge) must appear in the destination (at the right edge). Note that some pixel formats set constraints on this value (e.g., NTV2_FBF_10BIT_YCBCR requires this be a multiple of 6, while NTV2_FBF_8BIT_YCBCR requires this to be even).
[in]pSrcBufferSpecifies the starting address of the source buffer to be copied from. Must be non-NULL.
[in]inSrcBytesPerLineThe number of bytes per raster line of the source buffer. Note that this value is used to compute the maximum pixel width of the source raster. Also note that some pixel formats set constraints on this value (e.g., NTV2_FBF_10BIT_YCBCR requires this be a multiple of 16, while NTV2_FBF_8BIT_YCBCR requires this to be even). Must exceed zero.
[in]inSrcTotalLinesThe maximum height of the source buffer, in raster lines. Must exceed zero.
[in]inSrcVertLineOffsetSpecifies the top edge of the source image to copy. This value must be less than the inSrcTotalLines value.
[in]inSrcVertLinesToCopySpecifies the height of the source image to copy, in lines. This value can be larger than what's possible. The function guarantees that lines past the bottom edge of the source raster will not be accessed. It is not an error to specify zero, although nothing will be copied.
[in]inSrcHorzPixelOffsetSpecifies the left edge of the source image to copy. This value must be less than the maximum width of the source raster (as stipulated by the inSrcBytesPerLine parameter). Note that some pixel formats set constraints on this value (e.g., NTV2_FBF_10BIT_YCBCR requires this be a multiple of 6, while NTV2_FBF_8BIT_YCBCR requires this to be even).
[in]inSrcHorzPixelsToCopySpecifies the width of the source image to copy, in pixels. This value can be larger than what's possible. This function will ensure that pixels past the right edge of the source raster will not be accessed. It is not an error to specify zero, although nothing will be copied. Note that some pixel formats set constraints on this value(e.g., NTV2_FBF_10BIT_YCBCR requires this be a multiple of 6, while NTV2_FBF_8BIT_YCBCR requires this to be even).
Returns
True if successful; otherwise false.
Note
The source and destination buffers MUST have the same pixel format.
The source and destination buffers must NOT point to the same buffer.
The use of unsigned values precludes positioning the source raster above the top line of the destination raster, or to the left of the destination raster's left edge. This function will, however, clip the source raster if it overhangs the bottom and/or right edge of the destination raster.
Bug:

This function doesn't work with planar formats.

Needs implementations for NTV2_FBF_10BIT_YCBCRA, NTV2_FBF_10BIT_RGB_PACKED, NTV2_FBF_10BIT_ARGB, NTV2_FBF_16BIT_ARGB.

Definition at line 1735 of file ntv2utils.cpp.

◆ CopyRaster16BytesPer6Pixels()

static bool CopyRaster16BytesPer6Pixels ( UByte pDstBuffer,
const ULWord  inDstBytesPerLine,
const UWord  inDstTotalLines,
const UWord  inDstVertLineOffset,
const UWord  inDstHorzPixelOffset,
const UByte pSrcBuffer,
const ULWord  inSrcBytesPerLine,
const UWord  inSrcTotalLines,
const UWord  inSrcVertLineOffset,
const UWord  inSrcVertLinesToCopy,
const UWord  inSrcHorzPixelOffset,
const UWord  inSrcHorzPixelsToCopy 
)
static

Definition at line 1330 of file ntv2utils.cpp.

◆ CopyRaster20BytesPer16Pixels()

static bool CopyRaster20BytesPer16Pixels ( UByte pDstBuffer,
const ULWord  inDstBytesPerLine,
const UWord  inDstTotalLines,
const UWord  inDstVertLineOffset,
const UWord  inDstHorzPixelOffset,
const UByte pSrcBuffer,
const ULWord  inSrcBytesPerLine,
const UWord  inSrcTotalLines,
const UWord  inSrcVertLineOffset,
const UWord  inSrcVertLinesToCopy,
const UWord  inSrcHorzPixelOffset,
const UWord  inSrcHorzPixelsToCopy 
)
static

Definition at line 1391 of file ntv2utils.cpp.

◆ CopyRaster36BytesPer8Pixels()

static bool CopyRaster36BytesPer8Pixels ( UByte pDstBuffer,
const ULWord  inDstBytesPerLine,
const UWord  inDstTotalLines,
const UWord  inDstVertLineOffset,
const UWord  inDstHorzPixelOffset,
const UByte pSrcBuffer,
const ULWord  inSrcBytesPerLine,
const UWord  inSrcTotalLines,
const UWord  inSrcVertLineOffset,
const UWord  inSrcVertLinesToCopy,
const UWord  inSrcHorzPixelOffset,
const UWord  inSrcHorzPixelsToCopy 
)
static

Definition at line 1451 of file ntv2utils.cpp.

◆ CopyRaster3BytesPerPixel()

static bool CopyRaster3BytesPerPixel ( UByte pDstBuffer,
const ULWord  inDstBytesPerLine,
const UWord  inDstTotalLines,
const UWord  inDstVertLineOffset,
const UWord  inDstHorzPixelOffset,
const UByte pSrcBuffer,
const ULWord  inSrcBytesPerLine,
const UWord  inSrcTotalLines,
const UWord  inSrcVertLineOffset,
const UWord  inSrcVertLinesToCopy,
const UWord  inSrcHorzPixelOffset,
const UWord  inSrcHorzPixelsToCopy 
)
static

Definition at line 1624 of file ntv2utils.cpp.

◆ CopyRaster4BytesPer2Pixels()

static bool CopyRaster4BytesPer2Pixels ( UByte pDstBuffer,
const ULWord  inDstBytesPerLine,
const UWord  inDstTotalLines,
const UWord  inDstVertLineOffset,
const UWord  inDstHorzPixelOffset,
const UByte pSrcBuffer,
const ULWord  inSrcBytesPerLine,
const UWord  inSrcTotalLines,
const UWord  inSrcVertLineOffset,
const UWord  inSrcVertLinesToCopy,
const UWord  inSrcHorzPixelOffset,
const UWord  inSrcHorzPixelsToCopy 
)
static

Definition at line 1261 of file ntv2utils.cpp.

◆ CopyRaster4BytesPerPixel()

static bool CopyRaster4BytesPerPixel ( UByte pDstBuffer,
const ULWord  inDstBytesPerLine,
const UWord  inDstTotalLines,
const UWord  inDstVertLineOffset,
const UWord  inDstHorzPixelOffset,
const UByte pSrcBuffer,
const ULWord  inSrcBytesPerLine,
const UWord  inSrcTotalLines,
const UWord  inSrcVertLineOffset,
const UWord  inSrcVertLinesToCopy,
const UWord  inSrcHorzPixelOffset,
const UWord  inSrcHorzPixelsToCopy 
)
static

Definition at line 1568 of file ntv2utils.cpp.

◆ CopyRaster5BytesPerPixel()

static bool CopyRaster5BytesPerPixel ( UByte pDstBuffer,
const ULWord  inDstBytesPerLine,
const UWord  inDstTotalLines,
const UWord  inDstVertLineOffset,
const UWord  inDstHorzPixelOffset,
const UByte pSrcBuffer,
const ULWord  inSrcBytesPerLine,
const UWord  inSrcTotalLines,
const UWord  inSrcVertLineOffset,
const UWord  inSrcVertLinesToCopy,
const UWord  inSrcHorzPixelOffset,
const UWord  inSrcHorzPixelsToCopy 
)
static

Definition at line 1512 of file ntv2utils.cpp.

◆ CopyRaster6BytesPerPixel()

static bool CopyRaster6BytesPerPixel ( UByte pDstBuffer,
const ULWord  inDstBytesPerLine,
const UWord  inDstTotalLines,
const UWord  inDstVertLineOffset,
const UWord  inDstHorzPixelOffset,
const UByte pSrcBuffer,
const ULWord  inSrcBytesPerLine,
const UWord  inSrcTotalLines,
const UWord  inSrcVertLineOffset,
const UWord  inSrcVertLinesToCopy,
const UWord  inSrcHorzPixelOffset,
const UWord  inSrcHorzPixelsToCopy 
)
static

Definition at line 1680 of file ntv2utils.cpp.

◆ CopyRGBAImageToFrame()

void CopyRGBAImageToFrame ( ULWord pSrcBuffer,
ULWord  srcWidth,
ULWord  srcHeight,
ULWord pDstBuffer,
ULWord  dstWidth,
ULWord  dstHeight 
)

Definition at line 986 of file ntv2utils.cpp.

◆ CopyToQuadrant()

void CopyToQuadrant ( uint8_t *  srcBuffer,
uint32_t  srcHeight,
uint32_t  srcRowBytes,
uint32_t  dstQuadrant,
uint8_t *  dstBuffer,
uint32_t  quad13Offset 
)

Definition at line 519 of file ntv2utils.cpp.

◆ Fill10BitYCbCrVideoFrame()

bool Fill10BitYCbCrVideoFrame ( void *  pBaseVideoAddress,
const NTV2Standard  inStandard,
const NTV2FrameBufferFormat  inPixelFormat,
const YCbCr10BitPixel  inPixelColor,
const NTV2VANCMode  inVancMode = NTV2_VANCMODE_OFF 
)
Returns
True if successful; otherwise false.

Definition at line 842 of file ntv2utils.cpp.

◆ Fill4k8BitYCbCrVideoFrame()

void Fill4k8BitYCbCrVideoFrame ( PULWord  _baseVideoAddress,
NTV2FrameBufferFormat  frameBufferFormat,
YCbCrPixel  color,
bool  vancEnabled,
bool  b4k,
bool  wideVANC 
)

Definition at line 954 of file ntv2utils.cpp.

◆ Fill8BitYCbCrVideoFrame()

bool Fill8BitYCbCrVideoFrame ( void *  pBaseVideoAddress,
const NTV2Standard  inStandard,
const NTV2FrameBufferFormat  inFBF,
const YCbCrPixel  inPixelColor,
const NTV2VANCMode  inVancMode 
)

Definition at line 937 of file ntv2utils.cpp.

◆ FromRegNumSet()

NTV2RegisterReads FromRegNumSet ( const NTV2RegNumSet inRegNumSet)

Definition at line 8093 of file ntv2utils.cpp.

◆ Get4xSizedGeometry()

NTV2FrameGeometry Get4xSizedGeometry ( const NTV2FrameGeometry  inGeometry)

Definition at line 2328 of file ntv2utils.cpp.

◆ Get4xSizedStandard()

NTV2Standard Get4xSizedStandard ( const NTV2Standard  inStandard,
const bool  bIs4k 
)

Definition at line 2357 of file ntv2utils.cpp.

◆ GetAudioSamplesPerFrame()

ULWord GetAudioSamplesPerFrame ( const NTV2FrameRate  inFrameRate,
const NTV2AudioRate  inAudioRate,
ULWord  inCadenceFrame = 0,
bool  inIsSMPTE372Enabled = false 
)

Returns the number of audio samples for a given video frame rate, audio sample rate, and frame number. This is useful since AJA devices use fixed audio sample rates (typically 48KHz), and some video frame rates will necessarily result in some frames having more audio samples than others.

Parameters
[in]inFrameRateSpecifies a valid video frame rate.
[in]inAudioRateSpecifies a valid audio sample rate.
[in]inCadenceFrameOptionally specifies a frame number for maintaining proper cadence in a frame sequence, for those video frame rates that don't accommodate an even number of audio samples. Defaults to zero.
[in]inIsSMPTE372Optional parameter to support older devices that required two SDI links to output 1080p60, 1080p5994 or 1080p50, even though the device video frame rate would be NTV2_FRAMERATE_3000, NTV2_FRAMERATE_2997, or NTV2_FRAMERATE_2500, respectively. Defaults to false.
Returns
the number of audio samples, or zero upon failure.
See also
See Correlating Audio Samples to Video Frames

defined(NTV2_DEPRECATE_16_0)

defined(NTV2_DEPRECATE_16_0)

defined(NTV2_DEPRECATE_16_0)

Definition at line 2889 of file ntv2utils.cpp.

◆ GetAudioSamplesPerSecond()

double GetAudioSamplesPerSecond ( const NTV2AudioRate  inAudioRate)

Returns the audio sample rate as a number of audio samples per second.

Parameters
[in]inAudioRateSpecifies the audio sample rate.
Returns
The number of audio samples per second, or zero upon failure.
See also
See Correlating Audio Samples to Video Frames

Definition at line 3303 of file ntv2utils.cpp.

◆ GetChangedRegisters()

bool GetChangedRegisters ( const NTV2RegisterReads inBefore,
const NTV2RegisterReads inAfter,
NTV2RegNumSet outChanged 
)

Definition at line 8118 of file ntv2utils.cpp.

◆ GetConversionMode()

NTV2ConversionMode GetConversionMode ( const NTV2VideoFormat  inFormat,
const NTV2VideoFormat  outFormat 
)

Definition at line 5475 of file ntv2utils.cpp.

◆ GetDisplayHeight()

ULWord GetDisplayHeight ( const NTV2VideoFormat  inVideoFormat)

Definition at line 4207 of file ntv2utils.cpp.

◆ GetDisplayWidth()

ULWord GetDisplayWidth ( const NTV2VideoFormat  inVideoFormat)

Definition at line 4199 of file ntv2utils.cpp.

◆ GetFirstMatchingVideoFormat()

NTV2VideoFormat GetFirstMatchingVideoFormat ( const NTV2FrameRate  inFrameRate,
const UWord  inHeightLines,
const UWord  inWidthPixels,
const bool  inIsInterlaced,
const bool  inIsLevelB,
const bool  inIsPSF 
)
Returns
The first NTV2VideoFormat that matches the given frame rate and raster dimensions (and whether it's interlaced or not).
Parameters
[in]inFrameRateSpecifies the frame rate of interest.
[in]inHeightLinesSpecifies the raster height, in lines of visible video.
[in]inWidthPixelsSpecifies the raster width, in pixels.
[in]inIsInterlacedSpecify true for interlaced/psf video, or false for progressive.
[in]inIsLevelBSpecify true for level B, or false for everything else.
[in]inIsPSFSpecify true for segmented format false for everything else.

Definition at line 1921 of file ntv2utils.cpp.

◆ GetFrameRateFamily()

NTV2FrameRate GetFrameRateFamily ( const NTV2FrameRate  inFrameRate)
Returns
The frame rate family that the given NTV2FrameRate belongs to. (This is the NTV2FrameRate of the family having the lowest ordinal value.)
Parameters
[in]inFrameRateSpecifies the frame rate of interest.

Definition at line 5343 of file ntv2utils.cpp.

◆ GetFrameRateFromScale()

NTV2FrameRate GetFrameRateFromScale ( long  scale,
long  duration,
NTV2FrameRate  playFrameRate 
)

Definition at line 3491 of file ntv2utils.cpp.

◆ GetFramesPerSecond() [1/2]

double GetFramesPerSecond ( const NTV2FrameRate  inFrameRate)

defined(NTV2_DEPRECATE_16_0)

Definition at line 1833 of file ntv2utils.cpp.

◆ GetFramesPerSecond() [2/2]

bool GetFramesPerSecond ( const NTV2FrameRate  inFrameRate,
ULWord outFractionNumerator,
ULWord outFractionDenominator 
)

Answers with the given frame rate, in frames per second, as two components: the numerator and denominator of the fractional rate.

Parameters
[in]inFrameRateSpecifies the frame rate of interest.
[out]outFractionNumeratorReceives the numerator of the fractional frame rate. This will be zero if the function returns false.
[out]outFractionDenominatorReceives the denominator of the fractional frame rate. If the function is successful, this will be either 1000 or 1001. This will be zero if the function returns false.
Returns
True if successful; otherwise false.

Definition at line 1868 of file ntv2utils.cpp.

◆ GetGeometryFromFrameDimensions()

NTV2FrameGeometry GetGeometryFromFrameDimensions ( const NTV2FrameSize inFD)
Returns
The first matching NTV2FrameGeometry that matches the given NTV2FrameSize, or NTV2_FG_INVALID if none match.
Parameters
[in]inFDSpecifies the NTV2FrameSize of interest.

Definition at line 3957 of file ntv2utils.cpp.

◆ GetGeometryFromStandard()

NTV2FrameGeometry GetGeometryFromStandard ( const NTV2Standard  inStandard)
Returns
The equivalent normalized (non-VANC) NTV2FrameGeometry value for a given NTV2Standard.
Parameters
[in]inStandardSpecifies the NTV2Standard to be converted into a normalized NTV2FrameGeometry.

Definition at line 4068 of file ntv2utils.cpp.

◆ GetIndexForNTV2Channel()

ULWord GetIndexForNTV2Channel ( const NTV2Channel  inChannel)

Definition at line 4702 of file ntv2utils.cpp.

◆ GetIndexForNTV2Crosspoint()

ULWord GetIndexForNTV2Crosspoint ( const NTV2Crosspoint  channel)

Definition at line 4824 of file ntv2utils.cpp.

◆ GetIndexForNTV2CrosspointChannel()

ULWord GetIndexForNTV2CrosspointChannel ( const NTV2Crosspoint  channel)

Definition at line 4752 of file ntv2utils.cpp.

◆ GetIndexForNTV2CrosspointInput()

ULWord GetIndexForNTV2CrosspointInput ( const NTV2Crosspoint  channel)

Definition at line 4784 of file ntv2utils.cpp.

◆ GetIndexForNTV2InputSource()

ULWord GetIndexForNTV2InputSource ( const NTV2InputSource  inValue)

Definition at line 5274 of file ntv2utils.cpp.

◆ GetInputForConversionMode()

NTV2VideoFormat GetInputForConversionMode ( const NTV2ConversionMode  conversionMode)

Definition at line 5623 of file ntv2utils.cpp.

◆ GetInstalledMacDriverVersion()

bool GetInstalledMacDriverVersion ( UWord outMaj,
UWord outMin,
UWord outPt,
UWord outBld,
UWord outType 
)

Definition at line 8286 of file ntv2utils.cpp.

◆ GetNormalizedFrameGeometry()

NTV2FrameGeometry GetNormalizedFrameGeometry ( const NTV2FrameGeometry  inFrameGeometry)
Returns
The equivalent non-VANC NTV2FrameGeometry value for a given NTV2FrameGeometry.
Parameters
[in]inFrameGeometrySpecifies the NTV2FrameGeometry to be normalized into its non-VANC equivalent.
See also
GetVANCFrameGeometry

Definition at line 3856 of file ntv2utils.cpp.

◆ GetNTV2ChannelForIndex()

NTV2Channel GetNTV2ChannelForIndex ( const ULWord  inIndex)

Definition at line 4697 of file ntv2utils.cpp.

◆ GetNTV2CrosspointChannelForIndex()

NTV2Crosspoint GetNTV2CrosspointChannelForIndex ( const ULWord  index)

Definition at line 4736 of file ntv2utils.cpp.

◆ GetNTV2CrosspointForIndex()

NTV2Crosspoint GetNTV2CrosspointForIndex ( const ULWord  index)

Definition at line 4800 of file ntv2utils.cpp.

◆ GetNTV2CrosspointInputForIndex()

NTV2Crosspoint GetNTV2CrosspointInputForIndex ( const ULWord  index)

Definition at line 4768 of file ntv2utils.cpp.

◆ GetNTV2FrameGeometryFromVideoFormat()

NTV2FrameGeometry GetNTV2FrameGeometryFromVideoFormat ( const NTV2VideoFormat  inVideoFormat)
Returns
The NTV2FrameGeometry that corresponds to the given NTV2VideoFormat.
Parameters
[in]inVideoFormatSpecifies the NTV2VideoFormat of interest.
See also
GetNTV2StandardFromScanGeometry

Definition at line 2644 of file ntv2utils.cpp.

◆ GetNTV2FrameGeometryHeight()

ULWord GetNTV2FrameGeometryHeight ( const NTV2FrameGeometry  inFrameGeometry)
Returns
The height, in lines, of the given NTV2FrameGeometry.
Parameters
[in]inFrameGeometrySpecifies the NTV2FrameGeometry of interest.
See also
GetVANCFrameGeometry

Definition at line 4185 of file ntv2utils.cpp.

◆ GetNTV2FrameGeometryWidth()

ULWord GetNTV2FrameGeometryWidth ( const NTV2FrameGeometry  inFrameGeometry)
Returns
The pixel width of the given NTV2FrameGeometry.
Parameters
[in]inFrameGeometrySpecifies the NTV2FrameGeometry of interest.
See also
GetVANCFrameGeometry

Definition at line 4191 of file ntv2utils.cpp.

◆ GetNTV2FrameRateFromNumeratorDenominator()

NTV2FrameRate GetNTV2FrameRateFromNumeratorDenominator ( const ULWord  inNumerator,
const ULWord  inDenominator 
)

Definition at line 3588 of file ntv2utils.cpp.

◆ GetNTV2FrameRateFromVideoFormat()

NTV2FrameRate GetNTV2FrameRateFromVideoFormat ( const NTV2VideoFormat  inVideoFormat)
Returns
The NTV2FrameRate of the given NTV2VideoFormat.
Parameters
[in]inVideoFormatSpecifies the NTV2VideoFormat of interest.
Note
This function is physical-transport-centric, so "B" formats will answer with the frame rate of a single link. For example, NTV2_FORMAT_1080p_6000_B will result in NTV2_FRAMERATE_3000. See Dual-Link and 3G Overview for more information.

Definition at line 3630 of file ntv2utils.cpp.

◆ GetNTV2HDMIInputSourceForIndex()

NTV2InputSource GetNTV2HDMIInputSourceForIndex ( const ULWord  inIndex0)

Definition at line 5268 of file ntv2utils.cpp.

◆ GetNTV2InputSourceForIndex()

NTV2InputSource GetNTV2InputSourceForIndex ( const ULWord  inIndex0,
const NTV2IOKinds  inKinds = NTV2_IOKINDS_SDI 
)
Returns
The input source that corresponds to an index value, or NTV2_INPUTSOURCE_INVALID upon failure.
Parameters
[in]inIndex0Specifies the unsigned, zero-based integer value to be converted into an equivalent NTV2InputSource.
[in]inKindsOptionally specifies the input source type (SDI, HDMI, Analog, etc.) of interest. Defaults to NTV2_INPUTSOURCES_SDI.

Definition at line 5224 of file ntv2utils.cpp.

◆ GetNTV2InputSourceKind()

NTV2IOKinds GetNTV2InputSourceKind ( const NTV2InputSource  inSrc)
Returns
The NTV2IOKinds classification of the given NTV2InputSource, or NTV2_IOKINDS_NONE upon failure.
Parameters
[in]inSrcSpecifies the input source of interest.

Definition at line 5256 of file ntv2utils.cpp.

◆ GetNTV2StandardFromScanGeometry()

NTV2Standard GetNTV2StandardFromScanGeometry ( const UByte  inScanGeometry,
const bool  inIsProgressiveTransport 
)

Definition at line 1903 of file ntv2utils.cpp.

◆ GetNTV2StandardFromVideoFormat()

NTV2Standard GetNTV2StandardFromVideoFormat ( const NTV2VideoFormat  inVideoFormat)
Returns
The NTV2Standard that corresponds to the given NTV2VideoFormat.
Parameters
[in]inVideoFormatSpecifies the NTV2VideoFormat of interest.
See also
GetNTV2FrameGeometryFromVideoFormat, GetGeometryFromStandard

Definition at line 2375 of file ntv2utils.cpp.

◆ GetOutputForConversionMode()

NTV2VideoFormat GetOutputForConversionMode ( const NTV2ConversionMode  conversionMode)

Definition at line 5667 of file ntv2utils.cpp.

◆ GetQuadSizedVideoFormat()

NTV2VideoFormat GetQuadSizedVideoFormat ( const NTV2VideoFormat  inVideoFormat,
const bool  isSquareDivision 
)

Definition at line 2129 of file ntv2utils.cpp.

◆ GetQuarterSizedGeometry()

NTV2FrameGeometry GetQuarterSizedGeometry ( const NTV2FrameGeometry  inGeometry)

Definition at line 2315 of file ntv2utils.cpp.

◆ GetQuarterSizedStandard()

NTV2Standard GetQuarterSizedStandard ( const NTV2Standard  inStandard)

Definition at line 2340 of file ntv2utils.cpp.

◆ GetQuarterSizedVideoFormat()

NTV2VideoFormat GetQuarterSizedVideoFormat ( const NTV2VideoFormat  inVideoFormat)

Definition at line 1940 of file ntv2utils.cpp.

◆ GetReadAddress_2vuy()

static const UByte* GetReadAddress_2vuy ( const UByte pInFrameBuffer,
const ULWord  inBytesPerVertLine,
const UWord  inVertLineOffset,
const UWord  inHorzPixelOffset,
const UWord  inBytesPerHorzPixel 
)
static

Definition at line 1238 of file ntv2utils.cpp.

◆ GetRegNumChanges()

bool GetRegNumChanges ( const NTV2RegNumSet inBefore,
const NTV2RegNumSet inAfter,
NTV2RegNumSet outGone,
NTV2RegNumSet outSame,
NTV2RegNumSet outNew 
)

Definition at line 8109 of file ntv2utils.cpp.

◆ GetRelatedGeometries()

NTV2GeometrySet GetRelatedGeometries ( const NTV2FrameGeometry  inFrameGeometry)
Returns
An NTV2GeometrySet containing normal, tall and (possibly) taller frame geometries that are associated with the given NTV2FrameGeometry; or an empty set if passed an invalid geometry.
Parameters
[in]inFrameGeometrySpecifies the NTV2FrameGeometry. (Need not be normalized.)
Note
The resulting set will, at the least, contain the given geometry (if valid).
See also
GetVANCFrameGeometry

Definition at line 4002 of file ntv2utils.cpp.

◆ GetScaleFromFrameRate()

ULWord GetScaleFromFrameRate ( const NTV2FrameRate  inFrameRate)

defined(NTV2_DEPRECATE_16_0)

Definition at line 3454 of file ntv2utils.cpp.

◆ GetStandardFromGeometry()

NTV2Standard GetStandardFromGeometry ( const NTV2FrameGeometry  inGeometry,
const bool  inIsProgressive = true 
)
Returns
The equivalent NTV2Standard for the given NTV2FrameGeometry.
Parameters
[in]inGeometrySpecifies the NTV2FrameGeometry to be converted into a NTV2Standard.
[in]inIsProgressiveSpecifies if the resulting Standard should have a progressive transport or not. Defaults to true.

Definition at line 4104 of file ntv2utils.cpp.

◆ GetSupportedNTV2VideoFormatFromInputVideoFormat()

NTV2VideoFormat GetSupportedNTV2VideoFormatFromInputVideoFormat ( const NTV2VideoFormat  inVideoFormat)
Returns
The NTV2VideoFormat that is supported by the device (in frame buffer).
Parameters
[in]inVideoFormatSpecifies the input NTV2VideoFormat of interest.

Definition at line 2598 of file ntv2utils.cpp.

◆ GetTCIndexesForSDIConnector()

NTV2TCIndexes GetTCIndexesForSDIConnector ( const NTV2Channel  inSDIConnector)
Returns
The NTV2TCIndexes that are associated with the given SDI connector.
Parameters
[in]inSDIConnectorThe SDI connector of interest, specified as an NTV2Channel (a zero-based index number).

Definition at line 4970 of file ntv2utils.cpp.

◆ GetTotalAudioSamplesFromFrameNbrZeroUpToFrameNbr()

LWord64 GetTotalAudioSamplesFromFrameNbrZeroUpToFrameNbr ( const NTV2FrameRate  inFrameRate,
const NTV2AudioRate  inAudioRate,
const ULWord  inFrameNumNonInclusive 
)

defined(NTV2_DEPRECATE_16_0)

defined(NTV2_DEPRECATE_16_0)

Definition at line 3146 of file ntv2utils.cpp.

◆ GetTransportCompatibleFormat()

NTV2VideoFormat GetTransportCompatibleFormat ( const NTV2VideoFormat  inFormat,
const NTV2VideoFormat  inTargetFormat 
)

Definition at line 5194 of file ntv2utils.cpp.

◆ GetVANCFrameGeometry()

NTV2FrameGeometry GetVANCFrameGeometry ( const NTV2FrameGeometry  inFrameGeometry,
const NTV2VANCMode  inVancMode 
)
Returns
The equivalent VANC NTV2FrameGeometry value for a given NTV2VANCMode.
Parameters
[in]inFrameGeometrySpecifies the NTV2FrameGeometry to be converted into its VANC equivalent.
[in]inVancModeSpecifies the desired NTV2VANCMode.
See also
GetNormalizedFrameGeometry

Definition at line 3904 of file ntv2utils.cpp.

◆ GetVANCModeForGeometry()

NTV2VANCMode GetVANCModeForGeometry ( const NTV2FrameGeometry  inFrameGeometry)
Returns
The equivalent NTV2VANCMode for a given NTV2FrameGeometry.
Parameters
[in]inFrameGeometrySpecifies the NTV2FrameGeometry.
See also
GetVANCFrameGeometry

Definition at line 4056 of file ntv2utils.cpp.

◆ GetVaricamRepeatCount()

ULWord GetVaricamRepeatCount ( const NTV2FrameRate  inSequenceRate,
const NTV2FrameRate  inPlayRate,
const ULWord  inCadenceFrame 
)

Definition at line 3315 of file ntv2utils.cpp.

◆ GetVideoActiveSize()

ULWord GetVideoActiveSize ( const NTV2VideoFormat  inVideoFormat,
const NTV2FrameBufferFormat  inFBFormat,
const NTV2VANCMode  inVancMode = NTV2_VANCMODE_OFF 
)
Returns
The minimum number of bytes required to store a single frame of video in the given frame buffer format having the given video format, including VANC lines, if any.
Parameters
[in]inVideoFormatSpecifies the video format.
[in]inFBFormatSpecifies the frame buffer format.
[in]inVancModeOptionally specifies the VANC mode. Defaults to OFF (no VANC lines).

Definition at line 2858 of file ntv2utils.cpp.

◆ GetVideoWriteSize()

ULWord GetVideoWriteSize ( const NTV2VideoFormat  inVideoFormat,
const NTV2FrameBufferFormat  inFBFormat,
const NTV2VANCMode  inVancMode = NTV2_VANCMODE_OFF 
)

Identical to the GetVideoActiveSize function, except rounds the result up to the nearest 4K page size multiple.

Returns
The number of bytes required to store a single frame of video in the given frame buffer format having the given video format, including VANC lines, if any, rounded up to the nearest 4096-byte multiple.
Parameters
[in]inVideoFormatSpecifies the video format.
[in]inFBFormatSpecifies the frame buffer format.
[in]inVancModeOptionally specifies the VANC mode. Defaults to OFF (no VANC lines).

Historically, this "nearest 4K page size" was necessary to get high-speed I/O bursting to work between the AJA device and the Windows disk system. The file needed to be opened with FILE_FLAG_NO_BUFFERING to bypass the file system cache.

Definition at line 2875 of file ntv2utils.cpp.

◆ GetWriteAddress_2vuy()

static UByte* GetWriteAddress_2vuy ( UByte pInFrameBuffer,
const ULWord  inBytesPerVertLine,
const UWord  inVertLineOffset,
const UWord  inHorzPixelOffset,
const UWord  inBytesPerHorzPixel 
)
static

Definition at line 1249 of file ntv2utils.cpp.

◆ HasVANCGeometries()

bool HasVANCGeometries ( const NTV2FrameGeometry  inFrameGeometry)
Returns
True if the given NTV2FrameGeometry has tall or taller geometries associated with it; otherwise false.
Parameters
[in]inFrameGeometrySpecifies the NTV2FrameGeometry.
See also
GetVANCFrameGeometry

Definition at line 3966 of file ntv2utils.cpp.

◆ Is2KFormat()

bool Is2KFormat ( const NTV2VideoFormat  format)

Definition at line 5428 of file ntv2utils.cpp.

◆ Is4KFormat()

bool Is4KFormat ( const NTV2VideoFormat  format)

Definition at line 5434 of file ntv2utils.cpp.

◆ Is8BitFrameBufferFormat()

bool Is8BitFrameBufferFormat ( const NTV2FrameBufferFormat  format)

Definition at line 5452 of file ntv2utils.cpp.

◆ Is8KFormat()

bool Is8KFormat ( const NTV2VideoFormat  format)

Definition at line 5440 of file ntv2utils.cpp.

◆ IsAlphaChannelFormat()

bool IsAlphaChannelFormat ( const NTV2FrameBufferFormat  format)

Definition at line 5422 of file ntv2utils.cpp.

◆ IsMultiFormatCompatible() [1/2]

bool IsMultiFormatCompatible ( const NTV2FrameRate  inFrameRate1,
const NTV2FrameRate  inFrameRate2 
)

Compares two frame rates and returns true if they are "compatible" (with respect to a multiformat-capable device).

Parameters
[in]inFrameRate1Specifies one of the frame rates to be compared.
[in]inFrameRate2Specifies another frame rate to be compared.

Definition at line 5357 of file ntv2utils.cpp.

◆ IsMultiFormatCompatible() [2/2]

bool IsMultiFormatCompatible ( const NTV2VideoFormat  inFormat1,
const NTV2VideoFormat  inFormat2 
)

Compares two video formats and returns true if they are "compatible" (with respect to a multiformat-capable device).

Parameters
[in]inFormat1Specifies one of the video formats to be compared.
[in]inFormat2Specifies another video format to be compared.

Definition at line 5376 of file ntv2utils.cpp.

◆ IsNTV2CrosspointInput()

bool IsNTV2CrosspointInput ( const NTV2Crosspoint  inChannel)

Definition at line 4849 of file ntv2utils.cpp.

◆ IsNTV2CrosspointOutput()

bool IsNTV2CrosspointOutput ( const NTV2Crosspoint  inChannel)

Definition at line 4855 of file ntv2utils.cpp.

◆ IsProgressivePicture()

bool IsProgressivePicture ( const NTV2VideoFormat  format)

Definition at line 5391 of file ntv2utils.cpp.

◆ IsProgressiveTransport() [1/2]

bool IsProgressiveTransport ( const NTV2VideoFormat  format)

Definition at line 5397 of file ntv2utils.cpp.

◆ IsProgressiveTransport() [2/2]

bool IsProgressiveTransport ( const NTV2Standard  standard)

Definition at line 5404 of file ntv2utils.cpp.

◆ IsPSF()

bool IsPSF ( const NTV2VideoFormat  format)

Definition at line 5385 of file ntv2utils.cpp.

◆ IsRaw()

bool IsRaw ( const NTV2FrameBufferFormat  frameBufferFormat)

Definition at line 5446 of file ntv2utils.cpp.

◆ IsRGBFormat()

bool IsRGBFormat ( const NTV2FrameBufferFormat  format)

Definition at line 5410 of file ntv2utils.cpp.

◆ IsTransportCompatibleFormat()

bool IsTransportCompatibleFormat ( const NTV2VideoFormat  inFormat1,
const NTV2VideoFormat  inFormat2 
)

Definition at line 5206 of file ntv2utils.cpp.

◆ IsVideoFormatA()

bool IsVideoFormatA ( const NTV2VideoFormat  format)

Definition at line 5458 of file ntv2utils.cpp.

◆ IsVideoFormatB()

bool IsVideoFormatB ( const NTV2VideoFormat  format)

Definition at line 5464 of file ntv2utils.cpp.

◆ IsVideoFormatJ2KSupported()

bool IsVideoFormatJ2KSupported ( const NTV2VideoFormat  format)

Definition at line 5469 of file ntv2utils.cpp.

◆ IsYCbCrFormat()

bool IsYCbCrFormat ( const NTV2FrameBufferFormat  format)

Definition at line 5416 of file ntv2utils.cpp.

◆ Make10BitBlackLine()

void Make10BitBlackLine ( UWord pOutLineData,
const ULWord  inNumPixels = 1920 
)

Writes a line of unpacked, legal SMPTE 10-bit Y/C black values into the given buffer.

Parameters
[in]pOutLineDataA valid, non-NULL pointer to the destination UWord buffer.
[in]inNumPixelsSpecifies the width of the line, in pixels. Defaults to 1920.
Warning
This function performs no error checking. Memory corruption will occur if the destination buffer is smaller than 4 x 'inNumPixels' bytes.
Note
This function writes UNPACKED Y/C values. When I return, the destination buffer will NOT contain NTV2_FBF_10BIT_YCBCR-formatted pixel values. Use PackLine_16BitYUVto10BitYUV to convert to NTV2_FBF_10BIT_YCBCR.

Definition at line 803 of file ntv2utils.cpp.

◆ Make10BitLine()

void Make10BitLine ( UWord pOutLineData,
const UWord  Y,
const UWord  Cb,
const UWord  Cr,
const ULWord  inNumPixels 
)

Definition at line 829 of file ntv2utils.cpp.

◆ Make10BitWhiteLine()

void Make10BitWhiteLine ( UWord pOutLineData,
const ULWord  inNumPixels = 1920 
)

Writes a line of unpacked, legal SMPTE 10-bit Y/C white values into the given buffer.

Parameters
[in]pOutLineDataA valid, non-NULL pointer to the destination UWord buffer.
[in]inNumPixelsSpecifies the width of the line, in pixels. Defaults to 1920.
Warning
This function performs no error checking. Memory corruption will occur if the destination buffer is smaller than 4 x 'inNumPixels' bytes.
Note
This function writes UNPACKED Y/C values. When I return, the destination buffer will NOT contain NTV2_FBF_10BIT_YCBCR-formatted pixel values. Use PackLine_16BitYUVto10BitYUV to convert to NTV2_FBF_10BIT_YCBCR.

Definition at line 816 of file ntv2utils.cpp.

◆ Make8BitBlackLine()

void Make8BitBlackLine ( UByte lineData,
ULWord  numPixels,
NTV2FrameBufferFormat  fbFormat 
)

Definition at line 865 of file ntv2utils.cpp.

◆ Make8BitLine()

void Make8BitLine ( UByte lineData,
UByte  Y,
UByte  Cb,
UByte  Cr,
ULWord  numPixels,
NTV2FrameBufferFormat  fbFormat 
)

Definition at line 911 of file ntv2utils.cpp.

◆ Make8BitWhiteLine()

void Make8BitWhiteLine ( UByte lineData,
ULWord  numPixels,
NTV2FrameBufferFormat  fbFormat 
)

Definition at line 887 of file ntv2utils.cpp.

◆ MakeUnPacked10BitYCbCrBuffer()

void MakeUnPacked10BitYCbCrBuffer ( uint16_t *  buffer,
uint16_t  Y,
uint16_t  Cb,
uint16_t  Cr,
uint32_t  numPixels 
)

Definition at line 229 of file ntv2utils.cpp.

◆ MaskUnPacked10BitYCbCrBuffer()

void MaskUnPacked10BitYCbCrBuffer ( uint16_t *  ycbcrUnPackedBuffer,
uint16_t  signalMask,
uint32_t  numPixels 
)

Definition at line 367 of file ntv2utils.cpp.

◆ MaskYCbCrLine()

void MaskYCbCrLine ( UWord ycbcrLine,
UWord  signalMask,
ULWord  numPixels 
)

Definition at line 728 of file ntv2utils.cpp.

◆ NTV2AncDataRgnToStr()

string NTV2AncDataRgnToStr ( const NTV2AncDataRgn  inValue,
const bool  inCompactDisplay 
)

Definition at line 6577 of file ntv2utils.cpp.

◆ NTV2AudioBufferSizeToByteCount()

ULWord NTV2AudioBufferSizeToByteCount ( const NTV2AudioBufferSize  inBufferSize)

Converts the given NTV2BufferSize value into its exact byte count.

Parameters
[in]inBufferSizeSpecifies the NTV2AudioBufferSize to be converted.
Returns
The equivalent number of bytes.
Note
NTV2 audio systems using 4 MB buffers (0x400000 bytes) will only use the first 0x3FC000 bytes – they won't touch the last 16 KB (0x4000 bytes).

Definition at line 5302 of file ntv2utils.cpp.

◆ NTV2AudioBufferSizeToString()

string NTV2AudioBufferSizeToString ( const NTV2AudioBufferSize  inValue,
const bool  inForRetailDisplay 
)

Definition at line 5769 of file ntv2utils.cpp.

◆ NTV2AudioChannelOctetToString()

string NTV2AudioChannelOctetToString ( const NTV2Audio8ChannelSelect  inValue,
const bool  inCompactDisplay 
)

Definition at line 6455 of file ntv2utils.cpp.

◆ NTV2AudioChannelPairToString()

string NTV2AudioChannelPairToString ( const NTV2AudioChannelPair  inValue,
const bool  inCompactDisplay 
)

Definition at line 6431 of file ntv2utils.cpp.

◆ NTV2AudioChannelQuadToString()

string NTV2AudioChannelQuadToString ( const NTV2Audio4ChannelSelect  inValue,
const bool  inCompactDisplay 
)

Definition at line 6443 of file ntv2utils.cpp.

◆ NTV2AudioFormatToString()

string NTV2AudioFormatToString ( const NTV2AudioFormat  inValue,
const bool  inCompact 
)

Definition at line 6702 of file ntv2utils.cpp.

◆ NTV2AudioLoopBackToString()

string NTV2AudioLoopBackToString ( const NTV2AudioLoopBack  inValue,
const bool  inForRetailDisplay 
)

Definition at line 5781 of file ntv2utils.cpp.

◆ NTV2AudioRateToString()

string NTV2AudioRateToString ( const NTV2AudioRate  inValue,
const bool  inForRetailDisplay 
)

Definition at line 5756 of file ntv2utils.cpp.

◆ NTV2AudioSourceToString()

string NTV2AudioSourceToString ( const NTV2AudioSource  inValue,
const bool  inCompactDisplay 
)

Definition at line 6731 of file ntv2utils.cpp.

◆ NTV2AudioSystemToString()

string NTV2AudioSystemToString ( const NTV2AudioSystem  inValue,
const bool  inCompactDisplay 
)

Definition at line 5745 of file ntv2utils.cpp.

◆ NTV2BitfileTypeToString()

string NTV2BitfileTypeToString ( const NTV2BitfileType  inValue,
const bool  inCompactDisplay 
)

Definition at line 7927 of file ntv2utils.cpp.

◆ NTV2BreakoutTypeToString()

string NTV2BreakoutTypeToString ( const NTV2BreakoutType  inValue,
const bool  inCompactDisplay 
)

Definition at line 6558 of file ntv2utils.cpp.

◆ NTV2ChannelToAudioSystem()

NTV2AudioSystem NTV2ChannelToAudioSystem ( const NTV2Channel  inChannel)

Converts the given NTV2Channel value into its equivalent NTV2AudioSystem.

Parameters
[in]inChannelSpecifies the NTV2Channel to be converted.
Returns
The equivalent NTV2AudioSystem value.

Definition at line 4869 of file ntv2utils.cpp.

◆ NTV2ChannelToEmbeddedAudioInput()

NTV2EmbeddedAudioInput NTV2ChannelToEmbeddedAudioInput ( const NTV2Channel  inChannel)

Converts the given NTV2Channel value into its equivalent NTV2EmbeddedAudioInput.

Parameters
[in]inChannelSpecifies the NTV2Channel to be converted.
Returns
The equivalent NTV2EmbeddedAudioInput value.

Definition at line 4861 of file ntv2utils.cpp.

◆ NTV2ChannelToInputCrosspoint()

NTV2Crosspoint NTV2ChannelToInputCrosspoint ( const NTV2Channel  inChannel)

Definition at line 4915 of file ntv2utils.cpp.

◆ NTV2ChannelToInputInterrupt()

INTERRUPT_ENUMS NTV2ChannelToInputInterrupt ( const NTV2Channel  inChannel)

Converts the given NTV2Channel value into the equivalent input INTERRUPT_ENUMS value.

Parameters
[in]inChannelSpecifies the NTV2Channel to be converted.
Returns
The equivalent input INTERRUPT_ENUMS value.

Definition at line 4937 of file ntv2utils.cpp.

◆ NTV2ChannelToInputSource()

NTV2InputSource NTV2ChannelToInputSource ( const NTV2Channel  inChannel,
const NTV2IOKinds  inKinds = NTV2_IOKINDS_SDI 
)
Parameters
[in]inChannelSpecifies the NTV2Channel to be converted.
[in]inKindsSpecifies the type of input source of interest (SDI, HDMI, etc.). Defaults to SDI.
Returns
The NTV2InputSource value that corresponds to the given NTV2Channel value.

Definition at line 5132 of file ntv2utils.cpp.

◆ NTV2ChannelToOutputCrosspoint()

NTV2Crosspoint NTV2ChannelToOutputCrosspoint ( const NTV2Channel  inChannel)

Definition at line 4926 of file ntv2utils.cpp.

◆ NTV2ChannelToOutputDestination()

NTV2OutputDestination NTV2ChannelToOutputDestination ( const NTV2Channel  inChannel,
const NTV2IOKinds  inKinds = NTV2_IOKINDS_SDI 
)

Converts the given NTV2Channel value into its ordinary equivalent NTV2OutputDestination.

Parameters
[in]inChannelSpecifies the NTV2Channel to be converted.
[in]inKindsSpecifies the type of output destination of interest (SDI, HDMI, etc.). Defaults to SDI.
Returns
The equivalent NTV2OutputDestination value.

Definition at line 5167 of file ntv2utils.cpp.

◆ NTV2ChannelToOutputInterrupt()

INTERRUPT_ENUMS NTV2ChannelToOutputInterrupt ( const NTV2Channel  inChannel)

Converts the given NTV2Channel value into the equivalent output INTERRUPT_ENUMS value.

Parameters
[in]inChannelSpecifies the NTV2Channel to be converted.
Returns
The equivalent output INTERRUPT_ENUMS value.

Definition at line 4947 of file ntv2utils.cpp.

◆ NTV2ChannelToString()

string NTV2ChannelToString ( const NTV2Channel  inValue,
const bool  inForRetailDisplay 
)

Definition at line 5727 of file ntv2utils.cpp.

◆ NTV2ChannelToTimecodeIndex()

NTV2TCIndex NTV2ChannelToTimecodeIndex ( const NTV2Channel  inChannel,
const bool  inEmbeddedLTC = false,
const bool  inIsF2 = false 
)

Converts the given NTV2Channel value into the equivalent NTV2TCIndex value.

Parameters
[in]inChannelSpecifies the NTV2Channel to be converted.
[in]inEmbeddedLTCSpecify true for embedded LTC. Defaults to false.
[in]inIsF2Specify true for VITC2. Defaults to false.
Returns
The equivalent NTV2TCIndex value.

Definition at line 4962 of file ntv2utils.cpp.

◆ NTV2ColorCorrectionModeToString()

string NTV2ColorCorrectionModeToString ( const NTV2ColorCorrectionMode  inValue,
const bool  inCompactDisplay 
)

Definition at line 7914 of file ntv2utils.cpp.

◆ NTV2CrosspointToNTV2Channel()

NTV2Channel NTV2CrosspointToNTV2Channel ( const NTV2Crosspoint  inCrosspointChannel)

Definition at line 4708 of file ntv2utils.cpp.

◆ NTV2CrosspointToString()

string NTV2CrosspointToString ( const NTV2Crosspoint  inChannel)

Definition at line 5805 of file ntv2utils.cpp.

◆ NTV2DeviceCanDoFormat()

bool NTV2DeviceCanDoFormat ( const NTV2DeviceID  inDevID,
const NTV2FrameRate  inFR,
const NTV2FrameGeometry  inFG,
const NTV2Standard  inStd 
)
Parameters
[in]inDevIDSpecifies the NTV2DeviceID of the device of interest.
[in]inFRSpecifies the NTV2FrameRate of interest.
[in]inFGSpecifies the NTV2FrameGeometry of interest.
[in]inStdSpecifies the NTV2Standard of interest.
Deprecated:
This function is deprecated.
Note
The implementation of this function is very inefficient. Do not call it every frame.
Returns
True if the device having the given NTV2DeviceID supports the given frame rate, geometry and standard.

Definition at line 4158 of file ntv2utils.cpp.

◆ NTV2DeviceIDToString()

std::string NTV2DeviceIDToString ( const NTV2DeviceID  inValue,
const bool  inForRetailDisplay 
)

Definition at line 4608 of file ntv2utils.cpp.

◆ NTV2DieTempScaleToString()

string NTV2DieTempScaleToString ( const NTV2DieTempScale  inValue,
const bool  inUseUTF8 
)

Definition at line 8008 of file ntv2utils.cpp.

◆ NTV2DownConvertModeToString()

string NTV2DownConvertModeToString ( const NTV2DownConvertMode  inValue,
const bool  inCompact 
)

Definition at line 6605 of file ntv2utils.cpp.

◆ NTV2EmbeddedAudioClockToString()

string NTV2EmbeddedAudioClockToString ( const NTV2EmbeddedAudioClock  inValue,
const bool  inForRetailDisplay 
)

Definition at line 5793 of file ntv2utils.cpp.

◆ NTV2EmbeddedAudioInputToString()

string NTV2EmbeddedAudioInputToString ( const NTV2EmbeddedAudioInput  inValue,
const bool  inCompactDisplay 
)

Definition at line 6713 of file ntv2utils.cpp.

◆ NTV2FrameBufferFormatToString()

string NTV2FrameBufferFormatToString ( const NTV2FrameBufferFormat  inValue,
const bool  inForRetailDisplay 
)

Definition at line 6936 of file ntv2utils.cpp.

◆ NTV2FrameGeometryToString()

string NTV2FrameGeometryToString ( const NTV2FrameGeometry  inValue,
const bool  inForRetailDisplay 
)

defined(NTV2_DEPRECATE_17_6)

Definition at line 7316 of file ntv2utils.cpp.

◆ NTV2FrameRateToString()

string NTV2FrameRateToString ( const NTV2FrameRate  inValue,
const bool  inForRetailDisplay 
)

defined(NTV2_DEPRECATE_16_0)

Definition at line 7346 of file ntv2utils.cpp.

◆ NTV2FramesizeToByteCount()

ULWord NTV2FramesizeToByteCount ( const NTV2Framesize  inFrameSize)

Converts the given NTV2Framesize value into an exact byte count.

Parameters
[in]inFrameSizeSpecifies the NTV2Framesize to be converted.
Returns
The equivalent number of bytes.

Definition at line 5287 of file ntv2utils.cpp.

◆ NTV2FramesizeToString()

string NTV2FramesizeToString ( const NTV2Framesize  inValue,
const bool  inCompactDisplay 
)

Definition at line 6467 of file ntv2utils.cpp.

◆ NTV2GetBitfileName()

string NTV2GetBitfileName ( const NTV2DeviceID  inBoardID)

Definition at line 7567 of file ntv2utils.cpp.

◆ NTV2GetDeviceIDFromBitfileName()

NTV2DeviceID NTV2GetDeviceIDFromBitfileName ( const string &  inBitfileName)

Definition at line 7671 of file ntv2utils.cpp.

◆ NTV2GetFirmwareFolderPath()

string NTV2GetFirmwareFolderPath ( const bool  inAddTrailingPathDelim)

Definition at line 7693 of file ntv2utils.cpp.

◆ NTV2GetPluginsFolderPath()

string NTV2GetPluginsFolderPath ( const bool  inAddTrailingPathDelim)

Definition at line 7705 of file ntv2utils.cpp.

◆ NTV2GetSDKVersionComponent()

UWord NTV2GetSDKVersionComponent ( const int  inVersionComponent = 0)

Returns an SDK version component value.

Parameters
[in]inVersionComponentOptionally specifies which version component to return. Legal values are 0 (major version), 1 (minor version), 2 (point or "dot" version), and 3 (build number). Defaults to 0 (the major version).
Returns
The value of the requested version component, or zero if an invalid version component is specified.

Definition at line 7880 of file ntv2utils.cpp.

◆ NTV2GetSupportedDevices()

NTV2DeviceIDSet NTV2GetSupportedDevices ( const NTV2DeviceKinds  inKinds = NTV2_DEVICEKIND_ALL)

Returns an NTV2DeviceIDSet of devices supported by the SDK.

Parameters
[in]inKindsOptionally specifies an NTV2DeviceKinds filter. Defaults to NTV2_DEVICEKIND_ALL.
Returns
An NTV2DeviceIDSet of devices supported by the SDK.

Definition at line 7730 of file ntv2utils.cpp.

◆ NTV2GetVDevFolderPath()

string NTV2GetVDevFolderPath ( const bool  inAddTrailingPathDelim)

Definition at line 7717 of file ntv2utils.cpp.

◆ NTV2GetVersionString()

std::string NTV2GetVersionString ( const bool  inDetailed)

Definition at line 7868 of file ntv2utils.cpp.

◆ NTV2HDMIAudioChannelsToString()

string NTV2HDMIAudioChannelsToString ( const NTV2HDMIAudioChannels  inValue,
const bool  inCompact 
)

Definition at line 6657 of file ntv2utils.cpp.

◆ NTV2HDMIBitDepthToString()

string NTV2HDMIBitDepthToString ( const NTV2HDMIBitDepth  inValue,
const bool  inCompact 
)

Definition at line 6645 of file ntv2utils.cpp.

◆ NTV2HDMIColorSpaceToString()

string NTV2HDMIColorSpaceToString ( const NTV2HDMIColorSpace  inValue,
const bool  inCompact 
)

Definition at line 6690 of file ntv2utils.cpp.

◆ NTV2HDMIProtocolToString()

string NTV2HDMIProtocolToString ( const NTV2HDMIProtocol  inValue,
const bool  inCompact 
)

Definition at line 6668 of file ntv2utils.cpp.

◆ NTV2HDMIRangeToString()

string NTV2HDMIRangeToString ( const NTV2HDMIRange  inValue,
const bool  inCompact 
)

Definition at line 6679 of file ntv2utils.cpp.

◆ NTV2InputCrosspointIDToString()

string NTV2InputCrosspointIDToString ( const NTV2InputCrosspointID  inValue,
const bool  inForRetailDisplay 
)

Definition at line 5814 of file ntv2utils.cpp.

◆ NTV2InputSourceToAudioSource()

NTV2AudioSource NTV2InputSourceToAudioSource ( const NTV2InputSource  inInputSource)
Parameters
[in]inInputSourceSpecifies the NTV2InputSource.
Returns
The NTV2AudioSource that corresponds to the given NTV2InputSource.

Definition at line 4901 of file ntv2utils.cpp.

◆ NTV2InputSourceToAudioSystem()

NTV2AudioSystem NTV2InputSourceToAudioSystem ( const NTV2InputSource  inInputSource)

Converts a given NTV2InputSource to its equivalent NTV2AudioSystem value.

Parameters
[in]inInputSourceSpecifies the NTV2InputSource to be converted.
Returns
The equivalent NTV2AudioSystem value.

Definition at line 5071 of file ntv2utils.cpp.

◆ NTV2InputSourceToChannel()

NTV2Channel NTV2InputSourceToChannel ( const NTV2InputSource  inInputSource)

Converts a given NTV2InputSource to its equivalent NTV2Channel value.

Parameters
[in]inInputSourceSpecifies the NTV2InputSource to be converted.
Returns
The equivalent NTV2Channel value.

Definition at line 5047 of file ntv2utils.cpp.

◆ NTV2InputSourceToChannelSpec()

NTV2Crosspoint NTV2InputSourceToChannelSpec ( const NTV2InputSource  inInputSource)

Converts a given NTV2InputSource to its equivalent NTV2Crosspoint value.

Parameters
[in]inInputSourceSpecifies the NTV2InputSource to be converted.
Returns
The equivalent NTV2Crosspoint value.

Definition at line 4999 of file ntv2utils.cpp.

◆ NTV2InputSourceToEmbeddedAudioInput()

NTV2EmbeddedAudioInput NTV2InputSourceToEmbeddedAudioInput ( const NTV2InputSource  inInputSource)

Converts a given NTV2InputSource to its equivalent NTV2EmbeddedAudioInput value.

Parameters
[in]inInputSourceSpecifies the NTV2InputSource to be converted.
Returns
The equivalent NTV2EmbeddedAudioInput value.

Definition at line 4877 of file ntv2utils.cpp.

◆ NTV2InputSourceToReferenceSource()

NTV2ReferenceSource NTV2InputSourceToReferenceSource ( const NTV2InputSource  inInputSource)

Converts a given NTV2InputSource to its equivalent NTV2ReferenceSource value.

Parameters
[in]inInputSourceSpecifies the NTV2InputSource to be converted.
Returns
The equivalent NTV2ReferenceSource value.

Definition at line 5023 of file ntv2utils.cpp.

◆ NTV2InputSourceToString()

string NTV2InputSourceToString ( const NTV2InputSource  inValue,
const bool  inForRetailDisplay 
)

Definition at line 7377 of file ntv2utils.cpp.

◆ NTV2InputSourceToTimecodeIndex()

NTV2TimecodeIndex NTV2InputSourceToTimecodeIndex ( const NTV2InputSource  inInputSource,
const bool  inEmbeddedLTC = false 
)

Converts a given NTV2InputSource to its equivalent NTV2TimecodeIndex value.

Parameters
[in]inInputSourceSpecifies the NTV2InputSource to be converted.
[in]inEmbeddedLTCSpecify true for embedded ATC LTC. Defaults to false.
Returns
The equivalent NTV2TimecodeIndex value.

Definition at line 5095 of file ntv2utils.cpp.

◆ NTV2InterruptEnumToString()

std::string NTV2InterruptEnumToString ( const INTERRUPT_ENUMS  inInterruptEnumValue)

Definition at line 7462 of file ntv2utils.cpp.

◆ NTV2IpErrorEnumToString()

std::string NTV2IpErrorEnumToString ( const NTV2IpError  inIpErrorEnumValue)

Definition at line 7512 of file ntv2utils.cpp.

◆ NTV2IsCompatibleBitfileName()

bool NTV2IsCompatibleBitfileName ( const string &  inBitfileName,
const NTV2DeviceID  inDeviceID 
)

Definition at line 7647 of file ntv2utils.cpp.

◆ NTV2IsoConvertModeToString()

string NTV2IsoConvertModeToString ( const NTV2IsoConvertMode  inValue,
const bool  inCompact 
)

Definition at line 6630 of file ntv2utils.cpp.

◆ NTV2M31VideoPresetToString()

string NTV2M31VideoPresetToString ( const M31VideoPreset  val,
const bool  retailDisplay = false 
)
Deprecated:
New in SDK 12.0, removed in SDK 17.6

Definition at line 7144 of file ntv2utils.cpp.

◆ NTV2MixerInputControlToString()

string NTV2MixerInputControlToString ( const NTV2MixerKeyerInputControl  inValue,
const bool  inCompactDisplay 
)

Definition at line 6532 of file ntv2utils.cpp.

◆ NTV2MixerKeyerModeToString()

string NTV2MixerKeyerModeToString ( const NTV2MixerKeyerMode  inValue,
const bool  inCompactDisplay 
)

Definition at line 6518 of file ntv2utils.cpp.

◆ NTV2ModeToString()

string NTV2ModeToString ( const NTV2Mode  inValue,
const bool  inCompactDisplay 
)

Definition at line 6493 of file ntv2utils.cpp.

◆ NTV2OutputCrosspointIDToString()

string NTV2OutputCrosspointIDToString ( const NTV2OutputCrosspointID  inValue,
const bool  inForRetailDisplay 
)

Definition at line 5957 of file ntv2utils.cpp.

◆ NTV2OutputDestinationToChannel()

NTV2Channel NTV2OutputDestinationToChannel ( const NTV2OutputDestination  inOutputDest)

Converts a given NTV2OutputDestination to its equivalent NTV2Channel value.

Parameters
[in]inOutputDestSpecifies the NTV2OutputDestination to be converted.
Returns
The equivalent NTV2Channel value.

Definition at line 5155 of file ntv2utils.cpp.

◆ NTV2OutputDestinationToString()

string NTV2OutputDestinationToString ( const NTV2OutputDestination  inValue,
const bool  inForRetailDisplay 
)

Definition at line 7400 of file ntv2utils.cpp.

◆ NTV2ReferenceSourceToString()

string NTV2ReferenceSourceToString ( const NTV2ReferenceSource  inValue,
const bool  inForRetailDisplay 
)

Definition at line 7420 of file ntv2utils.cpp.

◆ NTV2RegisterNumberToString()

string NTV2RegisterNumberToString ( const NTV2RegisterNumber  inValue)

Definition at line 7894 of file ntv2utils.cpp.

◆ NTV2RegisterWriteModeToString()

string NTV2RegisterWriteModeToString ( const NTV2RegisterWriteMode  inValue,
const bool  inForRetailDisplay 
)

Definition at line 7449 of file ntv2utils.cpp.

◆ NTV2RegNumSetToString()

string NTV2RegNumSetToString ( const NTV2RegisterNumberSet inObj)

Definition at line 6366 of file ntv2utils.cpp.

◆ NTV2ScanMethodToString()

string NTV2ScanMethodToString ( const NTV2ScanMethod  inValue,
const bool  inCompact 
)

Definition at line 6618 of file ntv2utils.cpp.

◆ NTV2StandardToString()

string NTV2StandardToString ( const NTV2Standard  inValue,
const bool  inForRetailDisplay 
)

Definition at line 6910 of file ntv2utils.cpp.

◆ NTV2TaskModeToString()

string NTV2TaskModeToString ( const NTV2TaskMode  inValue,
const bool  inCompactDisplay 
)

Definition at line 6353 of file ntv2utils.cpp.

◆ NTV2TCIndexToString()

string NTV2TCIndexToString ( const NTV2TCIndex  inValue,
const bool  inCompactDisplay 
)

Definition at line 6394 of file ntv2utils.cpp.

◆ NTV2TimecodeIndexToChannel()

NTV2Channel NTV2TimecodeIndexToChannel ( const NTV2TCIndex  inTCIndex)

Converts the given NTV2TCIndex value into the appropriate NTV2Channel value.

Parameters
[in]inTCIndexSpecifies the NTV2TCIndex to be converted.
Returns
The equivalent NTV2Channel value.

Definition at line 4979 of file ntv2utils.cpp.

◆ NTV2TimecodeIndexToInputSource()

NTV2InputSource NTV2TimecodeIndexToInputSource ( const NTV2TCIndex  inTCIndex)

Converts the given NTV2TCIndex value into the appropriate NTV2InputSource value.

Parameters
[in]inTCIndexSpecifies the NTV2TCIndex to be converted.
Returns
The equivalent NTV2InputSource value.

Definition at line 4988 of file ntv2utils.cpp.

◆ NTV2UpConvertModeToString()

string NTV2UpConvertModeToString ( const NTV2UpConvertMode  inValue,
const bool  inCompact 
)

Definition at line 6591 of file ntv2utils.cpp.

◆ NTV2VANCModeToString()

string NTV2VANCModeToString ( const NTV2VANCMode  inValue,
const bool  inCompactDisplay 
)

Definition at line 6505 of file ntv2utils.cpp.

◆ NTV2VideoFormatToString()

string NTV2VideoFormatToString ( const NTV2VideoFormat  inFormat,
const bool  inUseFrameRate 
)

Definition at line 6746 of file ntv2utils.cpp.

◆ NTV2VideoLimitingToString()

string NTV2VideoLimitingToString ( const NTV2VideoLimiting  inValue,
const bool  inCompactDisplay 
)

Definition at line 6545 of file ntv2utils.cpp.

◆ NTV2WidgetIDToString()

string NTV2WidgetIDToString ( const NTV2WidgetID  inValue,
const bool  inCompactDisplay 
)

Definition at line 6162 of file ntv2utils.cpp.

◆ NTV2WidgetTypeToString()

string NTV2WidgetTypeToString ( const NTV2WidgetType  inValue,
const bool  inCompactDisplay 
)

Definition at line 6301 of file ntv2utils.cpp.

◆ operator<<() [1/10]

ostream& operator<< ( ostream &  inOutStream,
const NTV2FrameSize inFrameDimensions 
)

Definition at line 5715 of file ntv2utils.cpp.

◆ operator<<() [2/10]

ostream& operator<< ( ostream &  inOutStream,
const NTV2SmpteLineNumber inSmpteLineNumber 
)

Definition at line 5721 of file ntv2utils.cpp.

◆ operator<<() [3/10]

ostream& operator<< ( ostream &  inOutStr,
const NTV2RegisterNumberSet inObj 
)

Definition at line 6374 of file ntv2utils.cpp.

◆ operator<<() [4/10]

NTV2RegisterNumberSet& operator<< ( NTV2RegisterNumberSet inOutSet,
const ULWord  inRegisterNumber 
)

Adds the given register number to the specified NTV2RegisterNumberSet.

Parameters
inOutSetSpecifies the NTV2RegisterNumberSet to be added to.
[in]inRegisterNumberSpecifies the NTV2RegisterNumber to add to the set.
Returns
A non-constant reference to the specified NTV2RegisterNumberSet.

Definition at line 6387 of file ntv2utils.cpp.

◆ operator<<() [5/10]

ostream& operator<< ( ostream &  inOutStream,
const RP188_STRUCT inObj 
)

Definition at line 7558 of file ntv2utils.cpp.

◆ operator<<() [6/10]

ostream& operator<< ( std::ostream &  inOutStr,
const NTV2DeviceIDList inList 
)

Handy ostream writer for NTV2DeviceIDList.

Definition at line 7853 of file ntv2utils.cpp.

◆ operator<<() [7/10]

ostream& operator<< ( ostream &  inOutStr,
const NTV2DeviceIDSet inSet 
)

Definition at line 7860 of file ntv2utils.cpp.

◆ operator<<() [8/10]

ostream& operator<< ( ostream &  inOutStr,
const NTV2OutputCrosspointIDs inList 
)

Definition at line 8040 of file ntv2utils.cpp.

◆ operator<<() [9/10]

ostream& operator<< ( ostream &  inOutStream,
const NTV2StringList inData 
)

Definition at line 8070 of file ntv2utils.cpp.

◆ operator<<() [10/10]

ostream& operator<< ( ostream &  inOutStream,
const NTV2StringSet inData 
)

Definition at line 8081 of file ntv2utils.cpp.

◆ PackLine_16BitYUVto10BitYUV()

void PackLine_16BitYUVto10BitYUV ( const UWord pIn16BitYUVLine,
ULWord pOut10BitYUVLine,
const ULWord  inNumPixels 
)

Packs a line of 16-bit-per-component YCbCr (NTV2_FBF_10BIT_YCBCR) video into 10-bit-per-component YCbCr data.

Parameters
[in]pIn16BitYUVLineA valid, non-NULL pointer to the input buffer that contains the 16-bit-per-component YUV data to be converted into 10-bit-per-component YUV.
[out]pOut10BitYUVLineA valid, non-NULL pointer to the output buffer to receive the packed 10-bit-per-component YUV data.
[in]inNumPixelsSpecifies the width of the line to be converted, in pixels.

Definition at line 564 of file ntv2utils.cpp.

◆ PackLine_UWordSequenceTo10BitYUV()

bool PackLine_UWordSequenceTo10BitYUV ( const UWordSequence in16BitYUVLine,
ULWord pOut10BitYUVLine,
const ULWord  inNumPixels 
)

Packs a line of 16-bit-per-component YCbCr (NTV2_FBF_10BIT_YCBCR) video into 10-bit-per-component YCbCr data.

Parameters
[in]in16BitYUVLineThe UWordSequence that contains the 16-bit-per-component YUV data to be converted into 10-bit-per-component YUV.
[out]pOut10BitYUVLineA valid, non-NULL pointer to the output buffer to receive the packed 10-bit-per-component YUV data.
[in]inNumPixelsSpecifies the width of the line to be converted, in pixels.
Returns
True if successful; otherwise false.

Definition at line 581 of file ntv2utils.cpp.

◆ PackTo10BitYCbCrBuffer()

void PackTo10BitYCbCrBuffer ( const uint16_t *  ycbcrBuffer,
uint32_t *  packedBuffer,
const uint32_t  numPixels 
)

Definition at line 216 of file ntv2utils.cpp.

◆ PercentDecode()

string PercentDecode ( const string &  inStr)

Definition at line 8177 of file ntv2utils.cpp.

◆ PercentEncode()

string PercentEncode ( const string &  inStr)

Definition at line 8164 of file ntv2utils.cpp.

◆ RecordCopyAudio()

int RecordCopyAudio ( PULWord  pAja,
PULWord  pSR,
int  iStartSample,
int  iNumBytes,
int  iChan0,
int  iNumChans,
bool  bKeepAudio24Bits 
)

Definition at line 4338 of file ntv2utils.cpp.

◆ RePackLineDataForYCbCrDPX()

void RePackLineDataForYCbCrDPX ( ULWord packedycbcrLine,
ULWord  numULWords 
)

Definition at line 674 of file ntv2utils.cpp.

◆ SerialNum64ToString()

string SerialNum64ToString ( const uint64_t &  inSerNum)

Definition at line 8243 of file ntv2utils.cpp.

◆ setHDRDefaultsForBT2020()

void setHDRDefaultsForBT2020 ( HDRRegValues outRegVals)
Deprecated:
Use HDRRegValues::setBT2020 instead

Definition at line 8028 of file ntv2utils.cpp.

◆ setHDRDefaultsForDCIP3()

void setHDRDefaultsForDCIP3 ( HDRRegValues outRegVals)
Deprecated:
Use HDRRegValues::setDCIP3 instead

Definition at line 8033 of file ntv2utils.cpp.

◆ SetRasterLinesBlack()

bool SetRasterLinesBlack ( const NTV2PixelFormat  inPixelFormat,
UByte pDstBuffer,
const ULWord  inDstBytesPerLine,
const UWord  inDstTotalLines 
)

Sets all or part of a destination raster image to legal black.

Parameters
[in]inPixelFormatSpecifies the NTV2PixelFormat of the destination buffer. (Note that many pixel formats are not currently supported.)
pDstBufferSpecifies the address of the destination buffer to be modified. Must be non-NULL.
[in]inDstBytesPerLineThe number of bytes per raster line of the destination buffer. Note that this value is used to compute the maximum pixel width of the destination raster. Also note that some pixel formats set constraints on this value (e.g., NTV2_FBF_10BIT_YCBCR requires this be a multiple of 16, while NTV2_FBF_8BIT_YCBCR requires an even number). Must exceed zero.
[in]inDstTotalLinesThe total number of raster lines to set to legal black. Must exceed zero.
Bug:
Need implementations for numerous pixel formats.
Returns
True if successful; otherwise false.

Definition at line 1118 of file ntv2utils.cpp.

◆ SetRasterLinesBlack10BitYCbCr()

static bool SetRasterLinesBlack10BitYCbCr ( UByte pDstBuffer,
const ULWord  inDstBytesPerLine,
const UWord  inDstTotalLines 
)
static

Definition at line 1058 of file ntv2utils.cpp.

◆ SetRasterLinesBlack8BitYCbCr()

static bool SetRasterLinesBlack8BitYCbCr ( UByte pDstBuffer,
const ULWord  inDstBytesPerLine,
const UWord  inDstTotalLines 
)
static

Definition at line 1042 of file ntv2utils.cpp.

◆ SetRasterLinesWhite()

bool SetRasterLinesWhite ( const NTV2PixelFormat  inPixelFormat,
UByte pDstBuffer,
const ULWord  inDstBytesPerLine,
const UWord  inDstTotalLines 
)

Sets all or part of a destination raster image to legal white.

Parameters
[in]inPixelFormatSpecifies the NTV2PixelFormat of the destination buffer. (Note that many pixel formats are not currently supported.)
pDstBufferSpecifies the address of the destination buffer to be modified. Must be non-NULL.
[in]inDstBytesPerLineThe number of bytes per raster line of the destination buffer. Note that this value is used to compute the maximum pixel width of the destination raster. Also note that some pixel formats set constraints on this value (e.g., NTV2_FBF_10BIT_YCBCR requires this be a multiple of 16, while NTV2_FBF_8BIT_YCBCR requires an even number). Must exceed zero.
[in]inDstTotalLinesThe total number of raster lines to set to legal white. Must exceed zero.
Bug:
Need implementations for numerous pixel formats.
Returns
True if successful; otherwise false.

Definition at line 1178 of file ntv2utils.cpp.

◆ SetRasterLinesWhite10BitYCbCr()

static bool SetRasterLinesWhite10BitYCbCr ( UByte pDstBuffer,
const ULWord  inDstBytesPerLine,
const UWord  inDstTotalLines 
)
static

Definition at line 1096 of file ntv2utils.cpp.

◆ SetRasterLinesWhite8BitYCbCr()

static bool SetRasterLinesWhite8BitYCbCr ( UByte pDstBuffer,
const ULWord  inDstBytesPerLine,
const UWord  inDstTotalLines 
)
static

Definition at line 1080 of file ntv2utils.cpp.

◆ StackQuadrants()

void StackQuadrants ( uint8_t *  pSrc,
uint32_t  srcWidth,
uint32_t  srcHeight,
uint32_t  srcRowBytes,
uint8_t *  pDst 
)

Definition at line 450 of file ntv2utils.cpp.

◆ StringToSerialNum64()

bool StringToSerialNum64 ( const string &  inSerNumStr,
uint64_t &  outSerNum 
)

Definition at line 8219 of file ntv2utils.cpp.

◆ ToRegNumSet()

NTV2RegNumSet ToRegNumSet ( const NTV2RegisterReads inRegReads)

Definition at line 8101 of file ntv2utils.cpp.

◆ UnPack10BitDPXtoForRP215()

void UnPack10BitDPXtoForRP215 ( UWord rawrp215Buffer,
ULWord DPXLinebuffer,
ULWord  numPixels 
)

Definition at line 716 of file ntv2utils.cpp.

◆ UnPack10BitDPXtoForRP215withEndianSwap()

void UnPack10BitDPXtoForRP215withEndianSwap ( UWord rawrp215Buffer,
ULWord DPXLinebuffer,
ULWord  numPixels 
)

Definition at line 706 of file ntv2utils.cpp.

◆ UnPack10BitDPXtoRGBAlpha10BitPixel()

void UnPack10BitDPXtoRGBAlpha10BitPixel ( RGBAlpha10BitPixel rgba10BitBuffer,
const ULWord DPXLinebuffer,
ULWord  numPixels,
bool  bigEndian 
)

Definition at line 685 of file ntv2utils.cpp.

◆ UnPack10BitYCbCrBuffer()

void UnPack10BitYCbCrBuffer ( uint32_t *  packedBuffer,
uint16_t *  ycbcrBuffer,
uint32_t  numPixels 
)

Definition at line 201 of file ntv2utils.cpp.

◆ UnpackLine_10BitARGBtoUWordSequence()

bool UnpackLine_10BitARGBtoUWordSequence ( const void *  pIn10BitARGBLine,
const NTV2FormatDescriptor inFormatDesc,
UWordSequence out16BitARGBLine 
)

Unpacks a line of NTV2_FBF_10BIT_ARGB video into 16-bit-per-component ARGB data.

Parameters
[in]pIn10BitARGBLineA valid, non-NULL pointer to the start of the line that contains the packed NTV2_FBF_10BIT_ARGB data to be converted.
[in]inFormatDescDescribes the raster.
[out]out16BitARGBLineReceives the unpacked 16-bit-per-component ARGB data. The sequence is cleared before filling. The UWord sequence will be B, G, R, A
Returns
True if successful; otherwise false.

Definition at line 172 of file ntv2utils.cpp.

◆ UnpackLine_10BitYUVto16BitYUV()

void UnpackLine_10BitYUVto16BitYUV ( const ULWord pIn10BitYUVLine,
UWord pOut16BitYUVLine,
const ULWord  inNumPixels 
)

Unpacks a line of 10-bit-per-component YCbCr video into 16-bit-per-component YCbCr (NTV2_FBF_10BIT_YCBCR) data.

Parameters
[in]pIn10BitYUVLineA valid, non-NULL pointer to the input buffer that contains the packed 10-bit-per-component YUV data to be converted into 16-bit-per-component YUV.
[out]pOut16BitYUVLineA valid, non-NULL pointer to the output buffer to receive the unpacked 16-bit-per-component YUV data.
[in]inNumPixelsSpecifies the width of the line to be converted, in pixels.

Definition at line 548 of file ntv2utils.cpp.

◆ UnpackLine_10BitYUVtoU16s()

bool UnpackLine_10BitYUVtoU16s ( std::vector< uint16_t > &  outYCbCrLine,
const NTV2Buffer inFrameBuffer,
const NTV2FormatDescriptor inDescriptor,
const UWord  inLineOffset 
)

Unpacks up to one raster line of an NTV2_FBF_10BIT_YCBCR frame buffer into an array of uint16_t values containing the 10-bit YUV data.

Parameters
[out]outYCbCrLineThe YUV components unpacked from the frame buffer. This will be cleared upon entry, and if successful, will contain at least 12 values upon exit.
inFrameBufferThe frame buffer in host memory that is to be read.
[in]inDescriptorThe NTV2FormatDescriptor that describes the frame buffer.
[in]inLineOffsetThe zero-based line offset into the frame buffer.
Returns
True if successful; otherwise false.
Note
This is a safer version of the UnpackLine_10BitYUVtoUWordSequence function.

Definition at line 646 of file ntv2utils.cpp.

◆ UnpackLine_10BitYUVtoUWordSequence() [1/2]

bool UnpackLine_10BitYUVtoUWordSequence ( const void *  pIn10BitYUVLine,
UWordSequence out16BitYUVLine,
ULWord  inNumPixels 
)

Unpacks a line of NTV2_FBF_10BIT_YCBCR video into 16-bit-per-component YUV data.

Parameters
[in]pIn10BitYUVLineA valid, non-NULL pointer to the start of the line that contains the NTV2_FBF_10BIT_YCBCR data to be converted.
[out]out16BitYUVLineReceives the unpacked 16-bit-per-component YUV data. The sequence is cleared before filling. The UWord sequence will be Cb0, Y0, Cr0, Y1, Cb1, Y2, Cr1, Y3, Cb2, Y4, Cr2, Y5, . . .
[in]inNumPixelsSpecifies the width of the line to be converted, in pixels.
Returns
True if successful; otherwise false.

Definition at line 123 of file ntv2utils.cpp.

◆ UnpackLine_10BitYUVtoUWordSequence() [2/2]

bool UnpackLine_10BitYUVtoUWordSequence ( const void *  pIn10BitYUVLine,
const NTV2FormatDescriptor inFormatDesc,
UWordSequence out16BitYUVLine 
)

Unpacks a line of NTV2_FBF_10BIT_YCBCR video into 16-bit-per-component YUV data.

Parameters
[in]pIn10BitYUVLineA valid, non-NULL pointer to the start of the line that contains the packed NTV2_FBF_10BIT_YCBCR data to be converted.
[in]inFormatDescDescribes the raster.
[out]out16BitYUVLineReceives the unpacked 16-bit-per-component YUV data. The sequence is cleared before filling. The UWord sequence will be Cb0, Y0, Cr0, Y1, Cb1, Y2, Cr1, Y3, Cb2, Y4, Cr2, Y5, . . .
Returns
True if successful; otherwise false.

Definition at line 147 of file ntv2utils.cpp.

◆ YUVComponentsTo10BitYUVPackedBuffer()

bool YUVComponentsTo10BitYUVPackedBuffer ( const std::vector< uint16_t > &  inYCbCrLine,
NTV2Buffer inFrameBuffer,
const NTV2FormatDescriptor inDescriptor,
const UWord  inLineOffset 
)

Packs up to one raster line of uint16_t YUV components into an NTV2_FBF_10BIT_YCBCR frame buffer.

Parameters
[in]inYCbCrLineThe YUV components to be packed into the frame buffer. This must contain at least 12 values.
inFrameBufferThe frame buffer in host memory that is to be modified.
[in]inDescriptorThe NTV2FormatDescriptor that describes the frame buffer.
[in]inLineOffsetThe zero-based line offset into the frame buffer where the packed components will be written.
Returns
True if successful; otherwise false.
Note
Neighboring components in the packed output will be corrupted if input component values exceed 0x3FF.
This is a safer version of the PackLine_UWordSequenceTo10BitYUV function.

Definition at line 603 of file ntv2utils.cpp.

Variable Documentation

◆ gChanATCLTC

◆ gChanVITC1

◆ gChanVITC2

◆ m31Presets

const char* m31Presets[M31_NUMVIDEOPRESETS]
static

Definition at line 6979 of file ntv2utils.cpp.

◆ sFRFamilies

NTV2FrameRateFamilies sFRFamilies
static

Definition at line 5315 of file ntv2utils.cpp.

◆ sFRFamMutex

AJALock sFRFamMutex
static

Definition at line 5316 of file ntv2utils.cpp.