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++

feat(capture): probe Dolby/DTS bitstream capability; test hook for the Ada MFG experiment

Veyra Goal Agente68b79d0ae80
diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md
index f3be709f..a3bbcab7 100644
--- a/THIRD_PARTY_NOTICES.md
+++ b/THIRD_PARTY_NOTICES.md
@@ -16,6 +16,12 @@ The PS5 H.264 repair build additionally applies `scripts/ffmpeg/ps5-h264-slices.
Official XeSS SDK 3.0.2. Veyra loads `libxess_fg.dll` and `libxell.dll` for experimental preview frame generation. Unmodified binaries may be redistributed under the Intel Simplified Software License; the complete license and `third-party-programs.txt` accompany the package. User DLL replacement is allowed by Veyra without fixed identity locks; compatibility is not guaranteed.
+### XeSS multi-frame unlock (ported, process-memory only)
+
+Source: https://github.com/Coldwood1026/OptiScaler , commit `70676c5f037c8c26f1ec355b250a72303cd268da`, files `OptiScaler/proxies/XeFGUnlock.h` and `XeFGPacing.h` (GPL-3.0). The five byte patches that raise the provider's generated-frame ceiling on non-Intel GPUs are ported into `include/veyra/gfx/XessMfgUnlock.h` / `src/gfx/XessMfgUnlock.cpp`; the structural design (module identity checks, transactional install, rollback after the contexts exit) follows `SAOG0721/Magpie` (`experimental` branch, GPL-3.0, `XeSSFGCompatibility.h` / `XeSSFGPatchTransaction.h`). Veyra adds size + SHA-256 + PE identity checks and refuses unaudited provider builds.
+
+The provider DLL on disk is never modified, re-signed or renamed; only the mapped image of the process is patched, and every patched byte is restored when the XeFG/XeLL contexts are destroyed. Because Veyra itself is GPLv3, the ported GPL-3.0 code is compatible; the upstream authorship above is attributed here. Locked provider identity: `libxess_fg.dll` 1.3.1.78, 22,957,432 bytes, SHA-256 `EC5E0C65E075570C6EDE72618BB666D0BE0C2E10B2EA9762C0FE8CB8E375AB27`, PE TimeDateStamp `0x69CB0F4D`, SizeOfImage `0x015ED000`.
+
## AMD FidelityFX Optical Flow
FidelityFX SDK 1.1.4, upstream commit `c6efa6bf7f2027b3ec94f28578bb5965eabb9e55`, https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK . The optical-flow and DX12 backend libraries are statically linked. Copyright (C) 2024 Advanced Micro Devices, Inc.; MIT license, reproduced in the package's `licenses/AMD_FIDELITYFX_LICENSE.txt`. This is optical flow, not AMD NR or AMD super resolution.
diff --git a/src/pipeline/EnhanceGraph.cpp b/src/pipeline/EnhanceGraph.cpp
index b12e615f..65020fd7 100644
--- a/src/pipeline/EnhanceGraph.cpp
+++ b/src/pipeline/EnhanceGraph.cpp
@@ -411,7 +411,17 @@ bool EnhanceGraph::initNgxFeatures()
}
veyra::log::info("graph", std::format("FG capability available={} multiFrameMax={}",
fgCaps.available, fgCaps.multiFrameCountMax));
- if(desc_.enableFg&&(desc_.fgMultiplier<2||desc_.fgMultiplier>6||fgCaps.multiFrameCountMax<desc_.fgMultiplier-1)){veyra::log::error("graph",std::format("requested MFG multiplier unsupported request={} maxGeneratedFrames={}",desc_.fgMultiplier,fgCaps.multiFrameCountMax));return false;}
+ // Test-only research path for the Ada (40-series) MFG unlock: with
+ // VEYRA_TEST_FG_FORCE_MULTIPLIER=1 the reported capability no longer
+ // rejects the request, so a 40-series host can show whether the runtime
+ // generates real frames (or repeats/black) when the gate is bypassed at
+ // the caller. Never reachable from the product UI.
+ const bool forceAboveCapability=GetEnvironmentVariableW(L"VEYRA_TEST_FG_FORCE_MULTIPLIER",nullptr,0)>0;
+ const bool aboveCapability=desc_.enableFg&&fgCaps.multiFrameCountMax<desc_.fgMultiplier-1;
+ if(aboveCapability&&forceAboveCapability){
+ veyra::log::warn("capability",std::format("test-only FG multiplier forced above capability request={} maxGeneratedFrames={}",desc_.fgMultiplier,fgCaps.multiFrameCountMax));
+ }
+ if(desc_.enableFg&&(desc_.fgMultiplier<2||desc_.fgMultiplier>6||(aboveCapability&&!forceAboveCapability))){veyra::log::error("graph",std::format("requested MFG multiplier unsupported request={} maxGeneratedFrames={}",desc_.fgMultiplier,fgCaps.multiFrameCountMax));return false;}
}
if(nrEnabled_){
diff --git a/src/source/CaptureCardSource.cpp b/src/source/CaptureCardSource.cpp
index 537d6a1a..5b74c735 100644
--- a/src/source/CaptureCardSource.cpp
+++ b/src/source/CaptureCardSource.cpp
@@ -329,17 +329,45 @@ bool CaptureCardSource::connectDirectShowAudio(const SourceOpenDesc& desc){
// commonly stereo first even when native 5.1 is available.
auto releaseType=[](AM_MEDIA_TYPE* type){freeType(type);};
using AudioType=std::unique_ptr<AM_MEDIA_TYPE,decltype(releaseType)>;
- std::vector<AudioType> audioTypes;unsigned typeIndex=0;
- for(;;){AM_MEDIA_TYPE* type=nullptr;if(types->Next(1,&type,nullptr)!=S_OK||!type)break;
- AudioType owned(type,releaseType);sink::WavePcmFormat pcm;bool supported=false;
- if(type->formattype==FORMAT_WaveFormatEx&&type->pbFormat)supported=sink::parseWavePcm(type->pbFormat,type->cbFormat,pcm);
+std::vector<AudioType> audioTypes;unsigned typeIndex=0;
+// Dolby/DTS bitstream capability probe: the capture card may expose AC-3 /
+// E-AC-3 (Dolby Digital Plus, includes Atmos over DD+) / TrueHD / DTS instead
+// of PCM. Veyra currently consumes PCM only, so a compressed stream is reported
+// here (and then ignored) instead of being silently mis-parsed. Dolby passthrough
+// work builds on this inventory.
+unsigned bitstreamTypeCount=0;std::string bitstreamSummary;
+auto bitstreamName=[](const GUID& subtype)->const char*{
+ switch(subtype.Data1){
+ case 0x00000092u:return "AC-3(SPDIF)";
+ case 0x00002000u:return "AC-3";
+ case 0x0000000Au:return "E-AC-3/DD+";
+ case 0x0000010Au:return "E-AC-3/DD+ Atmos";
+ case 0x0000000Cu:return "TrueHD/MLP";
+ case 0x00000008u:return "DTS";
+ case 0x0000000Bu:return "DTS-HD";
+ case 0x0000010Bu:return "DTS:X(E1)";
+ case 0x0000030Bu:return "DTS:X(E2)";
+ default:return nullptr;
+ }
+};
+for(;;){AM_MEDIA_TYPE* type=nullptr;if(types->Next(1,&type,nullptr)!=S_OK||!type)break;
+AudioType owned(type,releaseType);sink::WavePcmFormat pcm;bool supported=false;
+if(type->formattype==FORMAT_WaveFormatEx&&type->pbFormat)supported=sink::parseWavePcm(type->pbFormat,type->cbFormat,pcm);
+if(!supported){
+ const char* name=bitstreamName(type->subtype);
+if(name){
+ ++bitstreamTypeCount;if(!bitstreamSummary.empty())bitstreamSummary+=",";bitstreamSummary+=name;
+ log::info("capture-audio-bitstream",std::string("mediaType=")+std::to_string(typeIndex)+" subtype=0x"+std::format("{:08X}",unsigned(type->subtype.Data1))+" kind="+name+" (not consumed yet)");
+}
+}
if(type->formattype==FORMAT_WaveFormatEx&&type->pbFormat&&type->cbFormat>=sizeof(WAVEFORMATEX)){
const auto* wave=reinterpret_cast<const WAVEFORMATEX*>(type->pbFormat);
log::info("capture-audio",std::format("mediaType={} major=0x{:08X} subtype=0x{:08X} tag={} channels={} mask=0x{:X} rate={} containerBits={} validBits={} floating={} pcm={}",typeIndex++,type->majortype.Data1,type->subtype.Data1,wave->wFormatTag,wave->nChannels,supported?pcm.layout.mask:0,wave->nSamplesPerSec,wave->wBitsPerSample,supported?pcm.validBits:0,supported&&pcm.floating?1:0,supported?1:0));
}else log::info("capture-audio",std::format("mediaType={} major=0x{:08X} subtype=0x{:08X} format=0x{:08X} pcm=0",typeIndex++,type->majortype.Data1,type->subtype.Data1,type->formattype.Data1));
if(supported)audioTypes.push_back(std::move(owned));
}
- if(audioTypes.empty()){log::warn("capture-audio","audio pin has no supported PCM media type");return false;}
+log::info("capture-audio-bitstream",std::format("device bitstream types={} [{}] pcmTypes={}",bitstreamTypeCount,bitstreamSummary.empty()?"none":bitstreamSummary,audioTypes.size()));
+if(audioTypes.empty()){log::warn("capture-audio","audio pin has no supported PCM media type");return false;}
std::stable_sort(audioTypes.begin(),audioTypes.end(),[](const auto& a,const auto& b){
sink::WavePcmFormat lhs{},rhs{};
if(!sink::parseWavePcm(a->pbFormat,a->cbFormat,lhs)||!sink::parseWavePcm(b->pbFormat,b->cbFormat,rhs))return false;