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
qwindowsd3d11videoprocessor_p.h
Go to the documentation of this file.
1
// Copyright (C) 2026 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
#
ifndef
QWINDOWSD3D11VIDEOPROCESSOR_P_H
4
#
define
QWINDOWSD3D11VIDEOPROCESSOR_P_H
5
6
//
7
// W A R N I N G
8
// -------------
9
//
10
// This file is not part of the Qt API. It exists purely as an
11
// implementation detail. This header file may change from version to
12
// version without notice, or even be removed.
13
//
14
// We mean it.
15
//
16
17
#
include
<
QtMultimedia
/
qtmultimediaexports
.
h
>
18
#
include
<
QtMultimedia
/
qvideoframeformat
.
h
>
19
20
#
include
<
QtCore
/
qsize
.
h
>
21
#
include
<
QtCore
/
private
/
qcomptr_p
.
h
>
22
23
#
include
<
d3d11
.
h
>
24
#
include
<
d3d11_1
.
h
>
25
26
QT_BEGIN_NAMESPACE
27
28
namespace
QtMultimediaPrivate
{
29
30
/*! \internal
31
Converts an NV12 or P010 D3D11 texture into a BGRA8 texture on the same D3D11 device, using
32
the fixed-function ID3D11VideoProcessor. Single-plane output is required for import into
33
non-D3D11 QRhi backends (see QWindowsD3D11RhiTextureImporter). HDR input is tone-mapped to
34
SDR by the processor; the output is always 8-bit BGRA8.
35
*/
36
class
Q_MULTIMEDIA_EXPORT
QWindowsD3D11VideoProcessor
37
{
38
public
:
39
QWindowsD3D11VideoProcessor
();
40
~
QWindowsD3D11VideoProcessor
();
41
42
Q_DISABLE_COPY_MOVE
(
QWindowsD3D11VideoProcessor
)
43
44
static
bool
isPixelFormatSupported
(
QVideoFrameFormat
::
PixelFormat
);
45
46
// Converts slice 'subresourceIndex' of 'texture' to BGRA8 on the same device.
47
ComPtr
<
ID3D11Texture2D
>
convertToBGRA
(
ID3D11Device
*,
ID3D11DeviceContext
*
context
,
48
const
ComPtr
<
ID3D11Texture2D
> &
texture
,
49
const
QSize
&
frameSize
,
50
QVideoFrameFormat
::
ColorSpace
colorSpace
,
51
QVideoFrameFormat
::
ColorRange
colorRange
,
52
QVideoFrameFormat
::
ColorTransfer
colorTransfer
,
53
UINT
subresourceIndex
= 0);
54
55
private
:
56
bool
ensureVideoProcessor
(
ID3D11Device
*,
const
QSize
&
frameSize
);
57
bool
ensureOutputTexture
(
ID3D11Device
*,
const
QSize
&
frameSize
);
58
59
ComPtr
<
ID3D11VideoDevice
>
m_videoDevice
;
60
ComPtr
<
ID3D11VideoContext1
>
m_videoContext
;
61
ComPtr
<
ID3D11VideoProcessorEnumerator
>
m_enumerator
;
62
ComPtr
<
ID3D11VideoProcessor
>
m_videoProcessor
;
63
QSize
m_processorSize
;
64
65
ComPtr
<
ID3D11Texture2D
>
m_outputTex
;
66
ComPtr
<
ID3D11VideoProcessorOutputView
>
m_outputView
;
67
};
68
69
}
// namespace QtMultimediaPrivate
70
71
QT_END_NAMESPACE
72
73
#
endif
// QWINDOWSD3D11VIDEOPROCESSOR_P_H
QtMultimediaPrivate::QWindowsD3D11VideoProcessor
Definition
qwindowsd3d11videoprocessor_p.h:37
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QtMultimediaPrivate::impl
Definition
qaudiosystem_p.h:257
qtmultimedia
src
multimedia
windows
qwindowsd3d11videoprocessor_p.h
Generated on
for Qt by
1.16.1