AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
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/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...
 
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)
 
bool UnpackLine_10BitYUVtoU16s (vector< uint16_t > &outYCbCrLine, const NTV2Buffer &inFrameBuffer, const NTV2FormatDescriptor &inDescriptor, const UWord inLineOffset)
 
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 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 NTV2FrameDimensions &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 NTV2FrameDimensions 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 NTV2EveryFrameTaskMode 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)
 
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 (void)
 
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)
 
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 char * m31Presets [M31_NUMVIDEOPRESETS]
 
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
 

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 4474 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 36 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 38 of file ntv2utils.cpp.

Typedef Documentation

◆ NTV2FrameRateFamilies

typedef std::vector<NTV2FrameRates> NTV2FrameRateFamilies

Definition at line 5372 of file ntv2utils.cpp.

◆ NTV2FrameRateFamiliesConstIter

typedef NTV2FrameRateFamilies::const_iterator NTV2FrameRateFamiliesConstIter

Definition at line 5373 of file ntv2utils.cpp.

◆ NTV2FrameRates

typedef std::set<NTV2FrameRate> NTV2FrameRates

Definition at line 5370 of file ntv2utils.cpp.

◆ NTV2FrameRatesConstIter

typedef NTV2FrameRates::const_iterator NTV2FrameRatesConstIter

Definition at line 5371 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 4652 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 4478 of file ntv2utils.cpp.

◆ AddAudioTone() [2/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 4604 of file ntv2utils.cpp.

◆ AddAudioTone() [3/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 4526 of file ntv2utils.cpp.

◆ AddAudioTone() [4/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 4565 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 7756 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 45 of file ntv2utils.cpp.

◆ CheckFrameRateFamiliesInitialized()

static bool CheckFrameRateFamiliesInitialized ( void  )
static

Definition at line 5379 of file ntv2utils.cpp.

◆ convertHDRFloatToRegisterValues()

bool convertHDRFloatToRegisterValues ( const HDRFloatValues inFloatValues,
HDRRegValues outRegisterValues 
)

Definition at line 7860 of file ntv2utils.cpp.

◆ convertHDRRegisterToFloatValues()

bool convertHDRRegisterToFloatValues ( const HDRRegValues inRegisterValues,
HDRFloatValues outFloatValues 
)

Definition at line 7890 of file ntv2utils.cpp.

◆ ConvertLineTo8BitYCbCr()

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

Definition at line 212 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 223 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 454 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 1642 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 1293 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 1354 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 1414 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 1531 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 1224 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 1475 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 1587 of file ntv2utils.cpp.

◆ CopyRGBAImageToFrame()

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

Definition at line 949 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 482 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 805 of file ntv2utils.cpp.

◆ Fill4k8BitYCbCrVideoFrame()

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

Definition at line 917 of file ntv2utils.cpp.

◆ Fill8BitYCbCrVideoFrame()

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

Definition at line 900 of file ntv2utils.cpp.

◆ FromRegNumSet()

NTV2RegisterReads FromRegNumSet ( const NTV2RegNumSet inRegNumSet)

Definition at line 8008 of file ntv2utils.cpp.

◆ Get4xSizedGeometry()

NTV2FrameGeometry Get4xSizedGeometry ( const NTV2FrameGeometry  inGeometry)

Definition at line 2230 of file ntv2utils.cpp.

◆ Get4xSizedStandard()

NTV2Standard Get4xSizedStandard ( const NTV2Standard  inStandard,
const bool  bIs4k 
)

Definition at line 2259 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 the video frame rate.
[in]inAudioRateSpecifies the audio sample rate. Must be one of NTV2_AUDIO_48K or NTV2_AUDIO_96K.
[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]inIsSMPTE372EnabledSpecifies that 1080p60, 1080p5994 or 1080p50 is being used. In this mode, the device's framerate might be NTV2_FRAMERATE_3000, but since 2 links are coming out, the video rate is effectively NTV2_FRAMERATE_6000. Defaults to false.
Returns
The number of audio samples.
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 2789 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 3203 of file ntv2utils.cpp.

◆ GetChangedRegisters()

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

Definition at line 8033 of file ntv2utils.cpp.

◆ GetConversionMode()

NTV2ConversionMode GetConversionMode ( const NTV2VideoFormat  inFormat,
const NTV2VideoFormat  outFormat 
)

Definition at line 5535 of file ntv2utils.cpp.

◆ GetDisplayHeight()

ULWord GetDisplayHeight ( const NTV2VideoFormat  inVideoFormat)

Definition at line 4106 of file ntv2utils.cpp.

◆ GetDisplayWidth()

ULWord GetDisplayWidth ( const NTV2VideoFormat  inVideoFormat)

Definition at line 4098 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 1825 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 5403 of file ntv2utils.cpp.

◆ GetFrameRateFromScale()

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

Definition at line 3391 of file ntv2utils.cpp.

◆ GetFramesPerSecond() [1/2]

double GetFramesPerSecond ( const NTV2FrameRate  inFrameRate)

defined(NTV2_DEPRECATE_16_0)

Definition at line 1737 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 1772 of file ntv2utils.cpp.

◆ GetGeometryFromFrameDimensions()

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

Definition at line 3856 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 3967 of file ntv2utils.cpp.

◆ GetIndexForNTV2Channel()

ULWord GetIndexForNTV2Channel ( const NTV2Channel  inChannel)

Definition at line 4762 of file ntv2utils.cpp.

◆ GetIndexForNTV2Crosspoint()

ULWord GetIndexForNTV2Crosspoint ( const NTV2Crosspoint  channel)

Definition at line 4884 of file ntv2utils.cpp.

◆ GetIndexForNTV2CrosspointChannel()

ULWord GetIndexForNTV2CrosspointChannel ( const NTV2Crosspoint  channel)

Definition at line 4812 of file ntv2utils.cpp.

◆ GetIndexForNTV2CrosspointInput()

ULWord GetIndexForNTV2CrosspointInput ( const NTV2Crosspoint  channel)

Definition at line 4844 of file ntv2utils.cpp.

◆ GetIndexForNTV2InputSource()

ULWord GetIndexForNTV2InputSource ( const NTV2InputSource  inValue)

Definition at line 5334 of file ntv2utils.cpp.

◆ GetInputForConversionMode()

NTV2VideoFormat GetInputForConversionMode ( const NTV2ConversionMode  conversionMode)

Definition at line 5683 of file ntv2utils.cpp.

◆ GetInstalledMacDriverVersion()

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

Definition at line 8201 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 3755 of file ntv2utils.cpp.

◆ GetNTV2ChannelForIndex()

NTV2Channel GetNTV2ChannelForIndex ( const ULWord  inIndex)

Definition at line 4757 of file ntv2utils.cpp.

◆ GetNTV2CrosspointChannelForIndex()

NTV2Crosspoint GetNTV2CrosspointChannelForIndex ( const ULWord  index)

Definition at line 4796 of file ntv2utils.cpp.

◆ GetNTV2CrosspointForIndex()

NTV2Crosspoint GetNTV2CrosspointForIndex ( const ULWord  index)

Definition at line 4860 of file ntv2utils.cpp.

◆ GetNTV2CrosspointInputForIndex()

NTV2Crosspoint GetNTV2CrosspointInputForIndex ( const ULWord  index)

Definition at line 4828 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 2545 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 4084 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 4090 of file ntv2utils.cpp.

◆ GetNTV2FrameRateFromNumeratorDenominator()

NTV2FrameRate GetNTV2FrameRateFromNumeratorDenominator ( const ULWord  inNumerator,
const ULWord  inDenominator 
)

Definition at line 3488 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 3530 of file ntv2utils.cpp.

◆ GetNTV2HDMIInputSourceForIndex()

NTV2InputSource GetNTV2HDMIInputSourceForIndex ( const ULWord  inIndex0)

Definition at line 5328 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 5284 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 5316 of file ntv2utils.cpp.

◆ GetNTV2StandardFromScanGeometry()

NTV2Standard GetNTV2StandardFromScanGeometry ( const UByte  inScanGeometry,
const bool  inIsProgressiveTransport 
)

Definition at line 1807 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 2277 of file ntv2utils.cpp.

◆ GetOutputForConversionMode()

NTV2VideoFormat GetOutputForConversionMode ( const NTV2ConversionMode  conversionMode)

Definition at line 5727 of file ntv2utils.cpp.

◆ GetQuadSizedVideoFormat()

NTV2VideoFormat GetQuadSizedVideoFormat ( const NTV2VideoFormat  inVideoFormat,
const bool  isSquareDivision 
)

Definition at line 2032 of file ntv2utils.cpp.

◆ GetQuarterSizedGeometry()

NTV2FrameGeometry GetQuarterSizedGeometry ( const NTV2FrameGeometry  inGeometry)

Definition at line 2217 of file ntv2utils.cpp.

◆ GetQuarterSizedStandard()

NTV2Standard GetQuarterSizedStandard ( const NTV2Standard  inStandard)

Definition at line 2242 of file ntv2utils.cpp.

◆ GetQuarterSizedVideoFormat()

NTV2VideoFormat GetQuarterSizedVideoFormat ( const NTV2VideoFormat  inVideoFormat)

Definition at line 1844 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 1201 of file ntv2utils.cpp.

◆ GetRegNumChanges()

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

Definition at line 8024 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 3901 of file ntv2utils.cpp.

◆ GetScaleFromFrameRate()

ULWord GetScaleFromFrameRate ( const NTV2FrameRate  inFrameRate)

defined(NTV2_DEPRECATE_16_0)

Definition at line 3354 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 4003 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 2499 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 5030 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 3046 of file ntv2utils.cpp.

◆ GetTransportCompatibleFormat()

NTV2VideoFormat GetTransportCompatibleFormat ( const NTV2VideoFormat  inFormat,
const NTV2VideoFormat  inTargetFormat 
)

Definition at line 5254 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 3803 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 3955 of file ntv2utils.cpp.

◆ GetVaricamRepeatCount()

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

Definition at line 3215 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 2758 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 2775 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 1212 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 3865 of file ntv2utils.cpp.

◆ Is2KFormat()

bool Is2KFormat ( const NTV2VideoFormat  format)

Definition at line 5488 of file ntv2utils.cpp.

◆ Is4KFormat()

bool Is4KFormat ( const NTV2VideoFormat  format)

Definition at line 5494 of file ntv2utils.cpp.

◆ Is8BitFrameBufferFormat()

bool Is8BitFrameBufferFormat ( const NTV2FrameBufferFormat  format)

Definition at line 5512 of file ntv2utils.cpp.

◆ Is8KFormat()

bool Is8KFormat ( const NTV2VideoFormat  format)

Definition at line 5500 of file ntv2utils.cpp.

◆ IsAlphaChannelFormat()

bool IsAlphaChannelFormat ( const NTV2FrameBufferFormat  format)

Definition at line 5482 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 5417 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 5436 of file ntv2utils.cpp.

◆ IsNTV2CrosspointInput()

bool IsNTV2CrosspointInput ( const NTV2Crosspoint  inChannel)

Definition at line 4909 of file ntv2utils.cpp.

◆ IsNTV2CrosspointOutput()

bool IsNTV2CrosspointOutput ( const NTV2Crosspoint  inChannel)

Definition at line 4915 of file ntv2utils.cpp.

◆ IsProgressivePicture()

bool IsProgressivePicture ( const NTV2VideoFormat  format)

Definition at line 5451 of file ntv2utils.cpp.

◆ IsProgressiveTransport() [1/2]

bool IsProgressiveTransport ( const NTV2Standard  standard)

Definition at line 5464 of file ntv2utils.cpp.

◆ IsProgressiveTransport() [2/2]

bool IsProgressiveTransport ( const NTV2VideoFormat  format)

Definition at line 5457 of file ntv2utils.cpp.

◆ IsPSF()

bool IsPSF ( const NTV2VideoFormat  format)

Definition at line 5445 of file ntv2utils.cpp.

◆ IsRaw()

bool IsRaw ( const NTV2FrameBufferFormat  frameBufferFormat)

Definition at line 5506 of file ntv2utils.cpp.

◆ IsRGBFormat()

bool IsRGBFormat ( const NTV2FrameBufferFormat  format)

Definition at line 5470 of file ntv2utils.cpp.

◆ IsTransportCompatibleFormat()

bool IsTransportCompatibleFormat ( const NTV2VideoFormat  inFormat1,
const NTV2VideoFormat  inFormat2 
)

Definition at line 5266 of file ntv2utils.cpp.

◆ IsVideoFormatA()

bool IsVideoFormatA ( const NTV2VideoFormat  format)

Definition at line 5518 of file ntv2utils.cpp.

◆ IsVideoFormatB()

bool IsVideoFormatB ( const NTV2VideoFormat  format)

Definition at line 5524 of file ntv2utils.cpp.

◆ IsVideoFormatJ2KSupported()

bool IsVideoFormatJ2KSupported ( const NTV2VideoFormat  format)

Definition at line 5529 of file ntv2utils.cpp.

◆ IsYCbCrFormat()

bool IsYCbCrFormat ( const NTV2FrameBufferFormat  format)

Definition at line 5476 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 766 of file ntv2utils.cpp.

◆ Make10BitLine()

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

Definition at line 792 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 779 of file ntv2utils.cpp.

◆ Make8BitBlackLine()

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

Definition at line 828 of file ntv2utils.cpp.

◆ Make8BitLine()

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

Definition at line 874 of file ntv2utils.cpp.

◆ Make8BitWhiteLine()

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

Definition at line 850 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 197 of file ntv2utils.cpp.

◆ MaskUnPacked10BitYCbCrBuffer()

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

Definition at line 330 of file ntv2utils.cpp.

◆ MaskYCbCrLine()

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

Definition at line 691 of file ntv2utils.cpp.

◆ NTV2AncDataRgnToStr()

string NTV2AncDataRgnToStr ( const NTV2AncDataRgn  inValue,
const bool  inCompactDisplay 
)

Definition at line 6624 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.

Definition at line 5362 of file ntv2utils.cpp.

◆ NTV2AudioBufferSizeToString()

string NTV2AudioBufferSizeToString ( const NTV2AudioBufferSize  inValue,
const bool  inForRetailDisplay 
)

Definition at line 5829 of file ntv2utils.cpp.

◆ NTV2AudioChannelOctetToString()

string NTV2AudioChannelOctetToString ( const NTV2Audio8ChannelSelect  inValue,
const bool  inCompactDisplay 
)

Definition at line 6502 of file ntv2utils.cpp.

◆ NTV2AudioChannelPairToString()

string NTV2AudioChannelPairToString ( const NTV2AudioChannelPair  inValue,
const bool  inCompactDisplay 
)

Definition at line 6478 of file ntv2utils.cpp.

◆ NTV2AudioChannelQuadToString()

string NTV2AudioChannelQuadToString ( const NTV2Audio4ChannelSelect  inValue,
const bool  inCompactDisplay 
)

Definition at line 6490 of file ntv2utils.cpp.

◆ NTV2AudioFormatToString()

string NTV2AudioFormatToString ( const NTV2AudioFormat  inValue,
const bool  inCompact 
)

Definition at line 6749 of file ntv2utils.cpp.

◆ NTV2AudioLoopBackToString()

string NTV2AudioLoopBackToString ( const NTV2AudioLoopBack  inValue,
const bool  inForRetailDisplay 
)

Definition at line 5841 of file ntv2utils.cpp.

◆ NTV2AudioRateToString()

string NTV2AudioRateToString ( const NTV2AudioRate  inValue,
const bool  inForRetailDisplay 
)

Definition at line 5816 of file ntv2utils.cpp.

◆ NTV2AudioSourceToString()

string NTV2AudioSourceToString ( const NTV2AudioSource  inValue,
const bool  inCompactDisplay 
)

Definition at line 6778 of file ntv2utils.cpp.

◆ NTV2AudioSystemToString()

string NTV2AudioSystemToString ( const NTV2AudioSystem  inValue,
const bool  inCompactDisplay 
)

Definition at line 5805 of file ntv2utils.cpp.

◆ NTV2BitfileTypeToString()

string NTV2BitfileTypeToString ( const NTV2BitfileType  inValue,
const bool  inCompactDisplay 
)

Definition at line 7783 of file ntv2utils.cpp.

◆ NTV2BreakoutTypeToString()

string NTV2BreakoutTypeToString ( const NTV2BreakoutType  inValue,
const bool  inCompactDisplay 
)

Definition at line 6605 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 4929 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 4921 of file ntv2utils.cpp.

◆ NTV2ChannelToInputCrosspoint()

NTV2Crosspoint NTV2ChannelToInputCrosspoint ( const NTV2Channel  inChannel)

Definition at line 4975 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 4997 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 5192 of file ntv2utils.cpp.

◆ NTV2ChannelToOutputCrosspoint()

NTV2Crosspoint NTV2ChannelToOutputCrosspoint ( const NTV2Channel  inChannel)

Definition at line 4986 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 5227 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 5007 of file ntv2utils.cpp.

◆ NTV2ChannelToString()

string NTV2ChannelToString ( const NTV2Channel  inValue,
const bool  inForRetailDisplay 
)

Definition at line 5787 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 5022 of file ntv2utils.cpp.

◆ NTV2ColorCorrectionModeToString()

string NTV2ColorCorrectionModeToString ( const NTV2ColorCorrectionMode  inValue,
const bool  inCompactDisplay 
)

Definition at line 7770 of file ntv2utils.cpp.

◆ NTV2CrosspointToNTV2Channel()

NTV2Channel NTV2CrosspointToNTV2Channel ( const NTV2Crosspoint  inCrosspointChannel)

Definition at line 4768 of file ntv2utils.cpp.

◆ NTV2CrosspointToString()

string NTV2CrosspointToString ( const NTV2Crosspoint  inChannel)

Definition at line 5865 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 4057 of file ntv2utils.cpp.

◆ NTV2DeviceIDToString()

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

Definition at line 4673 of file ntv2utils.cpp.

◆ NTV2DownConvertModeToString()

string NTV2DownConvertModeToString ( const NTV2DownConvertMode  inValue,
const bool  inCompact 
)

Definition at line 6652 of file ntv2utils.cpp.

◆ NTV2EmbeddedAudioClockToString()

string NTV2EmbeddedAudioClockToString ( const NTV2EmbeddedAudioClock  inValue,
const bool  inForRetailDisplay 
)

Definition at line 5853 of file ntv2utils.cpp.

◆ NTV2EmbeddedAudioInputToString()

string NTV2EmbeddedAudioInputToString ( const NTV2EmbeddedAudioInput  inValue,
const bool  inCompactDisplay 
)

Definition at line 6760 of file ntv2utils.cpp.

◆ NTV2FrameBufferFormatToString()

string NTV2FrameBufferFormatToString ( const NTV2FrameBufferFormat  inValue,
const bool  inForRetailDisplay 
)

Definition at line 6983 of file ntv2utils.cpp.

◆ NTV2FrameGeometryToString()

string NTV2FrameGeometryToString ( const NTV2FrameGeometry  inValue,
const bool  inForRetailDisplay 
)

Definition at line 7197 of file ntv2utils.cpp.

◆ NTV2FrameRateToString()

string NTV2FrameRateToString ( const NTV2FrameRate  inValue,
const bool  inForRetailDisplay 
)

defined(NTV2_DEPRECATE_16_0)

Definition at line 7227 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 5347 of file ntv2utils.cpp.

◆ NTV2FramesizeToString()

string NTV2FramesizeToString ( const NTV2Framesize  inValue,
const bool  inCompactDisplay 
)

Definition at line 6514 of file ntv2utils.cpp.

◆ NTV2GetBitfileName()

string NTV2GetBitfileName ( const NTV2DeviceID  inBoardID)

Definition at line 7448 of file ntv2utils.cpp.

◆ NTV2GetDeviceIDFromBitfileName()

NTV2DeviceID NTV2GetDeviceIDFromBitfileName ( const string &  inBitfileName)

Definition at line 7549 of file ntv2utils.cpp.

◆ NTV2GetFirmwareFolderPath()

string NTV2GetFirmwareFolderPath ( void  )

Definition at line 7569 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 7736 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 7591 of file ntv2utils.cpp.

◆ NTV2GetVersionString()

std::string NTV2GetVersionString ( const bool  inDetailed)

Definition at line 7724 of file ntv2utils.cpp.

◆ NTV2HDMIAudioChannelsToString()

string NTV2HDMIAudioChannelsToString ( const NTV2HDMIAudioChannels  inValue,
const bool  inCompact 
)

Definition at line 6704 of file ntv2utils.cpp.

◆ NTV2HDMIBitDepthToString()

string NTV2HDMIBitDepthToString ( const NTV2HDMIBitDepth  inValue,
const bool  inCompact 
)

Definition at line 6692 of file ntv2utils.cpp.

◆ NTV2HDMIColorSpaceToString()

string NTV2HDMIColorSpaceToString ( const NTV2HDMIColorSpace  inValue,
const bool  inCompact 
)

Definition at line 6737 of file ntv2utils.cpp.

◆ NTV2HDMIProtocolToString()

string NTV2HDMIProtocolToString ( const NTV2HDMIProtocol  inValue,
const bool  inCompact 
)

Definition at line 6715 of file ntv2utils.cpp.

◆ NTV2HDMIRangeToString()

string NTV2HDMIRangeToString ( const NTV2HDMIRange  inValue,
const bool  inCompact 
)

Definition at line 6726 of file ntv2utils.cpp.

◆ NTV2InputCrosspointIDToString()

string NTV2InputCrosspointIDToString ( const NTV2InputCrosspointID  inValue,
const bool  inForRetailDisplay 
)

Definition at line 5874 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 4961 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 5131 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 5107 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 5059 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 4937 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 5083 of file ntv2utils.cpp.

◆ NTV2InputSourceToString()

string NTV2InputSourceToString ( const NTV2InputSource  inValue,
const bool  inForRetailDisplay 
)

Definition at line 7258 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 5155 of file ntv2utils.cpp.

◆ NTV2InterruptEnumToString()

std::string NTV2InterruptEnumToString ( const INTERRUPT_ENUMS  inInterruptEnumValue)

Definition at line 7343 of file ntv2utils.cpp.

◆ NTV2IpErrorEnumToString()

std::string NTV2IpErrorEnumToString ( const NTV2IpError  inIpErrorEnumValue)

Definition at line 7393 of file ntv2utils.cpp.

◆ NTV2IsCompatibleBitfileName()

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

Definition at line 7525 of file ntv2utils.cpp.

◆ NTV2IsoConvertModeToString()

string NTV2IsoConvertModeToString ( const NTV2IsoConvertMode  inValue,
const bool  inCompact 
)

Definition at line 6677 of file ntv2utils.cpp.

◆ NTV2M31VideoPresetToString()

string NTV2M31VideoPresetToString ( const M31VideoPreset  inValue,
const bool  inForRetailDisplay 
)

Definition at line 7025 of file ntv2utils.cpp.

◆ NTV2MixerInputControlToString()

string NTV2MixerInputControlToString ( const NTV2MixerKeyerInputControl  inValue,
const bool  inCompactDisplay 
)

Definition at line 6579 of file ntv2utils.cpp.

◆ NTV2MixerKeyerModeToString()

string NTV2MixerKeyerModeToString ( const NTV2MixerKeyerMode  inValue,
const bool  inCompactDisplay 
)

Definition at line 6565 of file ntv2utils.cpp.

◆ NTV2ModeToString()

string NTV2ModeToString ( const NTV2Mode  inValue,
const bool  inCompactDisplay 
)

Definition at line 6540 of file ntv2utils.cpp.

◆ NTV2OutputCrosspointIDToString()

string NTV2OutputCrosspointIDToString ( const NTV2OutputCrosspointID  inValue,
const bool  inForRetailDisplay 
)

Definition at line 6017 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 5215 of file ntv2utils.cpp.

◆ NTV2OutputDestinationToString()

string NTV2OutputDestinationToString ( const NTV2OutputDestination  inValue,
const bool  inForRetailDisplay 
)

Definition at line 7281 of file ntv2utils.cpp.

◆ NTV2ReferenceSourceToString()

string NTV2ReferenceSourceToString ( const NTV2ReferenceSource  inValue,
const bool  inForRetailDisplay 
)

Definition at line 7301 of file ntv2utils.cpp.

◆ NTV2RegisterNumberToString()

string NTV2RegisterNumberToString ( const NTV2RegisterNumber  inValue)

Definition at line 7750 of file ntv2utils.cpp.

◆ NTV2RegisterWriteModeToString()

string NTV2RegisterWriteModeToString ( const NTV2RegisterWriteMode  inValue,
const bool  inForRetailDisplay 
)

Definition at line 7330 of file ntv2utils.cpp.

◆ NTV2RegNumSetToString()

string NTV2RegNumSetToString ( const NTV2RegisterNumberSet inObj)

Definition at line 6413 of file ntv2utils.cpp.

◆ NTV2ScanMethodToString()

string NTV2ScanMethodToString ( const NTV2ScanMethod  inValue,
const bool  inCompact 
)

Definition at line 6665 of file ntv2utils.cpp.

◆ NTV2StandardToString()

string NTV2StandardToString ( const NTV2Standard  inValue,
const bool  inForRetailDisplay 
)

Definition at line 6957 of file ntv2utils.cpp.

◆ NTV2TaskModeToString()

string NTV2TaskModeToString ( const NTV2EveryFrameTaskMode  inValue,
const bool  inCompactDisplay 
)

Definition at line 6400 of file ntv2utils.cpp.

◆ NTV2TCIndexToString()

string NTV2TCIndexToString ( const NTV2TCIndex  inValue,
const bool  inCompactDisplay 
)

Definition at line 6441 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 5039 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 5048 of file ntv2utils.cpp.

◆ NTV2UpConvertModeToString()

string NTV2UpConvertModeToString ( const NTV2UpConvertMode  inValue,
const bool  inCompact 
)

Definition at line 6638 of file ntv2utils.cpp.

◆ NTV2VANCModeToString()

string NTV2VANCModeToString ( const NTV2VANCMode  inValue,
const bool  inCompactDisplay 
)

Definition at line 6552 of file ntv2utils.cpp.

◆ NTV2VideoFormatToString()

string NTV2VideoFormatToString ( const NTV2VideoFormat  inFormat,
const bool  inUseFrameRate 
)

Definition at line 6793 of file ntv2utils.cpp.

◆ NTV2VideoLimitingToString()

string NTV2VideoLimitingToString ( const NTV2VideoLimiting  inValue,
const bool  inCompactDisplay 
)

Definition at line 6592 of file ntv2utils.cpp.

◆ NTV2WidgetIDToString()

string NTV2WidgetIDToString ( const NTV2WidgetID  inValue,
const bool  inCompactDisplay 
)

Definition at line 6222 of file ntv2utils.cpp.

◆ NTV2WidgetTypeToString()

string NTV2WidgetTypeToString ( const NTV2WidgetType  inValue,
const bool  inCompactDisplay 
)

Definition at line 6349 of file ntv2utils.cpp.

◆ operator<<() [1/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 6434 of file ntv2utils.cpp.

◆ operator<<() [2/10]

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

Definition at line 7716 of file ntv2utils.cpp.

◆ operator<<() [3/10]

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

Definition at line 7955 of file ntv2utils.cpp.

◆ operator<<() [4/10]

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

Definition at line 6421 of file ntv2utils.cpp.

◆ operator<<() [5/10]

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

Definition at line 5775 of file ntv2utils.cpp.

◆ operator<<() [6/10]

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

Definition at line 5781 of file ntv2utils.cpp.

◆ operator<<() [7/10]

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

Definition at line 7985 of file ntv2utils.cpp.

◆ operator<<() [8/10]

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

Definition at line 7996 of file ntv2utils.cpp.

◆ operator<<() [9/10]

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

Definition at line 7439 of file ntv2utils.cpp.

◆ operator<<() [10/10]

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

Handy ostream writer for NTV2DeviceIDList.

Definition at line 7709 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 527 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 544 of file ntv2utils.cpp.

◆ PackTo10BitYCbCrBuffer()

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

Definition at line 184 of file ntv2utils.cpp.

◆ PercentDecode()

string PercentDecode ( const string &  inStr)

Definition at line 8092 of file ntv2utils.cpp.

◆ PercentEncode()

string PercentEncode ( const string &  inStr)

Definition at line 8079 of file ntv2utils.cpp.

◆ RecordCopyAudio()

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

Definition at line 4403 of file ntv2utils.cpp.

◆ RePackLineDataForYCbCrDPX()

void RePackLineDataForYCbCrDPX ( ULWord packedycbcrLine,
ULWord  numULWords 
)

Definition at line 637 of file ntv2utils.cpp.

◆ SerialNum64ToString()

string SerialNum64ToString ( const uint64_t &  inSerNum)

Definition at line 8158 of file ntv2utils.cpp.

◆ setHDRDefaultsForBT2020()

void setHDRDefaultsForBT2020 ( HDRRegValues outRegisterValues)

Definition at line 7918 of file ntv2utils.cpp.

◆ setHDRDefaultsForDCIP3()

void setHDRDefaultsForDCIP3 ( HDRRegValues outRegisterValues)

Definition at line 7936 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 1081 of file ntv2utils.cpp.

◆ SetRasterLinesBlack10BitYCbCr()

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

Definition at line 1021 of file ntv2utils.cpp.

◆ SetRasterLinesBlack8BitYCbCr()

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

Definition at line 1005 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 1141 of file ntv2utils.cpp.

◆ SetRasterLinesWhite10BitYCbCr()

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

Definition at line 1059 of file ntv2utils.cpp.

◆ SetRasterLinesWhite8BitYCbCr()

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

Definition at line 1043 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 413 of file ntv2utils.cpp.

◆ StringToSerialNum64()

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

Definition at line 8134 of file ntv2utils.cpp.

◆ ToRegNumSet()

NTV2RegNumSet ToRegNumSet ( const NTV2RegisterReads inRegReads)

Definition at line 8016 of file ntv2utils.cpp.

◆ UnPack10BitDPXtoForRP215()

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

Definition at line 679 of file ntv2utils.cpp.

◆ UnPack10BitDPXtoForRP215withEndianSwap()

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

Definition at line 669 of file ntv2utils.cpp.

◆ UnPack10BitDPXtoRGBAlpha10BitPixel()

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

Definition at line 648 of file ntv2utils.cpp.

◆ UnPack10BitYCbCrBuffer()

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

Definition at line 169 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 511 of file ntv2utils.cpp.

◆ UnpackLine_10BitYUVtoU16s()

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

Definition at line 609 of file ntv2utils.cpp.

◆ UnpackLine_10BitYUVtoUWordSequence() [1/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 143 of file ntv2utils.cpp.

◆ UnpackLine_10BitYUVtoUWordSequence() [2/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 119 of file ntv2utils.cpp.

◆ YUVComponentsTo10BitYUVPackedBuffer()

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

Definition at line 566 of file ntv2utils.cpp.

Variable Documentation

◆ gChanATCLTC

◆ gChanVITC1

◆ gChanVITC2

◆ m31Presets

const char* m31Presets[M31_NUMVIDEOPRESETS]
static

Definition at line 4236 of file ntv2utils.cpp.

◆ sFRFamilies

NTV2FrameRateFamilies sFRFamilies
static

Definition at line 5375 of file ntv2utils.cpp.

◆ sFRFamMutex

AJALock sFRFamMutex
static

Definition at line 5376 of file ntv2utils.cpp.