Bring PS5 GTA6 to 120FPS with DLSS 5. An advanced Windows video player and capture enhancement tool featuring real-time preview for videos, images, and capture card sources. Combine AI-powered Super Resolution, DLSS5 image enhancement, and Frame Generation to deliver a next-generation visual experience.
C++
test: compare 1440p60 capture latency and allocator policies
Veyra Goal Agent050811b34f9b
diff --git a/docs/CAPTURE_1440P60_COMPARISON_2026-09-18.md b/docs/CAPTURE_1440P60_COMPARISON_2026-09-18.mdnew file mode 100644index 00000000..097cbab1--- /dev/null+++ b/docs/CAPTURE_1440P60_COMPARISON_2026-09-18.md@@ -0,0 +1,151 @@+# 1440p60 / 4K30 capture latency comparison++User requested 2560x1440 60fps against the existing 4K capture path. This is a+measurement task; product scheduling and capture implementation are unchanged.+Branch: codex/frame-pacing-20260918, product baseline 88ed81c.++## Method++VC-007PRO, NV12, RTX5070 / 616.56; NR realtime (1920x1080), DLSS4X, SR off,+frame sync off, WASAPI input muted, window1280x760, SDR2560x1440@100Hz.+Each run warms up10s then measures120s. Both runs use the same executable hash+recorded in run.json. Capture format negotiation and actual callback rate are+checked; no automatic substitute pixel format or resolution is allowed.++1440p input uses1440p FG/output; 4K input uses4K FG/output. Both NR and NVOF+run at1920x1080. This compares two requested configurations, not resolution+alone: source cadence changes from33.37ms to16.68ms as well. Display submission+rate is not physical refresh rate, and callback cadence does not prove the HDMI+source contains a different image on every frame.++Latency is capture callback to original-frame Present return. Card firmware,+upstream HDMI timing, USB/driver buffering before callback, compositor and+physical scanout are not measured. NV12 is uncompressed: no software video+codec decode step executes. GPU color conversion remains measured separately.+CSV snapshots are sampled every50ms and deduplicated by real Present counter;+P50/P95/P99 and maximum are sampled statistics, not exhaustive frame statistics.+Whole-run slow-event logs are preserved separately, including warmup.++GPU rows report the median of rolling stage means. Enhancement time merges+same-frame GPU intervals and excludes color/presentation. CPU readiness and+presentation scheduling intervals overlap GPU work and refer to different+output opportunities; they must not be added to reconstruct total latency.++## Two-minute results++Both runs exited0, retained NR/DLSS4X, passed actual callback-rate validation,+and stopped cleanly. No ERROR lines. NR CreateFeature18 and DLSSG Create+returned0x1 with non-null handles and seh0; Evaluate counters grew throughout.+Build succeeded. Shared probe SHA256:+73494BA0AE154E7C45DEF4ECBF290618297F3AD0F6FCBEED418BE86C9D27B4C3.++| Measurement | 1440p60 NV12 | 4K30 NV12 |+| --- | ---: | ---: |+| Actual input fps over120s | 59.969 | 29.9846 |+| Received / dropped during formal window | 7199 / 0 | 3599 / 0 |+| Generated during formal window | 21597 | 10797 |+| Callback to original return P50 ms | 25.355 | 40.095 |+| P95 ms | 25.707 | 40.974 |+| P99 ms | 26.002 | 41.989 |+| GPU color ms | 0.083 | 0.198 |+| GPU NVOF ms | 1.033 | 1.060 |+| GPU NR ms | 6.314 | 6.264 |+| GPU residual ms | 0.138 | 0.231 |+| GPU FG batch ms | 4.147 | 5.705 |+| GPU enhancement intervals ms | 11.632 | 13.268 |++P50 reduction14.739ms (36.76%). Enhancement intervals fall only1.636ms;+the source cadence/presentation timeline matters substantially. This does not+isolate resolution from fps, and does not measure physical screen latency.+No formal-window skipped/expired generated outputs or slot waits in either run.++Warmup is not fault-free: 1440p run lost2 capture frames, with NR Evaluate46.835ms+at frame603; 4K run recorded45.941ms at frame303 and original age81.808ms.+Both are about10s after capture starts, shifting frame number with input rate;+this supports investigating time-triggered work, not claiming an established+cause. The limited flag remained for the first0.91/0.76s of the formal windows+without new skipped outputs. All warmup evidence remains in engine.log.++## Commands and artifacts++From the isolated worktree:++```powershell+./scripts/build-isolated.ps1 -Root . -BuildDirectory 'E:/项目/Veyra/build/frame-pacing-20260918' -DependencyCache 'E:/项目/Veyra/build/frame-pacing-20260918/CMakeCache.txt' -TempDirectory 'E:/项目/Veyra/tmp/capture-1440p60-20260918' -DisplayVersion 1.4.2beta -Targets veyra_capture_latency_tests+./scripts/test-capture-version-comparison.ps1 -Build 'E:/项目/Veyra/build/frame-pacing-20260918' -Name dlss4-1440p60-120 -CaptureProfile 1440p60 -Output 'E:/项目/Veyra/tests/capture-1440p60-20260918' -TempDirectory 'E:/项目/Veyra/tmp/capture-1440p60-20260918'+./scripts/test-capture-version-comparison.ps1 -Build 'E:/项目/Veyra/build/frame-pacing-20260918' -Name dlss4-4k30-120 -CaptureProfile 4k30 -Output 'E:/项目/Veyra/tests/capture-1440p60-20260918' -TempDirectory 'E:/项目/Veyra/tmp/capture-1440p60-20260918'+python scripts/acceptance/analyze-capture-version-comparison.py 'E:/项目/Veyra/tests/capture-1440p60-20260918' dlss4-1440p60-120 dlss4-4k30-120+```++Build log: E:/项目/Veyra/logs/capture-1440p60-20260918/build.log.+Evidence: E:/项目/Veyra/tests/capture-1440p60-20260918, including per-run+engine.log, snapshots.csv, run.json, result.txt and combined comparison.json.+Temp: E:/项目/Veyra/tmp/capture-1440p60-20260918.++Only the comparison probe, its PowerShell wrapper and analysis script changed:+optional exact capture profile, allocator policy, existing verbose trace toggle,+formal-window markers, format diagnostics and actual callback-rate acceptance.+The analyzer splits original-frame timing using existing capture-present-sample+records within the markers. Existing historical two-argument invocation remains supported.+No runtime, main merge, package or release change.++## Device-buffer short tests++User then requested the specific original-ready-to-presentation interval and+whether the device-buffer selector affects it. Reconnected for each setting;+same1440p60 NV12/NR realtime/DLSS4X,10s warmup and20s formal test. Enabled+existing verbose timestamps; product code unchanged. CPU fence observation is+later than or equal to actual GPU completion, so ready-to-present is based on+observed readiness, not an exact GPU-to-host clock correlation.++| 1440p60 policy | Requested / actual allocator buffers | Callback to observed ready P50 ms | Ready to present begin P50 ms | Present call P50 ms | Callback to present end P50 ms |+| --- | --- | ---: | ---: | ---: | ---: |+| Auto | 3 / 10 | 9.331 | 15.918 | 0.196 | 25.458 |+| Minimum | 1 / 10 | 9.267 | 15.907 | 0.196 | 25.383 |+| Driver default | no suggestion / 10 | 9.534 | 15.828 | 0.209 | 25.579 |++Matched20s 4K30 auto trace:600 original records, callback-to-observed-ready+P50=10.664ms, observed-ready-to-present-begin P50=29.653ms/P95=30.447ms,+Present call P50=0.247ms, callback-to-end P50=40.606ms. 1440p60 auto wait+P95=16.611ms. All four trace runs contain no invalid readiness timestamps or+ERROR lines. 4K formal window also had zero capture drops and continuous NR/FG.+Most of the measured configuration difference is after original readiness;+fps and resolution still co-vary, so this is not an isolated fps experiment.++The4X provider generates A/B intermediate frames that precede original B.+Original B can be ready while the paced intermediate frames are still being+presented. Shorter source intervals compress that output timeline. This is+present even with the optional frame-sync feature disabled; it is not proof+that GPU idle time is waste or that presenting B immediately preserves cadence.++All three formal windows had zero capture drops, skipped/expired generation or+slot waits; NR/FG remained active. All exited0 and stopped cleanly. Auto/minimum+were not honored by the driver; the actual allocator remained10 in all modes.+Allocator capacity is not queued-frame occupancy and does not prove10 frames+of delay. Differences of0.09ms in ready-to-present across these single short+runs are not evidence of a useful policy effect. Startup NR stalls remain.++The selector negotiates DirectShow video-pin allocator capacity at connect;+it does not set Veyra's FG timeline or its capacity-one input mailbox. A device+that honors the request may change upstream latency or callback jitter. Fixed+delay before callback is excluded from this software metric; jitter can still+indirectly affect readiness and adaptive scheduling. No physical HDMI-to-screen+buffer-latency claim is possible from these timestamps.++Additional commands (same output/build/tmp arguments as above):++```powershell+./scripts/test-capture-version-comparison.ps1 -Build 'E:/项目/Veyra/build/frame-pacing-20260918' -Name buffer-auto-1440p60-20 -CaptureProfile 1440p60 -BufferMode auto -TraceFrames -Seconds 20 -Output 'E:/项目/Veyra/tests/capture-1440p60-20260918' -TempDirectory 'E:/项目/Veyra/tmp/capture-1440p60-20260918'+# Repeated with -BufferMode minimum / driver and corresponding unique names.+# trace-auto-4k30-20 uses -CaptureProfile 4k30 -BufferMode auto -TraceFrames -Seconds 20.+```++Build log: build-buffer.log. Per-frame trace count can differ by a few frames+from snapshot deltas because the50ms snapshot may lag the explicit window markers.+Final analysis command includes all six run names listed above, producing+comparison.json and logs/capture-1440p60-20260918/analysis-final.json. All test+processes exited, and the task temporary directory is empty. No new package.+Final process inspection found a user-launched portable Veyra process from+E:/App/Veyra-1.4.2beta-win64-portable, started23:02:52 local before the buffer+short tests. It was left running; its workload was not instrumented. These are+local short-run measurements, not an isolated-system microbenchmark.diff --git a/docs/CURRENT_STATUS.md b/docs/CURRENT_STATUS.mdindex 2211913a..5e56e483 100644--- a/docs/CURRENT_STATUS.md+++ b/docs/CURRENT_STATUS.md@@ -16,6 +16,8 @@## 本轮开发+VC-007PRO 1440p60 / 4K30、NR实时+DLSS4X 的同构建对照已完成,各120秒中位软件延迟25.36/40.09ms。追加20秒逐帧短测:原帧观察就绪后等待呈现15.92/29.65ms;2K60自动/最小/驱动默认均实际分配10个allocator缓冲,没有测得缓冲选项带来的有效差异。详见[1440p60与设备缓冲实测](CAPTURE_1440P60_COMPARISON_2026-09-18.md),非HDMI到屏幕端延迟,未修改产品调度。+帧同步已在隔离分支 `codex/frame-pacing-20260918` 实现并完成本机短测,基线存档 `6e69eeb`。入口:专业模式 → 运动 → 帧同步,默认关闭;低排队、均匀呈现、Reflex 实验和独立显示同步偏好可保存。无补帧文件测试减少了一帧提前缓存驻留;6X 提交吞吐保持 144fps,未证明显著降延迟或更平滑。Reflex 无补帧时真实调用 NVAPI,开启补帧时明确回退低排队并保留倍率;XeSS 继续由提供方调度。VC-007PRO 4K30 NV12、NR+DLSS4X 已完成四模式各 120 秒实卡测试,详见[采集阶段计时](CAPTURE_LATENCY_DLSS4X_2026-09-18.md)。屏幕端到端延迟、30/40 实卡、PS5、VRR 未验证,完整原计划尚未全部验收。其他验收见[帧同步报告](FRAME_PACING_ACCEPTANCE_2026-09-18.md)。未合并 main、推送、发布或更新现有 1.4.2beta 包。采集呈现相位优化及原始 1.4.2beta 引擎同参数对照见[延迟优化与历史对比](CAPTURE_LATENCY_REDUCTION_2026-09-18.md)。保持 4K30 NV12、NR、DLSS4X,不使用换格式或降低倍率解释收益。diff --git a/docs/WORKLOG.md b/docs/WORKLOG.mdindex e1034591..dfcc8853 100644--- a/docs/WORKLOG.md+++ b/docs/WORKLOG.md@@ -1,5 +1,15 @@# Veyra 工作记录+## 2026-09-18 1440p60 对照与设备缓冲短测++用户要求 2K60 对比 4K 链路,随后追加原帧就绪后等待呈现及设备缓冲对照,仅短测。沿用隔离分支 `codex/frame-pacing-20260918`,产品基线 `88ed81c`;只修改采集对比测试入口、包装脚本与分析脚本,未改产品调度。增加精确 NV12 档位、实际回调帧率校验、缓冲策略、既有逐帧日志开关、测量窗口标记与原帧分段分析。++同 VC-007PRO、RTX5070/616.56、NR 实时1080p、DLSS4X、SR/帧同步关闭:1440p60、4K30 各120秒,实际59.969/29.9846fps,7199/3599输入均零正式段丢帧。回调到原帧返回中位25.355/40.095ms,P95=25.707/40.974ms;GPU增强阶段11.632/13.268ms。未将同时变化的分辨率和fps当成单变量实验。++追加每档20秒、10秒预热并重连:2K60自动/最小/驱动默认的原帧就绪后到呈现开始中位15.918/15.907/15.828ms;实际allocator均10,自动请求3、最小请求1均未被驱动采纳。4K30同口径29.653ms。四轮零正式段丢帧,NR/FG持续,exit0、清洁停止、日志无ERROR。allocator容量不等于实际积压帧数;本机不能声称切最小降低延迟,也不能凭回调后的计时排除卡内/USB/驱动前置延迟。就绪为CPU观察fence完成时刻,不是精确GPU完成时间。启动10秒左右NR长调用仍存在,2K60约603帧、4K30约303帧,原因尚未确定。++构建两次成功,命令、分段耗时、真实Create0x1 seh0/计数、预热异常和限制见 [对照报告](CAPTURE_1440P60_COMPARISON_2026-09-18.md)。产物:`E:/项目/Veyra/tests/capture-1440p60-20260918` 六轮原始日志/CSV/manifest/comparison.json;`E:/项目/Veyra/logs/capture-1440p60-20260918` 构建与分析;`E:/项目/Veyra/tmp/capture-1440p60-20260918` 临时目录;继续使用 `E:/项目/Veyra/build/frame-pacing-20260918`。全部测试进程已退出,临时目录为空。没有新包/运行库更换/合并main/推送/发布。下一项仍为NR启动长调用与原HDR环境稳态长停顿定位,不把缓冲选项当作已证实的修复。+## 2026-09-18 长帧修复与追加实测用户要求实际修复,继续 `codex/frame-pacing-20260918`,基线 `c7464bb`,存档 `checkpoint/pre-stall-repair-20260918`。两项实现:XeSS 保留至少显示器尺寸的缓冲,普通缩放不再触发提供方重建,颜色区域按 client/buffer 几何映射并重置插值历史;实时预览先跳过过期/被抑制生成帧,再检查 GPU 就绪,原帧 fence 和 completion watcher 的资源持有保留。没有更改采集格式、NR 档位、请求倍率、运行库或导出行为。源文件、全部命令、日志、拒绝的实验与边界见 [修复报告](FRAME_STALL_REPAIR_2026-09-18.md)。diff --git a/scripts/acceptance/analyze-capture-version-comparison.py b/scripts/acceptance/analyze-capture-version-comparison.pyindex ebe8c131..61a4738a 100644--- a/scripts/acceptance/analyze-capture-version-comparison.py+++ b/scripts/acceptance/analyze-capture-version-comparison.py@@ -53,6 +53,30 @@ def analyze(directory):lines = log_text.splitlines()result["wholeRunSlowEvents"] = [line for line in lines if "slow=true" in line or re.search(r"\[[\w-]*stall\]", line)]result["wholeRunErrors"] = [line for line in lines if "[ERROR" in line]+ result["allocatorNegotiation"] = [line for line in lines if "[capture-buffer]" in line]+ measuring = False+ originals = []+ invalid_ready = 0+ for line in lines:+ if "[capture-comparison] measurement-start" in line:+ measuring = True+ elif "[capture-comparison] measurement-end" in line:+ measuring = False+ elif measuring and "[capture-present-sample]" in line and "generated=false" in line:+ fields = {k: int(v) for k, v in re.findall(r"(arrival|ready|begin|end)=([0-9]+)", line)}+ if len(fields) != 4 or not 0 < fields["arrival"] <= fields["ready"] <= fields["begin"] <= fields["end"]:+ invalid_ready += 1+ continue+ originals.append({+ "callbackToObservedReadyMs": (fields["ready"] - fields["arrival"]) / 10000,+ "observedReadyToPresentBeginMs": (fields["begin"] - fields["ready"]) / 10000,+ "presentCallMs": (fields["end"] - fields["begin"]) / 10000,+ "callbackToPresentEndMs": (fields["end"] - fields["arrival"]) / 10000})+ if originals or invalid_ready:+ result["originalFrameTrace"] = {"count": len(originals), "invalidReadyCount": invalid_ready}+ for key in originals[0] if originals else []:+ values = [row[key] for row in originals]+ result["originalFrameTrace"][key] = {"p50": median(values), "p95": percentile(values, .95), "max": max(values)}return resultdiff --git a/scripts/test-capture-version-comparison.ps1 b/scripts/test-capture-version-comparison.ps1index a76f4abb..0309555b 100644--- a/scripts/test-capture-version-comparison.ps1+++ b/scripts/test-capture-version-comparison.ps1@@ -9,6 +9,9 @@ param([ValidateSet(2,4)][int]$Multiplier=4,[ValidateSet('realtime','native')][string]$Nr='realtime',[switch]$Resize,+ [ValidateSet('4k30','1440p60')][string]$CaptureProfile='4k30',+ [ValidateSet('auto','minimum','driver')][string]$BufferMode='auto',+ [switch]$TraceFrames,[string]$TempDirectory='E:/项目/Veyra/tmp/beta-latency-ab-20260918')$ErrorActionPreference='Stop'@@ -19,12 +22,15 @@ $env:TEMP=$TempDirectory$env:TMP=$env:TEMPNew-Item -ItemType Directory -Force $env:TEMP | Out-Null$env:VEYRA_TEST_LEGACY_CAPTURE_PHASE=if($LegacyPhase){'1'}else{$null}+$env:VEYRA_TEST_CAPTURE_TRACE=if($TraceFrames){'1'}else{$null}$exe=Join-Path $Build 'veyra_capture_latency_tests.exe'-[ordered]@{build=$Build;name=$Name;seconds=$Seconds;backend=$Backend;multiplier=$Multiplier;nr=$Nr;resize=[bool]$Resize;legacyPhase=[bool]$LegacyPhase;executableSha256=(Get-FileHash -LiteralPath $exe).Hash} |+[ordered]@{build=$Build;name=$Name;seconds=$Seconds;backend=$Backend;multiplier=$Multiplier;nr=$Nr;captureProfile=$CaptureProfile;bufferMode=$BufferMode;traceFrames=[bool]$TraceFrames;resize=[bool]$Resize;legacyPhase=[bool]$LegacyPhase;executableSha256=(Get-FileHash -LiteralPath $exe).Hash} |ConvertTo-Json | Set-Content -LiteralPath (Join-Path $dir 'run.json') -Encoding utf8$testArgs=@(('"' + $dir + '"'),$Seconds)# Preserve compatibility with the immutable historical probe's two arguments.-if($Backend -ne 'dlss' -or $Multiplier -ne 4 -or $Nr -ne 'realtime' -or $Resize){$testArgs+=@($Backend,$Multiplier,$Nr,$(if($Resize){'resize'}else{'steady'}))}+if($Backend -ne 'dlss' -or $Multiplier -ne 4 -or $Nr -ne 'realtime' -or $Resize -or $CaptureProfile -ne '4k30' -or $BufferMode -ne 'auto'){$testArgs+=@($Backend,$Multiplier,$Nr,$(if($Resize){'resize'}else{'steady'}))}+if($CaptureProfile -ne '4k30' -or $BufferMode -ne 'auto'){$testArgs+=$CaptureProfile}+if($BufferMode -ne 'auto'){$testArgs+=@{minimum=1;driver=2}[$BufferMode]}$test=Start-Process -FilePath $exe -ArgumentList $testArgs -WorkingDirectory $Build -WindowStyle Hidden -PassThru -RedirectStandardOutput (Join-Path $dir 'result.txt') -RedirectStandardError (Join-Path $dir 'stderr.txt')$handle=$test.Handleif(!$test.WaitForExit(200000)){$test.Kill();throw 'Historical capture comparison exceeded 200 seconds'}diff --git a/tests/integration/CaptureLatencyComparisonTests.cpp b/tests/integration/CaptureLatencyComparisonTests.cppindex 35033c7f..73d3c82e 100644--- a/tests/integration/CaptureLatencyComparisonTests.cpp+++ b/tests/integration/CaptureLatencyComparisonTests.cpp@@ -11,17 +11,24 @@int wmain(int argc, wchar_t** argv) {using namespace veyra::engine;using Clock = std::chrono::steady_clock;- if (argc != 3 && argc != 7) return 2;- const std::wstring backend = argc == 7 ? argv[3] : L"dlss";- const unsigned multiplier = argc == 7 ? _wtoi(argv[4]) : 4;- const bool native = argc == 7 && std::wstring_view(argv[5]) == L"native";- const bool resize = argc == 7 && std::wstring_view(argv[6]) == L"resize";+ if (argc != 3 && argc != 7 && argc != 8 && argc != 9) return 2;+ const std::wstring backend = argc >= 7 ? argv[3] : L"dlss";+ const unsigned multiplier = argc >= 7 ? _wtoi(argv[4]) : 4;+ const bool native = argc >= 7 && std::wstring_view(argv[5]) == L"native";+ const bool resize = argc >= 7 && std::wstring_view(argv[6]) == L"resize";+ const std::wstring_view profile = argc >= 8 ? argv[7] : L"4k30";+ const unsigned bufferMode = argc == 9 ? _wtoi(argv[8]) : 0;+ if (bufferMode > 2) return 2;+ if (profile != L"4k30" && profile != L"1440p60") return 2;+ const unsigned width = profile == L"1440p60" ? 2560 : 3840;+ const unsigned height = profile == L"1440p60" ? 1440 : 2160;+ const double fps = profile == L"1440p60" ? 60.0 : 30.0;if ((backend != L"dlss" && backend != L"xess") || (multiplier != 2 && multiplier != 4)) return 2;const int seconds = _wtoi(argv[2]);if (seconds < 3 || seconds > 120) return 2;const std::filesystem::path dir = argv[1];std::filesystem::create_directories(dir);- SetEnvironmentVariableW(L"VEYRA_VERBOSE_FRAME_LOGS", L"0");+ SetEnvironmentVariableW(L"VEYRA_VERBOSE_FRAME_LOGS", GetEnvironmentVariableW(L"VEYRA_TEST_CAPTURE_TRACE",nullptr,0) ? L"1" : L"0");veyra::Logger::instance().openFile((dir / L"engine.log").wstring());veyra::Logger::instance().setConsoleEnabled(false);if (FAILED(CoInitializeEx(nullptr, COINIT_MULTITHREADED))) return 2;@@ -29,10 +36,14 @@ int wmain(int argc, wchar_t** argv) {const auto device = std::find_if(devices.begin(), devices.end(), [](const auto& d) { return d.name == L"VC-007PRO"; });if (device == devices.end()) { std::cout << "FAIL VC-007PRO missing" << std::endl; return 3; }const auto formats = veyra::source::CaptureCardSource::formatsByPath(device->path);- const auto format = std::find_if(formats.begin(), formats.end(), [](const auto& f) {- return f.width == 3840 && f.height == 2160 && std::abs(f.fps - 30) < .01 && f.label.find(L"NV12") != std::wstring::npos;+ const auto format = std::find_if(formats.begin(), formats.end(), [&](const auto& f) {+ return f.width == width && f.height == height && std::abs(f.fps - fps) < .1 && f.label.find(L"NV12") != std::wstring::npos;});- if (format == formats.end()) { std::cout << "FAIL 4K30 NV12 missing" << std::endl; return 3; }+ if (format == formats.end()) {+ std::cout << "FAIL requested NV12 format missing: " << width << 'x' << height << '@' << fps << std::endl;+ for (const auto& f : formats) std::wcout << f.index << L" " << f.label << std::endl;+ return 3;+ }const auto audios = veyra::source::CaptureCardSource::deviceDetails(true);const auto audio = std::find_if(audios.begin(), audios.end(), [](const auto& a) {return a.wasapi && a.name.find(L"HDMI (VC-007PRO)") != std::wstring::npos;@@ -46,9 +57,9 @@ int wmain(int argc, wchar_t** argv) {MONITORINFOEXW monitor{}; monitor.cbSize = sizeof(monitor);GetMonitorInfoW(MonitorFromWindow(window, MONITOR_DEFAULTTONEAREST), &monitor);DEVMODEW dm{}; dm.dmSize = sizeof(dm); EnumDisplaySettingsW(monitor.szDevice, ENUM_CURRENT_SETTINGS, &dm);- std::cout << "capture=VC-007PRO input=3840x2160 fps=" << format->fps << " NV12 formatIndex=" << format->index- << " audio=WASAPI-muted NR=" << (native ? "native4K" : "realtime1080") << " FG=" << (backend == L"xess" ? "XeSS" : "DLSS") << multiplier- << " resize=" << resize << " SR=off sync=default-off window=1280x760 display="+ std::cout << "capture=VC-007PRO input=" << width << 'x' << height << " fps=" << format->fps << " NV12 formatIndex=" << format->index+ << " audio=WASAPI-muted NR=" << (native ? "native" : "realtime1080") << " FG=" << (backend == L"xess" ? "XeSS" : "DLSS") << multiplier+ << " bufferMode=" << bufferMode << " resize=" << resize << " SR=off sync=default-off window=1280x760 display="<< dm.dmPelsWidth << 'x' << dm.dmPelsHeight << '@' << dm.dmDisplayFrequency << std::endl;int failures = 0;auto check = [&](bool ok, const char* label) { std::cout << (ok ? "PASS " : "FAIL ") << label << std::endl; failures += !ok; };@@ -57,6 +68,7 @@ int wmain(int argc, wchar_t** argv) {EngineController engine;engine.setVolume(0, true);EnhancementSettings settings; settings.nr = true; settings.sr = false; settings.multiplier = multiplier;+ settings.captureBuffer = static_cast<veyra::source::CaptureBufferMode>(bufferMode);settings.frameGenerationBackend = backend == L"xess" ? FrameGenerationBackend::XeSS : FrameGenerationBackend::Dlss;if (native) settings.nrPolicy = veyra::pipeline::NrSizePolicy::Native;engine.open(window, path, PlayerOptions::from(settings));@@ -83,6 +95,7 @@ int wmain(int argc, wchar_t** argv) {csv << "wall,frames,received,dropped,generated,nr,fg,multiplier,limited,callbackFps,submitFps,ageMs,ageP95,readAgeMs,realPresented,generatedPresented,fgSkipped,fgExpired,slotWaits,readyMeanMs,deadlineMeanMs,presentMeanMs,colorMeanMs,flowMeanMs,nrMeanMs,residualMeanMs,fgMeanMs,graphMeanMs\n";const auto first = engine.snapshot();auto last = first;+ veyra::log::info("capture-comparison", "measurement-start");const auto start = Clock::now();bool active = true;unsigned resizeStep = 0;@@ -110,12 +123,16 @@ int wmain(int argc, wchar_t** argv) {std::this_thread::sleep_for(std::chrono::milliseconds(50));}const double elapsed = std::chrono::duration<double>(Clock::now() - start).count();+ veyra::log::info("capture-comparison", "measurement-end");std::cout << "elapsed=" << elapsed << " receivedDelta=" << last.captureReceived - first.captureReceived<< " droppedDelta=" << last.captureDropped - first.captureDropped << " nrDelta=" << last.nrEvaluated - first.nrEvaluated<< " generatedDelta=" << last.generated - first.generated << " realPresentedDelta="<< last.metrics.flow.counters.realPresented - first.metrics.flow.counters.realPresented << std::endl;check(!last.failed && elapsed >= seconds && last.frames > first.frames + 10, "full measurement");check(active && last.nrEvaluated > first.nrEvaluated && last.generated > first.generated, "NR and requested FG continuously active");+ const double measuredFps = double(last.captureReceived - first.captureReceived) / elapsed;+ std::cout << "measuredCallbackFps=" << measuredFps << std::endl;+ check(std::abs(measuredFps - fps) < fps * .05, "actual callback rate matches requested capture rate");}engine.stop(); check(wait([&](const auto&) { return engine.idle(); }, 15000), "clean stop");}