| 758 | } |
| 759 | |
| 760 | HRESULT 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 | |
| 793 | HRESULT CDX9VideoProcessor::InitializeTexVP(const FmtConvParams_t& params, const UINT width, const UINT height) |
| 794 | { |
nothing calls this directly
no test coverage detected