diff options
author | Casimir666 <casimir666@users.sourceforge.net> | 2008-05-24 14:09:25 +0400 |
---|---|---|
committer | Casimir666 <casimir666@users.sourceforge.net> | 2008-05-24 14:09:25 +0400 |
commit | 5d74fbc888daeb3de48063050ad794875a9c4211 (patch) | |
tree | 5249b4cc78905827a71353f50192f0ae1faa11c6 /src/apps/mplayerc/res | |
parent | 1851fd89dfdb21efb5c2e3dff5b1285075e53a28 (diff) |
Random crash with EVR custom, memory leak DXVA, crash on DXVA when playing video twice, cleanup on shader resources
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@521 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/apps/mplayerc/res')
-rw-r--r-- | src/apps/mplayerc/res/shaders/levels.psh | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/src/apps/mplayerc/res/shaders/levels.psh b/src/apps/mplayerc/res/shaders/levels.psh index 8d756841a..6b36fb5a6 100644 --- a/src/apps/mplayerc/res/shaders/levels.psh +++ b/src/apps/mplayerc/res/shaders/levels.psh @@ -1,9 +1,26 @@ -sampler s0 : register(s0);
+sampler s0 : register(s0);
+float4 p0 : register(c0);
+float4 p1 : register(c1);
-#define Const_1 (16.0/255.0)
-#define Const_2 (255.0/219.0)
+#define width (p0[0])
+#define height (p0[1])
+#define counter (p0[2])
+#define clock (p0[3])
+#define one_over_width (p1[0])
+#define one_over_height (p1[1])
-float4 main(float2 tex : TEXCOORD0) : COLOR
+#define PI acos(-1)
+
+#define Const_1 (16.0/255.0)
+#define Const_2 (255.0/219.0)
+
+float4 main(float2 tex : TEXCOORD0) : COLOR
{
- return( ( tex2D( s0, tex ) - Const_1 ) * Const_2 );
+// #### Uncomment this part to limit TV->PC level to SD files
+// if (height < 720)
+// return( ( tex2D( s0, tex ) - Const_1 ) * Const_2 );
+// else
+// return tex2D( s0, tex );
+
+ return( ( tex2D( s0, tex ) - Const_1 ) * Const_2 );
}
|