Ocean
FrameConverterY_V_U12.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #ifndef META_OCEAN_CV_FRAME_CONVERTER_Y_V_U_12_H
9 #define META_OCEAN_CV_FRAME_CONVERTER_Y_V_U_12_H
10 
11 #include "ocean/cv/CV.h"
12 #include "ocean/cv/FrameChannels.h"
16 
17 namespace Ocean
18 {
19 
20 namespace CV
21 {
22 
23 /**
24  * This class provides functions to convert frames with Y_V_U12 pixel format.
25  * The Y_V_U12 format holds the three blocks of color channels.<br>
26  * The first block covers the Y channel and holds 8 bit per pixel.<br>
27  * The second block covers the V channel and holds 8 bit for four pixels in a 2x2 neighborhood.<br>
28  * The third block covers the U channel and also holds 8 bit for four pixels in a 2x2 neighborhood.
29  * @ingroup cv
30  */
31 class OCEAN_CV_EXPORT FrameConverterY_V_U12 : public FrameConverter
32 {
33  public:
34 
35  /**
36  * Converts a Y_V_U12 frame to an 8 bit gray scale frame into a second image buffer.
37  * @param ySource The y source frame buffer, with (width + yPaddingElements) * height elements, must be valid
38  * @param vSource The v source frame buffer, with (2 * width/2 + vPaddingElements) * height/2 elements, can be invalid, as this parameter is not used
39  * @param uSource The u source frame buffer, with (2 * width/2 + uPaddingElements) * height/2 elements, can be invalid, as this parameter is not used
40  * @param target The target frame buffer, with (width + targetPaddingElements) * height elements, must be valid
41  * @param width The width of the frame in pixel, with range [2, infinity), must be a multiple of 2
42  * @param height The height of the frame in pixel, with range [2, infinity), must be a multiple of 2
43  * @param flag Determining the type of conversion
44  * @param ySourcePaddingElements The number of padding elements at the end of each y-source row, in (uint8_t) elements, with range [0, infinity)
45  * @param vSourcePaddingElements The number of padding elements at the end of each v-source row, in (uint8_t) elements, with range [0, infinity), actually this parameter is not used
46  * @param uSourcePaddingElements The number of padding elements at the end of each u-source row, in (uint8_t) elements, with range [0, infinity), actually this parameter is not used
47  * @param targetPaddingElements The number of padding elements at the end of each target row, in (uint8_t) elements, with range [0, infinity)
48  * @param worker Optional worker object to distribute the computational to several CPU cores
49  */
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);
51 
52  /**
53  * Converts a Y_V_U12 frame to an 24 bit BGR frame into a second image buffer.
54  * <pre>
55  * YVU input value range: [16, 235]x[16, 240]x[16, 240]
56  * BGR output value range: [ 0, 255]x[ 0, 255]x[ 0, 255]
57  * </pre>
58  * @param ySource The y source frame buffer, with (width + yPaddingElements) * height elements, must be valid
59  * @param vSource The v source frame buffer, with (2 * width/2 + vPaddingElements) * height/2 elements, must be valid
60  * @param uSource The u source frame buffer, with (2 * width/2 + uPaddingElements) * height/2 elements, must be valid
61  * @param target The target frame buffer, with (width + targetPaddingElements) * height elements, must be valid
62  * @param width The width of the frame in pixel, with range [2, infinity), must be a multiple of 2
63  * @param height The height of the frame in pixel, with range [2, infinity), must be a multiple of 2
64  * @param flag Determining the type of conversion
65  * @param ySourcePaddingElements The number of padding elements at the end of each y-source row, in (uint8_t) elements, with range [0, infinity)
66  * @param vSourcePaddingElements The number of padding elements at the end of each v-source row, in (uint8_t) elements, with range [0, infinity)
67  * @param uSourcePaddingElements The number of padding elements at the end of each u-source row, in (uint8_t) elements, with range [0, infinity)
68  * @param targetPaddingElements The number of padding elements at the end of each target row, in (uint8_t) elements, with range [0, infinity)
69  * @param worker Optional worker object to distribute the computational to several CPU cores
70  */
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);
72 
73  /**
74  * Converts a Y_V_U12 frame to an 24 bit RGB frame into a second image buffer.
75  * <pre>
76  * YVU input value range: [16, 235]x[16, 240]x[16, 240]
77  * RGB output value range: [ 0, 255]x[ 0, 255]x[ 0, 255]
78  * </pre>
79  * @param ySource The y source frame buffer, with (width + yPaddingElements) * height elements, must be valid
80  * @param vSource The v source frame buffer, with (2 * width/2 + vPaddingElements) * height/2 elements, must be valid
81  * @param uSource The u source frame buffer, with (2 * width/2 + uPaddingElements) * height/2 elements, must be valid
82  * @param target The target frame buffer, with (width + targetPaddingElements) * height elements, must be valid
83  * @param width The width of the frame in pixel, with range [2, infinity), must be a multiple of 2
84  * @param height The height of the frame in pixel, with range [2, infinity), must be a multiple of 2
85  * @param flag Determining the type of conversion
86  * @param ySourcePaddingElements The number of padding elements at the end of each y-source row, in (uint8_t) elements, with range [0, infinity)
87  * @param vSourcePaddingElements The number of padding elements at the end of each v-source row, in (uint8_t) elements, with range [0, infinity)
88  * @param uSourcePaddingElements The number of padding elements at the end of each u-source row, in (uint8_t) elements, with range [0, infinity)
89  * @param targetPaddingElements The number of padding elements at the end of each target row, in (uint8_t) elements, with range [0, infinity)
90  * @param worker Optional worker object to distribute the computational to several CPU cores
91  */
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);
93 
94  /**
95  * Converts a Y_V_U12 frame to a 24 bit BGR frame into a second image buffer using BT.601 (analog).
96  * <pre>
97  * YVU input value range: [0, 255]x[0, 255]x[0, 255]
98  * BGR output value range: [0, 255]x[0, 255]x[0, 255]
99  * </pre>
100  * @param ySource The y source frame buffer, with (width + yPaddingElements) * height elements, must be valid
101  * @param vSource The v source frame buffer, with (width/2 + vPaddingElements) * height/2 elements, must be valid
102  * @param uSource The u source frame buffer, with (width/2 + uPaddingElements) * height/2 elements, must be valid
103  * @param target The target frame buffer, with (width + targetPaddingElements) * height elements, must be valid
104  * @param width The width of the frame in pixel, with range [2, infinity), must be a multiple of 2
105  * @param height The height of the frame in pixel, with range [2, infinity), must be a multiple of 2
106  * @param flag Determining the type of conversion
107  * @param ySourcePaddingElements The number of padding elements at the end of each y-source row, in (uint8_t) elements, with range [0, infinity)
108  * @param vSourcePaddingElements The number of padding elements at the end of each v-source row, in (uint8_t) elements, with range [0, infinity)
109  * @param uSourcePaddingElements The number of padding elements at the end of each u-source row, in (uint8_t) elements, with range [0, infinity)
110  * @param targetPaddingElements The number of padding elements at the end of each target row, in (uint8_t) elements, with range [0, infinity)
111  * @param worker Optional worker object to distribute the computational to several CPU cores
112  */
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);
114 
115  /**
116  * Converts a Y_V_U12 frame to a 24 bit RGB frame into a second image buffer using BT.601 (analog).
117  * <pre>
118  * YVU input value range: [0, 255]x[0, 255]x[0, 255]
119  * RGB output value range: [0, 255]x[0, 255]x[0, 255]
120  * </pre>
121  * @param ySource The y source frame buffer, with (width + yPaddingElements) * height elements, must be valid
122  * @param vSource The v source frame buffer, with (width/2 + vPaddingElements) * height/2 elements, must be valid
123  * @param uSource The u source frame buffer, with (width/2 + uPaddingElements) * height/2 elements, must be valid
124  * @param target The target frame buffer, with (width + targetPaddingElements) * height elements, must be valid
125  * @param width The width of the frame in pixel, with range [2, infinity), must be a multiple of 2
126  * @param height The height of the frame in pixel, with range [2, infinity), must be a multiple of 2
127  * @param flag Determining the type of conversion
128  * @param ySourcePaddingElements The number of padding elements at the end of each y-source row, in (uint8_t) elements, with range [0, infinity)
129  * @param vSourcePaddingElements The number of padding elements at the end of each v-source row, in (uint8_t) elements, with range [0, infinity)
130  * @param uSourcePaddingElements The number of padding elements at the end of each u-source row, in (uint8_t) elements, with range [0, infinity)
131  * @param targetPaddingElements The number of padding elements at the end of each target row, in (uint8_t) elements, with range [0, infinity)
132  * @param worker Optional worker object to distribute the computational to several CPU cores
133  */
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);
135 
136  /**
137  * Converts a Y_V_U12 frame to an 24 bit YVU frame into a second image buffer.
138  * @param ySource The y source frame buffer, with (width + yPaddingElements) * height elements, must be valid
139  * @param vSource The v source frame buffer, with (2 * width/2 + vPaddingElements) * height/2 elements, must be valid
140  * @param uSource The u source frame buffer, with (2 * width/2 + uPaddingElements) * height/2 elements, must be valid
141  * @param target The target frame buffer, with (width + targetPaddingElements) * height elements, must be valid
142  * @param width The width of the frame in pixel, with range [2, infinity), must be a multiple of 2
143  * @param height The height of the frame in pixel, with range [2, infinity), must be a multiple of 2
144  * @param flag Determining the type of conversion
145  * @param ySourcePaddingElements The number of padding elements at the end of each y-source row, in (uint8_t) elements, with range [0, infinity)
146  * @param vSourcePaddingElements The number of padding elements at the end of each v-source row, in (uint8_t) elements, with range [0, infinity)
147  * @param uSourcePaddingElements The number of padding elements at the end of each u-source row, in (uint8_t) elements, with range [0, infinity)
148  * @param targetPaddingElements The number of padding elements at the end of each target row, in (uint8_t) elements, with range [0, infinity)
149  * @param worker Optional worker object to distribute the computational to several CPU cores
150  */
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);
152 
153  /**
154  * Converts a Y_V_U12 frame to an 24 bit YUV frame into a second image buffer.
155  * @param ySource The y source frame buffer, with (width + yPaddingElements) * height elements, must be valid
156  * @param vSource The v source frame buffer, with (2 * width/2 + vPaddingElements) * height/2 elements, must be valid
157  * @param uSource The u source frame buffer, with (2 * width/2 + uPaddingElements) * height/2 elements, must be valid
158  * @param target The target frame buffer, with (width + targetPaddingElements) * height elements, must be valid
159  * @param width The width of the frame in pixel, with range [2, infinity), must be a multiple of 2
160  * @param height The height of the frame in pixel, with range [2, infinity), must be a multiple of 2
161  * @param flag Determining the type of conversion
162  * @param ySourcePaddingElements The number of padding elements at the end of each y-source row, in (uint8_t) elements, with range [0, infinity)
163  * @param vSourcePaddingElements The number of padding elements at the end of each v-source row, in (uint8_t) elements, with range [0, infinity)
164  * @param uSourcePaddingElements The number of padding elements at the end of each u-source row, in (uint8_t) elements, with range [0, infinity)
165  * @param targetPaddingElements The number of padding elements at the end of each target row, in (uint8_t) elements, with range [0, infinity)
166  * @param worker Optional worker object to distribute the computational to several CPU cores
167  */
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);
169 };
170 
171 inline void FrameConverterY_V_U12::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)
172 {
173  ocean_assert(ySource != nullptr && target != nullptr);
174  ocean_assert(width >= 1u && height >= 1u);
175 
176  FrameChannels::transformGeneric<uint8_t, 1u>(ySource, target, width, height, flag, ySourcePaddingElements, targetPaddingElements, worker);
177 }
178 
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)
180 {
181  ocean_assert(ySource != nullptr && vSource != nullptr && uSource != nullptr && target != nullptr);
182 
183  ocean_assert(width >= 2u && width % 2u == 0u);
184  ocean_assert(height >= 2u && height % 2u == 0u);
185 
186  if (width < 2u || height < 2u || width % 2u != 0u || height % 2u != 0u)
187  {
188  return;
189  }
190 
191  // precise color space conversion:
192  // | B | | 1.1639404296875 0.0 2.0179443359375 -276.919921875 | | Y |
193  // | G | = | 1.1639404296875 -0.81298828125 -0.3909912109375 135.486328125 | * | V |
194  // | R | | 1.1639404296875 1.595947265625 0.0 -222.904296875 | | U |
195  // | 1 |
196 
197  // approximation:
198  // | B | | 1192 0 2066 -277 | | Y |
199  // | G | = | 1192 -833 -400 135 | * | V |
200  // | R | | 1192 1634 0 -223 | | U |
201  // | 1 |
202 
203  const int options[4 + 12] =
204  {
205  // padding parameters
206  int(ySourcePaddingElements), int(vSourcePaddingElements), int(uSourcePaddingElements), int(targetPaddingElements),
207 
208  // multiplication parameters (with denominator 1024)
209  1192, 1192, 1192, 0, -833, 1634, 2066, -400, 0,
210 
211  // bias/translation parameters (with denominator 1)
212  -277, 135, -223
213  };
214 
215  const void* sources[3] =
216  {
217  ySource,
218  vSource,
219  uSource
220  };
221 
223 }
224 
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)
226 {
227  ocean_assert(ySource != nullptr && vSource != nullptr && uSource != nullptr && target != nullptr);
228 
229  ocean_assert(width >= 2u && width % 2u == 0u);
230  ocean_assert(height >= 2u && height % 2u == 0u);
231 
232  if (width < 2u || height < 2u || width % 2u != 0u || height % 2u != 0u)
233  {
234  return;
235  }
236 
237  // precise color space conversion:
238  // | R | | 1.1639404296875 1.595947265625 0.0 -222.904296875 | | Y |
239  // | G | = | 1.1639404296875 -0.81298828125 -0.3909912109375 135.486328125 | * | V |
240  // | B | | 1.1639404296875 0.0 2.0179443359375 -276.919921875 | | U |
241  // | 1 |
242 
243  // approximation:
244  // | R | | 1192 1634 0 -223 | | Y |
245  // | G | = | 1192 -833 -400 135 | * | V |
246  // | B | | 1192 0 2066 -277 | | U |
247  // | 1 |
248 
249  const int options[4 + 12] =
250  {
251  // padding parameters
252  int(ySourcePaddingElements), int(vSourcePaddingElements), int(uSourcePaddingElements), int(targetPaddingElements),
253 
254  // multiplication parameters (with denominator 1024)
255  1192, 1192, 1192, 1634, -833, 0, 0, -400, 2066,
256 
257  // bias/translation parameters (with denominator 1)
258  -223, 135, -277
259  };
260 
261  const void* sources[3] =
262  {
263  ySource,
264  vSource,
265  uSource
266  };
267 
269 }
270 
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)
272 {
273  FrameConverterY_U_V12::convertY_U_V12FullRangeToBGR24FullRangePrecision6Bit(ySource, uSource, vSource, target, width, height, flag, ySourcePaddingElements, uSourcePaddingElements, vSourcePaddingElements, targetPaddingElements, worker);
274 }
275 
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)
277 {
278  FrameConverterY_U_V12::convertY_U_V12FullRangeToRGB24FullRangePrecision6Bit(ySource, uSource, vSource, target, width, height, flag, ySourcePaddingElements, uSourcePaddingElements, vSourcePaddingElements, targetPaddingElements, worker);
279 }
280 
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)
282 {
283  FrameConverterY_U_V12::convertY_U_V12ToYUV24(ySource, vSource, uSource, target, width, height, flag, ySourcePaddingElements, vSourcePaddingElements, uSourcePaddingElements, targetPaddingElements, worker);
284 }
285 
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)
287 {
288  ocean_assert(ySource != nullptr && vSource != nullptr && uSource != nullptr && target != nullptr);
289 
290  ocean_assert(width >= 2u && width % 2u == 0u);
291  ocean_assert(height >= 2u && height % 2u == 0u);
292 
293  if (width < 2u || height < 2u || width % 2u != 0u || height % 2u != 0u)
294  {
295  return;
296  }
297 
298  const unsigned int options[4] = {ySourcePaddingElements, vSourcePaddingElements, uSourcePaddingElements, targetPaddingElements};
299 
300  const void* sources[3] =
301  {
302  ySource,
303  vSource,
304  uSource
305  };
306 
307  FrameConverter::convertArbitraryPixelFormat(sources, (void**)(&target), width, height, flag, 2u, FrameConverter::mapTwoRows_1Plane1ChannelAnd2Planes1ChannelDownsampled2x2_To_1Plane3Channels_8BitPerChannel<0u, 2u, 1u>, options, worker);
308 }
309 
310 }
311 
312 }
313 
314 #endif // META_OCEAN_CV_FRAME_CONVERTER_Y_V_U_12_H
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:3183
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