8 #ifndef META_OCEAN_CV_FRAME_CONVERTER_Y_V_U_12_H
9 #define META_OCEAN_CV_FRAME_CONVERTER_Y_V_U_12_H
50 static inline void convertY_V_U12ToY8(
const uint8_t* ySource,
const uint8_t* vSource,
const uint8_t* uSource, uint8_t* target,
const unsigned int width,
const unsigned int height,
const ConversionFlag flag,
const unsigned int ySourcePaddingElements,
const unsigned int vSourcePaddingElements,
const unsigned int uSourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker =
nullptr);
71 static inline void convertY_V_U12LimitedRangeToBGR24FullRange(
const uint8_t* ySource,
const uint8_t* vSource,
const uint8_t* uSource, uint8_t* target,
const unsigned int width,
const unsigned int height,
const ConversionFlag flag,
const unsigned int ySourcePaddingElements,
const unsigned int vSourcePaddingElements,
const unsigned int uSourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker =
nullptr);
92 static inline void convertY_V_U12LimitedRangeToRGB24FullRange(
const uint8_t* ySource,
const uint8_t* vSource,
const uint8_t* uSource, uint8_t* target,
const unsigned int width,
const unsigned int height,
const ConversionFlag flag,
const unsigned int ySourcePaddingElements,
const unsigned int vSourcePaddingElements,
const unsigned int uSourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker =
nullptr);
113 static inline void convertY_V_U12FullRangeToBGR24FullRangePrecision6Bit(
const uint8_t* ySource,
const uint8_t* vSource,
const uint8_t* uSource, uint8_t* target,
const unsigned int width,
const unsigned int height,
const ConversionFlag flag,
const unsigned int ySourcePaddingElements,
const unsigned int vSourcePaddingElements,
const unsigned int uSourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker =
nullptr);
134 static inline void convertY_V_U12FullRangeToRGB24FullRangePrecision6Bit(
const uint8_t* ySource,
const uint8_t* vSource,
const uint8_t* uSource, uint8_t* target,
const unsigned int width,
const unsigned int height,
const ConversionFlag flag,
const unsigned int ySourcePaddingElements,
const unsigned int vSourcePaddingElements,
const unsigned int uSourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker =
nullptr);
151 static inline void convertY_V_U12ToYVU24(
const uint8_t* ySource,
const uint8_t* vSource,
const uint8_t* uSource, uint8_t* target,
const unsigned int width,
const unsigned int height,
const ConversionFlag flag,
const unsigned int ySourcePaddingElements,
const unsigned int vSourcePaddingElements,
const unsigned int uSourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker =
nullptr);
168 static inline void convertY_V_U12ToYUV24(
const uint8_t* ySource,
const uint8_t* vSource,
const uint8_t* uSource, uint8_t* target,
const unsigned int width,
const unsigned int height,
const ConversionFlag flag,
const unsigned int ySourcePaddingElements,
const unsigned int vSourcePaddingElements,
const unsigned int uSourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker =
nullptr);
171 inline void FrameConverterY_V_U12::convertY_V_U12ToY8(
const uint8_t* ySource,
const uint8_t* ,
const uint8_t* , uint8_t* target,
const unsigned int width,
const unsigned int height,
const ConversionFlag flag,
const unsigned int ySourcePaddingElements,
const unsigned int ,
const unsigned int ,
const unsigned int targetPaddingElements,
Worker* worker)
173 ocean_assert(ySource !=
nullptr && target !=
nullptr);
174 ocean_assert(width >= 1u && height >= 1u);
176 FrameChannels::transformGeneric<uint8_t, 1u>(ySource, target, width, height, flag, ySourcePaddingElements, targetPaddingElements, worker);
179 inline void FrameConverterY_V_U12::convertY_V_U12LimitedRangeToBGR24FullRange(
const uint8_t* ySource,
const uint8_t* vSource,
const uint8_t* uSource, uint8_t* target,
const unsigned int width,
const unsigned int height,
const ConversionFlag flag,
const unsigned int ySourcePaddingElements,
const unsigned int vSourcePaddingElements,
const unsigned int uSourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker)
181 ocean_assert(ySource !=
nullptr && vSource !=
nullptr && uSource !=
nullptr && target !=
nullptr);
183 ocean_assert(width >= 2u && width % 2u == 0u);
184 ocean_assert(height >= 2u && height % 2u == 0u);
186 if (width < 2u || height < 2u || width % 2u != 0u || height % 2u != 0u)
203 const int options[4 + 12] =
206 int(ySourcePaddingElements), int(vSourcePaddingElements), int(uSourcePaddingElements), int(targetPaddingElements),
209 1192, 1192, 1192, 0, -833, 1634, 2066, -400, 0,
215 const void* sources[3] =
225 inline void FrameConverterY_V_U12::convertY_V_U12LimitedRangeToRGB24FullRange(
const uint8_t* ySource,
const uint8_t* vSource,
const uint8_t* uSource, uint8_t* target,
const unsigned int width,
const unsigned int height,
const ConversionFlag flag,
const unsigned int ySourcePaddingElements,
const unsigned int vSourcePaddingElements,
const unsigned int uSourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker)
227 ocean_assert(ySource !=
nullptr && vSource !=
nullptr && uSource !=
nullptr && target !=
nullptr);
229 ocean_assert(width >= 2u && width % 2u == 0u);
230 ocean_assert(height >= 2u && height % 2u == 0u);
232 if (width < 2u || height < 2u || width % 2u != 0u || height % 2u != 0u)
249 const int options[4 + 12] =
252 int(ySourcePaddingElements), int(vSourcePaddingElements), int(uSourcePaddingElements), int(targetPaddingElements),
255 1192, 1192, 1192, 1634, -833, 0, 0, -400, 2066,
261 const void* sources[3] =
271 inline void FrameConverterY_V_U12::convertY_V_U12FullRangeToBGR24FullRangePrecision6Bit(
const uint8_t* ySource,
const uint8_t* vSource,
const uint8_t* uSource, uint8_t* target,
const unsigned int width,
const unsigned int height,
const ConversionFlag flag,
const unsigned int ySourcePaddingElements,
const unsigned int vSourcePaddingElements,
const unsigned int uSourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker)
273 FrameConverterY_U_V12::convertY_U_V12FullRangeToBGR24FullRangePrecision6Bit(ySource, uSource, vSource, target, width, height, flag, ySourcePaddingElements, uSourcePaddingElements, vSourcePaddingElements, targetPaddingElements, worker);
276 inline void FrameConverterY_V_U12::convertY_V_U12FullRangeToRGB24FullRangePrecision6Bit(
const uint8_t* ySource,
const uint8_t* vSource,
const uint8_t* uSource, uint8_t* target,
const unsigned int width,
const unsigned int height,
const ConversionFlag flag,
const unsigned int ySourcePaddingElements,
const unsigned int vSourcePaddingElements,
const unsigned int uSourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker)
278 FrameConverterY_U_V12::convertY_U_V12FullRangeToRGB24FullRangePrecision6Bit(ySource, uSource, vSource, target, width, height, flag, ySourcePaddingElements, uSourcePaddingElements, vSourcePaddingElements, targetPaddingElements, worker);
281 inline void FrameConverterY_V_U12::convertY_V_U12ToYVU24(
const uint8_t* ySource,
const uint8_t* vSource,
const uint8_t* uSource, uint8_t* target,
const unsigned int width,
const unsigned int height,
const ConversionFlag flag,
const unsigned int ySourcePaddingElements,
const unsigned int vSourcePaddingElements,
const unsigned int uSourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker)
283 FrameConverterY_U_V12::convertY_U_V12ToYUV24(ySource, vSource, uSource, target, width, height, flag, ySourcePaddingElements, vSourcePaddingElements, uSourcePaddingElements, targetPaddingElements, worker);
286 inline void FrameConverterY_V_U12::convertY_V_U12ToYUV24(
const uint8_t* ySource,
const uint8_t* vSource,
const uint8_t* uSource, uint8_t* target,
const unsigned int width,
const unsigned int height,
const ConversionFlag flag,
const unsigned int ySourcePaddingElements,
const unsigned int vSourcePaddingElements,
const unsigned int uSourcePaddingElements,
const unsigned int targetPaddingElements,
Worker* worker)
288 ocean_assert(ySource !=
nullptr && vSource !=
nullptr && uSource !=
nullptr && target !=
nullptr);
290 ocean_assert(width >= 2u && width % 2u == 0u);
291 ocean_assert(height >= 2u && height % 2u == 0u);
293 if (width < 2u || height < 2u || width % 2u != 0u || height % 2u != 0u)
298 const unsigned int options[4] = {ySourcePaddingElements, vSourcePaddingElements, uSourcePaddingElements, targetPaddingElements};
300 const void* sources[3] =
307 FrameConverter::convertArbitraryPixelFormat(sources, (
void**)(&target), width, height, flag, 2u, FrameConverter::mapTwoRows_1Plane1ChannelAnd2Planes1ChannelDownsampled2x2_To_1Plane3Channels_8BitPerChannel<0u, 2u, 1u>, options, 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 convertTwoRows_1Plane1ChannelAnd2Planes1ChannelDownsampled2x2_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 two rows of an image with e.g., a Y_U_V12 pixel format to two rows 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
static void convertY_U_V12ToYUV24(const uint8_t *ySource, const uint8_t *uSource, const uint8_t *vSource, uint8_t *target, const unsigned int width, const unsigned int height, const ConversionFlag flag, const unsigned int ySourcePaddingElements, const unsigned int uSourcePaddingElements, const unsigned int vSourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr)
Converts a Y_U_V12 frame to a 24 bit YUV frame into a second image buffer.
Definition: FrameConverterY_U_V12.h:685
static void convertY_U_V12FullRangeToRGB24FullRangePrecision6Bit(const uint8_t *ySource, const uint8_t *uSource, const uint8_t *vSource, uint8_t *target, const unsigned int width, const unsigned int height, const ConversionFlag flag, const unsigned int ySourcePaddingElements, const unsigned int uSourcePaddingElements, const unsigned int vSourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr)
Converts a Y_U_V12 frame to a 24 bit RGB frame into a second image buffer.
Definition: FrameConverterY_U_V12.h:573
static void convertY_U_V12FullRangeToBGR24FullRangePrecision6Bit(const uint8_t *ySource, const uint8_t *uSource, const uint8_t *vSource, uint8_t *target, const unsigned int width, const unsigned int height, const ConversionFlag flag, const unsigned int ySourcePaddingElements, const unsigned int uSourcePaddingElements, const unsigned int vSourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr)
Converts a Y_U_V12 frame to a 24 bit BGR frame into a second image buffer using BT....
Definition: FrameConverterY_U_V12.h:393
This class provides functions to convert frames with Y_V_U12 pixel format.
Definition: FrameConverterY_V_U12.h:32
static void convertY_V_U12ToY8(const uint8_t *ySource, const uint8_t *vSource, const uint8_t *uSource, uint8_t *target, const unsigned int width, const unsigned int height, const ConversionFlag flag, const unsigned int ySourcePaddingElements, const unsigned int vSourcePaddingElements, const unsigned int uSourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr)
Converts a Y_V_U12 frame to an 8 bit gray scale frame into a second image buffer.
Definition: FrameConverterY_V_U12.h:171
static void convertY_V_U12ToYUV24(const uint8_t *ySource, const uint8_t *vSource, const uint8_t *uSource, uint8_t *target, const unsigned int width, const unsigned int height, const ConversionFlag flag, const unsigned int ySourcePaddingElements, const unsigned int vSourcePaddingElements, const unsigned int uSourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr)
Converts a Y_V_U12 frame to an 24 bit YUV frame into a second image buffer.
Definition: FrameConverterY_V_U12.h:286
static void convertY_V_U12FullRangeToRGB24FullRangePrecision6Bit(const uint8_t *ySource, const uint8_t *vSource, const uint8_t *uSource, uint8_t *target, const unsigned int width, const unsigned int height, const ConversionFlag flag, const unsigned int ySourcePaddingElements, const unsigned int vSourcePaddingElements, const unsigned int uSourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr)
Converts a Y_V_U12 frame to a 24 bit RGB frame into a second image buffer using BT....
Definition: FrameConverterY_V_U12.h:276
static void convertY_V_U12LimitedRangeToRGB24FullRange(const uint8_t *ySource, const uint8_t *vSource, const uint8_t *uSource, uint8_t *target, const unsigned int width, const unsigned int height, const ConversionFlag flag, const unsigned int ySourcePaddingElements, const unsigned int vSourcePaddingElements, const unsigned int uSourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr)
Converts a Y_V_U12 frame to an 24 bit RGB frame into a second image buffer.
Definition: FrameConverterY_V_U12.h:225
static void convertY_V_U12ToYVU24(const uint8_t *ySource, const uint8_t *vSource, const uint8_t *uSource, uint8_t *target, const unsigned int width, const unsigned int height, const ConversionFlag flag, const unsigned int ySourcePaddingElements, const unsigned int vSourcePaddingElements, const unsigned int uSourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr)
Converts a Y_V_U12 frame to an 24 bit YVU frame into a second image buffer.
Definition: FrameConverterY_V_U12.h:281
static void convertY_V_U12FullRangeToBGR24FullRangePrecision6Bit(const uint8_t *ySource, const uint8_t *vSource, const uint8_t *uSource, uint8_t *target, const unsigned int width, const unsigned int height, const ConversionFlag flag, const unsigned int ySourcePaddingElements, const unsigned int vSourcePaddingElements, const unsigned int uSourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr)
Converts a Y_V_U12 frame to a 24 bit BGR frame into a second image buffer using BT....
Definition: FrameConverterY_V_U12.h:271
static void convertY_V_U12LimitedRangeToBGR24FullRange(const uint8_t *ySource, const uint8_t *vSource, const uint8_t *uSource, uint8_t *target, const unsigned int width, const unsigned int height, const ConversionFlag flag, const unsigned int ySourcePaddingElements, const unsigned int vSourcePaddingElements, const unsigned int uSourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr)
Converts a Y_V_U12 frame to an 24 bit BGR frame into a second image buffer.
Definition: FrameConverterY_V_U12.h:179
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