| 410 | } |
| 411 | |
| 412 | HRESULT CD3D11VP::InitInputTextures(ID3D11Device* pDevice) |
| 413 | { |
| 414 | UINT referenceFrames = 1 + m_RateConvCaps.PastFrames; |
| 415 | if (m_bUseFutureFrames) { |
| 416 | referenceFrames += m_RateConvCaps.FutureFrames; |
| 417 | } |
| 418 | m_VideoTextures.Resize(referenceFrames); |
| 419 | m_VideoInputData.Resize(referenceFrames); |
| 420 | |
| 421 | HRESULT hr = E_NOT_VALID_STATE; |
| 422 | |
| 423 | for (UINT i = 0; i < m_VideoTextures.Size(); i++) { |
| 424 | ID3D11Texture2D** ppTexture = m_VideoTextures.GetTexture(i); |
| 425 | D3D11_TEXTURE2D_DESC texdesc = CreateTex2DDesc(m_srcFormat, m_srcWidth, m_srcHeight, Tex2D_Default); |
| 426 | |
| 427 | hr = pDevice->CreateTexture2D(&texdesc, nullptr, ppTexture); |
| 428 | if (S_OK == hr) { |
| 429 | D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC inputViewDesc = {}; |
| 430 | inputViewDesc.ViewDimension = D3D11_VPIV_DIMENSION_TEXTURE2D; |
| 431 | hr = m_pVideoDevice->CreateVideoProcessorInputView(*ppTexture, m_pVideoProcessorEnum, &inputViewDesc, m_VideoTextures.GetInputView(i)); |
| 432 | } |
| 433 | } |
| 434 | |
| 435 | return hr; |
| 436 | } |
| 437 | |
| 438 | ID3D11Texture2D* CD3D11VP::GetNextInputTexture(const D3D11_VIDEO_FRAME_FORMAT vframeFormat) |
| 439 | { |
no test coverage detected