MCPcopy Create free account
hub / github.com/Aleksoid1978/VideoRenderer / SetColorSpaceOld

Method SetColorSpaceOld

Source/D3D11VP.cpp:691–710  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

689}
690
691void CD3D11VP::SetColorSpaceOld(const DXVA2_ExtendedFormat exFmt)
692{
693 ASSERT(m_pVideoContext && m_pVideoProcessor);
694
695 // Windows 8/8.1 or if something went wrong
696 DLog(L"CD3D11VP::SetColorSpaceOld() : used ID3D11VideoContext");
697
698 D3D11_VIDEO_PROCESSOR_COLOR_SPACE colorSpace = {};
699 if (exFmt.value) {
700 colorSpace.RGB_Range = 0; // output RGB always full range (0-255)
701 colorSpace.YCbCr_Matrix = (exFmt.VideoTransferMatrix == DXVA2_VideoTransferMatrix_BT601)
702 ? 0 // ITU-R BT.601
703 : 1; // ITU-R BT.709
704 colorSpace.Nominal_Range = (exFmt.NominalRange == DXVA2_NominalRange_0_255)
705 ? D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_0_255
706 : D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_16_235;
707 }
708 m_pVideoContext->VideoProcessorSetStreamColorSpace(m_pVideoProcessor, 0, &colorSpace);
709 m_pVideoContext->VideoProcessorSetOutputColorSpace(m_pVideoProcessor, &colorSpace);
710}
711
712HRESULT CD3D11VP::SetSuperResNvidia(const bool enable)
713{

Callers

nothing calls this directly

Calls 1

DLogFunction · 0.85

Tested by

no test coverage detected