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