8 #ifndef META_OCEAN_CV_FRAME_CONVERTER_BGR_565_H
9 #define META_OCEAN_CV_FRAME_CONVERTER_BGR_565_H
42 static inline void convertBGR565ToBGR24(
const uint16_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 convertBGR565ToRGB24(
const uint16_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 convertBGR565ToY8(
const uint16_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);
79 static void convertRowBGR565ToBGR24(
const uint16_t* source, uint8_t* target,
const size_t width,
const void* unusedOptions);
88 static void convertRowBGR565ToRGB24(
const uint16_t* source, uint8_t* target,
const size_t width,
const void* unusedOptions);
97 static void convertRowBGR565ToY8(
const uint16_t* source, uint8_t* target,
const size_t width,
const void* unusedOptions);
99 #if defined(OCEAN_HARDWARE_NEON_VERSION) && OCEAN_HARDWARE_NEON_VERSION >= 10
130 ocean_assert(source !=
nullptr && target !=
nullptr);
131 ocean_assert(width >= 1u && height >= 1u);
133 const unsigned int sourceStrideElements = width + sourcePaddingElements;
134 const unsigned int targetStrideElements = width * 3u + targetPaddingElements;
136 const bool areContinuous = sourcePaddingElements == 0u && targetPaddingElements == 0u;
138 FrameConverter::convertGenericPixelFormat<uint16_t, uint8_t>(source, target, width, height, sourceStrideElements, targetStrideElements, flag,
CV::FrameConverterBGR565::convertRowBGR565ToBGR24, CV::FrameChannels::reverseRowPixelOrderInPlace<uint8_t, 3u>, areContinuous,
nullptr, worker);
143 ocean_assert(source !=
nullptr && target !=
nullptr);
144 ocean_assert(width >= 1u && height >= 1u);
146 const unsigned int sourceStrideElements = width + sourcePaddingElements;
147 const unsigned int targetStrideElements = width * 3u + targetPaddingElements;
149 const bool areContinuous = sourcePaddingElements == 0u && targetPaddingElements == 0u;
151 FrameConverter::convertGenericPixelFormat<uint16_t, uint8_t>(source, target, width, height, sourceStrideElements, targetStrideElements, flag,
CV::FrameConverterBGR565::convertRowBGR565ToRGB24, CV::FrameChannels::reverseRowPixelOrderInPlace<uint8_t, 3u>, areContinuous,
nullptr, worker);
156 ocean_assert(source !=
nullptr && target !=
nullptr);
157 ocean_assert(width >= 1u && height >= 1u);
159 const unsigned int sourceStrideElements = width + sourcePaddingElements;
160 const unsigned int targetStrideElements = width * 1u + targetPaddingElements;
162 const bool areContinuous = sourcePaddingElements == 0u && targetPaddingElements == 0u;
164 FrameConverter::convertGenericPixelFormat<uint16_t, uint8_t>(source, target, width, height, sourceStrideElements, targetStrideElements, flag,
CV::FrameConverterBGR565::convertRowBGR565ToY8, CV::FrameChannels::reverseRowPixelOrderInPlace<uint8_t, 1u>, areContinuous,
nullptr, worker);
This class provides functions to convert or to change frames with BGR 565 pixel format.
Definition: FrameConverterBGR565.h:28
static void convertRowBGR565ToY8(const uint16_t *source, uint8_t *target, const size_t width, const void *unusedOptions)
Converts a row of a BGR565 frame to a row of a Y8 frame.
static void convertRowBGR565ToRGB24NEON(const uint16_t *source, uint8_t *target, const unsigned int width)
Converts a row of a BGR565 frame to a row of a RGB24 frame using NEON instructions.
static void convertBGR565ToY8(const uint16_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 BGR565 (16 bit) frame to a Y8 bit frame.
Definition: FrameConverterBGR565.h:154
static void convertRowBGR565ToBGR24NEON(const uint16_t *source, uint8_t *target, const unsigned int width)
Converts a row of a BGR565 frame to a row of a BGR24 frame using NEON instructions.
static void convertRowBGR565ToY8NEON(const uint16_t *source, uint8_t *target, const unsigned int width)
Converts a row of a BGR565 frame to a row of a Y8 frame using NEON instructions.
static void convertBGR565ToRGB24(const uint16_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 BGR565 (16 bit) frame to a RGB24 bit frame.
Definition: FrameConverterBGR565.h:141
static void convertRowBGR565ToRGB24(const uint16_t *source, uint8_t *target, const size_t width, const void *unusedOptions)
Converts a row of a BGR565 frame to a row of a RGB24 frame.
static void convertBGR565ToBGR24(const uint16_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 BGR565 (16 bit) frame to a BGR24 bit frame.
Definition: FrameConverterBGR565.h:128
static void convertRowBGR565ToBGR24(const uint16_t *source, uint8_t *target, const size_t width, const void *unusedOptions)
Converts a row of a BGR565 frame to a row of a BGR24 frame.
This is the base class for all frame converter classes.
Definition: FrameConverter.h:32
ConversionFlag
Definition of individual conversion flags.
Definition: FrameConverter.h:39
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