ADTF
Loading...
Searching...
No Matches
streamimageformat.h
Go to the documentation of this file.
1
7#pragma once
8#include <adtf_utils.h>
9
10namespace adtf
11{
12namespace streaming
13{
14namespace ant
15{
16
18#define ADTF_STREAMING_DEFAULT_SIZE_OF_STREAM_IMAGE_FORMATNAME 24
19
21typedef adtf_util::stack_string_base < ADTF_STREAMING_DEFAULT_SIZE_OF_STREAM_IMAGE_FORMATNAME, adtf_util::assert_out_of_range > cStreamFormatStorageType;
23typedef adtf_util::string_base<cStreamFormatStorageType> tStreamImageFormatName;
24
30{
35 uint32_t m_ui32Width = 0;
37 uint32_t m_ui32Height = 0;
39 size_t m_szMaxByteSize = 0;
43 uint8_t m_ui8DataEndianess = PLATFORM_BYTEORDER;
44};
45
53bool operator!=(const tStreamImageFormat& sLeft, const tStreamImageFormat& sRight);
61bool operator==(const tStreamImageFormat& sLeft, const tStreamImageFormat& sRight);
62
68{
69}
70
72#define ADTF_DEFINE_STREAM_IMAGE_FORMAT( _FORMAT_STRUCT_TYPE_, _FORMAT_NAME_) \
73namespace imageformat_definition \
74{ \
75 struct _FORMAT_STRUCT_TYPE_ \
76 { \
77 static constexpr const char *const FormatName = _FORMAT_NAME_; \
78 }; \
79}
80
83ADTF_DEFINE_STREAM_IMAGE_FORMAT(GREYSCALE_8, "GREY(8)")
85ADTF_DEFINE_STREAM_IMAGE_FORMAT(GREYSCALE_16, "GREY(16)")
87ADTF_DEFINE_STREAM_IMAGE_FORMAT(GREYSCALE_24, "GREY(24)")
89ADTF_DEFINE_STREAM_IMAGE_FORMAT(GREYSCALE_32, "GREY(32)")
90
92ADTF_DEFINE_STREAM_IMAGE_FORMAT(RGB_8, "R(3)G(3)B(2)")
94ADTF_DEFINE_STREAM_IMAGE_FORMAT(RGB_555, "R(5)G(5)B(5)(1)")
96ADTF_DEFINE_STREAM_IMAGE_FORMAT(RGB_565, "R(5)G(6)B(5)")
97
99ADTF_DEFINE_STREAM_IMAGE_FORMAT(RGB_24, "R(8)G(8)B(8)")
101ADTF_DEFINE_STREAM_IMAGE_FORMAT(BGR_24, "B(8)G(8)R(8)")
104ADTF_DEFINE_STREAM_IMAGE_FORMAT(RGB_32, "R(8)G(8)B(8)(8)")
107ADTF_DEFINE_STREAM_IMAGE_FORMAT(BGR_32, "B(8)G(8)R(8)(8)")
110ADTF_DEFINE_STREAM_IMAGE_FORMAT(RGBA_32, "R(8)G(8)B(8)A(8)")
113ADTF_DEFINE_STREAM_IMAGE_FORMAT(BGRA_32, "B(8)G(8)R(8)A(8)")
116ADTF_DEFINE_STREAM_IMAGE_FORMAT(ABGR_32, "A(8)B(8)G(8)R(8)")
119ADTF_DEFINE_STREAM_IMAGE_FORMAT(ARGB_32, "A(8)R(8)G(8)B(8)")
121ADTF_DEFINE_STREAM_IMAGE_FORMAT(YUV420P, "YUV420P")
125
126
133bool stream_image_format_is_generic_greyscale(const tStreamImageFormat& strFormat);
134
142
149
156
163uint32_t stream_image_format_get_generic_mask(const char* strChannel, const tStreamImageFormat& strFormat);
164
165} // namespace ant
166
169
175{
176 using namespace ant::imageformat_definition;
177} // namespace stream_image_format
178
183#define ADTF_IMAGE_FORMAT(_FORMAT_) ::adtf::streaming::stream_image_format::_FORMAT_::FormatName
184
185
186
187using ant::stream_image_format_is_generic_greyscale;
192}
193} // namespace adtf
Namespace to sort pixelformat descriptions.
Definition streamimageformat.h:68
Namespace for all functionality of the ADTF Streaming SDK provided since v3.0.
Definition bindingproxyoutport.h:16
bool operator==(const tStreamImageFormat &sLeft, const tStreamImageFormat &sRight)
bool stream_image_format_is_generic(const tStreamImageFormat &strFormat)
adtf_util::string_base< cStreamFormatStorageType > tStreamImageFormatName
formatname type as stack string (max byte size defined by ADTF_STREAMING_DEFAULT_SIZE_OF_STREAM_IMAGE...
Definition streamimageformat.h:23
uint32_t stream_image_format_get_generic_mask(const char *strChannel, const tStreamImageFormat &strFormat)
bool operator!=(const tStreamImageFormat &sLeft, const tStreamImageFormat &sRight)
bool stream_image_format_is_generic_rgb(const tStreamImageFormat &strFormat)
adtf_util::stack_string_base< ADTF_STREAMING_DEFAULT_SIZE_OF_STREAM_IMAGE_FORMATNAME, adtf_util::assert_out_of_range > cStreamFormatStorageType
formatname storage type (max byte size defined by ADTF_STREAMING_DEFAULT_SIZE_OF_STREAM_IMAGE_FORMATN...
Definition streamimageformat.h:21
unsigned int stream_image_format_get_generic_pixel_size(const tStreamImageFormat &strFormat)
ADTF_DEFINE_STREAM_IMAGE_FORMAT(RGB_8, "R(3)G(3)B(2)") ADTF_DEFINE_STREAM_IMAGE_FORMAT(RGB_555
Format definition.
Container namespace to predefine some common imageformats within ADTF.
Definition streamimageformat.h:175
Namespace for the ADTF Streaming SDK.
Definition bindingproxyinport.h:14
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14
#define ADTF_DEFINE_STREAM_IMAGE_FORMAT(_FORMAT_STRUCT_TYPE_, _FORMAT_NAME_)
Definition streamimageformat.h:72
Definition streamimageformat.h:30
tStreamImageFormatName m_strFormatName
Formatname of the image - see adtf::streaming::ant::imageformat_definition. usually it is a pixelform...
Definition streamimageformat.h:33
uint32_t m_ui32Width
Pixel width of the image.
Definition streamimageformat.h:35
size_t m_szMaxByteSize
Maximal byte size of the image.
Definition streamimageformat.h:39
uint32_t m_ui32Height
Pixel height of the image.
Definition streamimageformat.h:37
uint8_t m_ui8DataEndianess
Endianess of the image (usually pixel endianess) - by default this is PLATFORM_BYTEORDER (PLATFORM_BI...
Definition streamimageformat.h:43