Implement YUV 4:4:4 decoding with D3D11VA on Intel GPUs

This commit is contained in:
Cameron Gutman
2024-07-30 21:12:11 -05:00
parent 6c6f808365
commit 0bb0d27d64
10 changed files with 223 additions and 100 deletions
+13
View File
@@ -0,0 +1,13 @@
min16float4 main(ShaderInput input) : SV_TARGET
{
// Clamp the texcoords to avoid sampling the row of texels adjacent to the alignment padding
min16float3 yuv = swizzle(videoTex.Sample(theSampler, min(input.tex, chromaTexMax.rg)));
// Subtract the YUV offset for limited vs full range
yuv -= offsets;
// Multiply by the conversion matrix for this colorspace
yuv = mul(yuv, cscMatrix);
return min16float4(yuv, 1.0);
}