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++
1.5 KB
Raw Blame
// Distribution note (2026-09-09): project-owned additions and modifications
// are licensed under Apache-2.0. Upstream portions retain their original
// licenses and attribution; see NOTICE, PROVENANCE.md and licenses/.
// OpenCV DIS/reference-derived portions retain Intel (2000-2008), Willow
// Garage (2009) and other upstream copyrights and BSD/Apache terms.
// See licenses/OPENCV_DIS_BSD_HEADER.txt and OPENCV_APACHE_LICENSE.txt.

// Motion-input adapter, not a decoder. Reuses A's surface_nv12_color.hlsl
// FFmpeg 7.1 SSSE3 integer organization, followed by OpenCV RGB2GRAY.
// Only 8-bit limited BT.601/709 is accepted by the host. No full-range guess.
Texture2D<float> Luma : register(t0);
Texture2D<float2> Chroma : register(t1);
RWTexture2D<float> Gray : register(u0);
cbuffer Params : register(b0) {
    uint width; uint height; uint cropX; uint cropY; uint matrix709; uint reserved;
};
[numthreads(8,8,1)]
void main(uint3 id : SV_DispatchThreadID) {
    if(id.x>=width || id.y>=height) return;
    uint2 p=id.xy+uint2(cropX,cropY);
    int y=(int)(Luma.Load(int3(p,0))*255.0+0.5);
    int2 uv=(int2)(Chroma.Load(int3(p>>1,0))*255.0+0.5);
    int yc=(((y<<3)-128)*9539)>>16;
    int u=(uv.x<<3)-1024,v=(uv.y<<3)-1024;
    uint r=(uint)clamp(yc+((v*(matrix709?14686:13075))>>16),0,255);
    uint g=(uint)clamp(yc+((u*(matrix709?-1747:-3209))>>16)+((v*(matrix709?-4366:-6660))>>16),0,255);
    uint b=(uint)clamp(yc+((u*(matrix709?17305:16525))>>16),0,255);
    Gray[id.xy]=(float)((9798u*r+19235u*g+3735u*b+16384u)>>15);
}