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(perf): verify 15 bounded export edge cases without pressure
Veyra Goal Agentb1bd9c95ca8f
diff --git a/docs/PERF_5B_CROSS_FRAME_2026-10-05.md b/docs/PERF_5B_CROSS_FRAME_2026-10-05.mdindex 845991f9..ff20e5ca 100644--- a/docs/PERF_5B_CROSS_FRAME_2026-10-05.md+++ b/docs/PERF_5B_CROSS_FRAME_2026-10-05.md@@ -39,3 +39,9 @@ build-export-baseline-v1 UI/probe构建成功,编译产品源码86e0458;只`nr-export-verify.py B5b-serial-v2 B5b-candidate-v1`75/75通过、8100完整decoded帧与PTS/尺寸/轨道/时长全部一致;所有策略生成的整个封装文件SHA也与各自A一致。收据B5b-candidate-v1-decoded-review.json,各原始framemd5/ffprobe保留。该验证覆盖当前本机/运行库/素材,不代表其他GPU、HDR或直播通过。下一步单独验证GPU debug、取消、单帧、FG保持串行和事件API失败回退。只模拟API错误分支,不制造GPU压力或设备重置;候选继续默认关闭。++## 边界检查已执行++`nr-export-edges.py B2d B5b-edges-v1`15/15通过(编译产品f94d0bc,EXE SHA256 `0bd9993fda49d55210456764e09a790ca12e5ce72c5617925b1bec9fb2975359`):单帧、双NR/NR+SR的debug层、DLSS2X保持串行、取消后无正式/owned partial、事件创建/注册错误回退、既有作者HDR720p/PQ/Main10导出。7组对照整个输出文件SHA相同;debug ERROR/CORRUPTION为0,removedReason=0。事件故障是逻辑注入ERROR_INVALID_HANDLE/E_FAIL,未制造真实内存不足、设备移除或GPU压力。++原始日志和收据在`E:/项目/Veyra/logs/perf-nr-20261004/B5b-edges-v1-summary/summary.json`及15个case目录;HDR源SHA256 `05827c1b08f27a84be2074435365289a82e21ae435f39f4891cc26d921128e2d`,它是既有作者测试媒体,不冒充自然HDR影片或全效果HDR验收。候选仍默认关闭,下一步仅将已测无FG/NVENC路径启为默认,并以显式B-off保护复测产品worker生命周期。diff --git a/docs/WORKLOG.md b/docs/WORKLOG.mdindex ff51abc7..a5d7205f 100644--- a/docs/WORKLOG.md+++ b/docs/WORKLOG.md@@ -8304,3 +8304,7 @@ B4a-native-v2 20/20通过、800 PNG及逐图SHA/PTS保留;debug/设备移除05b基线A-A完整1620 decoded帧及PTS/尺寸/轨道/时长15/15全同,8K实为7680×4320,收据B5b-serial-v2-decoded-review.json。新增默认关闭候选:两帧pending lease/producer/consumer fence严格有界、复用前GPU完成、NVENC独立inputFence;独立fence事件等待、失败回轮询、取消/健康/30秒保留。源码审查修正std::move(out)之后取real.lease的潜在空指针,改先保存consumerFence再move,未构建/执行有缺陷版本。两个机制分组计时,尚未标收益。5b build-export-candidate-v1通过;60组普通同EXE串行/事件/两帧/组合三轮通过,payload全SHA保持,源帧/最终编码足量,maxInFlight1/2及真实NR数核实。组合总耗时普通4K降44.37%、单NR23.60%、双NR14.20%、NR+SR4K6.41%、SR8K3.91%;处理区间各降57.66/54.24/16.85/15.03/10.45%,明确不混算。完整75文件/8100decoded帧/PTS/尺寸/轨道/时长全同,连整个文件SHA也全同。E:/项目/Veyra/logs/perf-nr-20261004/B5b-candidate-v1-summary/comparison.json及B5b-candidate-v1-decoded-review.json。报表初读日志遇运行库非UTF8字节,errors=replace仅解析ASCII字段,raw未改。下一步仅必要debug/取消/单帧/FG串行/事件失败回退,不造GPU压力/设备重置;测试hook默认关闭。++## 2026-10-05 NR性能5b导出边界检查++`py -3.11 -B scripts/perf/nr-export-edges.py B2d B5b-edges-v1` exit0,15/15真实生产exportVideo通过,7对输出整个SHA一致。单帧、debug双NR/NR+SR、FG保持串行、取消清理、逻辑事件故障回退和既有HDR Main10通过;debug0/removed0。日志`E:/项目/Veyra/logs/perf-nr-20261004/B5b-edges-v1-summary/summary.json`。未运行压力或设备重置;5b的NVOF未来帧准备尚未完成,不把导出两帧在途冒充该部分。diff --git a/scripts/perf/nr-export-edges.py b/scripts/perf/nr-export-edges.pynew file mode 100644index 00000000..01510945--- /dev/null+++ b/scripts/perf/nr-export-edges.py@@ -0,0 +1,54 @@+"""Directed safety checks for the export candidate; no pressure or device removal."""+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=sys.argv[1:3];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')+active={'VEYRA_TEST_EXPORT_ASYNC':'1','VEYRA_TEST_EXPORT_FENCE_EVENTS':'1'}+hdr=BASE/'tests/video-hdr-20260918/hdr-export.mp4'+cases=[('single-off','none',1,{},False,None),('single-on','none',1,active,False,None),+ ('nr2-debug-off','nr2',24,{'VEYRA_TEST_EXPORT_DEBUG':'1'},False,None),('nr2-debug-on','nr2',24,{**active,'VEYRA_TEST_EXPORT_DEBUG':'1'},False,None),+ ('nrsr-debug-off','nrsr4k',24,{'VEYRA_TEST_EXPORT_DEBUG':'1'},False,None),('nrsr-debug-on','nrsr4k',24,{**active,'VEYRA_TEST_EXPORT_DEBUG':'1'},False,None),+ ('fg-off','fg2',40,{},False,None),('fg-on','fg2',40,active,False,None),+ ('cancel-off','nrsr4k',24,{},True,None),('cancel-on','nrsr4k',24,active,True,None),+ ('failure-reference','nr',32,{},False,None),+ ('event-create-failure','nr',32,{**active,'VEYRA_TEST_EXPORT_EVENT_CREATE_FAIL':'1'},False,None),+ ('event-register-failure','nr',32,{**active,'VEYRA_TEST_EXPORT_EVENT_REGISTER_FAIL':'1'},False,None),+ ('hdr-off','none',16,{'VEYRA_TEST_EXPORT_DEBUG':'1'},False,hdr),('hdr-on','none',16,{**active,'VEYRA_TEST_EXPORT_DEBUG':'1'},False,hdr)]+results=[]+for name,group,frames,flags,cancel,source in cases:+ matrix.assert_gpu_tests_idle();source=source or matrix.SOURCES['M1'];run=label+'-'+name;out=BASE/'logs'/TASK/run;tmp=BASE/'tmp'/TASK/run+ for p in (out,tmp):p.mkdir(parents=True,exist_ok=False)+ dest=out/'export.mp4';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),**flags)+ command=[str(exe),str(source),str(dest),group,str(frames),str(out)]+(['--cancel'] if cancel else [])+ print('START',run,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+ text=(out/'console.log').read_text(encoding='utf-8',errors='replace');log=(out/'engine.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)}+ passed=rc==0 and (metrics.get('cancelled')==1 and metrics.get('ok')==0 and not dest.exists() if cancel else metrics.get('ok')==1 and metrics.get('source')==frames)+ if 'VEYRA_TEST_EXPORT_DEBUG' in flags:passed=passed and '[export-debug] errors=0 removedReason=0x0' in log+ if name=='fg-on':passed=passed and 'mode=serial fenceEvents=true maxInFlight=1' in log+ if 'failure' in name and name!='failure-reference':passed=passed and 'injected=true; keeping polling' in log and 'fenceEvents=false maxInFlight=2' in log+ if cancel:passed=passed and not list(out.glob('*.partial*'))+ result={'name':run,'case':name,'group':group,'command':command,'flags':flags,'exitCode':rc,'metrics':metrics,'wallSeconds':time.monotonic()-start,'sourceSha256':matrix.digest(source),+ 'outputSha256':matrix.digest(dest) if dest.exists() else None,'exeSha256':matrix.digest(exe),'passed':passed,'extraGpuLoad':False,+ 'diagnostics':[s for s in log.splitlines() if '[export-debug]' in s or '[export-pipeline]' in s]}+ (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',json.dumps(result),flush=True)+ if not passed:print(log[-7000:],flush=True);raise SystemExit(1)+assert all(matrix.digest(app/name)==sha for name,sha in payload.items()),'Product payload mutated'+lookup={r['case']:r for r in results};pairs=[('single-off','single-on'),('nr2-debug-off','nr2-debug-on'),('nrsr-debug-off','nrsr-debug-on'),('fg-off','fg-on'),('hdr-off','hdr-on'),+ ('failure-reference','event-create-failure'),('failure-reference','event-register-failure')]+comparisons=[{'a':a,'b':b,'sameWholeFile':lookup[a]['outputSha256']==lookup[b]['outputSha256']} for a,b in pairs]+passed=all(c['sameWholeFile'] for c in comparisons);(folder/'summary.json').write_text(json.dumps({'runs':results,'comparisons':comparisons,'passed':passed,'payloadUnchanged':True},ensure_ascii=False,indent=2),encoding='utf-8')+matrix.assert_gpu_tests_idle();print('EXPORT_EDGES_COMPLETE',passed,comparisons,flush=True);raise SystemExit(0 if passed else 1)