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

Method InitializeDXVA2VP

Source/DX9VideoProcessor.cpp:760–791  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

758}
759
760HRESULT CDX9VideoProcessor::InitializeDXVA2VP(const FmtConvParams_t& params, const UINT width, const UINT height)
761{
762 const auto& dxva2format = params.DXVA2Format;
763
764 DLog(L"CDX9VideoProcessor::InitializeDXVA2VP() started with input surface: {}, {} x {}", D3DFormatToString(dxva2format), width, height);
765
766 if (m_VendorId != PCIV_INTEL && (dxva2format == D3DFMT_X8R8G8B8 || dxva2format == D3DFMT_A8R8G8B8)) {
767 m_DXVA2VP.ReleaseVideoProcessor();
768 DLog(L"CDX9VideoProcessor::InitializeDXVA2VP() : RGB input is not supported");
769 return E_FAIL;
770 }
771
772 m_DXVA2OutputFmt = m_InternalTexFmt;
773 const int deinterlacing = m_bInterlaced ? m_iVPDeinterlacing : DEINT_Disable;
774 HRESULT hr = m_DXVA2VP.InitVideoProcessor(dxva2format, width, height, m_srcExFmt, deinterlacing, m_DXVA2OutputFmt);
775 if (FAILED(hr)) {
776 return hr;
777 }
778
779 m_srcWidth = width;
780 m_srcHeight = height;
781 m_srcParams = params;
782 m_srcDXVA2Format = dxva2format;
783 m_pCopyPlaneFn = GetCopyPlaneFunction(params, VP_DXVA2);
784
785 m_DXVA2VP.GetProcAmpRanges(m_DXVA2ProcAmpRanges);
786 m_DXVA2VP.SetProcAmpValues(m_DXVA2ProcAmpValues);
787
788 DLog(L"CDX9VideoProcessor::InitializeDXVA2VP() completed successfully");
789
790 return S_OK;
791}
792
793HRESULT CDX9VideoProcessor::InitializeTexVP(const FmtConvParams_t& params, const UINT width, const UINT height)
794{

Callers

nothing calls this directly

Calls 7

DLogFunction · 0.85
D3DFormatToStringFunction · 0.85
GetCopyPlaneFunctionFunction · 0.85
GetProcAmpRangesMethod · 0.80
ReleaseVideoProcessorMethod · 0.45
InitVideoProcessorMethod · 0.45
SetProcAmpValuesMethod · 0.45

Tested by

no test coverage detected