AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
pixelformat.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: MIT */
8 #ifndef _PixelFormat_Defined_
9 #define _PixelFormat_Defined_
10 
12 
13 #define IS_CION_RAW(pixFmt) (pixFmt >= AJA_PixelFormat_RAW10 && pixFmt <= AJA_PixelFormat_RAW10_HS)
14 
16 {
21  AJAScaleTypeQRez = 1 << 3,
24 };
25 
26 
28 {
35 };
36 
37 
44 {
45 public:
46 
49  virtual ~AJAPixelFormat();
50 
56  void Set(AJA_PixelFormat format);
57 
63  AJA_PixelFormat Query(void);
64 
70  uint32_t QueryFourCC(void);
71 
77  const char* QueryDisplayName(void);
78 
84  bool QueryRgb(void);
85 
91  uint32_t QueryBitDepth();
92  static uint32_t QueryBitDepth(AJA_PixelFormat format);
93 
99  AJASubSampleType QuerySubSampleType();
100  static AJASubSampleType QuerySubSampleType(AJA_PixelFormat format);
101 
107  uint32_t QueryPlaneCount();
108  static uint32_t QueryPlaneCount(AJA_PixelFormat format);
109 
110 
116  bool QueryIsValid();
117  static bool QueryIsValid(AJA_PixelFormat format);
118 
119 
125  AJAScaleType QueryScaleType(void);
126 
133  static int QueryNumberPossibleFormats();
134 
143  static bool QueryFormatAtIndex(int index,AJAPixelFormat& fmt);
144 
156  static bool QueryIsScalable(uint32_t bitmapWidth,uint32_t wireWidth,uint32_t xAspect,uint32_t yAspect,
157  AJA_PixelFormat *pMatchingFormat,AJA_PixelFormat *pScalingFormat);
158 
167  static bool ConvertWidth(AJAScaleType scaleType,int xIn,int &xOut);
168 
179  static bool ConvertAspect(AJAScaleType scaleType,int hIn, int vIn, int &hOut,int &vOut);
180 
190  static bool QueryScaleType(int xWire,int xBitmap,AJA_PixelFormat &primaryFormat,AJAScaleType &scaleType);
191 
192 
200  static int QueryFullScaleWidth(int scaledWidth, int height);
201 
202 
210  static AJA_PixelFormat QueryScaledPixelFormat(int scaledWidth, int height);
211 
212 
213 protected:
215 };
216 
217 #endif // _PixelFormat_Defined_
AJAScaleTypeDVCPro
@ AJAScaleTypeDVCPro
Definition: pixelformat.h:23
AJA_EXPORT
#define AJA_EXPORT
Definition: export.h:34
AJAScaleType1280To1920
@ AJAScaleType1280To1920
Definition: pixelformat.h:18
AJAScaleType960To1280
@ AJAScaleType960To1280
Definition: pixelformat.h:19
AJASubSample420
@ AJASubSample420
Definition: pixelformat.h:31
AJAScaleTypeQRez
@ AJAScaleTypeQRez
Definition: pixelformat.h:21
AJAPixelFormat
Storage and utility class for AJA_PixelFormat defines. This class provides a means of storing and que...
Definition: pixelformat.h:43
AJAScaleTypeHDV
@ AJAScaleTypeHDV
Definition: pixelformat.h:22
AJASubSample444
@ AJASubSample444
Definition: pixelformat.h:32
AJASubSampleType
AJASubSampleType
Definition: pixelformat.h:27
AJASubSample4444
@ AJASubSample4444
Definition: pixelformat.h:33
AJAScaleType1440To1920
@ AJAScaleType1440To1920
Definition: pixelformat.h:20
AJAPixelFormat::m_format
AJA_PixelFormat m_format
Definition: pixelformat.h:214
AJASubSampleBayer
@ AJASubSampleBayer
Definition: pixelformat.h:34
AJAScaleTypeNone
@ AJAScaleTypeNone
Definition: pixelformat.h:17
AJASubSampleNone
@ AJASubSampleNone
Definition: pixelformat.h:29
videotypes.h
Declares the enumeration constants used in the ajabase library.
AJA_PixelFormat
AJA_PixelFormat
Definition: videotypes.h:121
AJAScaleType
AJAScaleType
Definition: pixelformat.h:15
AJASubSample422
@ AJASubSample422
Definition: pixelformat.h:30