Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorclsid2 <clsid2@users.sourceforge.net>2009-12-15 13:24:45 +0300
committerclsid2 <clsid2@users.sourceforge.net>2009-12-15 13:24:45 +0300
commit255b9e316821fc12e09400c871a6d964229488c5 (patch)
treeb93d39f80fceb92a0037a596efd8a593ba1f5665 /src
parentfd25905c6b0b466967ab075a46cc10394d9da18f (diff)
Minor changes
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1418 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src')
-rw-r--r--src/apps/mplayerc/Struct.h4
-rw-r--r--src/apps/mplayerc/res/shaders/SharpenComplex2.psh155
-rw-r--r--src/apps/mplayerc/res/shaders/levels2.psh8
-rw-r--r--src/filters/filters.sln14
-rw-r--r--src/filters/parser/flvsplitter/FLVSplitter.vcproj2
-rw-r--r--src/filters/renderer/MpcAudioRenderer/MpcAudioRendererFilter.vcproj8
6 files changed, 91 insertions, 100 deletions
diff --git a/src/apps/mplayerc/Struct.h b/src/apps/mplayerc/Struct.h
index 695d4fd77..cffe115c7 100644
--- a/src/apps/mplayerc/Struct.h
+++ b/src/apps/mplayerc/Struct.h
@@ -19,7 +19,9 @@
typedef LONG NTSTATUS, *PNTSTATUS;
typedef LONG KPRIORITY;
-//#define NT_SUCCESS(Status) ((NTSTATUS)(Status) >= 0)
+#ifndef NT_SUCCESS
+#define NT_SUCCESS(Status) ((NTSTATUS)(Status) >= 0)
+#endif
typedef void (CALLBACK *PKNORMAL_ROUTINE)(PVOID, PVOID, PVOID);
diff --git a/src/apps/mplayerc/res/shaders/SharpenComplex2.psh b/src/apps/mplayerc/res/shaders/SharpenComplex2.psh
index db4f21a12..6f930bdd3 100644
--- a/src/apps/mplayerc/res/shaders/SharpenComplex2.psh
+++ b/src/apps/mplayerc/res/shaders/SharpenComplex2.psh
@@ -1,22 +1,19 @@
-////////////////////////////////////////////////////
-// Sharpen complex v2 (nécessite ps >=2a)
-////////////////////////////////////////////////////
-sampler s0 : register(s0);
-float4 p0 : register(c0);
-float4 p1 : register(c1);
+/* Sharpen complex v2 (requires ps >= 2a) */
+
+sampler s0 : register(s0);
+float4 p0 : register(c0);
+float4 p1 : register(c1);
+
+#define width (p0[0])
+#define height (p0[1])
-// résolution de l'image
-#define width (p0[0])
-#define height (p0[1])
// "largeur" d'un pixel
#define px (p1[0])
#define py (p1[1])
+/* Parameters */
-////////////////////////////////////////////////////
-// Paramètres
-////////////////////////////////////////////////////
- // pour le calcul du flou
+// pour le calcul du flou
#define moyenne 0.6
#define dx (moyenne*px)
#define dy (moyenne*py)
@@ -24,83 +21,71 @@ float4 p1 : register(c1);
#define CoefFlou 2
#define CoefOri (1+ CoefFlou)
- // pour le sharpen
-#define SharpenEdge 0.2
-#define Sharpen_val0 2
-#define Sharpen_val1 ((Sharpen_val0-1) / 8.0)
-
-
-////////////////////////////////////////////////////
-float4 main( float2 tex : TEXCOORD0 ) : COLOR
-{
- // recup du pixel original
- float4 ori = tex2D(s0, tex); ;
+// pour le sharpen
+#define SharpenEdge 0.2
+#define Sharpen_val0 2
+#define Sharpen_val1 ((Sharpen_val0-1) / 8.0)
-////////////////////////////////////////////////////
-// calcul image floue (filtre gaussien)
-////////////////////////////////////////////////////
- float4 c1 = tex2D(s0, tex + float2(-dx,-dy));
- float4 c2 = tex2D(s0, tex + float2(0,-dy));
- float4 c3 = tex2D(s0, tex + float2(dx,-dy));
- float4 c4 = tex2D(s0, tex + float2(-dx,0));
- float4 c5 = tex2D(s0, tex + float2(dx,0));
- float4 c6 = tex2D(s0, tex + float2(-dx,dy));
- float4 c7 = tex2D(s0, tex + float2(0,dy));
- float4 c8 = tex2D(s0, tex + float2(dx,dy));
+float4 main( float2 tex : TEXCOORD0 ) : COLOR
+{
+ // recup du pixel original
+ float4 ori = tex2D(s0, tex); ;
- // filtre gaussien
- // [ 1, 2 , 1 ]
- // [ 2, 4 , 2 ]
- // [ 1, 2 , 1 ]
- // pour normaliser les valeurs, il faut diviser par la somme des coef
- // 1 / (1+2+1+2+4+2+1+2+1) = 1 / 16 = .0625
- float4 flou = (c1+c3+c6+c8 + 2*(c2+c4+c5+c7)+ 4*ori)*0.0625;
+ // calcul image floue (filtre gaussien)
+ float4 c1 = tex2D(s0, tex + float2(-dx,-dy));
+ float4 c2 = tex2D(s0, tex + float2(0,-dy));
+ float4 c3 = tex2D(s0, tex + float2(dx,-dy));
+ float4 c4 = tex2D(s0, tex + float2(-dx,0));
+ float4 c5 = tex2D(s0, tex + float2(dx,0));
+ float4 c6 = tex2D(s0, tex + float2(-dx,dy));
+ float4 c7 = tex2D(s0, tex + float2(0,dy));
+ float4 c8 = tex2D(s0, tex + float2(dx,dy));
- // soustraction de l'image flou à l'image originale
- float4 cori = CoefOri*ori - CoefFlou*flou;
+ // filtre gaussien
+ // [ 1, 2 , 1 ]
+ // [ 2, 4 , 2 ]
+ // [ 1, 2 , 1 ]
+ // pour normaliser les valeurs, il faut diviser par la somme des coef
+ // 1 / (1+2+1+2+4+2+1+2+1) = 1 / 16 = .0625
+ float4 flou = (c1+c3+c6+c8 + 2*(c2+c4+c5+c7)+ 4*ori)*0.0625;
-////////////////////////////////////////////////////
-// détection des contours
-////////////////////////////////////////////////////
- // récuppération des 9 voisins
- // [ c1, c2 , c3 ]
- // [ c4,ori , c5 ]
- // [ c6, c7 , c8 ]
- c1 = tex2D(s0, tex + float2(-px,-py));
- c2 = tex2D(s0, tex + float2(0,-py));
- c3 = tex2D(s0, tex + float2(px,-py));
- c4 = tex2D(s0, tex + float2(-px,0));
- c5 = tex2D(s0, tex + float2(px,0));
- c6 = tex2D(s0, tex + float2(-px,py));
- c7 = tex2D(s0, tex + float2(0,py));
- c8 = tex2D(s0, tex + float2(px,py));
+ // soustraction de l'image flou à l'image originale
+ float4 cori = CoefOri*ori - CoefFlou*flou;
-// par filtre de sobel
- // Gradient horizontal
- // [ -1, 0 ,1 ]
- // [ -2, 0, 2 ]
- // [ -1, 0 ,1 ]
- float delta1 = (c3 + 2*c5 + c8)-(c1 + 2*c4 + c6);
+ // détection des contours
+ // récuppération des 9 voisins
+ // [ c1, c2 , c3 ]
+ // [ c4,ori , c5 ]
+ // [ c6, c7 , c8 ]
+ c1 = tex2D(s0, tex + float2(-px,-py));
+ c2 = tex2D(s0, tex + float2(0,-py));
+ c3 = tex2D(s0, tex + float2(px,-py));
+ c4 = tex2D(s0, tex + float2(-px,0));
+ c5 = tex2D(s0, tex + float2(px,0));
+ c6 = tex2D(s0, tex + float2(-px,py));
+ c7 = tex2D(s0, tex + float2(0,py));
+ c8 = tex2D(s0, tex + float2(px,py));
- // Gradient vertical
- // [ -1,- 2,-1 ]
- // [ 0, 0, 0 ]
- // [ 1, 2, 1 ]
- float delta2 = (c6 + 2*c7 + c8)-(c1 + 2*c2 + c3);
+ // par filtre de sobel
+ // Gradient horizontal
+ // [ -1, 0 ,1 ]
+ // [ -2, 0, 2 ]
+ // [ -1, 0 ,1 ]
+ float delta1 = (c3 + 2*c5 + c8)-(c1 + 2*c4 + c6);
- // calcul
- if( sqrt( mul(delta1,delta1) + mul(delta2,delta2) ) >SharpenEdge )
- {
-////////////////////////////////////////////////////
-// si contour, sharpen
- // return float4(1,0,0,0);
- return ori*Sharpen_val0 - (c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8 ) * Sharpen_val1 ;
- }
- else
- {
-////////////////////////////////////////////////////
-// sinon, image corrigée
- return cori;
- }
-}
+ // Gradient vertical
+ // [ -1,- 2,-1 ]
+ // [ 0, 0, 0 ]
+ // [ 1, 2, 1 ]
+ float delta2 = (c6 + 2*c7 + c8)-(c1 + 2*c2 + c3);
+ // calcul
+ if( sqrt( mul(delta1,delta1) + mul(delta2,delta2) ) >SharpenEdge ) {
+ // si contour, sharpen
+ //return float4(1,0,0,0);
+ return ori*Sharpen_val0 - (c1 + c2 + c3 + c4 + c5 + c6 + c7 + c8 ) * Sharpen_val1 ;
+ } else {
+ // sinon, image corrigée
+ return cori;
+ }
+} \ No newline at end of file
diff --git a/src/apps/mplayerc/res/shaders/levels2.psh b/src/apps/mplayerc/res/shaders/levels2.psh
index 6574faa14..047509979 100644
--- a/src/apps/mplayerc/res/shaders/levels2.psh
+++ b/src/apps/mplayerc/res/shaders/levels2.psh
@@ -2,7 +2,7 @@ sampler s0 : register(s0);
float4 p0 : register(c0);
#define height (p0[1])
-//#define width (p0[0])
+#define width (p0[0])
#define const_1 (16.0/255.0)
#define const_2 (255.0/219.0)
@@ -12,10 +12,10 @@ float4 main(float2 tex : TEXCOORD0) : COLOR
// original pixel
float4 c0 = tex2D(s0,tex);
- if(height > 719 ) {
- //if(width > 1279) {
+ /* ATI driver only looks at the height */
+ if(height >= 720 ) {
return c0;
} else {
return((c0 - const_1) * const_2);
}
-}
+} \ No newline at end of file
diff --git a/src/filters/filters.sln b/src/filters/filters.sln
index 113499e38..964100048 100644
--- a/src/filters/filters.sln
+++ b/src/filters/filters.sln
@@ -138,9 +138,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MpaDecFilter", "transform\m
{A7134255-DFF3-42F7-9BC2-FAC6E71CFFAE} = {A7134255-DFF3-42F7-9BC2-FAC6E71CFFAE}
{4CEFBC84-C215-11DB-8314-0800200C9A66} = {4CEFBC84-C215-11DB-8314-0800200C9A66}
{62FE6D94-E17C-4A8E-8D3C-7A589A70D865} = {62FE6D94-E17C-4A8E-8D3C-7A589A70D865}
+ {FAE14DBE-B508-4AB3-929D-75C68E4EBBC1} = {FAE14DBE-B508-4AB3-929D-75C68E4EBBC1}
{5EFCFACB-1835-422C-ACDA-E3B3A2F51387} = {5EFCFACB-1835-422C-ACDA-E3B3A2F51387}
{E8A3F6FA-AE1C-4C8E-A0B6-9C8480324EAA} = {E8A3F6FA-AE1C-4C8E-A0B6-9C8480324EAA}
- {FAE14DBE-B508-4AB3-929D-75C68E4EBBC1} = {FAE14DBE-B508-4AB3-929D-75C68E4EBBC1}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmad", "transform\mpadecfilter\libmad\msvc++\libmad.vcproj", "{D8365C15-2166-4DB6-8A2D-1C8F0239EB18}"
@@ -232,6 +232,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MP4Splitter", "parser\mp4sp
{37768B3F-89BC-4C16-B2A8-767C5DA84C3F} = {37768B3F-89BC-4C16-B2A8-767C5DA84C3F}
{273B3149-3192-4B75-A791-470320B90812} = {273B3149-3192-4B75-A791-470320B90812}
{2FCD4B66-9CF9-4C8F-BC70-37CD20002D49} = {2FCD4B66-9CF9-4C8F-BC70-37CD20002D49}
+ {FC70988B-1AE5-4381-866D-4F405E28AC42} = {FC70988B-1AE5-4381-866D-4F405E28AC42}
{E8A3F6FA-AE1C-4C8E-A0B6-9C8480324EAA} = {E8A3F6FA-AE1C-4C8E-A0B6-9C8480324EAA}
EndProjectSection
EndProject
@@ -252,6 +253,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FLVSplitter", "parser\flvsp
{54DDA60F-E528-4D07-A152-960A1E818680} = {54DDA60F-E528-4D07-A152-960A1E818680}
{37768B3F-89BC-4C16-B2A8-767C5DA84C3F} = {37768B3F-89BC-4C16-B2A8-767C5DA84C3F}
{273B3149-3192-4B75-A791-470320B90812} = {273B3149-3192-4B75-A791-470320B90812}
+ {FC70988B-1AE5-4381-866D-4F405E28AC42} = {FC70988B-1AE5-4381-866D-4F405E28AC42}
{E8A3F6FA-AE1C-4C8E-A0B6-9C8480324EAA} = {E8A3F6FA-AE1C-4C8E-A0B6-9C8480324EAA}
EndProjectSection
EndProject
@@ -309,13 +311,11 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MpcAudioRendererFilter", "renderer\MpcAudioRenderer\MpcAudioRendererFilter.vcproj", "{D0620EF4-1313-40D5-9069-A82F6FE26994}"
ProjectSection(ProjectDependencies) = postProject
{273B3149-3192-4B75-A791-470320B90812} = {273B3149-3192-4B75-A791-470320B90812}
+ {FC70988B-1AE5-4381-866D-4F405E28AC42} = {FC70988B-1AE5-4381-866D-4F405E28AC42}
+ {E8A3F6FA-AE1C-4C8E-A0B6-9C8480324EAA} = {E8A3F6FA-AE1C-4C8E-A0B6-9C8480324EAA}
EndProjectSection
EndProject
Global
- GlobalSection(SubversionScc) = preSolution
- Svn-Managed = True
- Manager = AnkhSVN - Subversion Support for Visual Studio
- EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug Unicode lib|Win32 = Debug Unicode lib|Win32
Debug Unicode lib|x64 = Debug Unicode lib|x64
@@ -1227,4 +1227,8 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(SubversionScc) = preSolution
+ Svn-Managed = True
+ Manager = AnkhSVN - Subversion Support for Visual Studio
+ EndGlobalSection
EndGlobal
diff --git a/src/filters/parser/flvsplitter/FLVSplitter.vcproj b/src/filters/parser/flvsplitter/FLVSplitter.vcproj
index fe2242a38..81cc61fb2 100644
--- a/src/filters/parser/flvsplitter/FLVSplitter.vcproj
+++ b/src/filters/parser/flvsplitter/FLVSplitter.vcproj
@@ -504,7 +504,7 @@
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\..\..\include;..\..\BaseClasses"
- PreprocessorDefinitions="REGISTER_FILTER;WIN32;NDEBUG;_USRDLL;NOVIDEOTWEAK"
+ PreprocessorDefinitions="REGISTER_FILTER;WIN32;NDEBUG;_USRDLL"
BufferSecurityCheck="true"
/>
<Tool
diff --git a/src/filters/renderer/MpcAudioRenderer/MpcAudioRendererFilter.vcproj b/src/filters/renderer/MpcAudioRenderer/MpcAudioRendererFilter.vcproj
index f4b3c0db3..f966d52f7 100644
--- a/src/filters/renderer/MpcAudioRenderer/MpcAudioRendererFilter.vcproj
+++ b/src/filters/renderer/MpcAudioRenderer/MpcAudioRendererFilter.vcproj
@@ -58,7 +58,7 @@
<Tool
Name="VCLinkerTool"
RegisterOutput="true"
- AdditionalDependencies="dsound.lib decssDU.lib dsutilDU.lib strmbaseDU.lib Winmm.lib Avrt.lib"
+ AdditionalDependencies="dsound.lib dsutilDU.lib strmbaseDU.lib Winmm.lib Avrt.lib"
OutputFile="$(OutDir)\$(ProjectName).ax"
AdditionalLibraryDirectories="..\..\..\..\lib"
IgnoreAllDefaultLibraries="false"
@@ -132,7 +132,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="dsound.lib decssDU.lib dsutilDU.lib strmbaseDU.lib Winmm.lib avrt.lib"
+ AdditionalDependencies="dsound.lib dsutilDU.lib strmbaseDU.lib Winmm.lib avrt.lib"
OutputFile="$(OutDir)\$(ProjectName).ax"
AdditionalLibraryDirectories="..\..\..\..\lib64"
ModuleDefinitionFile="MpcAudioRenderer.def"
@@ -202,7 +202,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="dsound.lib decssRU.lib dsutilRU.lib strmbaseRU.lib Winmm.lib zlibR.lib Avrt.lib"
+ AdditionalDependencies="dsound.lib dsutilRU.lib strmbaseRU.lib Winmm.lib Avrt.lib"
OutputFile="..\..\..\..\bin\x86\$(ProjectName).ax"
AdditionalLibraryDirectories="..\..\..\..\lib"
ModuleDefinitionFile="MpcAudioRenderer.def"
@@ -277,7 +277,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="dsound.lib libfaad2R.lib libmadR.lib liba52R.lib libdcaR.lib libflac.lib decssRU.lib dsutilRU.lib strmbaseRU.lib Winmm.lib libavcodec_gcc.lib libgcc.a libmingwex.a zlibR.lib Avrt.lib"
+ AdditionalDependencies="dsound.lib dsutilRU.lib strmbaseRU.lib Winmm.lib Avrt.lib"
OutputFile="..\..\..\..\bin\x64\$(ProjectName).ax"
AdditionalLibraryDirectories="..\..\..\..\lib64"
ModuleDefinitionFile="MpcAudioRenderer.def"