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

Method UpdateStatsInputFmt

Source/VideoProcessor.cpp:184–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184void CVideoProcessor::UpdateStatsInputFmt()
185{
186 m_strStatsInputFmt.assign(L"\nInput format : ");
187
188 if (m_iSrcFromGPU == 9) {
189 m_strStatsInputFmt.append(L"DXVA2_");
190 }
191 else if (m_iSrcFromGPU == 11) {
192 m_strStatsInputFmt.append(L"D3D11_");
193 }
194 m_strStatsInputFmt.append(m_srcParams.str);
195
196 if (m_srcWidth != m_srcRectWidth || m_srcHeight != m_srcRectHeight) {
197 m_strStatsInputFmt += std::format(L" {}x{} ->", m_srcWidth, m_srcHeight);
198 }
199 m_strStatsInputFmt += std::format(L" {}x{}", m_srcRectWidth, m_srcRectHeight);
200 if (m_srcAnamorphic) {
201 m_strStatsInputFmt += std::format(L" ({}:{})", m_srcAspectRatioX, m_srcAspectRatioY);
202 }
203
204 if (m_srcParams.CSType == CS_YUV) {
205 if (m_Dovi.bValid) {
206 int dv_profile = 0;
207 const auto& hdr = m_Dovi.msd.Header;
208 const bool has_el = hdr.el_spatial_resampling_filter_flag && !hdr.disable_residual_flag;
209
210 if ((hdr.vdr_rpu_profile == 0) && hdr.bl_video_full_range_flag) {
211 dv_profile = 5;
212 } else if (has_el) {
213 // Profile 7 is max 12 bits, both MEL & FEL
214 if (hdr.vdr_bit_depth == 12) {
215 dv_profile = 7;
216 } else {
217 dv_profile = 4;
218 }
219 } else {
220 dv_profile = 8;
221 }
222
223 m_strStatsInputFmt += std::format(L"\n DolbyVision Profile {}", dv_profile);
224 }
225 else {
226 LPCSTR strs[6] = {};
227 GetExtendedFormatString(strs, m_srcExFmt, m_srcParams.CSType);
228 m_strStatsInputFmt += std::format(L"\n Range: {}", A2WStr(strs[1]));
229 if (m_decExFmt.NominalRange == DXVA2_NominalRange_Unknown) {
230 m_strStatsInputFmt += L'*';
231 };
232 m_strStatsInputFmt += std::format(L", Matrix: {}", A2WStr(strs[2]));
233 if (m_decExFmt.VideoTransferMatrix == DXVA2_VideoTransferMatrix_Unknown) {
234 m_strStatsInputFmt += L'*';
235 };
236 if (m_decExFmt.VideoLighting != DXVA2_VideoLighting_Unknown) {
237 // display Lighting only for values other than Unknown, but this never happens
238 m_strStatsInputFmt += std::format(L", Lighting: {}", A2WStr(strs[3]));
239 };
240 m_strStatsInputFmt += std::format(L"\n Primaries: {}", A2WStr(strs[4]));
241 if (m_decExFmt.VideoPrimaries == DXVA2_VideoPrimaries_Unknown) {

Callers

nothing calls this directly

Calls 2

GetExtendedFormatStringFunction · 0.85
A2WStrFunction · 0.85

Tested by

no test coverage detected