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++
perf: measure priority over 18 competition runs; reject High default
Veyra Goal Agentd263f0a5a791
diff --git a/docs/PERF_3A_GPU_PRIORITY_2026-10-04.md b/docs/PERF_3A_GPU_PRIORITY_2026-10-04.mdindex 5c2a4e74..3dd02071 100644--- a/docs/PERF_3A_GPU_PRIORITY_2026-10-04.md+++ b/docs/PERF_3A_GPU_PRIORITY_2026-10-04.md@@ -10,3 +10,21 @@## v1无效与修正v1在Popen后立即调用Set/Get,进程GPU上下文尚未创建,三个档位均NTSTATUS 0xC000000D,applied=false。数据不用于收益。只读核验已运行的两个本轮GPU进程时Get均成功、实际class=2,确认需要等待WDDM进程记录就绪。v1保存三个完整组,第四个本轮竞争fixture收到stop标记后正常退出、driver在对方早停断言退出;未关闭用户进程。v2竞争方在LOAD_READY后设置并读回,播放器等待Get首次成功(30秒上限、全部失败状态保留)后才设置并立即读回,不能读回则数据直接判无效。+++## 有效18组实测++v2 M1真30帧自然视频与v3-60 M10合成1080p60,各Normal/High/Realtime三轮、交错顺序,共18组全通过。Set/Get各组实际2/4/5,竞争方实际Normal2,真实NR完整求值/debug/device通过。每轮稳态软件Present间隔样本M1为1140、M10为2280,无preview跳帧/过期补帧。表为每轮P95/P99/max再取三轮中位数,不把它称所有样本聚合P99。++| 输入 | 优先级 | Present P95 ms | P99 ms | max ms | GPU就绪滚动P95中位 ms | 竞争Graph完成/s |+|---|---|---:|---:|---:|---:|---:|+| M1 30Hz | Normal | 33.8545 | 34.0324 | 38.2812 | 19.671 | 29.0455 |+| M1 30Hz | High | 33.8166 | 33.9923 | 37.6997 | 19.867 | 29.0009 |+| M1 30Hz | Realtime | 33.8263 | 34.0280 | 40.5258 | 11.807 | 29.1079 |+| M10 60Hz | Normal | 17.6123 | 18.9184 | 40.7287 | 32.3215 | 14.5448 |+| M10 60Hz | High | 17.5489 | 19.0063 | 35.5948 | 32.2205 | 14.5238 |+| M10 60Hz | Realtime | 17.4517 | 17.6260 | 39.6298 | 12.1910 | 15.2195 |++Realtime对M10 P99改善6.83%、GPU就绪估计减少62.28%,竞争Graph吞吐增加4.64%;M1的极端max增加5.86%,不能据平均/就绪收益宣称所有尖峰改善。High M10 P99反而增加0.46%,M1就绪增加约1%,无足以改默认的稳定收益。因此拒绝原计划“默认High”,维持Normal,保留供用户自选的优先级能力,Realtime不默认。全部是软件Present返回和GPU时间戳估计,不是物理面板帧率/端到端延迟。CPU/GPU频率/整卡占用仍在每秒meters中,未锁频。++M10由现有10秒合成translation素材重定时循环生成60秒,3600帧、60/1,前600帧无相邻重复,SHA4f588d4c8eb4945f83986b5a9710b630b25327375570c85c2e68561f9bef40f1;M2同方法为4K60,SHA19482f441ee53f8ed35b2b95da343b18d2fce5764181aefb45bb4c32c46fa943。它们不是真实主机或电影素材,来源/编码命令/framemd5/ffprobe在authored-media-v1 manifest。缓存/其他待建产品源码未用于18组计时:测试使用封存5c EXE bf4952347424f500df45a29ab3f7289742e4ecae188ac66b71805b9743978568。产品首选项/实际生效/画面导出回归仍待。diff --git a/docs/WORKLOG.md b/docs/WORKLOG.mdindex 66638139..640f982e 100644--- a/docs/WORKLOG.md+++ b/docs/WORKLOG.md@@ -8208,3 +8208,10 @@ release. 5090 live acceptance, 15-second hitch and user flicker remain unresolve## 2026-10-04 PERF 3a API时机反例build-priority-load-v1 2步exit0。本轮三NR竞争fixture SHA a46c2923ab4b7a200ad9028de442377d7b5e0214d473722be4dabb4681014e2b。nr-priority.py B5c 3a-competition-v1 的Set/Get全部0xC000000D/applied=false,不能作为Normal/High/Realtime比较。只读已运行的本轮两个GPU进程Get均0/class2;修正为实际GPU上下文就绪后设置,完整Get失败重试序列与最终读回记录。v1前三完整组证据保留,第四owned load经其stop文件正常停止,driver对方早停断言exit1;没有强关用户应用。下一轮3a-competition-v2重新交错九组。+++## 2026-10-04 PERF 3a有效18组与2c候选++3a-competition-v2真30Hz与3a-competition-v3-60合成60Hz各九组exit0;三档实际读回2/4/5,全组无预览跳帧/debug/device异常。60Hz Realtime软件Present P99 18.9184→17.6260ms(-6.83%),竞争Graph14.5448→15.2195完成/s(+4.64%);30Hz max退化5.86%,不能称全尖峰改进。High无稳定收益,否决默认High,拟保留用户自选、默认Normal。原始日志/CSV/JSON/每秒环境均E:/项目/Veyra/logs/perf-nr-20261004/对应label。CPU-only nr-media.py生成M10/M2各60秒3600帧,前600无相邻重复,manifest/provenance/ffprobe/framemd5在authored-media-v1,明确合成而非实卡素材。没有GPU构建与计时重叠。++2c候选修改Engine图所有权为unique_ptr,单NR→全关最多缓存一份完整Graph,严格key、DLLmtime/尺寸及WDDM预算;FXoff图不再初始化Core,命中完整reset,压力/恢复/退出先释放缓存。全部仍待构建和原生/Qt验证,未计收益。规则/取舍见PERF_2C_RECENT_CACHE,测试50开关含自然不同片段、所有输出完整SHA及关键像素。新增实际VRAM测试注入limit与HRESULT日志,默认行为不变。diff --git a/scripts/perf/nr-media.py b/scripts/perf/nr-media.pynew file mode 100644index 00000000..0a4ec360--- /dev/null+++ b/scripts/perf/nr-media.py@@ -0,0 +1,38 @@+"""Own CPU-only synthetic timing stimuli, with provenance and decoded hashes."""+from pathlib import Path+import hashlib+import json+import os+import subprocess++base=Path('E:/项目/Veyra');task='perf-nr-20261004'+out=base/'tests/perf-matrix/media';out.mkdir(parents=True,exist_ok=True)+logs=base/'logs'/task/'authored-media-v1';logs.mkdir(exist_ok=False)+tmp=base/'tmp'/task/'authored-media-v1';tmp.mkdir(parents=True,exist_ok=False)+corpus=Path('C:/Users/123/Desktop/Veyra DLSS Video Player/loop/local/fixed_clips/corpus')+env=os.environ.copy();env.update(TEMP=str(tmp),TMP=str(tmp))+records=[]+for name,original in [('M10-1080p60-synthetic',corpus/'translation_1080p60.mp4'),('M2',corpus/'translation_4k60.mp4')]:+ target=out/(name+'.mkv');assert not target.exists()+ command=['ffmpeg','-v','warning','-nostdin','-n','-stream_loop','-1','-i',str(original),+ '-t','60','-vf','setpts=N/(60*TB)','-an','-c:v','libx264','-preset','ultrafast','-crf','18',+ '-threads','4','-pix_fmt','yuv420p','-color_range','tv','-colorspace','bt709',+ '-color_primaries','bt709','-color_trc','bt709',str(target)]+ with (logs/(name+'-encode.log')).open('xb') as f:+ subprocess.run(command,env=env,stdout=f,stderr=subprocess.STDOUT,check=True,timeout=280)+ probe=subprocess.run(['ffprobe','-v','error','-count_frames','-show_entries',+ 'stream=width,height,r_frame_rate,avg_frame_rate,nb_read_frames:format=duration',+ '-of','json',str(target)],env=env,capture_output=True,text=True,check=True,timeout=120)+ info=json.loads(probe.stdout);assert int(info['streams'][0]['nb_read_frames'])==3600+ md5=logs/(name+'-first600.framemd5')+ subprocess.run(['ffmpeg','-v','error','-nostdin','-n','-i',str(target),'-frames:v','600',+ '-an','-f','framemd5',str(md5)],env=env,check=True,timeout=180)+ hashes=[s.split(',')[-1].strip() for s in md5.read_text().splitlines() if s and not s.startswith('#')]+ assert len(hashes)==600+ adjacent=sum(a==b for a,b in zip(hashes,hashes[1:]))+ record={'id':name,'path':str(target),'sha256':hashlib.file_digest(target.open('rb'),'sha256').hexdigest(),+ 'source':str(original),'sourceSha256':hashlib.file_digest(original.open('rb'),'sha256').hexdigest(),+ 'provenance':'Existing authored synthetic translation corpus; repeated 10-second motion, re-timed to exact 60Hz. Not real footage or console capture.',+ 'command':command,'ffprobe':info,'checkedDecodedFrames':600,'adjacentDuplicateCount':adjacent}+ records.append(record);print(json.dumps(record,ensure_ascii=False),flush=True)+with (logs/'manifest.json').open('x',encoding='utf-8') as f:json.dump(records,f,ensure_ascii=False,indent=2)diff --git a/scripts/perf/nr-priority.py b/scripts/perf/nr-priority.pyindex 1856bbc1..325d987d 100644--- a/scripts/perf/nr-priority.py+++ b/scripts/perf/nr-priority.py@@ -21,7 +21,7 @@ def set_owned(proc,priority):before=ctypes.c_int(-1);after=ctypes.c_int(-1)a=get(int(proc._handle),ctypes.byref(before));b=set_priority(int(proc._handle),priority);c=get(int(proc._handle),ctypes.byref(after))return {'pid':proc.pid,'beforeStatus':hex(a&0xffffffff),'beforeClass':before.value,'setStatus':hex(b&0xffffffff),'afterStatus':hex(c&0xffffffff),'afterClass':after.value,'applied':a==b==c==0 and after.value==priority}-variant,label=sys.argv[1:3];matrix.assert_gpu_tests_idle()+variant,label=sys.argv[1:3];material=sys.argv[3] if len(sys.argv)>3 else 'M1';matrix.assert_gpu_tests_idle()app=BASE/'tests'/TASK/(label+'-load-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)shutil.copy2(BASE/'build'/TASK/variant/'veyra_nr_gpu_competition_load.exe',app/'veyra_nr_gpu_competition_load.exe')@@ -51,7 +51,7 @@ for repeat,order in enumerate(orders,1):priority=set_owned(load,2)assert priority['applied'], 'Owned GPU load priority was not actually applied'target_begin=time.monotonic()- matrix.run(variant,'M1','S3',run_label,50,gpuPriority=classes[name],allowedGpuPids=(load.pid,))+ matrix.run(variant,material,'S3',run_label,50,gpuPriority=classes[name],allowedGpuPids=(load.pid,))target_end=time.monotonic()assert load.poll() is None,'competition load ended before target'(out/'stop').write_text('owned fixture completed',encoding='utf-8');rc=load.wait(timeout=20)@@ -70,7 +70,7 @@ for repeat,order in enumerate(orders,1):with (out/'completed.csv').open(encoding='utf-8') as f:rows=list(csv.DictReader(f))ready_utc=int(re.search(r'NR_PERF_READY (\d+)',log).group(1))/1000stable=[float(row['completedFps']) for row in rows if ready_utc+10<float(row['wallUtc'])<ready_utc+45];assert len(stable)>15- result={'label':run_label,'priorityRequested':name,'loadPriority':priority,'targetPriority':receipt['gpuPriority'],+ result={'label':run_label,'material':material,'priorityRequested':name,'loadPriority':priority,'targetPriority':receipt['gpuPriority'],'loadExeSha256':matrix.digest(app/'veyra_nr_gpu_competition_load.exe'),'targetExeSha256':receipt['exeSha256'],'loadCompletedFpsMedian':statistics.median(stable),'loadCompletedFpsRange':[min(stable),max(stable)],'presentIntervalsMs':{'p50':percentile(intervals,.5),'p95':percentile(intervals,.95),'p99':percentile(intervals,.99),'max':max(intervals),'count':len(intervals)},