8 #ifndef META_OCEAN_CV_FRAME_CONVERTER_RGBA_64_H
9 #define META_OCEAN_CV_FRAME_CONVERTER_RGBA_64_H
40 static inline void convertRGBA64ToRGB24(
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);
53 static inline void convertRGBA64ToRGBA32(
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 inline void convertRGBA64ToRGBA64(
const uint16_t* source, uint16_t* target,
const unsigned int width,
const unsigned int height,
const ConversionFlag flag,
const unsigned int sourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker =
nullptr);
77 static inline void convertRowRGBA64ToRGB24(
const uint16_t* source, uint8_t* target,
const size_t size,
const void* unusedParameters =
nullptr);
86 static inline void convertRowRGBA64ToRGBA32(
const uint16_t* source, uint8_t* target,
const size_t size,
const void* unusedParameters =
nullptr);
92 ocean_assert(source !=
nullptr && target !=
nullptr);
93 ocean_assert(width >= 1u && height >= 1u);
95 const unsigned int sourceStrideElements = width * 4u + sourcePaddingElements;
96 const unsigned int targetStrideElements = width * 3u + targetPaddingElements;
98 const bool areContinuous = sourcePaddingElements == 0u && targetPaddingElements == 0u;
100 FrameConverter::convertGenericPixelFormat(source, target, width, height, sourceStrideElements, targetStrideElements, flag,
convertRowRGBA64ToRGB24, CV::FrameChannels::reverseRowPixelOrderInPlace<uint8_t, 3u>, areContinuous,
nullptr, worker);
105 ocean_assert(source !=
nullptr && target !=
nullptr);
106 ocean_assert(width >= 1u && height >= 1u);
108 const unsigned int sourceStrideElements = width * 4u + sourcePaddingElements;
109 const unsigned int targetStrideElements = width * 4u + targetPaddingElements;
111 const bool areContinuous = sourcePaddingElements == 0u && targetPaddingElements == 0u;
113 FrameConverter::convertGenericPixelFormat(source, target, width, height, sourceStrideElements, targetStrideElements, flag,
convertRowRGBA64ToRGBA32, CV::FrameChannels::reverseRowPixelOrderInPlace<uint8_t, 4u>, areContinuous,
nullptr, worker);
118 ocean_assert(source !=
nullptr && target !=
nullptr);
119 ocean_assert(width >= 1u && height >= 1u);
121 FrameChannels::transformGeneric<uint16_t, 4u>(source, target, width, height, flag, sourcePaddingElements, targetPaddingElements, worker);
126 ocean_assert(source !=
nullptr && target !=
nullptr);
127 ocean_assert(size >= 1);
129 const uint8_t* source8 = (
const uint8_t*)(source);
131 for (
size_t n = 0; n < size; ++n)
134 target[n * 3 + 0] = source8[n * 8 + 1];
135 target[n * 3 + 1] = source8[n * 8 + 3];
136 target[n * 3 + 2] = source8[n * 8 + 5];
142 ocean_assert(source !=
nullptr && target !=
nullptr);
143 ocean_assert(size >= 1);
145 const uint8_t* source8 = (
const uint8_t*)(source);
147 for (
size_t n = 0; n < size; ++n)
150 target[n * 4 + 0] = source8[n * 8 + 1];
151 target[n * 4 + 1] = source8[n * 8 + 3];
152 target[n * 4 + 2] = source8[n * 8 + 5];
153 target[n * 4 + 3] = source8[n * 8 + 7];
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 convertGenericPixelFormat(const TSource *source, TTarget *target, const unsigned int width, const unsigned int height, const unsigned int sourceStrideElements, const unsigned int targetStrideElements, const ConversionFlag flag, const RowConversionFunction< TSource, TTarget > rowConversionFunction, const RowReversePixelOrderInPlaceFunction< TTarget > targetReversePixelOrderInPlaceFunction, const bool areContinuous, const void *options, Worker *worker)
Converts a frame with generic pixel format (e.g., RGBA32, BGR24, YUV24, ...) to a frame with generic ...
Definition: FrameConverter.h:3211
This class provides functions to convert frames with RGBA64 pixel format.
Definition: FrameConverterRGBA64.h:26
static void convertRGBA64ToRGBA32(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 an RGBA 64 bit frame to a RGBA 32 bit frame.
Definition: FrameConverterRGBA64.h:103
static void convertRowRGBA64ToRGBA32(const uint16_t *source, uint8_t *target, const size_t size, const void *unusedParameters=nullptr)
Converts a RGBA64 row to a RGBA32 row applying a linear conversion.
Definition: FrameConverterRGBA64.h:140
static void convertRowRGBA64ToRGB24(const uint16_t *source, uint8_t *target, const size_t size, const void *unusedParameters=nullptr)
Converts a RGBA64 row to a RGB24 row applying a linear conversion.
Definition: FrameConverterRGBA64.h:124
static void convertRGBA64ToRGB24(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 an RGBA 64 bit frame to a RGB 24 bit frame.
Definition: FrameConverterRGBA64.h:90
static void convertRGBA64ToRGBA64(const uint16_t *source, uint16_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 an RGBA 64 bit frame to a RGBA 64 bit frame.
Definition: FrameConverterRGBA64.h:116
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