Skip to content

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: prepare normal export baseline and align optimization status

Veyra Goal Agent86e045872388
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9579d362..69b78ae7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1052,6 +1052,10 @@ add_executable(veyra_sr_reconstruction_tests tests/integration/SrReconstructionT
target_compile_features(veyra_nr_queue_migration_experiment PRIVATE cxx_std_20)
target_compile_options(veyra_nr_queue_migration_experiment PRIVATE /utf-8)
target_link_libraries(veyra_nr_queue_migration_experiment PRIVATE veyra_engine)
+ add_executable(veyra_nr_export_pipeline_experiment tests/perf/NrExportPipelineExperiment.cpp)
+ target_compile_features(veyra_nr_export_pipeline_experiment PRIVATE cxx_std_20)
+ target_compile_options(veyra_nr_export_pipeline_experiment PRIVATE /utf-8)
+ target_link_libraries(veyra_nr_export_pipeline_experiment PRIVATE veyra_engine)
target_compile_features(veyra_nr_recent_cache_experiment PRIVATE cxx_std_20)
target_compile_options(veyra_nr_recent_cache_experiment PRIVATE /utf-8)
target_link_libraries(veyra_nr_recent_cache_experiment PRIVATE veyra_engine bcrypt)
diff --git a/README.md b/README.md
index dfbce190..c188b9c7 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@ A Windows enhancement player for videos, images, capture cards and streaming. Su
[Download 2.0.3 portable](https://github.com/Likely7/Veyra-NRVideo/releases/tag/v2.0.3) · [Full changelog: English / 中文](docs/RELEASE_NOTES_2.0.3.md) · [Issues](https://github.com/Likely7/Veyra-NRVideo/issues)
-**Local development, 2026-10-04:** this branch starts from the tested RTSS restart, custom playback rate, subtitle, UI refresh, Professional layout and fullscreen restoration repairs. Those later repairs are not in the public 2.0.3 assets. NR pipeline performance work is now tracked in [the execution record](docs/PERF_EXECUTION_NR_2026-10-04.md); measurements are pending. Severe background frame loss remains unresolved, and HDR/Dolby PRs remain deferred. [Current project status](docs/CURRENT_STATUS.md) distinguishes published, local and unverified work.
+**Local development, 2026-10-05:** this branch includes later RTSS restart, custom playback rate, subtitle, UI refresh, Professional layout and fullscreen restoration repairs; public 2.0.3 assets do not include them. Measured NR work has retained core reuse, single-NR caching, idle prewarming, paused-frame reuse and narrowly admitted compute queues. The low-resolution multi-NR chain was reverted after marginal whole-pipeline gains and image changes. [The execution record](docs/PERF_EXECUTION_NR_2026-10-04.md) lists measurements and remaining work. Severe background frame loss remains unresolved, and HDR/Dolby PRs remain deferred. [Current project status](docs/CURRENT_STATUS.md) distinguishes published, local and unverified work.
## Highlights
diff --git a/README_CN.md b/README_CN.md
index b49bc351..c2603f79 100644
--- a/README_CN.md
+++ b/README_CN.md
@@ -16,13 +16,15 @@ Windows 视频、图片、采集卡与串流增强工具。在同一处理链组
[下载 2.0.3 免安装版](https://github.com/Likely7/Veyra-NRVideo/releases/tag/v2.0.3) · [完整更新(English / 中文)](docs/RELEASE_NOTES_2.0.3.md) · [反馈](https://github.com/Likely7/Veyra-NRVideo/issues)
+**本地开发进度,2026-10-05:** 此分支另含RTSS重启、自定义倍速、字幕、UI刷新、专业布局和全屏恢复修复,公开2.0.3包尚未包含。NR优化已实测保留核心复用、单NR缓存、空闲预热、暂停复用与限定组合的COMPUTE队列;多层低分辨率整链因整体收益小并改变画面已回退。[执行账本](docs/PERF_EXECUTION_NR_2026-10-04.md)记录数据和剩余节点,严重后台掉帧仍未解决,HDR/杜比PR继续暂缓。
+
## 2.0.0 重点
- **全新界面**:首页、极简、专业列表、节点、调色、导出和设置重新组织;支持简中、繁中、English、日本語。
- **节点编辑与多层 NR**:连线编排处理顺序,NR/调色独立参数;列表与节点各自保存配置、会话和预设。
- **PC / Xbox 串流**:Moonlight/Sunshine 协议 PC 串流、非官方实验 Xbox 接入,与 PS5、采集卡、屏幕捕获共用增强。
- **导出页重做**:可编辑顺序队列、剪辑、MP4/MKV、多音轨/内嵌字幕、取消重试和完成提示音。
-- **增强与兼容**:NR 三版本(50 系 NVIDIA 原版、Lecram、SF-v2)、DLSS/XeSS/FSR 补帧入口、采集优化及带重启确认的 OBS 游戏采集开关。详细新功能与修复见 Release。
+- **增强与兼容**:NR 四版本(50 系 NVIDIA 原版、Lecram、SF-v2、AMD lmxxf)、DLSS/XeSS/FSR 补帧入口、采集优化及带重启确认的 OBS 游戏采集开关。详细新功能与修复见 Release。
## 2.0.3 新增与修复
diff --git a/docs/CURRENT_STATUS.md b/docs/CURRENT_STATUS.md
index 9973f814..4f38b361 100644
--- a/docs/CURRENT_STATUS.md
+++ b/docs/CURRENT_STATUS.md
@@ -1,5 +1,13 @@
# 当前项目状态 / Current Status
+## 2026-10-05 普通负载续推:3c限定保留、4a回退
+
+用户继续授权优化并明确不做压力测试。3c完整18组普通负载实测:双NR1080p+SR4K+DLSS2X/3X,普通COMPUTE增强21.386→19.477ms / 23.330→21.542ms(8.93%/7.66%)。自动准入只限已测RTX5070/616.56文件组合,其余DIRECT;9组队列迁移1278完整输出及PTS一致,真实Qt FSR3.1/XeSS/VFG/调色/时域回退通过,HIGH不默认。成功软件Present P99未改善,R0未完成,不称卡顿根治。
+
+4a低分辨率整链候选20组800PNG与控制/debug通过,但多层画面有数值变化(最高81/255)。12组普通播放整体仅下降1.09%/0.62%,Present P99未改善;已明确回退产品实现,保留候选/原图/HTML/计时证据。标签checkpoint/perf-nr-4a-low-chain-rejected-20261004(8dac9ec)。R0长帧进一步定位在NR运行时CPU调用(样本108.279ms,GPU约6.7ms),尚未修复。
+
+已保留2a/2c单NR/2d/5c/3a及限定3c,均待最终产品回归;剩余5a黑边、3b自动尺寸、5b跨帧、4b推荐、UI整合与R0继续。下文较早“3c待测”等语句仅代表当时状态。本轮未合并、推送或发布,不改用户配置/驱动/原桌面工作树。
+
## 2026-10-05 正常负载匹配复测
用户要求测一波:封存A与确实用于压力测试的同一B EXE,三轮交错六组及一对确认共八组完成,无额外自有竞争进程。全四轮保留异常,NR中位A/B7.3925/7.256ms,增强合计21.394/21.245ms;B压力时11.367/27.653ms的高读数回落,未测到此配置普遍NR回退,但差异小,不宣称持续播放提速。A3提交断档2.84s/源跳89,B3源跳13/生成过期14,确认组0源跳;根因未明,调度/图提交长间隔列入R0。EXE/DLL/QML manifest前后完整一致,测试已退出、数据与源码存档。详PERF_3C_NORMAL_LOAD_2026-10-05,完整COMPUTE性能和全方案仍待;未改产品、未合并或发布。
diff --git a/docs/PERF_5B_CROSS_FRAME_2026-10-05.md b/docs/PERF_5B_CROSS_FRAME_2026-10-05.md
new file mode 100644
index 00000000..6c9c0543
--- /dev/null
+++ b/docs/PERF_5B_CROSS_FRAME_2026-10-05.md
@@ -0,0 +1,11 @@
+# 5b 文件/导出跨帧并行实验
+
+从4a明确回退后的8dac9ec继续,先封存方案、无优化产品probe和真实基线,再写候选。用户明确禁止额外GPU竞争、人为满载和显存压力;本节点只做正常文件导出与必要正确性/取消检查。
+
+现状实查:VideoExportJob每帧先等resolveGeneration完成,再交给NVENC;NvencD3D12Encoder本身已有4个异步槽,RGB到NV12转换与Graph同DIRECT ring,NVENC inputFencePoint明确等待转换提交fence。Graph有两份输出和上传缓冲,重用上传缓冲仍等待对应producer fence,不删除这些同步。补帧有效性读回必须在GPU完成后读取,不能一并跳过。
+
+第一候选只对无补帧NVENC导出消除“刚提交即CPU等GPU”的串行点,限制两帧在途,重用前显式确认最旧帧完成;保留取消、设备健康、30秒超时、slow-frame测试语义。其他编码器和补帧仍原路径。先用测试ENV,默认关闭。输出逐帧decoded SHA、PTS、帧数、尺寸、音频轨与时长匹配串行版;同一EXE交错三轮并记录导出整体/处理区间,不把API提交速度冒充最终导出提速。
+
+此候选不代表NVOF(N+1)与NR(N)已重叠。原计划这一部分需要分离源颜色、两份flow/conf及各自producer/consumer fence,当前共用纹理和DIRECT顺序不满足。先测实际剩余瓶颈,再独立实验,不凭代码结构宣称已实现。直播/采集路径不进入此导出候选。
+
+基线以真实exportVideo生产接口构建定向probe;普通4K导出、自然1080源单/双NR、NR+SR4K和无NR的SR8K分开报告。8K高负载NR/其他GPU/设备移除边界不强行测试,不扩展实卡通过范围。每个进程有250秒上限,构建与GPU计时不重叠,导出后软件解码核对在计时波次结束才执行。
diff --git a/docs/WORKLOG.md b/docs/WORKLOG.md
index b4a8a7b5..f5f4f07b 100644
--- a/docs/WORKLOG.md
+++ b/docs/WORKLOG.md
@@ -8290,3 +8290,9 @@ B4a-native-v2 20/20通过、800 PNG及逐图SHA/PTS保留;debug/设备移除0
# 2026-10-05 4a正常计时完成并决定回退
`nr-low-chain-normal.py B2d B4a-normal-v1 2-sr 3-sr`12/12成功,封存c2891b4 EXE、原DLL/QML全部SHA保持。完整增强两层18.319→18.120ms(1.09%)、三层25.029→24.873ms(0.62%);最后残差约25%下降不代表整体。Present P99未改善,三层尾部on110–113ms,源跳过0。画面数值最大变化81/255,收益不足以承担语义/画质变化;明确拒绝产品候选,先封存完整计时证据再回退bd4c2ef生产实现。E:/项目/Veyra/logs/perf-nr-20261004/B4a-normal-v1-summary和各12原始目录;800PNG/质量HTML保留。R0定位最后NR snippet CPU108.279ms、GPU约6.7ms的长帧,未修复,不宣称丝滑。
+
+# 2026-10-05 4a回退完成、5b基线接点
+
+8dac9ec明确revert bd4c2ef产品和已退役native入口,冲突仅本轮新增文档/probe,保留当前完整WORKLOG/4a证据、删除退役fixture;Graph/header/CMake/notices与cefbaec逐文件diff空,存档checkpoint/perf-nr-4a-low-chain-rejected-20261004/bundle verify通过。README双语与CURRENT_STATUS更新真实进度,旧日期条目保留作历史。
+
+5b方案PERF_5B_CROSS_FRAME_2026-10-05.md。新增生产exportVideo定向probe与普通导出矩阵、只加completionWait/pipeline最终drain计时,不改串行语义;先测基线再实现默认关闭候选。不做GPU竞争/压力,不将去掉CPU等待说成已经重叠NVOF(N+1)。本轮所有新输出仍E:/项目/Veyra对应build/tests/logs/tmp/archive。
diff --git a/scripts/perf/nr-export-pipeline.py b/scripts/perf/nr-export-pipeline.py
new file mode 100644
index 00000000..17fb87d2
--- /dev/null
+++ b/scripts/perf/nr-export-pipeline.py
@@ -0,0 +1,49 @@
+"""Normal production exports; no extra load. Decode verification runs after timing."""
+from pathlib import Path
+import importlib.util,json,os,re,shutil,subprocess,sys,time
+ROOT=Path(__file__).resolve().parents[2];BASE=Path('E:/项目/Veyra');TASK='perf-nr-20261004'
+spec=importlib.util.spec_from_file_location('matrix',ROOT/'scripts/perf/nr-matrix.py');matrix=importlib.util.module_from_spec(spec);spec.loader.exec_module(matrix)
+variant,label,mode=sys.argv[1:4];groups=sys.argv[4:] or ['none4k','nr','nr2','nrsr4k','sr8k']
+assert mode in ('serial','async','interleaved')
+assert all(g in ('none4k','nr','nr2','sr4k','nrsr4k','sr8k','fg2') for g in groups)
+matrix.assert_gpu_tests_idle();app=BASE/'tests'/TASK/(label+'-app');assert not app.exists()
+shutil.copytree(BASE/'test-packages'/TASK/'Veyra-2.0.3-perf-baseline-A-NVIDIA-win64-portable',app,copy_function=matrix.copy_dependency)
+exe=app/'veyra_nr_export_pipeline_experiment.exe';shutil.copy2(BASE/'build'/TASK/variant/exe.name,exe)
+folder=BASE/'logs'/TASK/(label+'-summary');folder.mkdir(parents=True,exist_ok=False)
+payload={str(p.relative_to(app)):matrix.digest(p) for p in app.rglob('*') if p.is_file() and p.suffix.lower() in ('.exe','.dll','.qml')}
+(folder/'artifacts.json').write_text(json.dumps(payload,ensure_ascii=False,indent=2),encoding='utf-8')
+results=[]
+for group in groups:
+ source=BASE/'tests/perf-matrix/media/M2.mkv' if group in ('none4k','sr8k') else matrix.SOURCES['M1']
+ config='none' if group=='none4k' else group;frames=60 if group=='sr8k' else 120
+ for repeat in range(1,4):
+ modes=(('serial','async') if repeat%2 else ('async','serial')) if mode=='interleaved' else (mode,)
+ for current in modes:
+ matrix.assert_gpu_tests_idle();name=f'{label}-{group}-{current}-r{repeat}';out=BASE/'logs'/TASK/name;tmp=BASE/'tmp'/TASK/name
+ for p in (out,tmp):p.mkdir(parents=True,exist_ok=False)
+ dest=out/'export.mkv';env=os.environ.copy()
+ for key in tuple(env):
+ if key.upper().startswith('VEYRA_'):env.pop(key)
+ env.update(TEMP=str(tmp),TMP=str(tmp))
+ if current=='async':env['VEYRA_TEST_EXPORT_ASYNC']='1'
+ command=[str(exe),str(source),str(dest),config,str(frames),str(out)]
+ before=matrix.gpu();print('START',name,flush=True);start=time.monotonic()
+ with (out/'console.log').open('xb') as stream:
+ try:rc=subprocess.run(command,cwd=app,env=env,stdout=stream,stderr=subprocess.STDOUT,timeout=250).returncode
+ except subprocess.TimeoutExpired:rc=124
+ elapsed=time.monotonic()-start;after=matrix.gpu()
+ text=(out/'console.log').read_text(encoding='utf-8',errors='replace');line=next((s for s in text.splitlines() if s.startswith('EXPORT_PIPELINE_RESULT ')),'')
+ metrics={k:float(v) for k,v in re.findall(r'(\w+)=(-?[\d.]+)',line)};log=(out/'engine.log').read_text(encoding='utf-8',errors='replace') if (out/'engine.log').exists() else ''
+ pipeline=[s for s in log.splitlines() if '[export-pipeline]' in s];stages=[s for s in log.splitlines() if '[graph-contract]' in s or '[resolution]' in s or '[export-counts]' in s]
+ result={'name':name,'group':group,'mode':current,'repeat':repeat,'command':command,'exitCode':rc,'metrics':metrics,'wallSeconds':elapsed,'beforeGpu':before,'afterGpu':after,
+ 'pipeline':pipeline,'stages':stages,'exeSha256':matrix.digest(exe),'runtimeSha256':matrix.digest(app/'runtime/experimental/nvngx_dlssnr.dll'),
+ 'sourceSha256':matrix.digest(source),'outputSha256':matrix.digest(dest) if dest.exists() else None,
+ 'sourceHead':subprocess.check_output(['git','-C',str(ROOT),'rev-parse','HEAD'],text=True).strip(),
+ 'passed':rc==0 and metrics.get('ok')==1 and metrics.get('source')==frames and metrics.get('encoded')==frames*(2 if group=='fg2' else 1) and bool(pipeline),
+ 'extraGpuLoad':False,'note':'Normal export includes enhancement and encoder drain; no artificial GPU load or memory pressure.'}
+ (out/'result.json').write_text(json.dumps(result,ensure_ascii=False,indent=2),encoding='utf-8');results.append(result)
+ (folder/'completed.json').write_text(json.dumps(results,ensure_ascii=False,indent=2),encoding='utf-8');print('RESULT',name,json.dumps({'passed':result['passed'],'metrics':metrics,'pipeline':pipeline}),flush=True)
+ if not result['passed']:print(text[-5000:],log[-7000:],flush=True);raise SystemExit(1)
+assert all(matrix.digest(app/name)==sha for name,sha in payload.items()),'Product payload mutated'
+matrix.assert_gpu_tests_idle();(folder/'summary.json').write_text(json.dumps({'runs':results,'payloadUnchanged':True,'extraGpuLoad':False},ensure_ascii=False,indent=2),encoding='utf-8')
+print('EXPORT_PIPELINE_COMPLETE',len(results),flush=True)
diff --git a/src/engine/VideoExportJob.cpp b/src/engine/VideoExportJob.cpp
index 90b537c3..a7ab7cd0 100644
--- a/src/engine/VideoExportJob.cpp
+++ b/src/engine/VideoExportJob.cpp
@@ -204,6 +204,9 @@ bool exportVideo(const std::wstring& input,const std::wstring& output,PlayerOpti
uint64_t sourceCount=0,generatedCount=0,holdCount=0;int64_t outputIndex=0;bool error=false;std::shared_ptr<pipeline::FrameLease> lastReal;
double previousPts=0;int64_t lastOutputUs=-1;
uint64_t slowFrames=0;
+ // Directed export measurements exclude feature/encoder creation, but include final drain.
+ const auto pipelineStart=std::chrono::steady_clock::now();
+ double completionWaitMs=0;
// Acceptance hook: VEYRA_TEST_EXPORT_SLOW_FRAME=<source index>:<ms> holds that frame's
// completion back, standing in for a GPU that is slow but alive. Unset in normal use.
int slowFrameIndex=-1,slowFrameMs=0;
@@ -264,7 +267,9 @@ bool exportVideo(const std::wstring& input,const std::wstring& output,PlayerOpti
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
if(error||cancel)break;
- if(const auto waited=std::chrono::duration<double,std::milli>(std::chrono::steady_clock::now()-readyStart).count();waited>1000){
+ const double waited=std::chrono::duration<double,std::milli>(std::chrono::steady_clock::now()-readyStart).count();
+ completionWaitMs+=waited;
+ if(waited>1000){
++slowFrames;uint64_t budget=0,usage=0;ctx.videoMemoryInfo(budget,usage);
if(slowFrames<=20)veyra::log::warn("export",std::format("slow frame source={} gpuWaitMs={:.0f} vramMiB={} budgetMiB={}",sourceCount,waited,usage>>20,budget>>20));
}
@@ -311,6 +316,8 @@ bool exportVideo(const std::wstring& input,const std::wstring& output,PlayerOpti
veyra::log::info("export-counts",std::format("slowFrames={} source={} generated={} hold={} output={} multiplier={} repairedTimestamps={} backend={} vfgQuality={} encoder={} bitrateMbps={} note={} (holds are not generated frames)",slowFrames,sourceCount,generatedCount,holdCount,outputIndex,multiplier,repairedTimestamps,frameGenerationBackendName(options.settings.frameGenerationBackend),options.settings.vfgQuality,std::string(sink::encoderBackendName(encoder->backend())),options.settings.exportBitrateMbps,utf8(fgNote)));
progress(.99,L"正在收尾:等待编码器输出剩余帧");
if(!encoder->finish()){if(failureReason.empty())failureReason=L"编码器收尾失败,请查看编码器诊断";break;}
+ veyra::log::info("export-pipeline",std::format("source={} pipelineMs={:.3f} completionWaitMs={:.3f} mode=serial",
+ sourceCount,std::chrono::duration<double,std::milli>(std::chrono::steady_clock::now()-pipelineStart).count(),completionWaitMs));
const int64_t estimatedEnd=lastOutputUs+std::max<int64_t>(1,int64_t(std::llround(sourceInterval*1000000/multiplier)));
const int64_t finalEnd=requestedEnd>0?std::min(estimatedEnd,int64_t(std::llround((requestedEnd-videoOriginSeconds)*1000000))):estimatedEnd;
if(!flushVideo(finalEnd))break;
diff --git a/tests/perf/NrExportPipelineExperiment.cpp b/tests/perf/NrExportPipelineExperiment.cpp
new file mode 100644
index 00000000..114a0da9
--- /dev/null
+++ b/tests/perf/NrExportPipelineExperiment.cpp
@@ -0,0 +1,51 @@
+// Directed entry into the actual export graph, NVENC and mux. No encoder implementation here.
+#include "veyra/engine/VideoExportJob.h"
+#include "veyra/engine/EffectChain.h"
+#include "veyra/Log.h"
+#include "veyra/gfx/GpuSchedulingPriority.h"
+#include <chrono>
+#include <filesystem>
+#include <format>
+#include <iostream>
+#include <objbase.h>
+
+int wmain(int argc,wchar_t** argv){
+ using namespace veyra;
+ if(argc<6||argc>7)return 2;
+ const std::wstring group=argv[3];const unsigned frames=std::stoul(argv[4]);
+ if(!frames||frames>300)return 2;
+ const std::filesystem::path logs=argv[5];std::filesystem::create_directories(logs);
+ Logger::instance().setConsoleEnabled(false);Logger::instance().openFile((logs/L"engine.log").wstring());
+ const HRESULT com=CoInitializeEx(nullptr,COINIT_MULTITHREADED);
+ log::info("export-pipeline-test",std::format("COM init hr=0x{:X}",unsigned(com)));if(FAILED(com))return 2;
+ struct Apartment {~Apartment(){CoUninitialize();}} apartment;
+ engine::EnhancementSettings settings;settings.exportBitrateMbps=30;
+ settings.nrPolicy=pipeline::NrSizePolicy::Native;
+ if(group==L"nr"||group==L"nr2"||group==L"nrsr4k")settings.nr=true;
+ if(group==L"sr4k"||group==L"sr8k"||group==L"nrsr4k"){
+ settings.sr=true;settings.videoSrQuality=0;
+ settings.srTarget=group==L"sr8k"?pipeline::SrTarget::Uhd8K:pipeline::SrTarget::Uhd4K;
+ }
+ if(group==L"nr2"){
+ engine::EffectChain chain;chain.nodeCount=2;
+ for(unsigned i=0;i<2;++i){chain.nodes[i].enabled=true;chain.nodes[i].type=engine::EffectType::NrEnhance;chain.nodes[i].nr.sizePolicy=pipeline::NrSizePolicy::Native;}
+ engine::fromChain(chain,settings);
+ }
+ if(group==L"fg2")settings.multiplier=2;
+ if(group!=L"none"&&group!=L"nr"&&group!=L"nr2"&&group!=L"sr4k"&&group!=L"nrsr4k"&&group!=L"sr8k"&&group!=L"fg2")return 2;
+ settings.nrPolicy=pipeline::NrSizePolicy::Native;settings.exportBitrateMbps=30;
+ auto options=engine::PlayerOptions::from(settings);options.exportRateControl=sink::ExportRateControl::Vbr;
+ const bool cancelTest=argc==7&&std::wstring(argv[6])==L"--cancel";
+ if(argc==7&&!cancelTest)return 2;
+ std::atomic<bool> cancel{false};engine::ExportCounts last;bool priorityApplied=false,priorityPass=true;
+ const auto start=std::chrono::steady_clock::now();
+ const bool ok=engine::exportVideo(argv[1],argv[2],options,true,cancel,[](double,const std::wstring&){},frames,
+ [&](){if(!priorityApplied){gfx::requestGpuPriority(gfx::GpuPriority::Normal);const auto p=gfx::gpuPriorityStatus();priorityPass=p.state==gfx::GpuPriorityState::Applied&&p.actual==2;priorityApplied=true;}return priorityPass;},
+ [&](const engine::ExportCounts& c){last=c;if(cancelTest&&c.source>=2)cancel=true;});
+ const double elapsed=std::chrono::duration<double,std::milli>(std::chrono::steady_clock::now()-start).count();
+ Logger::instance().flush();
+ std::cout<<"EXPORT_PIPELINE_RESULT ok="<<ok<<" cancelled="<<cancel.load()<<" source="<<last.source<<" generated="<<last.generated
+ <<" hold="<<last.holds<<" encoded="<<last.encoded<<" totalMs="<<elapsed<<std::endl;
+ if(cancelTest)return !ok&&cancel&&!std::filesystem::exists(argv[2])?0:1;
+ return ok&&last.source==frames&&last.encoded==last.source*(group==L"fg2"?2:1)?0:1;
+}