6#include <QtCore/qloggingcategory.h>
7#include <QtCore/private/qsystemerror_p.h>
13Q_STATIC_LOGGING_CATEGORY(lcD3D11VideoProcessor,
"qt.multimedia.windows.d3d11videoprocessor");
19DXGI_COLOR_SPACE_TYPE toDxgiColorSpace(QVideoFrameFormat::ColorSpace colorSpace,
20 QVideoFrameFormat::ColorRange colorRange,
21 QVideoFrameFormat::ColorTransfer colorTransfer)
23 const bool fullRange = colorRange == QVideoFrameFormat::ColorRange_Full;
26 case QVideoFrameFormat::ColorSpace_BT2020:
27 switch (colorTransfer) {
28 case QVideoFrameFormat::ColorTransfer_ST2084:
31 return DXGI_COLOR_SPACE_YCBCR_STUDIO_G2084_LEFT_P2020;
32 case QVideoFrameFormat::ColorTransfer_STD_B67:
33 return fullRange ? DXGI_COLOR_SPACE_YCBCR_FULL_GHLG_TOPLEFT_P2020
34 : DXGI_COLOR_SPACE_YCBCR_STUDIO_GHLG_TOPLEFT_P2020;
35 case QVideoFrameFormat::ColorTransfer_Unknown:
36 case QVideoFrameFormat::ColorTransfer_BT709:
37 case QVideoFrameFormat::ColorTransfer_BT601:
38 case QVideoFrameFormat::ColorTransfer_Linear:
39 case QVideoFrameFormat::ColorTransfer_Gamma22:
40 case QVideoFrameFormat::ColorTransfer_Gamma28:
42 return fullRange ? DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020
43 : DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020;
45 Q_UNREACHABLE_RETURN(DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020);
46 case QVideoFrameFormat::ColorSpace_BT601:
47 return fullRange ? DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P601
48 : DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601;
49 case QVideoFrameFormat::ColorSpace_BT709:
50 case QVideoFrameFormat::ColorSpace_AdobeRgb:
51 case QVideoFrameFormat::ColorSpace_Undefined:
53 return fullRange ? DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P709
54 : DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709;
56 Q_UNREACHABLE_RETURN(DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709);
Combined button and popup list for selecting options.