Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qvideoframeconversionhelper.cpp File Reference

(352f08af6700f73ee099a217b631d2b25c1e99d8)

#include "qvideoframeconversionhelper_p.h"
#include "qrgb.h"
#include <mutex>
Include dependency graph for qvideoframeconversionhelper.cpp:

Go to the source code of this file.

Macros

#define CLAMP(n)
#define EXPAND_UV(u, v)

Functions

static quint32 qYUVToARGB32 (int y, int rv, int guv, int bu, int a=0xff)
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 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)
static void QT_FASTCALL qt_convert_YUV420P_to_ARGB32 (const QVideoFrame &frame, uchar *output)
static void QT_FASTCALL qt_convert_YUV422P_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_AYUV_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_UYVY_to_ARGB32 (const QVideoFrame &frame, uchar *output)
static void QT_FASTCALL qt_convert_YUYV_to_ARGB32 (const QVideoFrame &frame, uchar *output)
static void QT_FASTCALL qt_convert_NV12_to_ARGB32 (const QVideoFrame &frame, uchar *output)
static void QT_FASTCALL qt_convert_NV21_to_ARGB32 (const QVideoFrame &frame, uchar *output)
static void QT_FASTCALL qt_convert_IMC1_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_IMC3_to_ARGB32 (const QVideoFrame &frame, uchar *output)
static void QT_FASTCALL qt_convert_IMC4_to_ARGB32 (const QVideoFrame &frame, uchar *output)
template<typename Pixel>
static void QT_FASTCALL qt_convert_to_ARGB32 (const QVideoFrame &frame, uchar *output)
template<typename Pixel>
static void QT_FASTCALL qt_convert_premultiplied_to_ARGB32 (const QVideoFrame &frame, uchar *output)
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_P016_to_ARGB32 (const QVideoFrame &frame, uchar *output)
template<typename Y>
static void QT_FASTCALL qt_convert_Y_to_ARGB32 (const QVideoFrame &frame, uchar *output)
template<typename Pixel>
static void QT_FASTCALL qt_copy_pixels_with_mask (Pixel *dst, const Pixel *src, size_t size, Pixel mask)
static void qInitFuncsAsm ()
VideoFrameConvertFunc qConverterForFormat (QVideoFrameFormat::PixelFormat format)
void Q_MULTIMEDIA_EXPORT qCopyPixelsWithAlphaMask (uint32_t *dst, const uint32_t *src, size_t pixCount, QVideoFrameFormat::PixelFormat format, bool srcAlphaVaries)
void qCopyPixelsWithMask (uint32_t *dst, const uint32_t *src, size_t size, uint32_t mask)
uint32_t qAlphaMask (QVideoFrameFormat::PixelFormat format)

Variables

static VideoFrameConvertFunc qConvertFuncs [QVideoFrameFormat::NPixelFormats]
static PixelsCopyFunc qPixelsCopyFunc = qt_copy_pixels_with_mask<uint32_t>
static std::once_flag InitFuncsAsmFlag

Macro Definition Documentation

◆ CLAMP

#define CLAMP ( n)
Value:
(n > 255 ? 255 : (n < 0 ? 0 : n))
GLfloat n

Definition at line 11 of file qvideoframeconversionhelper.cpp.

◆ EXPAND_UV

#define EXPAND_UV ( u,
v )
Value:
int uu = u - 128; \
int vv = v - 128; \
int rv = 409 * vv + 128; \
int guv = 100 * uu + 208 * vv + 128; \
int bu = 516 * uu + 128; \
GLsizei const GLfloat * v

Definition at line 13 of file qvideoframeconversionhelper.cpp.

Function Documentation

◆ planarYUV420_16bit_to_ARGB32()

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 )
inlinestatic

Definition at line 373 of file qvideoframeconversionhelper.cpp.

◆ planarYUV420_to_ARGB32()

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 )
inlinestatic

Definition at line 29 of file qvideoframeconversionhelper.cpp.

◆ planarYUV422_to_ARGB32()

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 )
inlinestatic

Definition at line 64 of file qvideoframeconversionhelper.cpp.

◆ qAlphaMask()

uint32_t qAlphaMask ( QVideoFrameFormat::PixelFormat format)

Definition at line 602 of file qvideoframeconversionhelper.cpp.

◆ qConverterForFormat()

VideoFrameConvertFunc qConverterForFormat ( QVideoFrameFormat::PixelFormat format)

Definition at line 570 of file qvideoframeconversionhelper.cpp.

References InitFuncsAsmFlag, and qInitFuncsAsm().

Here is the call graph for this function:

◆ qCopyPixelsWithAlphaMask()

void Q_MULTIMEDIA_EXPORT qCopyPixelsWithAlphaMask ( uint32_t * dst,
const uint32_t * src,
size_t pixCount,
QVideoFrameFormat::PixelFormat format,
bool srcAlphaVaries )

Definition at line 578 of file qvideoframeconversionhelper.cpp.

◆ qCopyPixelsWithMask()

void qCopyPixelsWithMask ( uint32_t * dst,
const uint32_t * src,
size_t size,
uint32_t mask )

Definition at line 595 of file qvideoframeconversionhelper.cpp.

References InitFuncsAsmFlag, qInitFuncsAsm(), and qPixelsCopyFunc.

Here is the call graph for this function:

◆ qInitFuncsAsm()

void qInitFuncsAsm ( )
static

Definition at line 505 of file qvideoframeconversionhelper.cpp.

Referenced by qConverterForFormat(), and qCopyPixelsWithMask().

Here is the caller graph for this function:

◆ qt_convert_AYUV_Premultiplied_to_ARGB32()

void QT_FASTCALL qt_convert_AYUV_Premultiplied_to_ARGB32 ( const QVideoFrame & frame,
uchar * output )
static

Definition at line 151 of file qvideoframeconversionhelper.cpp.

◆ qt_convert_AYUV_to_ARGB32()

void QT_FASTCALL qt_convert_AYUV_to_ARGB32 ( const QVideoFrame & frame,
uchar * output )
static

Definition at line 126 of file qvideoframeconversionhelper.cpp.

◆ qt_convert_IMC1_to_ARGB32()

void QT_FASTCALL qt_convert_IMC1_to_ARGB32 ( const QVideoFrame & frame,
uchar * output )
static

Definition at line 250 of file qvideoframeconversionhelper.cpp.

◆ qt_convert_IMC2_to_ARGB32()

void QT_FASTCALL qt_convert_IMC2_to_ARGB32 ( const QVideoFrame & frame,
uchar * output )
static

Definition at line 264 of file qvideoframeconversionhelper.cpp.

◆ qt_convert_IMC3_to_ARGB32()

void QT_FASTCALL qt_convert_IMC3_to_ARGB32 ( const QVideoFrame & frame,
uchar * output )
static

Definition at line 277 of file qvideoframeconversionhelper.cpp.

◆ qt_convert_IMC4_to_ARGB32()

void QT_FASTCALL qt_convert_IMC4_to_ARGB32 ( const QVideoFrame & frame,
uchar * output )
static

Definition at line 291 of file qvideoframeconversionhelper.cpp.

◆ qt_convert_NV12_to_ARGB32()

void QT_FASTCALL qt_convert_NV12_to_ARGB32 ( const QVideoFrame & frame,
uchar * output )
static

Definition at line 228 of file qvideoframeconversionhelper.cpp.

◆ qt_convert_NV21_to_ARGB32()

void QT_FASTCALL qt_convert_NV21_to_ARGB32 ( const QVideoFrame & frame,
uchar * output )
static

Definition at line 239 of file qvideoframeconversionhelper.cpp.

◆ qt_convert_P016_to_ARGB32()

void QT_FASTCALL qt_convert_P016_to_ARGB32 ( const QVideoFrame & frame,
uchar * output )
static

Definition at line 414 of file qvideoframeconversionhelper.cpp.

◆ qt_convert_premultiplied_to_ARGB32()

template<typename Pixel>
void QT_FASTCALL qt_convert_premultiplied_to_ARGB32 ( const QVideoFrame & frame,
uchar * output )
static

Definition at line 340 of file qvideoframeconversionhelper.cpp.

◆ qt_convert_to_ARGB32()

template<typename Pixel>
void QT_FASTCALL qt_convert_to_ARGB32 ( const QVideoFrame & frame,
uchar * output )
static

Definition at line 306 of file qvideoframeconversionhelper.cpp.

◆ qt_convert_UYVY_to_ARGB32()

void QT_FASTCALL qt_convert_UYVY_to_ARGB32 ( const QVideoFrame & frame,
uchar * output )
static

Definition at line 176 of file qvideoframeconversionhelper.cpp.

◆ qt_convert_Y_to_ARGB32()

template<typename Y>
void QT_FASTCALL qt_convert_Y_to_ARGB32 ( const QVideoFrame & frame,
uchar * output )
static

Definition at line 427 of file qvideoframeconversionhelper.cpp.

◆ qt_convert_YUV420P_to_ARGB32()

void QT_FASTCALL qt_convert_YUV420P_to_ARGB32 ( const QVideoFrame & frame,
uchar * output )
static

Definition at line 92 of file qvideoframeconversionhelper.cpp.

◆ qt_convert_YUV422P_to_ARGB32()

void QT_FASTCALL qt_convert_YUV422P_to_ARGB32 ( const QVideoFrame & frame,
uchar * output )
static

Definition at line 103 of file qvideoframeconversionhelper.cpp.

◆ qt_convert_YUYV_to_ARGB32()

void QT_FASTCALL qt_convert_YUYV_to_ARGB32 ( const QVideoFrame & frame,
uchar * output )
static

Definition at line 202 of file qvideoframeconversionhelper.cpp.

◆ qt_convert_YV12_to_ARGB32()

void QT_FASTCALL qt_convert_YV12_to_ARGB32 ( const QVideoFrame & frame,
uchar * output )
static

Definition at line 115 of file qvideoframeconversionhelper.cpp.

◆ qt_copy_pixels_with_mask()

template<typename Pixel>
void QT_FASTCALL qt_copy_pixels_with_mask ( Pixel * dst,
const Pixel * src,
size_t size,
Pixel mask )
static

Definition at line 462 of file qvideoframeconversionhelper.cpp.

◆ qYUVToARGB32()

quint32 qYUVToARGB32 ( int y,
int rv,
int guv,
int bu,
int a = 0xff )
inlinestatic

Definition at line 20 of file qvideoframeconversionhelper.cpp.

Variable Documentation

◆ InitFuncsAsmFlag

std::once_flag InitFuncsAsmFlag
static

Definition at line 503 of file qvideoframeconversionhelper.cpp.

Referenced by qConverterForFormat(), and qCopyPixelsWithMask().

◆ qConvertFuncs

VideoFrameConvertFunc qConvertFuncs
static

Definition at line 469 of file qvideoframeconversionhelper.cpp.

◆ qPixelsCopyFunc

PixelsCopyFunc qPixelsCopyFunc = qt_copy_pixels_with_mask<uint32_t>
static

Definition at line 501 of file qvideoframeconversionhelper.cpp.

Referenced by qCopyPixelsWithMask().