![]() |
AJA NTV2 SDK
18.0.0.2122
NTV2 SDK 18.0.0.2122
|
#include <ntv2smpteancdata.h>
Static Public Member Functions | |
| static UWord | AddEvenParity (UByte dataByte) |
| static bool | UnpackLine_8BitYUVtoUWordSequence (const void *pInYUV8Line, UWordSequence &out16BitYUVLine, const ULWord inNumPixels) |
| Converts a single line of NTV2_FBF_8BIT_YCBCR data from the given source buffer into an ordered sequence of UWords that contain the resulting 10-bit even-parity data. More... | |
| static bool | FindAnc (const UWord inAncDID, const UWord inAncSDID, const NTV2Buffer &inFrameBuffer, const NTV2FormatDescriptor &inFormatDesc, const NTV2_SMPTEAncChannelSelect inAncChannel, UWordSequence &outWords, bool &outHasParityErrors, const UWord inLineIncrement, UWord &inOutLineStart, UWord &inOutPixelStart) |
| Searches for ancillary data in a given host frame buffer. More... | |
| static bool | FindAnc (const UWord inAncDID, const UWord inAncSDID, const ULWord *pInFrameBuffer, const NTV2_SMPTEAncChannelSelect inAncChannel, const NTV2VideoFormat inVideoFormat, const NTV2FrameBufferFormat inFBFormat, UWord *pOutBuff, ULWord &outWordCount, const ULWord inWordCountMax, bool &outHasParityErrors, const UWord inLineIncrement, UWord &inOutLineStart, UWord &inOutPixelStart) |
| Searches for ancillary data in a given host frame buffer. More... | |
| static bool | FindAnc (const UWord inAncDID, const UWord inAncSDID, const ULWord *pInFrameBuffer, const NTV2_SMPTEAncChannelSelect inAncChannel, const NTV2VideoFormat inVideoFormat, const NTV2FrameBufferFormat inFBFormat, UWord *pOutBuff, ULWord &outWordCount, const ULWord inWordCountMax, bool &outHasParityErrors) |
| Searches for ancillary data in a given host frame buffer. More... | |
| static bool | FindAnc (const UWord inAncDID, const UWord inAncSDID, const ULWord *pInFrameBuffer, const NTV2_SMPTEAncChannelSelect inAncChannel, const NTV2VideoFormat inVideoFormat, const NTV2FrameBufferFormat inFBFormat, UWord *pOutBuff, ULWord &outWordCount, const ULWord inWordCountMax) |
| Searches for ancillary data in a given host frame buffer. More... | |
| static bool | MakeAncHeader (NTV2_SMPTEAncHeaderPtr pHdr, UByte ancDID, UByte ancSDID, UByte ancDC) |
| static bool | SetAncHeaderDataCount (NTV2_SMPTEAncHeaderPtr pHdr, UByte ancDC) |
| static bool | SetAncFooterChecksum (NTV2_SMPTEAncFooterPtr pFtr, UWord checksum) |
| static bool | CalculateAncChecksum (NTV2_SMPTEAncHeaderPtr pHdr, UByte dataCount=0) |
| static bool | ExtractCompressedAnc (const void *pFrameBuffer, void *pAncBuff, ULWord ancBufMax, ULWord &inOutFoundSize, NTV2VideoFormat videoFormat, NTV2FrameBufferFormat fbFormat) |
| static bool | EmbedCompressedAnc (const void *pAncBuff, void *pFrameBuffer, const ULWord ancBufSize, const NTV2VideoFormat videoFormat, const NTV2FrameBufferFormat fbFormat) |
| static bool | InsertAnc (const UWord *pInAncBuff, const size_t inAncWordCount, const ULWord inLineOffset, const ULWord inWordOffset, ULWord *pFrameBuffer, const NTV2VideoFormat inVideoFormat, const NTV2FrameBufferFormat inFBFormat) |
| Inserts ancillary data at a given line and channel offset into the given host frame buffer. More... | |
| static bool | InsertAncAtSmpteLine (const UWord *pInAncBuff, const ULWord inAncWordCount, const ULWord inSMPTELineNum, const ULWord inWordOffset, ULWord *pFrameBuffer, const NTV2VideoFormat inVideoFormat, const NTV2FrameBufferFormat inFBFormat) |
| Inserts ancillary data at a given line and channel offset into the given host frame buffer. More... | |
| static bool | FirstVancLineAndChannel (const NTV2FormatDescriptor &inFD, const NTV2SmpteLineNumber &inLN, NTV2_SMPTEAncChannelSelect &inOutChannel, ULWord &inOutSMPTELine, ULWord &outLineOffset) |
| static bool | NextVancLineAndChannel (const NTV2FormatDescriptor &inFD, const NTV2SmpteLineNumber &inLN, NTV2_SMPTEAncChannelSelect &inOutChannel, ULWord &inOutSMPTELine, ULWord &outLineOffset) |
| static ULWord | GetVancLineOffset (const NTV2FormatDescriptor &inFormatDesc, const NTV2SmpteLineNumber &inSmpteLineNumbers, const ULWord inSmpteLine) |
| static bool | CompressAncPacket (const UWord *packetBuffer, UByte *targetBuffer, ULWord maxTargetSize, ULWord &outCompPacketSize, NTV2_SMPTEAncChannelSelect chan, UWord smpteLine) |
| static void | DecompressAncPacket (const UByte *pInCompBuffer, UWord *pOutUnpackedBuffer, ULWord &outCompPacketSize, bool &outIsValidLoc, NTV2_SMPTEAncChannelSelect &outChan, ULWord &outSmpteLine) |
| static bool | FindCompressedAnc (UByte ancDID, UByte ancSDID, const UByte *pSrcAncBuf, const ULWord srcAncSize, UByteConstPtr &outBuffPtr, ULWord &outBufSize) |
| static bool | GetAncPacketsFromVANCLine (const UWordSequence &inYUV16Line, const NTV2_SMPTEAncChannelSelect inChanSelect, UWordVANCPacketList &outRawPackets, UWordSequence &outWordOffsets) |
| Extracts whatever VANC packets are found inside the given 16-bit YUV line buffer. More... | |
| static ULWord | GetCaptionAncLineNumber (const NTV2VideoFormat inVideoFormat, const bool inIsField1=true) |
| Answers with the SMPTE raster line number into which NTSC caption CDPs should be inserted. More... | |
Definition at line 99 of file ntv2smpteancdata.h.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Searches for ancillary data in a given host frame buffer.
| [in] | inAncDID | Specifies the Ancillary data ID to look for in the frame buffer. (The proper parity will automatically be added to 8-bit DID values.) |
| [in] | inAncSDID | Specifies the Ancillary SDID to look for in the frame buffer. (The proper parity will automatically be added to 8-bit SDID values.) |
| [in] | inFrameBuffer | Specifies the host frame buffer to be searched. |
| [in] | inFormatDesc | Describes the video/pixel format of the host frame buffer. |
| [in] | inAncChannel | Specifies the ancillary data channel to search, whether luma (Y), chroma (C), or both. |
| [out] | outWords | Receives the 10-bit packet data (including parity), replacing its previous contents. |
| [out] | outHasParityErrors | Receives "true" if any parity errors are found, or "false" if none found. |
| [in] | inLineIncrement | Specifies the line increment to use. Use 1 to scan every VANC line in the buffer. |
| inOutLineStart | Upon entry, specifies the zero-based starting line offset at which to start the search. Upon return, contains the ending line offset where the search ended. | |
| inOutPixelStart | Upon entry, specifies the initial zero-based pixel offset from which to start the search. Upon exit, contains the ending zero-based pixel offset where the data search ended. Ignored if inOutLineStart is non-zero. |
|
static |
Searches for ancillary data in a given host frame buffer.
| [in] | inAncDID | Specifies the Ancillary data ID to look for in the frame buffer. (The proper parity will automatically be added to 8-bit DID values.) |
| [in] | inAncSDID | Specifies the Ancillary SDID to look for in the frame buffer. (The proper parity will automatically be added to 8-bit SDID values.) |
| [in] | pInFrameBuffer | Specifies a valid, non-NULL starting address of the host frame buffer to be searched. |
| [in] | inAncChannel | Specifies the ancillary data channel to search, whether in the luma (Y), the chroma (C), or both. |
| [in] | inVideoFormat | Specifies the video format of the host frame buffer. |
| [in] | inFBFormat | Specifies the pixel format of the host frame buffer. Must be NTV2_FBF_8BIT_YCBCR or NTV2_FBF_10BIT_YCBCR. |
| [out] | pOutBuff | Specifies a valid, non-NULL address of the output buffer that is to receive the packet data. This will be 10-bit data, and will include parity. |
| [out] | outWordCount | Specifies the number of ancillary data words written into the output buffer. |
| [in] | inWordCountMax | Specifies the capacity, in UWords, of the output buffer. |
| [out] | outHasParityErrors | Specifies a boolean variable that is to receive "true" if any parity errors are found, or "false" if none are found. |
| [in] | inLineIncrement | Specifies the line increment to use. Use 1 to scan every line in the buffer. |
| inOutLineStart | Upon entry, specifies the zero-based starting line number at which to start the search. Upon return, contains the ending line number where the search ended. | |
| inOutPixelStart | Upon entry, specifies the initial zero-based pixel number from which to start the search. Upon exit, contains the ending zero-based pixel number where the data search ended. Ignored if inOutLineStart is non-zero. |
|
static |
Searches for ancillary data in a given host frame buffer.
| [in] | inAncDID | Specifies the Ancillary data ID to look for in the frame buffer. The proper parity will automatically be added to 8-bit DID values. |
| [in] | inAncSDID | Specifies the Ancillary SDID to look for in the frame buffer. The proper parity will automatically be added to 8-bit SDID values. |
| [in] | pInFrameBuffer | Specifies a valid, non-NULL starting address of the host frame buffer to be searched. |
| [in] | inAncChannel | Specifies the ancillary data channel. |
| [in] | inVideoFormat | Specifies the video format of the host frame buffer. |
| [in] | inFBFormat | Specifies the pixel format of the host frame buffer. |
| [out] | pOutBuff | Specifies a valid, non-NULL address of the output buffer. |
| [out] | outWordCount | Specifies the number of ancillary data words written into the output buffer. |
| [in] | inWordCountMax | Specifies the capacity, in UWords, of the output buffer. |
| [out] | outHasParityErrors | Specifies a boolean variable that is to receive true if any parity errors are found, or false if none are found. |
|
static |
Searches for ancillary data in a given host frame buffer.
| [in] | inAncDID | Specifies the Ancillary data ID to look for in the frame buffer. The proper parity will automatically be added to 8-bit DID values. |
| [in] | inAncSDID | Specifies the Ancillary SDID to look for in the frame buffer. The proper parity will automatically be added to 8-bit SDID values. |
| [in] | pInFrameBuffer | Specifies a valid, non-NULL starting address of the host frame buffer to be searched. |
| [in] | inAncChannel | Specifies the ancillary data channel. |
| [in] | inVideoFormat | Specifies the video format of the host frame buffer. |
| [in] | inFBFormat | Specifies the pixel format of the host frame buffer. |
| [out] | pOutBuff | Specifies a valid, non-NULL address of the output buffer. |
| [out] | outWordCount | Specifies the number of ancillary data words written into the output buffer. |
| [in] | inWordCountMax | Specifies the capacity, in UWords, of the output buffer. |
|
static |
|
static |
|
static |
Extracts whatever VANC packets are found inside the given 16-bit YUV line buffer.
| [in] | inYUV16Line | Specifies the UWord sequence containing the 10-bit YUV VANC line data components. (Use UnpackLine_10BitYUVtoUWordSequence to convert a VANC line from an NTV2_FBF_10BIT_YCBCR frame buffer into this format. Use CNTV2SMPTEAncData::UnpackLine_8BitYUVtoUWordSequence) to convert a VANC line from an NTV2_FBF_8BIT_YCBCR frame buffer into this format.) |
| [in] | inChanSelect | Specifies the ancillary data channel to search, whether in the luma (kNTV2SMPTEAncChannel_Y) or chroma (kNTV2SMPTEAncChannel_C). Use kNTV2SMPTEAncChannel_Both for SD video. |
| [out] | outRawPackets | Receives the UWordVancPacketList, which will have one UWordSequence per extracted packet. Each UWordSequence in the returned list will start with the 0x000/0x3FF/0x3FF/DID/SDID/DC sequence, followed by each 10-bit packet data word, and ending with the checksum word. |
| [out] | outWordOffsets | Receives the horizontal word offsets into the line, one for each packet found. This should have the same number of elements as "outRawPackets". These offsets can also be used to discern which channel each packet originated in (Y or C). |
|
static |
Answers with the SMPTE raster line number into which NTSC caption CDPs should be inserted.
| [in] | inVideoFormat | Specifies the video format. |
| [in] | inIsField1 | Specify true for Field 1; otherwise false for Field 2. |
|
static |
|
static |
Inserts ancillary data at a given line and channel offset into the given host frame buffer.
| [in] | pInAncBuff | Specifies a valid, non-NULL starting address of the buffer that contains the ancillary data to be inserted into the host frame buffer. |
| [in] | inAncWordCount | Specifies the number of two-byte words of ancillary data in the pAncBuff to be inserted into the host frame buffer. |
| [in] | inLineOffset | Specifies the line offset into the host frame buffer into which the ancillary data will be inserted. |
| [in] | inWordOffset | Specifies the word offset in the host frame buffer into which the ancillary data will be inserted. This effectively determines the anc channel in which to embed the data (e.g., 1 uses the Y/luma channel). |
| [in] | pFrameBuffer | Specifies a valid, non-NULL starting address of the host frame buffer that is to have the ancillary data inserted into it. |
| [in] | inVideoFormat | Specifies the video format. |
| [in] | inFBFormat | Specifies the pixel format of the host frame buffer. |
|
static |
Inserts ancillary data at a given line and channel offset into the given host frame buffer.
| [in] | pInAncBuff | Specifies a valid, non-NULL starting address of the buffer that contains the ancillary data to be inserted into the host frame buffer. |
| [in] | inAncWordCount | Specifies the number of two-byte words of ancillary data in the pAncBuff to be inserted into the host frame buffer. |
| [in] | inSMPTELineNum | Specifies the SMPTE line number into which the ancillary data will be inserted in the host frame buffer. |
| [in] | inWordOffset | Specifies the word offset in the host frame buffer into which the ancillary data will be inserted. This effectively determines the anc channel in which to embed the data (e.g., 1 uses the Y/luma channel). |
| [in] | pFrameBuffer | Specifies a valid, non-NULL starting address of the host frame buffer that is to have the ancillary data inserted into it. |
| [in] | inVideoFormat | Specifies the video format. |
| [in] | inFBFormat | Specifies the pixel format of the host frame buffer. |
|
static |
|
static |
|
static |
|
static |
|
static |
Converts a single line of NTV2_FBF_8BIT_YCBCR data from the given source buffer into an ordered sequence of UWords that contain the resulting 10-bit even-parity data.
| [in] | pInYUV8Line | A valid, non-NULL pointer to the start of the VANC line in an NTV2_FBF_8BIT_YCBCR video buffer. |
| [out] | out16BitYUVLine | Receives the converted 10-bit-per-component values as an ordered sequence of UWord values, which will include even parity and valid checksums. |
| [in] | inNumPixels | Specifies the width of the line to be converted, in pixels. |