8 #ifndef META_OCEAN_CV_FRAME_CONVERTER_YUYV_16_H
9 #define META_OCEAN_CV_FRAME_CONVERTER_YUYV_16_H
42 static inline void convertYUYV16ToBGR24(
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 convertYUYV16ToRGB24(
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 convertYUYV16ToYUV24(
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 convertYUYV16ToYVU24(
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 convertYUYV16ToY8(
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 1192, 1192, 1192, 2066, -400, 0, 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 1192, 1192, 1192, 0, -400, 2066, 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_1Plane3ChannelsWith2ChannelsDownsampled2x1BackIsDownsampled_To_1Plane3Channels_8BitPerChannel<0u, 1u, 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_1Plane3ChannelsWith2ChannelsDownsampled2x1BackIsDownsampled_To_1Plane3Channels_8BitPerChannel<0u, 2u, 1u>, 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 = 0x0u;
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_1Plane3ChannelsWith2ChannelsDownsampled2x1BackIsDownsampled_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 YUYV16 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 YUYV16 pixel format.
Definition: FrameConverterYUYV16.h:28
static void convertYUYV16ToRGB24(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 YUYV16 frame to a 24 bit RGB frame into a second image buffer.
Definition: FrameConverterYUYV16.h:129
static void convertYUYV16ToBGR24(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 YUYV16 frame to a 24 bit BGR frame into a second image buffer.
Definition: FrameConverterYUYV16.h:97
static void convertYUYV16ToYUV24(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 YUYV16 frame to a 24 bit YUV frame into a second image buffer.
Definition: FrameConverterYUYV16.h:161
static void convertYUYV16ToY8(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 YUYV16 frame to a 8 bit grayscale frame into a second image buffer.
Definition: FrameConverterYUYV16.h:195
static void convertYUYV16ToYVU24(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 YUYV16 frame to a 24 bit YVU frame into a second image buffer.
Definition: FrameConverterYUYV16.h:178
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