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

Method DrawStats

Source/DX11VideoProcessor.cpp:4371–4502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4369*/
4370
4371HRESULT CDX11VideoProcessor::DrawStats(ID3D11Texture2D* pRenderTarget)
4372{
4373 if (m_windowRect.IsRectEmpty()) {
4374 return E_ABORT;
4375 }
4376
4377 std::wstring str;
4378 str.reserve(700);
4379 str.assign(m_strStatsHeader);
4380 str.append(m_strStatsDispInfo);
4381 str += std::format(L"\nGraph. Adapter: {}", m_strAdapterDescription);
4382
4383 wchar_t frametype = (m_SampleFormat != D3D11_VIDEO_FRAME_FORMAT_PROGRESSIVE) ? 'i' : 'p';
4384 str += std::format(
4385 L"\nFrame rate : {:7.3f}{},{:7.3f}",
4386 m_pFilter->m_FrameStats.GetAverageFps(),
4387 frametype,
4388 m_pFilter->m_DrawStats.GetAverageFps()
4389 );
4390
4391 str.append(m_strStatsInputFmt);
4392 if (m_Dovi.bValid && m_Dovi.bHasMMR) {
4393 str.append(L", MMR");
4394 }
4395 str.append(m_strStatsVProc);
4396
4397 const int dstW = m_videoRect.Width();
4398 const int dstH = m_videoRect.Height();
4399 if (m_iRotation) {
4400 str += std::format(L"\nScaling : {}x{} r{}\u00B0> {}x{}", m_srcRectWidth, m_srcRectHeight, m_iRotation, dstW, dstH);
4401 } else {
4402 str += std::format(L"\nScaling : {}x{} -> {}x{}", m_srcRectWidth, m_srcRectHeight, dstW, dstH);
4403 }
4404 if (m_srcRectWidth != dstW || m_srcRectHeight != dstH) {
4405 if (m_D3D11VP.IsReady() && m_bVPScaling && !m_bVPScalingUseShaders) {
4406 str.append(L" D3D11");
4407 if (m_bVPUseSuperRes) {
4408 str.append(L" SuperResolution*");
4409 }
4410 } else {
4411 str += L' ';
4412 if (m_strShaderX) {
4413 str.append(m_strShaderX);
4414 if (m_strShaderY && m_strShaderY != m_strShaderX) {
4415 str += L'/';
4416 str.append(m_strShaderY);
4417 }
4418 } else if (m_strShaderY) {
4419 str.append(m_strShaderY);
4420 }
4421 }
4422 }
4423
4424 if (m_strCorrection || m_pPostScaleShaders.size() || m_bDitherUsed) {
4425 str.append(L"\nPostProcessing:");
4426 if (m_strCorrection) {
4427 str += std::format(L" {},", m_strCorrection);
4428 }

Callers

nothing calls this directly

Calls 15

str_trim_endFunction · 0.85
GetPreciseTicksPerSecondFunction · 0.85
GetFramesMethod · 0.80
MinMaxMethod · 0.80
OldestIndexMethod · 0.80
GetAverageFpsMethod · 0.45
IsReadyMethod · 0.45
SizeMethod · 0.45
DrawMethod · 0.45
Draw2DTextMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected