Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qvideoframeconversionhelper.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
5#include "qrgb.h"
6
7#include <mutex>
8
10
11#define CLAMP(n) (n > 255 ? 255 : (n < 0 ? 0 : n))
12
13#define EXPAND_UV(u, v) \
14 int uu = u - 128; \
15 int vv = v - 128; \
16 int rv = 409 * vv + 128; \
17 int guv = 100 * uu + 208 * vv + 128; \
18 int bu = 516 * uu + 128; \
19
20static inline quint32 qYUVToARGB32(int y, int rv, int guv, int bu, int a = 0xff)
21{
22 int yy = (y - 16) * 298;
23 return (a << 24)
24 | CLAMP((yy + rv) >> 8) << 16
25 | CLAMP((yy - guv) >> 8) << 8
26 | CLAMP((yy + bu) >> 8);
27}
28
29static inline void planarYUV420_to_ARGB32(const uchar *y, int yStride,
30 const uchar *u, int uStride,
31 const uchar *v, int vStride,
32 int uvPixelStride,
33 quint32 *rgb,
34 int width, int height)
35{
36 height &= ~1;
37 quint32 *rgb0 = rgb;
38 quint32 *rgb1 = rgb + width;
39
40 for (int j = 0; j < height; j += 2) {
41 const uchar *lineY0 = y;
42 const uchar *lineY1 = y + yStride;
43 const uchar *lineU = u;
44 const uchar *lineV = v;
45
46 for (int i = 0; i < width; i += 2) {
47 EXPAND_UV(*lineU, *lineV);
48 lineU += uvPixelStride;
49 lineV += uvPixelStride;
50
51 *rgb0++ = qYUVToARGB32(*lineY0++, rv, guv, bu);
52 *rgb0++ = qYUVToARGB32(*lineY0++, rv, guv, bu);
53 *rgb1++ = qYUVToARGB32(*lineY1++, rv, guv, bu);
54 *rgb1++ = qYUVToARGB32(*lineY1++, rv, guv, bu);
55 }
56
57 y += yStride << 1; // stride * 2
58 u += uStride;
59 v += vStride;
60 rgb0 += width;
61 rgb1 += width;
62 }
63}
64
65static inline void planarYUV422_to_ARGB32(const uchar *y, int yStride,
66 const uchar *u, int uStride,
67 const uchar *v, int vStride,
68 int uvPixelStride,
69 quint32 *rgb,
70 int width, int height)
71{
72 quint32 *rgb0 = rgb;
73
74 for (int j = 0; j < height; ++j) {
75 const uchar *lineY0 = y;
76 const uchar *lineU = u;
77 const uchar *lineV = v;
78
79 for (int i = 0; i < width; i += 2) {
80 EXPAND_UV(*lineU, *lineV);
81 lineU += uvPixelStride;
82 lineV += uvPixelStride;
83
84 *rgb0++ = qYUVToARGB32(*lineY0++, rv, guv, bu);
85 *rgb0++ = qYUVToARGB32(*lineY0++, rv, guv, bu);
86 }
87
88 y += yStride; // stride * 2
89 u += uStride;
90 v += vStride;
91 rgb0 += width;
92 }
93}
94
95
96
98{
100 planarYUV420_to_ARGB32(plane1, plane1Stride,
101 plane2, plane2Stride,
102 plane3, plane3Stride,
103 1,
104 reinterpret_cast<quint32*>(output),
105 width, height);
106}
107
109{
111 planarYUV422_to_ARGB32(plane1, plane1Stride,
112 plane2, plane2Stride,
113 plane3, plane3Stride,
114 1,
115 reinterpret_cast<quint32*>(output),
116 width, height);
117}
118
119
121{
123 planarYUV420_to_ARGB32(plane1, plane1Stride,
124 plane3, plane3Stride,
125 plane2, plane2Stride,
126 1,
127 reinterpret_cast<quint32*>(output),
128 width, height);
129}
130
132{
135
136 quint32 *rgb = reinterpret_cast<quint32*>(output);
137
138 for (int i = 0; i < height; ++i) {
139 const uchar *lineSrc = src;
140
141 for (int j = 0; j < width; ++j) {
142 int a = *lineSrc++;
143 int y = *lineSrc++;
144 int u = *lineSrc++;
145 int v = *lineSrc++;
146
147 EXPAND_UV(u, v);
148
149 *rgb++ = qPremultiply(qYUVToARGB32(y, rv, guv, bu, a));
150 }
151
152 src += stride;
153 }
154}
155
157{
160
161 quint32 *rgb = reinterpret_cast<quint32*>(output);
162
163 for (int i = 0; i < height; ++i) {
164 const uchar *lineSrc = src;
165
166 for (int j = 0; j < width; ++j) {
167 int a = *lineSrc++;
168 int y = *lineSrc++;
169 int u = *lineSrc++;
170 int v = *lineSrc++;
171
172 EXPAND_UV(u, v);
173
174 *rgb++ = qYUVToARGB32(y, rv, guv, bu, a);
175 }
176
177 src += stride;
178 }
179}
180
182{
185
186 quint32 *rgb = reinterpret_cast<quint32*>(output);
187
188 for (int i = 0; i < height; ++i) {
189 const uchar *lineSrc = src;
190
191 for (int j = 0; j < width; j += 2) {
192 int u = *lineSrc++;
193 int y0 = *lineSrc++;
194 int v = *lineSrc++;
195 int y1 = *lineSrc++;
196
197 EXPAND_UV(u, v);
198
199 *rgb++ = qYUVToARGB32(y0, rv, guv, bu);
200 *rgb++ = qYUVToARGB32(y1, rv, guv, bu);
201 }
202
203 src += stride;
204 }
205}
206
208{
211
212 quint32 *rgb = reinterpret_cast<quint32*>(output);
213
214 for (int i = 0; i < height; ++i) {
215 const uchar *lineSrc = src;
216
217 for (int j = 0; j < width; j += 2) {
218 int y0 = *lineSrc++;
219 int u = *lineSrc++;
220 int y1 = *lineSrc++;
221 int v = *lineSrc++;
222
223 EXPAND_UV(u, v);
224
225 *rgb++ = qYUVToARGB32(y0, rv, guv, bu);
226 *rgb++ = qYUVToARGB32(y1, rv, guv, bu);
227 }
228
229 src += stride;
230 }
231}
232
234{
236 planarYUV420_to_ARGB32(plane1, plane1Stride,
237 plane2, plane2Stride,
238 plane2 + 1, plane2Stride,
239 2,
240 reinterpret_cast<quint32*>(output),
241 width, height);
242}
243
245{
247 planarYUV420_to_ARGB32(plane1, plane1Stride,
248 plane2 + 1, plane2Stride,
249 plane2, plane2Stride,
250 2,
251 reinterpret_cast<quint32*>(output),
252 width, height);
253}
254
256{
258 Q_ASSERT(plane1Stride == plane2Stride);
259 Q_ASSERT(plane1Stride == plane3Stride);
260
261 planarYUV420_to_ARGB32(plane1, plane1Stride,
262 plane3, plane3Stride,
263 plane2, plane2Stride,
264 1,
265 reinterpret_cast<quint32*>(output),
266 width, height);
267}
268
270{
272 Q_ASSERT(plane1Stride == plane2Stride);
273
274 planarYUV420_to_ARGB32(plane1, plane1Stride,
275 plane2 + (plane1Stride >> 1), plane1Stride,
276 plane2, plane1Stride,
277 1,
278 reinterpret_cast<quint32*>(output),
279 width, height);
280}
281
283{
285 Q_ASSERT(plane1Stride == plane2Stride);
286 Q_ASSERT(plane1Stride == plane3Stride);
287
288 planarYUV420_to_ARGB32(plane1, plane1Stride,
289 plane2, plane2Stride,
290 plane3, plane3Stride,
291 1,
292 reinterpret_cast<quint32*>(output),
293 width, height);
294}
295
297{
299 Q_ASSERT(plane1Stride == plane2Stride);
300
301 planarYUV420_to_ARGB32(plane1, plane1Stride,
302 plane2, plane1Stride,
303 plane2 + (plane1Stride >> 1), plane1Stride,
304 1,
305 reinterpret_cast<quint32*>(output),
306 width, height);
307}
308
309
310template<typename Pixel>
312{
315
316 quint32 *argb = reinterpret_cast<quint32*>(output);
317
318 for (int y = 0; y < height; ++y) {
319 const Pixel *data = reinterpret_cast<const Pixel *>(src);
320
321 int x = 0;
322 for (; x < width - 3; x += 4) {
323 // Copy 4 pixels onto the stack in one go. This significantly increases performance
324 // in the case where the mapped memory is uncached (because it's a framebuffer)
325 Pixel p[4];
326 memcpy(p, data, 4*sizeof(Pixel));
327 *argb++ = qPremultiply(p[0].convert());
328 *argb++ = qPremultiply(p[1].convert());
329 *argb++ = qPremultiply(p[2].convert());
330 *argb++ = qPremultiply(p[3].convert());
331 data += 4;
332 }
333
334 // leftovers
335 for (; x < width; ++x) {
336 *argb++ = qPremultiply(data->convert());
337 ++data;
338 }
339
340 src += stride;
341 }
342}
343
344template<typename Pixel>
346{
349
350 quint32 *argb = reinterpret_cast<quint32*>(output);
351
352 for (int y = 0; y < height; ++y) {
353 const Pixel *data = reinterpret_cast<const Pixel *>(src);
354
355 int x = 0;
356 for (; x < width - 3; x += 4) {
357 // Copy 4 pixels onto the stack in one go. This significantly increases performance
358 // in the case where the mapped memory is uncached (because it's a framebuffer)
359 Pixel p[4];
360 memcpy(p, data, 4*sizeof(Pixel));
361 *argb++ = p[0].convert();
362 *argb++ = p[1].convert();
363 *argb++ = p[2].convert();
364 *argb++ = p[3].convert();
365 data += 4;
366 }
367
368 // leftovers
369 for (; x < width; ++x) {
370 *argb++ = data->convert();
371 ++data;
372 }
373
374 src += stride;
375 }
376}
377
378static inline void planarYUV420_16bit_to_ARGB32(const uchar *y, int yStride,
379 const uchar *u, int uStride,
380 const uchar *v, int vStride,
381 int uvPixelStride,
382 quint32 *rgb,
383 int width, int height)
384{
385 height &= ~1;
386 quint32 *rgb0 = rgb;
387 quint32 *rgb1 = rgb + width;
388
389 for (int j = 0; j < height; j += 2) {
390 const uchar *lineY0 = y;
391 const uchar *lineY1 = y + yStride;
392 const uchar *lineU = u;
393 const uchar *lineV = v;
394
395 for (int i = 0; i < width; i += 2) {
396 EXPAND_UV(*lineU, *lineV);
397 lineU += uvPixelStride;
398 lineV += uvPixelStride;
399
400 *rgb0++ = qYUVToARGB32(*lineY0, rv, guv, bu);
401 lineY0 += 2;
402 *rgb0++ = qYUVToARGB32(*lineY0, rv, guv, bu);
403 lineY0 += 2;
404 *rgb1++ = qYUVToARGB32(*lineY1, rv, guv, bu);
405 lineY1 += 2;
406 *rgb1++ = qYUVToARGB32(*lineY1, rv, guv, bu);
407 lineY1 += 2;
408 }
409
410 y += yStride << 1; // stride * 2
411 u += uStride;
412 v += vStride;
413 rgb0 += width;
414 rgb1 += width;
415 }
416}
417
419{
421 planarYUV420_16bit_to_ARGB32(plane1 + 1, plane1Stride,
422 plane2 + 1, plane2Stride,
423 plane2 + 3, plane2Stride,
424 4,
425 reinterpret_cast<quint32*>(output),
426 width, height);
427
428}
429
430template <typename Y>
432{
434 MERGE_LOOPS(width, height, stride, (int)sizeof(Y))
435 quint32 *argb = reinterpret_cast<quint32*>(output);
436
437 using Pixel = YPixel<Y>;
438
439 for (int y = 0; y < height; ++y) {
440 const Pixel *pixel = reinterpret_cast<const Pixel *>(src);
441
442 int x = 0;
443 for (; x < width - 3; x += 4) {
444 *argb++ = pixel->convert();
445 ++pixel;
446 *argb++ = pixel->convert();
447 ++pixel;
448 *argb++ = pixel->convert();
449 ++pixel;
450 *argb++ = pixel->convert();
451 ++pixel;
452 }
453
454 // leftovers
455 for (; x < width; ++x) {
456 *argb++ = pixel->convert();
457 ++pixel;
458 }
459
460 src += stride;
461 }
463}
464
465static VideoFrameConvertFunc qConvertFuncs[QVideoFrameFormat::NPixelFormats] = {
466 /* Format_Invalid */ nullptr, // Not needed
467 /* Format_ARGB8888 */ qt_convert_to_ARGB32<ARGB8888>,
468 /* Format_ARGB8888_Premultiplied */ qt_convert_premultiplied_to_ARGB32<ARGB8888>,
469 /* Format_XRGB8888 */ qt_convert_premultiplied_to_ARGB32<XRGB8888>,
470 /* Format_BGRA8888 */ qt_convert_to_ARGB32<BGRA8888>,
471 /* Format_BGRA8888_Premultiplied */ qt_convert_premultiplied_to_ARGB32<BGRA8888>,
472 /* Format_BGRX8888 */ qt_convert_premultiplied_to_ARGB32<BGRX8888>,
473 /* Format_ABGR8888 */ qt_convert_to_ARGB32<ABGR8888>,
474 /* Format_XBGR8888 */ qt_convert_premultiplied_to_ARGB32<XBGR8888>,
475 /* Format_RGBA8888 */ qt_convert_to_ARGB32<RGBA8888>,
476 /* Format_RGBX8888 */ qt_convert_premultiplied_to_ARGB32<RGBX8888>,
477 /* Format_AYUV */ qt_convert_AYUV_to_ARGB32,
478 /* Format_AYUV_Premultiplied */ qt_convert_AYUV_Premultiplied_to_ARGB32,
479 /* Format_YUV420P */ qt_convert_YUV420P_to_ARGB32,
480 /* Format_YUV422P */ qt_convert_YUV422P_to_ARGB32,
481 /* Format_YV12 */ qt_convert_YV12_to_ARGB32,
482 /* Format_UYVY */ qt_convert_UYVY_to_ARGB32,
483 /* Format_YUYV */ qt_convert_YUYV_to_ARGB32,
484 /* Format_NV12 */ qt_convert_NV12_to_ARGB32,
485 /* Format_NV21 */ qt_convert_NV21_to_ARGB32,
486 /* Format_IMC1 */ qt_convert_IMC1_to_ARGB32,
487 /* Format_IMC2 */ qt_convert_IMC2_to_ARGB32,
488 /* Format_IMC3 */ qt_convert_IMC3_to_ARGB32,
489 /* Format_IMC4 */ qt_convert_IMC4_to_ARGB32,
490 /* Format_Y8 */ qt_convert_Y_to_ARGB32<uchar>,
491 /* Format_Y16 */ qt_convert_Y_to_ARGB32<ushort>,
492 /* Format_P010 */ qt_convert_P016_to_ARGB32,
493 /* Format_P016 */ qt_convert_P016_to_ARGB32,
494 /* Format_Jpeg */ nullptr, // Not needed
495};
496
498{
499#ifdef QT_COMPILER_SUPPORTS_SSE2
500 extern void QT_FASTCALL qt_convert_ARGB8888_to_ARGB32_sse2(const QVideoFrame &frame, uchar *output);
501 extern void QT_FASTCALL qt_convert_ABGR8888_to_ARGB32_sse2(const QVideoFrame &frame, uchar *output);
502 extern void QT_FASTCALL qt_convert_RGBA8888_to_ARGB32_sse2(const QVideoFrame &frame, uchar *output);
503 extern void QT_FASTCALL qt_convert_BGRA8888_to_ARGB32_sse2(const QVideoFrame &frame, uchar *output);
504 if (qCpuHasFeature(SSE2)){
505 qConvertFuncs[QVideoFrameFormat::Format_ARGB8888] = qt_convert_ARGB8888_to_ARGB32_sse2;
506 qConvertFuncs[QVideoFrameFormat::Format_ARGB8888_Premultiplied] = qt_convert_ARGB8888_to_ARGB32_sse2;
507 qConvertFuncs[QVideoFrameFormat::Format_XRGB8888] = qt_convert_ARGB8888_to_ARGB32_sse2;
508 qConvertFuncs[QVideoFrameFormat::Format_BGRA8888] = qt_convert_BGRA8888_to_ARGB32_sse2;
509 qConvertFuncs[QVideoFrameFormat::Format_BGRA8888_Premultiplied] = qt_convert_BGRA8888_to_ARGB32_sse2;
510 qConvertFuncs[QVideoFrameFormat::Format_BGRX8888] = qt_convert_BGRA8888_to_ARGB32_sse2;
511 qConvertFuncs[QVideoFrameFormat::Format_ABGR8888] = qt_convert_ABGR8888_to_ARGB32_sse2;
512 qConvertFuncs[QVideoFrameFormat::Format_XBGR8888] = qt_convert_ABGR8888_to_ARGB32_sse2;
513 qConvertFuncs[QVideoFrameFormat::Format_RGBA8888] = qt_convert_RGBA8888_to_ARGB32_sse2;
514 qConvertFuncs[QVideoFrameFormat::Format_RGBX8888] = qt_convert_RGBA8888_to_ARGB32_sse2;
515 }
516#endif
517#ifdef QT_COMPILER_SUPPORTS_SSSE3
518 extern void QT_FASTCALL qt_convert_ARGB8888_to_ARGB32_ssse3(const QVideoFrame &frame, uchar *output);
519 extern void QT_FASTCALL qt_convert_ABGR8888_to_ARGB32_ssse3(const QVideoFrame &frame, uchar *output);
520 extern void QT_FASTCALL qt_convert_RGBA8888_to_ARGB32_ssse3(const QVideoFrame &frame, uchar *output);
521 extern void QT_FASTCALL qt_convert_BGRA8888_to_ARGB32_ssse3(const QVideoFrame &frame, uchar *output);
522 if (qCpuHasFeature(SSSE3)){
523 qConvertFuncs[QVideoFrameFormat::Format_ARGB8888] = qt_convert_ARGB8888_to_ARGB32_ssse3;
524 qConvertFuncs[QVideoFrameFormat::Format_ARGB8888_Premultiplied] = qt_convert_ARGB8888_to_ARGB32_ssse3;
525 qConvertFuncs[QVideoFrameFormat::Format_XRGB8888] = qt_convert_ARGB8888_to_ARGB32_ssse3;
526 qConvertFuncs[QVideoFrameFormat::Format_BGRA8888] = qt_convert_BGRA8888_to_ARGB32_ssse3;
527 qConvertFuncs[QVideoFrameFormat::Format_BGRA8888_Premultiplied] = qt_convert_BGRA8888_to_ARGB32_ssse3;
528 qConvertFuncs[QVideoFrameFormat::Format_BGRX8888] = qt_convert_BGRA8888_to_ARGB32_ssse3;
529 qConvertFuncs[QVideoFrameFormat::Format_ABGR8888] = qt_convert_ABGR8888_to_ARGB32_ssse3;
530 qConvertFuncs[QVideoFrameFormat::Format_XBGR8888] = qt_convert_ABGR8888_to_ARGB32_ssse3;
531 qConvertFuncs[QVideoFrameFormat::Format_RGBA8888] = qt_convert_RGBA8888_to_ARGB32_ssse3;
532 qConvertFuncs[QVideoFrameFormat::Format_RGBX8888] = qt_convert_RGBA8888_to_ARGB32_ssse3;
533 }
534#endif
535#ifdef QT_COMPILER_SUPPORTS_AVX2
536 extern void QT_FASTCALL qt_convert_ARGB8888_to_ARGB32_avx2(const QVideoFrame &frame, uchar *output);
537 extern void QT_FASTCALL qt_convert_ABGR8888_to_ARGB32_avx2(const QVideoFrame &frame, uchar *output);
538 extern void QT_FASTCALL qt_convert_RGBA8888_to_ARGB32_avx2(const QVideoFrame &frame, uchar *output);
539 extern void QT_FASTCALL qt_convert_BGRA8888_to_ARGB32_avx2(const QVideoFrame &frame, uchar *output);
540 if (qCpuHasFeature(AVX2)){
541 qConvertFuncs[QVideoFrameFormat::Format_ARGB8888] = qt_convert_ARGB8888_to_ARGB32_avx2;
542 qConvertFuncs[QVideoFrameFormat::Format_ARGB8888_Premultiplied] = qt_convert_ARGB8888_to_ARGB32_avx2;
543 qConvertFuncs[QVideoFrameFormat::Format_XRGB8888] = qt_convert_ARGB8888_to_ARGB32_avx2;
544 qConvertFuncs[QVideoFrameFormat::Format_BGRA8888] = qt_convert_BGRA8888_to_ARGB32_avx2;
545 qConvertFuncs[QVideoFrameFormat::Format_BGRA8888_Premultiplied] = qt_convert_BGRA8888_to_ARGB32_avx2;
546 qConvertFuncs[QVideoFrameFormat::Format_BGRX8888] = qt_convert_BGRA8888_to_ARGB32_avx2;
547 qConvertFuncs[QVideoFrameFormat::Format_ABGR8888] = qt_convert_ABGR8888_to_ARGB32_avx2;
548 qConvertFuncs[QVideoFrameFormat::Format_XBGR8888] = qt_convert_ABGR8888_to_ARGB32_avx2;
549 qConvertFuncs[QVideoFrameFormat::Format_RGBA8888] = qt_convert_RGBA8888_to_ARGB32_avx2;
550 qConvertFuncs[QVideoFrameFormat::Format_RGBX8888] = qt_convert_RGBA8888_to_ARGB32_avx2;
551 }
552#endif
553}
554
556{
557 static std::once_flag once;
558 std::call_once(once, &qInitConvertFuncsAsm);
559
560 VideoFrameConvertFunc convert = qConvertFuncs[format];
561 return convert;
562}
563
564
PixelFormat
Enumerates video data types.
static constexpr int NPixelFormats
The QVideoFrame class represents a frame of video data.
Definition qvideoframe.h:26
Combined button and popup list for selecting options.
#define rgb(r, g, b)
Definition qcolor.cpp:124
#define QT_FASTCALL
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLint GLsizei GLsizei height
GLboolean GLboolean GLboolean GLboolean a
[7]
GLuint GLfloat GLfloat GLfloat GLfloat y1
GLenum src
const void GLsizei GLsizei stride
GLint GLsizei width
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint GLsizei GLsizei GLenum format
GLuint GLfloat GLfloat y0
GLint y
GLfloat GLfloat p
[1]
static constexpr To convert(const std::array< Mapping, N > &mapping, From Mapping::*from, To Mapping::*to, From value, To defaultValue)
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
constexpr QRgb qPremultiply(QRgb x)
Definition qrgb.h:45
#define qCpuHasFeature(feature)
Definition qsimd_p.h:378
unsigned int quint32
Definition qtypes.h:45
unsigned char uchar
Definition qtypes.h:27
static void QT_FASTCALL qt_convert_NV12_to_ARGB32(const QVideoFrame &frame, uchar *output)
static void QT_FASTCALL qt_convert_YUV420P_to_ARGB32(const QVideoFrame &frame, uchar *output)
static void QT_FASTCALL qt_convert_AYUV_Premultiplied_to_ARGB32(const QVideoFrame &frame, uchar *output)
static void QT_FASTCALL qt_convert_IMC1_to_ARGB32(const QVideoFrame &frame, uchar *output)
VideoFrameConvertFunc qConverterForFormat(QVideoFrameFormat::PixelFormat format)
static void QT_FASTCALL qt_convert_YUV422P_to_ARGB32(const QVideoFrame &frame, uchar *output)
static void QT_FASTCALL qt_convert_UYVY_to_ARGB32(const QVideoFrame &frame, uchar *output)
#define EXPAND_UV(u, v)
static void QT_FASTCALL qt_convert_premultiplied_to_ARGB32(const QVideoFrame &frame, uchar *output)
static quint32 qYUVToARGB32(int y, int rv, int guv, int bu, int a=0xff)
static void QT_FASTCALL qt_convert_YUYV_to_ARGB32(const QVideoFrame &frame, uchar *output)
static void planarYUV420_to_ARGB32(const uchar *y, int yStride, const uchar *u, int uStride, const uchar *v, int vStride, int uvPixelStride, quint32 *rgb, int width, int height)
static void planarYUV420_16bit_to_ARGB32(const uchar *y, int yStride, const uchar *u, int uStride, const uchar *v, int vStride, int uvPixelStride, quint32 *rgb, int width, int height)
static void QT_FASTCALL qt_convert_AYUV_to_ARGB32(const QVideoFrame &frame, uchar *output)
static void QT_FASTCALL qt_convert_Y_to_ARGB32(const QVideoFrame &frame, uchar *output)
static void QT_FASTCALL qt_convert_IMC2_to_ARGB32(const QVideoFrame &frame, uchar *output)
static void QT_FASTCALL qt_convert_YV12_to_ARGB32(const QVideoFrame &frame, uchar *output)
static void QT_FASTCALL qt_convert_IMC3_to_ARGB32(const QVideoFrame &frame, uchar *output)
static void QT_FASTCALL qt_convert_P016_to_ARGB32(const QVideoFrame &frame, uchar *output)
static void qInitConvertFuncsAsm()
static VideoFrameConvertFunc qConvertFuncs[QVideoFrameFormat::NPixelFormats]
static void QT_FASTCALL qt_convert_to_ARGB32(const QVideoFrame &frame, uchar *output)
static void QT_FASTCALL qt_convert_IMC4_to_ARGB32(const QVideoFrame &frame, uchar *output)
static void QT_FASTCALL qt_convert_NV21_to_ARGB32(const QVideoFrame &frame, uchar *output)
static void planarYUV422_to_ARGB32(const uchar *y, int yStride, const uchar *u, int uStride, const uchar *v, int vStride, int uvPixelStride, quint32 *rgb, int width, int height)
#define CLAMP(n)
#define MERGE_LOOPS(width, height, stride, bpp)
#define FETCH_INFO_PACKED(frame)
#define FETCH_INFO_BIPLANAR(frame)
#define FETCH_INFO_TRIPLANAR(frame)
QT_BEGIN_NAMESPACE typedef uchar * output
QFrame frame
[0]