aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorCrystalP <CrystalP@xbmc.org>2011-01-31 02:47:18 -0500
committerCrystalP <CrystalP@xbmc.org>2011-02-06 20:45:14 -0500
commit3d246e09f59bbca661570624bde000d62d79408a (patch)
treece56c1a3a6819ab9bf701610532bfb6b16997011 /system
parent6e2c48f4f4677ed7ae22aa2a8b0edaade9a80fee (diff)
[WIN32] add nv12 rendering (software and ps)
Diffstat (limited to 'system')
-rw-r--r--system/shaders/yuv2rgb_d3d.fx6
1 files changed, 6 insertions, 0 deletions
diff --git a/system/shaders/yuv2rgb_d3d.fx b/system/shaders/yuv2rgb_d3d.fx
index 833bbadd43..1f39734781 100644
--- a/system/shaders/yuv2rgb_d3d.fx
+++ b/system/shaders/yuv2rgb_d3d.fx
@@ -87,10 +87,16 @@ struct PS_OUTPUT
PS_OUTPUT YUV2RGB( VS_OUTPUT In)
{
PS_OUTPUT OUT;
+#if defined(XBMC_YV12)
float4 YUV = float4(tex2D (YSampler, In.TextureY).x
, tex2D (USampler, In.TextureU).x
, tex2D (VSampler, In.TextureV).x
, 1.0);
+#elif defined(XBMC_NV12)
+ float4 YUV = float4(tex2D (YSampler, In.TextureY).x
+ , tex2D (USampler, In.TextureU).ra
+ , 1.0);
+#endif
OUT.RGBColor = mul(YUV, g_ColorMatrix);
OUT.RGBColor.a = 1.0;
return OUT;