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++
fix: a repeated present no longer resets the XeSS/FSR provider history; make FG admission strictness a switch
Veyra Goal Agentd9da38407bb6
diff --git a/include/veyra/engine/EnhancementSettings.h b/include/veyra/engine/EnhancementSettings.hindex 1e8755f8..7af67df1 100644--- a/include/veyra/engine/EnhancementSettings.h+++ b/include/veyra/engine/EnhancementSettings.h@@ -107,6 +107,17 @@ struct EnhancementSettings {bool lowLatency=false; // preview only: NR before SR, opt-inNrRuntime nrRuntime=NrRuntime::Original;bool nrTemporal=false; // optional motion-reprojected residual stabilization+ // Frame-generation admission strictness.+ // false (default): a group is admitted when the whole group can still+ // reach its LAST deadline, which is what 1.4.0 did. More generated+ // frames; some early outputs in a group may arrive late.+ // true: the FIRST generated output must also reach its own deadline,+ // which at 6X is one sixth of a source interval. Rejects whole groups+ // whose early outputs are already doomed, so the cadence is stricter+ // but fewer frames are generated - measured 3.75 generated per source+ // frame at 6X against 1.4.0 hitting the full 3.0 of 3 at 4X.+ // Users reported 1.4.0 feeling better, so the looser rule is the default.+ bool fgStrictAdmission=false;bool captureCompatible=false;// Capture audio ingress; requires a reconnect to take effect (the media type// is negotiated when the graph is built).diff --git a/include/veyra/engine/FgRecoveryBudget.h b/include/veyra/engine/FgRecoveryBudget.hindex 117b594e..f10a60e8 100644--- a/include/veyra/engine/FgRecoveryBudget.h+++ b/include/veyra/engine/FgRecoveryBudget.h@@ -81,8 +81,12 @@ public:bool admit(int64_t now,int64_t deadline,double elapsed,double present,bool warmingHistory=false,double queuedMs=0){return recordAdmission(canAdmit(now,deadline,elapsed,present,warmingHistory,queuedMs));}+ // strictFirstOutput=false reproduces the 1.4.0 rule: only the whole group+ // against its last deadline. true additionally requires the first output to+ // reach its own deadline; see EnhancementSettings::fgStrictAdmission.bool admitFile(int64_t now,int64_t firstDeadline,int64_t lastDeadline,int64_t outputInterval,- double elapsed,double present,std::optional<double> firstFgMs,bool warmingHistory,double queuedMs){+ double elapsed,double present,std::optional<double> firstFgMs,bool warmingHistory,double queuedMs,+ bool strictFirstOutput=true){const auto whole=predicted(now,warmingHistory),base=baseCost(now);if(warmingHistory||!whole||!base||!firstFgMs||!std::isfinite(*firstFgMs)||*firstFgMs<0)return admit(now,lastDeadline,elapsed,present,warmingHistory,queuedMs);@@ -94,7 +98,7 @@ public:};// The first output must be reachable too: the last deadline alone can// admit a whole MFG group whose early outputs are already doomed.- return recordAdmission(fits(firstDeadline,*base+*firstFgMs)&&fits(lastDeadline,*whole));+ return recordAdmission((!strictFirstOutput||fits(firstDeadline,*base+*firstFgMs))&&fits(lastDeadline,*whole));}// Reduced-group affordability: base work plus ONE measured first// interpolation must reach the pair midpoint. Does not touch recoverydiff --git a/scripts/acceptance/__pycache__/fg-utilization-matrix.cpython-311.pyc b/scripts/acceptance/__pycache__/fg-utilization-matrix.cpython-311.pycnew file mode 100644index 00000000..258d6f81Binary files /dev/null and b/scripts/acceptance/__pycache__/fg-utilization-matrix.cpython-311.pyc differdiff --git a/src/engine/EngineController.cpp b/src/engine/EngineController.cppindex 3973dd2f..4c0e4482 100644--- a/src/engine/EngineController.cpp+++ b/src/engine/EngineController.cpp@@ -1226,7 +1226,7 @@ void EngineController::run(HWND window,std::wstring path,PlayerOptions options,sconst auto firstDeadline=now+firstPts-media,deadline=now+lastGenerated-media;const auto first=frameFlow->snapshot(now).gpuTiming[size_t(diagnostics::GpuStage::Fg1)].p95;const auto elapsed=elapsedMs(processStart),blit=livePresentGpu.p95();- const auto admitted=fgBudget.admitFile(now,firstDeadline,deadline,interval/previewFgMultiplier,elapsed,blit,first,warmingHistory,queuedGpuMs);+ const auto admitted=fgBudget.admitFile(now,firstDeadline,deadline,interval/previewFgMultiplier,elapsed,blit,first,warmingHistory,queuedGpuMs,options.settings.fgStrictAdmission);logAdmission(batch,now,deadline,elapsed,blit,admitted,warmingHistory,"file-audio",firstDeadline,queuedGpuMs);if(admitted)return pipeline::EnhanceGraph::FgDecision::Evaluate;// Over budget for the full group: emit a presentable 2Xdiff --git a/src/engine/VideoPresenter.cpp b/src/engine/VideoPresenter.cppindex 76a57f5c..e5ea154a 100644--- a/src/engine/VideoPresenter.cpp+++ b/src/engine/VideoPresenter.cpp@@ -225,7 +225,16 @@ bool VideoPresenter::present(gfx::D3D12DeviceContext& ctx,gfx::CommandSlotRing&if(!xess->tag(list,bb,mapped,depth,fullBuffer,true,reset,elapsed)){xessFailed_=true;return false;}gpuTimer_.mark(list,diagnostics::GpuStage::FgBatch,true);}else if(!xess->tag(list,bb,motion,depth,fgRect,false,reset,elapsed)){xessFailed_=true;return false;}- lastXessFrame_=now;lastXessIdentity_=identity;xessWasEnabled_=enabled;lastXessPts100ns_=sourcePts100ns;+ // A present that carried no NEW source frame is a repeat, not a+ // discontinuity: the provider's history is still valid, there is just+ // nothing new to interpolate from. Clearing the flag on a repeat made+ // the very next frame set reset=1, so under load the provider re-warmed+ // at the repeat rate - which is the XeSS flicker users reported+ // (2026-09-22). Only a real gap invalidates the history.+ const bool xessRepeatOnly=identity.sourceFrameId==lastXessIdentity_.sourceFrameId;+ lastXessFrame_=now;xessWasEnabled_=enabled||(xessWasEnabled_&&xessRepeatOnly);+ if(!xessRepeatOnly)lastXessIdentity_=identity;else lastXessIdentity_.epoch=identity.epoch,lastXessIdentity_.settingsRevision=identity.settingsRevision;+ if(enabled)lastXessPts100ns_=sourcePts100ns;previousXessView_=view;previousXessWidth_=rc.right;previousXessHeight_=rc.bottom;}if(auto* fsr=sink_.fsr()){@@ -239,7 +248,10 @@ bool VideoPresenter::present(gfx::D3D12DeviceContext& ctx,gfx::CommandSlotRing&if(!fsr->tag(list,bb,graph.presentMotion(slot),graph.presentDepth(),fgRect,enabled,reset,elapsed))fsrFailed_=true;if(enabled)gpuTimer_.mark(list,diagnostics::GpuStage::FgBatch,true);if(sink_.fsr()->failed())fsrFailed_=true;- lastFsrFrame_=now;lastFsrIdentity_=identity;fsrWasEnabled_=enabled;+ // Same repeat rule as XeSS above.+ const bool fsrRepeatOnly=identity.sourceFrameId==lastFsrIdentity_.sourceFrameId;+ lastFsrFrame_=now;fsrWasEnabled_=enabled||(fsrWasEnabled_&&fsrRepeatOnly);+ if(!fsrRepeatOnly)lastFsrIdentity_=identity;else lastFsrIdentity_.epoch=identity.epoch,lastFsrIdentity_.settingsRevision=identity.settingsRevision;}gpuTimer_.mark(list,diagnostics::GpuStage::Blit,true);gpuTimer_.resolve(list);if(!ring.submitAndSignal(commandSlot))return false;gpuTimer_.submitted(ring.lastSignaledValue());lastBuffer_=backBufferIndex;hasPresented_=true;