8 #ifndef META_OCEAN_CV_FRAME_CONVERTER_UYVY_16_H
9 #define META_OCEAN_CV_FRAME_CONVERTER_UYVY_16_H
42 static inline void convertUYVY16ToBGR24(
const uint8_t* source, uint8_t* target,
const unsigned int width,
const unsigned int height,
const ConversionFlag flag,
const unsigned int sourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker =
nullptr);
55 static inline void convertUYVY16ToRGB24(
const uint8_t* source, uint8_t* target,
const unsigned int width,
const unsigned int height,
const ConversionFlag flag,
const unsigned int sourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker =
nullptr);
68 static inline void convertUYVY16ToYUV24(
const uint8_t* source, uint8_t* target,
const unsigned int width,
const unsigned int height,
const ConversionFlag flag,
const unsigned int sourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker =
nullptr);
81 static inline void convertUYVY16ToYVU24(
const uint8_t* source, uint8_t* target,
const unsigned int width,
const unsigned int height,
const ConversionFlag flag,
const unsigned int sourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker =
nullptr);
94 static inline void convertUYVY16ToY8(
const uint8_t* source, uint8_t* target,
const unsigned int width,
const unsigned int height,
const ConversionFlag flag,
const unsigned int sourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker =
nullptr);
99 ocean_assert(source !=
nullptr && target !=
nullptr);
101 ocean_assert(width >= 2u && width % 2u == 0u);
102 ocean_assert(height >= 1u);
104 if (width < 2u || height < 1u || width % 2u != 0u)
114 const int options[14] =
117 int(sourcePaddingElements), int(targetPaddingElements),
120 2066, -400, 0, 1192, 1192, 1192, 0, -833, 1634,
131 ocean_assert(source !=
nullptr && target !=
nullptr);
133 ocean_assert(width >= 2u && width % 2u == 0u);
134 ocean_assert(height >= 1u);
136 if (width < 2u || height < 1u || width % 2u != 0u)
146 const int options[14] =
149 int(sourcePaddingElements), int(targetPaddingElements),
152 0, -400, 2066, 1192, 1192, 1192, 1634, -833, 0,
163 ocean_assert(source !=
nullptr && target !=
nullptr);
165 ocean_assert(width >= 2u && width % 2u == 0u);
166 ocean_assert(height >= 1u);
168 if (width < 2u || height < 1u || width % 2u != 0u)
173 const unsigned int options[2] = {sourcePaddingElements, targetPaddingElements};
175 FrameConverter::convertArbitraryPixelFormat((
const void**)(&source), (
void**)(&target), width, height, flag, 1u, FrameConverter::mapOneRow_1Plane3ChannelsWith2ChannelsDownsampled2x1FrontIsDownsampled_To_1Plane3Channels_8BitPerChannel<1u, 0u, 2u>, options, worker);
180 ocean_assert(source !=
nullptr && target !=
nullptr);
182 ocean_assert(width >= 2u && width % 2u == 0u);
183 ocean_assert(height >= 1u);
185 if (width < 2u || height < 1u || width % 2u != 0u)
190 const unsigned int options[2] = {sourcePaddingElements, targetPaddingElements};
192 FrameConverter::convertArbitraryPixelFormat((
const void**)(&source), (
void**)(&target), width, height, flag, 1u, FrameConverter::mapOneRow_1Plane3ChannelsWith2ChannelsDownsampled2x1FrontIsDownsampled_To_1Plane3Channels_8BitPerChannel<1u, 2u, 0u>, options, worker);
197 ocean_assert(source !=
nullptr && target !=
nullptr);
198 ocean_assert(width >= 2u && width % 2u == 0u);
199 ocean_assert(height >= 1u);
201 if (width % 2u != 0u || height == 0u)
212 constexpr
unsigned int shufflePattern = 0x1u;
214 FrameChannels::shuffleChannels<uint8_t, 2u, 1u, shufflePattern>(source, target, width, height, flag, sourcePaddingElements, targetPaddingElements, worker);
This is the base class for all frame converter classes.
Definition: FrameConverter.h:32
ConversionFlag
Definition of individual conversion flags.
Definition: FrameConverter.h:39
static void convertOneRow_1Plane3ChannelsWith2ChannelsDownsampled2x1FrontIsDownsampled_To_1Plane3Channels_8BitPerChannel_Precision10Bit(const void **sources, void **targets, const unsigned int multipleRowIndex, const unsigned int width, const unsigned int height, const ConversionFlag conversionFlag, const void *options)
Converts one row of an image with e.g., a UYVY16 pixel format to one row of an image with e....
static void convertArbitraryPixelFormat(const void **sources, void **targets, const unsigned int width, const unsigned int height, const ConversionFlag flag, const unsigned int multipleRowsPerIteration, const MultipleRowsConversionFunction multipleRowsConversionFunction, const void *options, Worker *worker)
Converts a frame with arbitrary pixel format (e.g., Y_UV12, Y_VU12, YUYV16, ...) to a frame with arbi...
Definition: FrameConverter.h:3234
This class provides functions to convert frames with UYVY16 pixel format.
Definition: FrameConverterUYVY16.h:28
static void convertUYVY16ToY8(const uint8_t *source, uint8_t *target, const unsigned int width, const unsigned int height, const ConversionFlag flag, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr)
Converts a UYVY16 frame to a 8 bit grayscale frame into a second image buffer.
Definition: FrameConverterUYVY16.h:195
static void convertUYVY16ToYVU24(const uint8_t *source, uint8_t *target, const unsigned int width, const unsigned int height, const ConversionFlag flag, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr)
Converts a UYVY16 frame to a 24 bit YVU frame into a second image buffer.
Definition: FrameConverterUYVY16.h:178
static void convertUYVY16ToBGR24(const uint8_t *source, uint8_t *target, const unsigned int width, const unsigned int height, const ConversionFlag flag, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr)
Converts a UYVY16 frame to a 24 bit BGR frame into a second image buffer.
Definition: FrameConverterUYVY16.h:97
static void convertUYVY16ToYUV24(const uint8_t *source, uint8_t *target, const unsigned int width, const unsigned int height, const ConversionFlag flag, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr)
Converts a UYVY16 frame to a 24 bit YUV frame into a second image buffer.
Definition: FrameConverterUYVY16.h:161
static void convertUYVY16ToRGB24(const uint8_t *source, uint8_t *target, const unsigned int width, const unsigned int height, const ConversionFlag flag, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr)
Converts a UYVY16 frame to a 24 bit RGB frame into a second image buffer.
Definition: FrameConverterUYVY16.h:129
This class implements a worker able to distribute function calls over different threads.
Definition: Worker.h:33
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15