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

Method UpdateTexures

Source/DX9VideoProcessor.cpp:2178–2204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2176}
2177
2178void CDX9VideoProcessor::UpdateTexures()
2179{
2180 if (!m_srcWidth || !m_srcHeight) {
2181 return;
2182 }
2183
2184 // TODO: try making w and h a multiple of 128.
2185 HRESULT hr = S_OK;
2186
2187 if (m_DXVA2VP.IsReady()) {
2188 if (m_bVPScaling) {
2189 CSize texsize = m_videoRect.Size();
2190 if (m_iRotation == 90 || m_iRotation == 270) {
2191 std::swap(texsize.cx, texsize.cy);
2192 }
2193 hr = m_TexConvertOutput.CheckCreate(m_pD3DDevEx, m_DXVA2OutputFmt, texsize.cx, texsize.cy, D3DUSAGE_RENDERTARGET);
2194 if (FAILED(hr)) {
2195 hr = m_TexConvertOutput.CheckCreate(m_pD3DDevEx, m_DXVA2OutputFmt, m_srcRectWidth, m_srcRectHeight, D3DUSAGE_RENDERTARGET);
2196 }
2197 } else {
2198 hr = m_TexConvertOutput.CheckCreate(m_pD3DDevEx, m_DXVA2OutputFmt, m_srcRectWidth, m_srcRectHeight, D3DUSAGE_RENDERTARGET);
2199 }
2200 }
2201 else {
2202 hr = m_TexConvertOutput.CheckCreate(m_pD3DDevEx, m_InternalTexFmt, m_srcRectWidth, m_srcRectHeight, D3DUSAGE_RENDERTARGET);
2203 }
2204}
2205
2206void CDX9VideoProcessor::UpdatePostScaleTexures()
2207{

Callers

nothing calls this directly

Calls 3

IsReadyMethod · 0.45
SizeMethod · 0.45
CheckCreateMethod · 0.45

Tested by

no test coverage detected