GoPxL SDK
GoGdpPixelFormat.h
Go to the documentation of this file.
1 
10 #ifndef GO_PXL_SDK_GOGDPPIXELFORMAT_H
11 #define GO_PXL_SDK_GOGDPPIXELFORMAT_H
12 
14 
15 class GoGdpMsgTests;
16 
17 namespace GoPxLSdk
18 {
20  {
21  public:
22  // Enums
23 
27  enum ColorType : k32s
28  {
29  Mono = 0x01000000,
30  Color = 0x02000000
31  };
32 
36  enum PixelSize : k32s
37  {
38  Size_8_Bit = 0x00080000,
39  Size_10_Bit = 0x000A0000,
40  Size_12_Bit = 0x000C0000,
41  Size_14_Bit = 0x000E0000,
42  Size_16_Bit = 0x00100000,
43  Size_24_Bit = 0x00180000,
44  Size_32_Bit = 0x00200000,
45  Size_48_Bit = 0x00300000,
46  Size_64_Bit = 0x00400000,
47  };
48 
59  enum FormatType : k32s
60  {
61  //kPixelFormats
62  Null_Format = 0, // Unknown pixel format.
63  Greyscale_8BPP = 1, // 8-bit greyscale (k8u)
64  CFA_8BPP = 2, // 8-bit color filter array (k8u)
65  BGRX_8BPC = 3, // 8-bits-per-channel ColorType::Color with 4 channels (blue/green/red/unused)(kRgb)
66  Greyscale_1BPP = 4, // 1-bit greyscale, 8 packed pixels per image element (k8u)
67  Greyscale_16BPP = 5, // 16-bit greyscale (k16u)
68  BGR_8BPC = 6, // 8-bits-per-channel color with 3 channels (blue/green/red)(kRgb24)
69 
70  // mono formats
71  Mono8 = ColorType::Mono | PixelSize::Size_8_Bit | 0x0001,
72  Mono10 = ColorType::Mono | PixelSize::Size_16_Bit | 0x0003,
73  Mono10p = ColorType::Mono | PixelSize::Size_10_Bit | 0x0046,
74  Mono12 = ColorType::Mono | PixelSize::Size_16_Bit | 0x0005,
75  Mono12Packed = ColorType::Mono | PixelSize::Size_12_Bit | 0x0006,
76  Mono12p = ColorType::Mono | PixelSize::Size_12_Bit | 0x0047,
77  Mono14 = ColorType::Mono | PixelSize::Size_16_Bit | 0x0025,
78  Mono16 = ColorType::Mono | PixelSize::Size_16_Bit | 0x0007,
79 
80  // bayer formats
81  BayerGR8 = ColorType::Mono | PixelSize::Size_8_Bit | 0x0008,
82  BayerRG8 = ColorType::Mono | PixelSize::Size_8_Bit | 0x0009,
83  BayerGB8 = ColorType::Mono | PixelSize::Size_8_Bit | 0x000A,
84  BayerBG8 = ColorType::Mono | PixelSize::Size_8_Bit | 0x000B,
85  BayerGR10 = ColorType::Mono | PixelSize::Size_16_Bit | 0x000C,
86  BayerRG10 = ColorType::Mono | PixelSize::Size_16_Bit | 0x000D,
87  BayerGB10 = ColorType::Mono | PixelSize::Size_16_Bit | 0x000E,
88  BayerBG10 = ColorType::Mono | PixelSize::Size_16_Bit | 0x000F,
89  BayerGR12 = ColorType::Mono | PixelSize::Size_16_Bit | 0x0010,
90  BayerRG12 = ColorType::Mono | PixelSize::Size_16_Bit | 0x0011,
91  BayerGB12 = ColorType::Mono | PixelSize::Size_16_Bit | 0x0012,
92  BayerBG12 = ColorType::Mono | PixelSize::Size_16_Bit | 0x0013,
93  BayerGR12Packed = ColorType::Mono | PixelSize::Size_12_Bit | 0x002A,
94  BayerRG12Packed = ColorType::Mono | PixelSize::Size_12_Bit | 0x002B,
95  BayerGB12Packed = ColorType::Mono | PixelSize::Size_12_Bit | 0x002C,
96  BayerBG12Packed = ColorType::Mono | PixelSize::Size_12_Bit | 0x002D,
97  BayerGR10p = ColorType::Mono | PixelSize::Size_10_Bit | 0x0056,
98  BayerRG10p = ColorType::Mono | PixelSize::Size_10_Bit | 0x0058,
99  BayerGB10p = ColorType::Mono | PixelSize::Size_10_Bit | 0x0054,
100  BayerBG10p = ColorType::Mono | PixelSize::Size_10_Bit | 0x0052,
101  BayerGR12p = ColorType::Mono | PixelSize::Size_12_Bit | 0x0057,
102  BayerRG12p = ColorType::Mono | PixelSize::Size_12_Bit | 0x0059,
103  BayerGB12p = ColorType::Mono | PixelSize::Size_12_Bit | 0x0055,
104  BayerBG12p = ColorType::Mono | PixelSize::Size_12_Bit | 0x0053,
105  BayerGR16 = ColorType::Mono | PixelSize::Size_16_Bit | 0x002E,
106  BayerRG16 = ColorType::Mono | PixelSize::Size_16_Bit | 0x002F,
107  BayerGB16 = ColorType::Mono | PixelSize::Size_16_Bit | 0x0030,
108  BayerBG16 = ColorType::Mono | PixelSize::Size_16_Bit | 0x0031,
109 
110  // rgb formats
111  Rgb8 = ColorType::Color | PixelSize::Size_24_Bit | 0x0014,
112  Bgr8 = ColorType::Color | PixelSize::Size_24_Bit | 0x0015,
113  Rgb10 = ColorType::Color | PixelSize::Size_48_Bit | 0x0018,
114  Bgr10 = ColorType::Color | PixelSize::Size_48_Bit | 0x0019,
115  Rgb12 = ColorType::Color | PixelSize::Size_48_Bit | 0x001A,
116  Bgr12 = ColorType::Color | PixelSize::Size_48_Bit | 0x001B,
117  Rgb14 = ColorType::Color | PixelSize::Size_48_Bit | 0x005E,
118  Bgr14 = ColorType::Color | PixelSize::Size_48_Bit | 0x004A,
119  Rgb16 = ColorType::Color | PixelSize::Size_48_Bit | 0x0033,
120  Bgr16 = ColorType::Color | PixelSize::Size_48_Bit | 0x004B,
121 
122  // rgba formats
123  Rgba8 = ColorType::Color | PixelSize::Size_32_Bit | 0x0016,
124  Bgra8 = ColorType::Color | PixelSize::Size_32_Bit | 0x0017,
125  Rgba10 = ColorType::Color | PixelSize::Size_64_Bit | 0x005F,
126  Bgra10 = ColorType::Color | PixelSize::Size_64_Bit | 0x004C,
127  Rgba12 = ColorType::Color | PixelSize::Size_64_Bit | 0x0061,
128  Bgra12 = ColorType::Color | PixelSize::Size_64_Bit | 0x004E,
129  Rgba14 = ColorType::Color | PixelSize::Size_64_Bit | 0x0063,
130  Bgra14 = ColorType::Color | PixelSize::Size_64_Bit | 0x0050,
131  Rgba16 = ColorType::Color | PixelSize::Size_64_Bit | 0x0064,
132  Bgra16 = ColorType::Color | PixelSize::Size_64_Bit | 0x0051,
133 
134  // yuv/ycbcr formats
135  Yuv411 = ColorType::Color | PixelSize::Size_12_Bit | 0x001E,
136  Yuv422 = ColorType::Color | PixelSize::Size_16_Bit | 0x001F,
137  Yuv444 = ColorType::Color | PixelSize::Size_24_Bit | 0x0020,
138  Yuv422_8 = ColorType::Color | PixelSize::Size_16_Bit | 0x0032,
139  YCbCr8_CbYCr = ColorType::Color | PixelSize::Size_24_Bit | 0x003A,
140  YCbCr422_8 = ColorType::Color | PixelSize::Size_16_Bit | 0x003B,
141  YCbCr411_8_CbYYCrYY = ColorType::Color | PixelSize::Size_12_Bit | 0x003C,
142  YCbCr601_8_CbYCr = ColorType::Color | PixelSize::Size_24_Bit | 0x003D,
143  YCbCr601_422_8 = ColorType::Color | PixelSize::Size_16_Bit | 0x003E,
144  YCbCr601_411_8_CbYYCrYY = ColorType::Color | PixelSize::Size_12_Bit | 0x003F,
145  YCbCr709_8_CbYCr = ColorType::Color | PixelSize::Size_24_Bit | 0x0040,
146  YCbCr709_422_8 = ColorType::Color | PixelSize::Size_16_Bit | 0x0041,
147  YCbCr709_411_8_CbYYCrYY = ColorType::Color | PixelSize::Size_12_Bit | 0x0042,
148  YCbCr422_8_CbYCrY = ColorType::Color | PixelSize::Size_16_Bit | 0x0043,
149  YCbCr601_422_8_CbYCrY = ColorType::Color | PixelSize::Size_16_Bit | 0x0044,
150  YCbCr709_422_8_CbYCrY = ColorType::Color | PixelSize::Size_16_Bit | 0x0045,
151  YCbCr411_8 = ColorType::Color | PixelSize::Size_12_Bit | 0x005A,
152  YCbCr8 = ColorType::Color | PixelSize::Size_24_Bit | 0x005B,
153  };
154 
155  public:
156  // Disables all default constructors.
157  GoGdpPixelFormat() = delete;
158  GoGdpPixelFormat(const GoGdpPixelFormat&) = delete;
159  GoGdpPixelFormat& operator=(const GoGdpPixelFormat) = delete;
160 
166  static const kSize PixelBits(FormatType type);
167 
175  static const k64f PixelBytes(FormatType type);
176  };
177 }
178 
179 #endif // GO_PXL_SDK_GOGDPPIXELFORMAT_H
#define GoPxLSdkClass
Definition: Def.h:35
ColorType
Indicates if pixel is monochrome or RGB.
Definition: GoGdpPixelFormat.h:27
FormatType
Pixel format types.
Definition: GoGdpPixelFormat.h:59
PixelSize
Indicates number of bits for a pixel.
Definition: GoGdpPixelFormat.h:36
Declares the GoPxLSdk.GoGdpMsg class.
Definition: GoGdpPixelFormat.h:19
Definition: Def.h:46