AJA NTV2 SDK
17.1.3.1410
NTV2 SDK 17.1.3.1410
|
Describes a video frame for a given video standard or format and pixel format, including the total number of lines, number of pixels per line, line pitch, and which line contains the start of active video. More...
#include <ntv2formatdescriptor.h>
Public Member Functions | |
void | MakeInvalid (void) |
Resets me into an invalid (NULL) state. More... | |
Constructors | |
NTV2FormatDescriptor () | |
My default constructor initializes me in an "invalid" state. More... | |
NTV2FormatDescriptor (const ULWord inNumLines, const ULWord inNumPixels, const ULWord inLinePitch, const ULWord inFirstActiveLine=0) | |
Construct from line and pixel count, plus line pitch. More... | |
NTV2FormatDescriptor (const NTV2Standard inStandard, const NTV2FrameBufferFormat inFrameBufferFormat, const NTV2VANCMode inVancMode=NTV2_VANCMODE_OFF) | |
Constructs me from the given video standard, pixel format, and VANC settings. More... | |
NTV2FormatDescriptor (const NTV2VideoFormat inVideoFormat, const NTV2FrameBufferFormat inFrameBufferFormat, const NTV2VANCMode inVancMode=NTV2_VANCMODE_OFF) | |
Constructs me from the given video format, pixel format and VANC settings. More... | |
Inquiry | |
bool | IsValid (void) const |
ULWord | GetVerticalSampleRatio (const UWord inPlaneIndex0=0) const |
ULWord | GetTotalRasterBytes (const UWord inPlaneIndex0=0) const |
ULWord | GetTotalBytes (void) const |
ULWord | GetVideoWriteSize (ULWord inPageSize=4096UL) const |
ULWord | GetVisibleRasterBytes (const UWord inPlaneIndex0=0) const |
ULWord | GetBytesPerRow (const UWord inPlaneIndex0=0) const |
std::string | PlaneToString (const UWord inPlaneIndex0) const |
UWord | ByteOffsetToPlane (const ULWord inByteOffset) const |
UWord | ByteOffsetToRasterLine (const ULWord inByteOffset) const |
bool | IsAtLineStart (ULWord inByteOffset) const |
ULWord | GetRasterHeight (const bool inVisibleOnly=false) const |
ULWord | GetFullRasterHeight (void) const |
ULWord | GetFirstActiveLine (void) const |
ULWord | GetVisibleRasterHeight (void) const |
bool | GetRowBuffer (const NTV2Buffer &inFrameBuffer, NTV2Buffer &inOutRowBuffer, const ULWord inRowIndex0, const UWord inPlaneIndex0=0) const |
Answers with an NTV2Buffer that describes the given row (and plane) given the NTV2Buffer that describes the frame buffer. More... | |
const void * | GetRowAddress (const void *pInStartAddress, const ULWord inRowIndex0, const UWord inPlaneIndex0=0) const |
void * | GetWriteableRowAddress (void *pInStartAddress, const ULWord inRowIndex0, const UWord inPlaneIndex0=0) const |
ULWord | RasterLineToByteOffset (const ULWord inRowIndex0, const UWord inPlaneIndex0=0) const |
UByte * | GetTopVisibleRowAddress (UByte *pInStartAddress) const |
bool | GetFirstChangedRow (const void *pInStartAddress1, const void *pInStartAddress2, ULWord &outFirstChangedRowNum) const |
Compares two buffers line-by-line (using my description of the buffer contents). More... | |
bool | GetChangedLines (NTV2RasterLineOffsets &outDiffs, const void *pInBuffer1, const void *pInBuffer2, const ULWord inMaxLines=0) const |
Compares two buffers line-by-line (using my description of the buffer contents). More... | |
NTV2FrameDimensions | GetFullRasterDimensions (void) const |
NTV2FrameDimensions | GetVisibleRasterDimensions (void) const |
bool | GetSMPTELineNumber (const ULWord inLineOffset, ULWord &outSMPTELine, bool &outIsField2) const |
Answers with the equivalent SMPTE line number for the given line offset into the frame buffer I describe. More... | |
bool | GetLineOffsetFromSMPTELine (const ULWord inSMPTELine, ULWord &outLineOffset) const |
Answers with the equivalent line offset into the raster I describe for the given SMPTE line number. More... | |
NTV2SegmentedXferInfo & | GetSegmentedXferInfo (NTV2SegmentedXferInfo &inSegmentInfo, const bool inIsSource=true) const |
Sets the given NTV2SegmentedXferInfo to match my raster, as a source or destination. More... | |
bool | operator== (const NTV2FormatDescriptor &inRHS) const |
std::ostream & | Print (std::ostream &inOutStream, const bool inDetailed=true) const |
Writes a human-readable description of me into the given output stream. More... | |
std::ostream & | PrintSMPTELineNumber (std::ostream &inOutStream, const ULWord inLineOffset, const bool inForTextMode=false) const |
Writes the given frame buffer line offset as a formatted SMPTE line number into the given output stream. More... | |
bool | Is2KFormat (void) const |
Public Attributes | |
ULWord | numLines |
Height – total number of lines. More... | |
ULWord | numPixels |
Width – total number of pixels per line. More... | |
ULWord | linePitch |
Number of 32-bit words per line. Shadows mLinePitch[0] * sizeof(ULWord). More... | |
ULWord | firstActiveLine |
First active line of video (0 if NTV2_VANCMODE_OFF) More... | |
Friends | |
class | CNTV2CaptionRenderer |
Describes a video frame for a given video standard or format and pixel format, including the total number of lines, number of pixels per line, line pitch, and which line contains the start of active video.
Definition at line 41 of file ntv2formatdescriptor.h.
|
explicit |
My default constructor initializes me in an "invalid" state.
My default constructor
Definition at line 812 of file ntv2formatdescriptor.cpp.
|
explicit |
Construct from line and pixel count, plus line pitch.
[in] | inNumLines | Specifies the total number of lines. |
[in] | inNumPixels | Specifies the total number of pixels. |
[in] | inLinePitch | Specifies the line pitch as the number of 32-bit words per line. |
[in] | inFirstActiveLine | Optionally specifies the first active line of video, where zero is the first (top) line. Defaults to zero. |
Definition at line 818 of file ntv2formatdescriptor.cpp.
|
explicit |
Constructs me from the given video standard, pixel format, and VANC settings.
[in] | inStandard | Specifies the video standard being used. |
[in] | inFrameBufferFormat | Specifies the pixel format of the frame buffer. |
[in] | inVancMode | Specifies the VANC mode. Defaults to OFF. |
Definition at line 651 of file ntv2formatdescriptor.cpp.
|
explicit |
Constructs me from the given video format, pixel format and VANC settings.
[in] | inVideoFormat | Specifies the video format being used. |
[in] | inFrameBufferFormat | Specifies the pixel format of the frame buffer. |
[in] | inVancMode | Specifies the VANC mode. |
Definition at line 756 of file ntv2formatdescriptor.cpp.
[in] | inByteOffset | The offset, in bytes, to the byte of interest in the frame. |
Definition at line 925 of file ntv2formatdescriptor.cpp.
[in] | inByteOffset | The offset, in bytes, to the byte of interest in the raster buffer. |
Definition at line 942 of file ntv2formatdescriptor.cpp.
[in] | inPlaneIndex0 | Specifies the plane of interest. Defaults to zero. |
Definition at line 140 of file ntv2formatdescriptor.h.
bool NTV2FormatDescriptor::GetChangedLines | ( | NTV2RasterLineOffsets & | outDiffs, |
const void * | pInBuffer1, | ||
const void * | pInBuffer2, | ||
const ULWord | inMaxLines = 0 |
||
) | const |
Compares two buffers line-by-line (using my description of the buffer contents).
[out] | outDiffs | Receives the ordered sequence of line offsets of the lines that differed. This will be empty if the two buffers are identical (or if an error occurs). |
[in] | pInBuffer1 | Specifies the non-NULL address of the first memory buffer whose contents are to be compared. |
[in] | pInBuffer2 | Specifies the non-NULL address of the second memory buffer whose contents are to be compared. |
[in] | inMaxLines | Optionally specifies the maximum number of lines to compare. If zero, all lines are compared. Defaults to zero (all lines). |
Definition at line 1078 of file ntv2formatdescriptor.cpp.
|
inline |
Definition at line 180 of file ntv2formatdescriptor.h.
bool NTV2FormatDescriptor::GetFirstChangedRow | ( | const void * | pInStartAddress1, |
const void * | pInStartAddress2, | ||
ULWord & | outFirstChangedRowNum | ||
) | const |
Compares two buffers line-by-line (using my description of the buffer contents).
[in] | pInStartAddress1 | A valid, non-NULL pointer to the start of the first raster buffer. |
[in] | pInStartAddress2 | A valid, non-NULL pointer to the start of the second raster buffer. |
[out] | outFirstChangedRowNum | Receives the zero-based row number of the first row that's different, or 0xFFFFFFFF if identical. |
Definition at line 1054 of file ntv2formatdescriptor.cpp.
NTV2FrameDimensions NTV2FormatDescriptor::GetFullRasterDimensions | ( | void | ) | const |
Definition at line 1258 of file ntv2formatdescriptor.cpp.
|
inline |
Definition at line 175 of file ntv2formatdescriptor.h.
bool NTV2FormatDescriptor::GetLineOffsetFromSMPTELine | ( | const ULWord | inSMPTELine, |
ULWord & | outLineOffset | ||
) | const |
Answers with the equivalent line offset into the raster I describe for the given SMPTE line number.
[in] | inSMPTELine | Specifies the SMPTE line number. |
[out] | outLineOffset | Receives the zero-based line offset into the raster I describe. |
Definition at line 1200 of file ntv2formatdescriptor.cpp.
[in] | inVisibleOnly | Specify true to return just the visible height; otherwise false (the default) to return the full height. |
Definition at line 170 of file ntv2formatdescriptor.h.
const void * NTV2FormatDescriptor::GetRowAddress | ( | const void * | pInStartAddress, |
const ULWord | inRowIndex0, | ||
const UWord | inPlaneIndex0 = 0 |
||
) | const |
[in] | pInStartAddress | A pointer to the raster buffer. |
[in] | inRowIndex0 | Specifies the row of interest in the buffer, where zero is the topmost row. |
[in] | inPlaneIndex0 | Specifies the plane of interest. Defaults to zero. |
Definition at line 997 of file ntv2formatdescriptor.cpp.
bool NTV2FormatDescriptor::GetRowBuffer | ( | const NTV2Buffer & | inFrameBuffer, |
NTV2Buffer & | inOutRowBuffer, | ||
const ULWord | inRowIndex0, | ||
const UWord | inPlaneIndex0 = 0 |
||
) | const |
Answers with an NTV2Buffer that describes the given row (and plane) given the NTV2Buffer that describes the frame buffer.
[in] | inFrameBuffer | Specifies the frame buffer (that includes all planes, if planar). |
inOutRowBuffer | Receives the NTV2Buffer that references the row (and plane) in the frame buffer. | |
[in] | inRowIndex0 | Specifies the row of interest in the buffer, where zero is the topmost row. |
[in] | inPlaneIndex0 | Optionally specifies the plane of interest. Defaults to zero. |
Definition at line 971 of file ntv2formatdescriptor.cpp.
NTV2SegmentedXferInfo & NTV2FormatDescriptor::GetSegmentedXferInfo | ( | NTV2SegmentedXferInfo & | inSegmentInfo, |
const bool | inIsSource = true |
||
) | const |
Sets the given NTV2SegmentedXferInfo to match my raster, as a source or destination.
inSegmentInfo | Specifies the segmented transfer object to modify. | |
[in] | inIsSource | Specify 'true' (the default) to set the "source" aspect of the transfer info object; otherwise 'false' to set the "destination" aspect of it. |
Definition at line 1269 of file ntv2formatdescriptor.cpp.
bool NTV2FormatDescriptor::GetSMPTELineNumber | ( | const ULWord | inLineOffset, |
ULWord & | outSMPTELine, | ||
bool & | outIsField2 | ||
) | const |
Answers with the equivalent SMPTE line number for the given line offset into the frame buffer I describe.
[in] | inLineOffset | Specifies the zero-based line offset into the frame buffer that I describe. |
[out] | outSMPTELine | Receives the equivalent SMPTE line number. |
[out] | outIsField2 | Receives true if the line number is associated with Field 2 (interlaced only); otherwise false. |
Definition at line 1168 of file ntv2formatdescriptor.cpp.
[in] | pInStartAddress | A pointer to the raster buffer. |
Definition at line 230 of file ntv2formatdescriptor.h.
ULWord NTV2FormatDescriptor::GetTotalBytes | ( | void | ) | const |
Definition at line 851 of file ntv2formatdescriptor.cpp.
[in] | inPlaneIndex0 | Specifies the plane of interest. Defaults to zero. |
Definition at line 114 of file ntv2formatdescriptor.h.
[in] | inPlaneIndex0 | Specifies the plane of interest. Defaults to zero. |
Definition at line 881 of file ntv2formatdescriptor.cpp.
[in] | inPageSize | Optionally specifies the page size to use. Defaults to 4096 (4K) bytes. |
Definition at line 862 of file ntv2formatdescriptor.cpp.
[in] | inPlaneIndex0 | Specifies the plane of interest. Defaults to zero, the first plane. |
Definition at line 134 of file ntv2formatdescriptor.h.
NTV2FrameDimensions NTV2FormatDescriptor::GetVisibleRasterDimensions | ( | void | ) | const |
Definition at line 1263 of file ntv2formatdescriptor.cpp.
|
inline |
Definition at line 185 of file ntv2formatdescriptor.h.
void * NTV2FormatDescriptor::GetWriteableRowAddress | ( | void * | pInStartAddress, |
const ULWord | inRowIndex0, | ||
const UWord | inPlaneIndex0 = 0 |
||
) | const |
[in] | pInStartAddress | A non-const pointer to the raster buffer. |
[in] | inRowIndex0 | Specifies the row of interest in the buffer, where zero is the topmost row. |
[in] | inPlaneIndex0 | Specifies the plane of interest. Defaults to zero. |
Definition at line 1018 of file ntv2formatdescriptor.cpp.
bool NTV2FormatDescriptor::Is2KFormat | ( | void | ) | const |
Definition at line 898 of file ntv2formatdescriptor.cpp.
bool NTV2FormatDescriptor::IsAtLineStart | ( | ULWord | inByteOffset | ) | const |
[in] | inByteOffset | The offset, in bytes, to the byte of interest in the frame. |
Definition at line 957 of file ntv2formatdescriptor.cpp.
|
inline |
Definition at line 94 of file ntv2formatdescriptor.h.
void NTV2FormatDescriptor::MakeInvalid | ( | void | ) |
Resets me into an invalid (NULL) state.
Definition at line 835 of file ntv2formatdescriptor.cpp.
bool NTV2FormatDescriptor::operator== | ( | const NTV2FormatDescriptor & | inRHS | ) | const |
[in] | inRHS | The right-hand-side operand that I'll be compared with. |
Definition at line 908 of file ntv2formatdescriptor.cpp.
string NTV2FormatDescriptor::PlaneToString | ( | const UWord | inPlaneIndex0 | ) | const |
Definition at line 916 of file ntv2formatdescriptor.cpp.
ostream & NTV2FormatDescriptor::Print | ( | std::ostream & | inOutStream, |
const bool | inDetailed = true |
||
) | const |
Writes a human-readable description of me into the given output stream.
inOutStream | The output stream to be written into. | |
[in] | inDetailed | If true (the default), writes a detailed description; otherwise writes a brief one. |
Definition at line 1108 of file ntv2formatdescriptor.cpp.
ostream & NTV2FormatDescriptor::PrintSMPTELineNumber | ( | std::ostream & | inOutStream, |
const ULWord | inLineOffset, | ||
const bool | inForTextMode = false |
||
) | const |
Writes the given frame buffer line offset as a formatted SMPTE line number into the given output stream.
inOutStream | The output stream to be written into. | |
[in] | inLineOffset | Specifies the zero-based line offset in the frame buffer. |
[in] | inForTextMode | Defaults to false. If true, omits the space between the field indicator and the line number, and adds leading zeroes to line number. |
Definition at line 1242 of file ntv2formatdescriptor.cpp.
ULWord NTV2FormatDescriptor::RasterLineToByteOffset | ( | const ULWord | inRowIndex0, |
const UWord | inPlaneIndex0 = 0 |
||
) | const |
[in] | inRowIndex0 | Specifies the row of interest in the buffer, where zero is the topmost row. |
[in] | inPlaneIndex0 | Specifies the plane of interest. Defaults to zero. |
Definition at line 1036 of file ntv2formatdescriptor.cpp.
|
friend |
Definition at line 341 of file ntv2formatdescriptor.h.
ULWord NTV2FormatDescriptor::firstActiveLine |
First active line of video (0 if NTV2_VANCMODE_OFF)
Definition at line 351 of file ntv2formatdescriptor.h.
ULWord NTV2FormatDescriptor::linePitch |
Number of 32-bit words per line. Shadows mLinePitch[0] * sizeof(ULWord).
Definition at line 350 of file ntv2formatdescriptor.h.
ULWord NTV2FormatDescriptor::numLines |
Height – total number of lines.
Definition at line 348 of file ntv2formatdescriptor.h.
ULWord NTV2FormatDescriptor::numPixels |
Width – total number of pixels per line.
Definition at line 349 of file ntv2formatdescriptor.h.