8 #ifndef META_OCEAN_CV_FRAME_CONVERTER_RGB_565_H
9 #define META_OCEAN_CV_FRAME_CONVERTER_RGB_565_H
42 static inline void convertRGB565ToRGB24(
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 convertRGB565ToY8(
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);
66 static void convertRowRGB565ToRGB24(
const uint16_t* source, uint8_t* target,
const size_t width,
const void* unusedOptions);
75 static void convertRowRGB565ToY8(
const uint16_t* source, uint8_t* target,
const size_t width,
const void* unusedOptions);
77 #if defined(OCEAN_HARDWARE_NEON_VERSION) && OCEAN_HARDWARE_NEON_VERSION >= 10
100 ocean_assert(source !=
nullptr && target !=
nullptr);
101 ocean_assert(width >= 1u && height >= 1u);
103 const unsigned int sourceStrideElements = width + sourcePaddingElements;
104 const unsigned int targetStrideElements = width * 3u + targetPaddingElements;
106 const bool areContinuous = sourcePaddingElements == 0u && targetPaddingElements == 0u;
108 FrameConverter::convertGenericPixelFormat<uint16_t, uint8_t>(source, target, width, height, sourceStrideElements, targetStrideElements, flag,
CV::FrameConverterRGB565::convertRowRGB565ToRGB24, CV::FrameChannels::reverseRowPixelOrderInPlace<uint8_t, 3u>, areContinuous,
nullptr, worker);
113 ocean_assert(source !=
nullptr && target !=
nullptr);
114 ocean_assert(width >= 1u && height >= 1u);
116 const unsigned int sourceStrideElements = width + sourcePaddingElements;
117 const unsigned int targetStrideElements = width * 1u + targetPaddingElements;
119 const bool areContinuous = sourcePaddingElements == 0u && targetPaddingElements == 0u;
121 FrameConverter::convertGenericPixelFormat<uint16_t, uint8_t>(source, target, width, height, sourceStrideElements, targetStrideElements, flag,
CV::FrameConverterRGB565::convertRowRGB565ToY8, CV::FrameChannels::reverseRowPixelOrderInPlace<uint8_t, 1u>, areContinuous,
nullptr, 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
This class provides functions to convert or to change frames with RGB 565 pixel format.
Definition: FrameConverterRGB565.h:28
static void convertRowRGB565ToY8(const uint16_t *source, uint8_t *target, const size_t width, const void *unusedOptions)
Converts a row of a RGB656 frame to a row of a Y8 frame.
static void convertRowRGB565ToRGB24NEON(const uint16_t *source, uint8_t *target, const unsigned int width)
Converts a row of a RGB656 frame to a row of a RGB24 frame using NEON instructions.
static void convertRGB565ToRGB24(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 RGB565 (16 bit) frame to a RGB24 bit frame.
Definition: FrameConverterRGB565.h:98
static void convertRGB565ToY8(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 RGB565 (16 bit) frame to a Y8 bit frame.
Definition: FrameConverterRGB565.h:111
static void convertRowRGB565ToRGB24(const uint16_t *source, uint8_t *target, const size_t width, const void *unusedOptions)
Converts a row of a RGB656 frame to a row of a RGB24 frame.
static void convertRowRGB565ToY8NEON(const uint16_t *source, uint8_t *target, const unsigned int width)
Converts a row of a RGB656 frame to a row of a Y8 frame using NEON instructions.
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