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

Method DrawStats

Source/DX9VideoProcessor.cpp:3057–3179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3055*/
3056
3057HRESULT CDX9VideoProcessor::DrawStats(IDirect3DSurface9* pRenderTarget)
3058{
3059 if (m_windowRect.IsRectEmpty()) {
3060 return E_ABORT;
3061 }
3062
3063 std::wstring str;
3064 str.reserve(700);
3065 str.assign(m_strStatsHeader);
3066 str.append(m_strStatsDispInfo);
3067 str += std::format(L"\nGraph. Adapter: {}", m_strAdapterDescription);
3068
3069 wchar_t frametype = (m_CurrentSampleFmt >= DXVA2_SampleFieldInterleavedEvenFirst && m_CurrentSampleFmt <= DXVA2_SampleFieldSingleOdd) ? 'i' : 'p';
3070 str += std::format(
3071 L"\nFrame rate : {:7.3f}{},{:7.3f}",
3072 m_pFilter->m_FrameStats.GetAverageFps(),
3073 frametype,
3074 m_pFilter->m_DrawStats.GetAverageFps()
3075 );
3076
3077 str.append(m_strStatsInputFmt);
3078
3079 str.append(m_strStatsVProc);
3080
3081 const int dstW = m_videoRect.Width();
3082 const int dstH = m_videoRect.Height();
3083 if (m_iRotation) {
3084 str += std::format(L"\nScaling : {}x{} r{}\u00B0> {}x{}", m_srcRectWidth, m_srcRectHeight, m_iRotation, dstW, dstH);
3085 } else {
3086 str += std::format(L"\nScaling : {}x{} -> {}x{}", m_srcRectWidth, m_srcRectHeight, dstW, dstH);
3087 }
3088 if (m_srcRectWidth != dstW || m_srcRectHeight != dstH) {
3089 if (m_DXVA2VP.IsReady() && m_bVPScaling && !m_bVPScalingUseShaders) {
3090 str.append(L" DXVA2");
3091 } else {
3092 str += L' ';
3093 if (m_strShaderX) {
3094 str.append(m_strShaderX);
3095 if (m_strShaderY && m_strShaderY != m_strShaderX) {
3096 str += L'/';
3097 str.append(m_strShaderY);
3098 }
3099 } else if (m_strShaderY) {
3100 str.append(m_strShaderY);
3101 }
3102 }
3103 }
3104
3105 if (m_strCorrection || m_pPostScaleShaders.size() || m_bDitherUsed) {
3106 str.append(L"\nPostProcessing:");
3107 if (m_strCorrection) {
3108 str += std::format(L" {},", m_strCorrection);
3109 }
3110 if (m_pPostScaleShaders.size()) {
3111 str += std::format(L" shaders[{}],", m_pPostScaleShaders.size());
3112 }
3113 if (m_bDitherUsed) {
3114 str.append(L" dither");

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
DrawMethod · 0.45
Draw2DTextMethod · 0.45
SetMethod · 0.45
ClearPointsMethod · 0.45

Tested by

no test coverage detected