AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
AJAPixelFormat Class Reference

Storage and utility class for AJA_PixelFormat defines. This class provides a means of storing and querying facts about the various AJA_PixelFormat values. More...

#include "streams/common/pixelformat.h"

Public Member Functions

 AJAPixelFormat ()
 
 AJAPixelFormat (AJA_PixelFormat format)
 
virtual ~AJAPixelFormat ()
 
void Set (AJA_PixelFormat format)
 
AJA_PixelFormat Query (void)
 
uint32_t QueryFourCC (void)
 
const char * QueryDisplayName (void)
 
bool QueryRgb (void)
 
uint32_t QueryBitDepth ()
 
AJASubSampleType QuerySubSampleType ()
 
uint32_t QueryPlaneCount ()
 
bool QueryIsValid ()
 
AJAScaleType QueryScaleType (void)
 

Static Public Member Functions

static uint32_t QueryBitDepth (AJA_PixelFormat format)
 
static AJASubSampleType QuerySubSampleType (AJA_PixelFormat format)
 
static uint32_t QueryPlaneCount (AJA_PixelFormat format)
 
static bool QueryIsValid (AJA_PixelFormat format)
 
static int QueryNumberPossibleFormats ()
 
static bool QueryFormatAtIndex (int index, AJAPixelFormat &fmt)
 
static bool QueryIsScalable (uint32_t bitmapWidth, uint32_t wireWidth, uint32_t xAspect, uint32_t yAspect, AJA_PixelFormat *pMatchingFormat, AJA_PixelFormat *pScalingFormat)
 
static bool ConvertWidth (AJAScaleType scaleType, int xIn, int &xOut)
 
static bool ConvertAspect (AJAScaleType scaleType, int hIn, int vIn, int &hOut, int &vOut)
 
static bool QueryScaleType (int xWire, int xBitmap, AJA_PixelFormat &primaryFormat, AJAScaleType &scaleType)
 
static int QueryFullScaleWidth (int scaledWidth, int height)
 
static AJA_PixelFormat QueryScaledPixelFormat (int scaledWidth, int height)
 

Protected Attributes

AJA_PixelFormat m_format
 

Detailed Description

Storage and utility class for AJA_PixelFormat defines. This class provides a means of storing and querying facts about the various AJA_PixelFormat values.

Definition at line 43 of file pixelformat.h.

Constructor & Destructor Documentation

◆ AJAPixelFormat() [1/2]

AJAPixelFormat::AJAPixelFormat ( )

Definition at line 88 of file pixelformat.cpp.

◆ AJAPixelFormat() [2/2]

AJAPixelFormat::AJAPixelFormat ( AJA_PixelFormat  format)

Definition at line 93 of file pixelformat.cpp.

◆ ~AJAPixelFormat()

AJAPixelFormat::~AJAPixelFormat ( )
virtual

Definition at line 100 of file pixelformat.cpp.

Member Function Documentation

◆ ConvertAspect()

bool AJAPixelFormat::ConvertAspect ( AJAScaleType  scaleType,
int  hIn,
int  vIn,
int &  hOut,
int &  vOut 
)
static

Static method to convert aspect ratio from wire to bitmap

Parameters
[in]scaleTypeType of scaling to be done
[in]hInHorizontal value to convert
[in]vInVertical value to convert
[out]hOutConverted horizontal value
[out]vOutConverted vertical value
Returns
True if conversion occurred

Definition at line 304 of file pixelformat.cpp.

◆ ConvertWidth()

bool AJAPixelFormat::ConvertWidth ( AJAScaleType  scaleType,
int  xIn,
int &  xOut 
)
static

Static method to convert scaled x resolution

Parameters
[in]scaleTypetype of scaling to be done
[in]xIneither the wire or bitmap resolution
[out]xOutthe corrected resolution
Returns
returns true if conversion occurred

Definition at line 252 of file pixelformat.cpp.

◆ Query()

AJA_PixelFormat AJAPixelFormat::Query ( void  )

Query current format value.

Returns
current AJA_PixelFormat value.

Definition at line 111 of file pixelformat.cpp.

◆ QueryBitDepth() [1/2]

uint32_t AJAPixelFormat::QueryBitDepth ( )

Query max bit depth per component for specified format

Returns
bit depth per component for specified format

Definition at line 131 of file pixelformat.cpp.

◆ QueryBitDepth() [2/2]

uint32_t AJAPixelFormat::QueryBitDepth ( AJA_PixelFormat  format)
static

Definition at line 136 of file pixelformat.cpp.

◆ QueryDisplayName()

const char * AJAPixelFormat::QueryDisplayName ( void  )

Query display name.

Returns
current display name.

Definition at line 121 of file pixelformat.cpp.

◆ QueryFormatAtIndex()

bool AJAPixelFormat::QueryFormatAtIndex ( int  index,
AJAPixelFormat fmt 
)
static

Static method to get a format out of table of all possible formats

Parameters
[in]indexZero-based index value.
[out]fmtReceives format for index. Unmodified if index out of bounds.
Returns
true if index within bounds

Definition at line 187 of file pixelformat.cpp.

◆ QueryFourCC()

uint32_t AJAPixelFormat::QueryFourCC ( void  )

Query current fourCC value.

Returns
current FourCC value.

Definition at line 116 of file pixelformat.cpp.

◆ QueryFullScaleWidth()

int AJAPixelFormat::QueryFullScaleWidth ( int  scaledWidth,
int  height 
)
static

Static method to provide expanded width for width-scaled rasters (e.g. DVCPro, HDV)

Parameters
[in]scaledWidthwidth of scaled raster prior to full-width video expansion
[in]heightheight of scaled raster
Returns
returns expanded width if input raster size matches known scaled raster type, otherwise returns input (scaledWidth)

Definition at line 357 of file pixelformat.cpp.

◆ QueryIsScalable()

bool AJAPixelFormat::QueryIsScalable ( uint32_t  bitmapWidth,
uint32_t  wireWidth,
uint32_t  xAspect,
uint32_t  yAspect,
AJA_PixelFormat pMatchingFormat,
AJA_PixelFormat pScalingFormat 
)
static

Static method to see if a source and target resolution are scalable

Parameters
[in]bitmapWidthwidth of the bitmap in PC memory
[in]wireWidthwidth of the bitmap in Kona memory
[in]xAspectHorizontal component of aspect ratio
[in]yAspectVertical component of aspect ratio
[in]pMatchingFormatPixel format used for matching
[out]pScalingFormatReceives scaling pixel format
Returns
returns true if one of the pixel formats will suffice for scaling

Definition at line 201 of file pixelformat.cpp.

◆ QueryIsValid() [1/2]

bool AJAPixelFormat::QueryIsValid ( )

Query is valid

Returns
true if AJA pixel format is valid

Definition at line 167 of file pixelformat.cpp.

◆ QueryIsValid() [2/2]

bool AJAPixelFormat::QueryIsValid ( AJA_PixelFormat  format)
static

Definition at line 172 of file pixelformat.cpp.

◆ QueryNumberPossibleFormats()

int AJAPixelFormat::QueryNumberPossibleFormats ( )
static

Static method to get number of possible formats Useful for filling out GUI's

Returns
number of possible formats

Definition at line 182 of file pixelformat.cpp.

◆ QueryPlaneCount() [1/2]

uint32_t AJAPixelFormat::QueryPlaneCount ( )

Query plane count

Returns
plane count

Definition at line 155 of file pixelformat.cpp.

◆ QueryPlaneCount() [2/2]

uint32_t AJAPixelFormat::QueryPlaneCount ( AJA_PixelFormat  format)
static

Definition at line 160 of file pixelformat.cpp.

◆ QueryRgb()

bool AJAPixelFormat::QueryRgb ( void  )

Query RGB.

Returns
whether or not current format is RGB.

Definition at line 126 of file pixelformat.cpp.

◆ QueryScaledPixelFormat()

AJA_PixelFormat AJAPixelFormat::QueryScaledPixelFormat ( int  scaledWidth,
int  height 
)
static

Static method to provide associated pixel format (e.g. DVCPro, HDV)

Parameters
[in]scaledWidthwidth of scaled raster prior to full-width video expansion
[in]heightheight of scaled raster
Returns
returns associated pixel format

Definition at line 374 of file pixelformat.cpp.

◆ QueryScaleType() [1/2]

bool AJAPixelFormat::QueryScaleType ( int  xWire,
int  xBitmap,
AJA_PixelFormat primaryFormat,
AJAScaleType scaleType 
)
static

Static method to provide a suggested scaling type and primary pixel format

Parameters
[in]xWirewire resolution
[in]xBitmapbitmap resolution
[out]primaryFormatunscaled pixel format
[out]scaleTypetype of scaling that needs to occur
Returns
returns true if conversion occurred

Definition at line 330 of file pixelformat.cpp.

◆ QueryScaleType() [2/2]

AJAScaleType AJAPixelFormat::QueryScaleType ( void  )

Query Scale Type.

Returns
what type of scale format uses if any.

Definition at line 177 of file pixelformat.cpp.

◆ QuerySubSampleType() [1/2]

AJASubSampleType AJAPixelFormat::QuerySubSampleType ( )

Query chroma sub-sample type

Returns
chroma sub-sample type

Definition at line 143 of file pixelformat.cpp.

◆ QuerySubSampleType() [2/2]

AJASubSampleType AJAPixelFormat::QuerySubSampleType ( AJA_PixelFormat  format)
static

Definition at line 148 of file pixelformat.cpp.

◆ Set()

void AJAPixelFormat::Set ( AJA_PixelFormat  format)

Set current format value.

Parameters
[in]formatnew AJA_PixelFormat.

Definition at line 104 of file pixelformat.cpp.

Member Data Documentation

◆ m_format

AJA_PixelFormat AJAPixelFormat::m_format
protected

Definition at line 214 of file pixelformat.h.


The documentation for this class was generated from the following files: