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
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2013-01-08 20:08:36 +0400
committerXhmikosR <xhmikosr@users.sourceforge.net>2013-01-08 20:10:54 +0400
commit79245553d2f54afe824044711f5ca253ced5ece1 (patch)
tree690159c79d33e10654ec6a5aae7fe6b32200aec9 /contrib
parent06f96bd387db088b48345350e3be5a3f37021803 (diff)
create a contrib folder and put there the scripts and stuff
Diffstat (limited to 'contrib')
-rw-r--r--contrib/astyle.ini47
-rw-r--r--contrib/checkyear.js98
-rw-r--r--contrib/hash2rev.sh43
-rw-r--r--contrib/icl13.diff196
-rw-r--r--contrib/mpc-hc.cppcheck13
-rw-r--r--contrib/rev2hash.sh43
-rw-r--r--contrib/run_astyle.bat14
7 files changed, 454 insertions, 0 deletions
diff --git a/contrib/astyle.ini b/contrib/astyle.ini
new file mode 100644
index 000000000..ed47e668c
--- /dev/null
+++ b/contrib/astyle.ini
@@ -0,0 +1,47 @@
+# http://astyle.sourceforge.net/astyle.html
+--indent=spaces=4 --style=kr
+--indent-switches --indent-namespaces --indent-col1-comments
+--pad-header --pad-oper --unpad-paren
+--align-pointer=type --align-reference=type
+--add-brackets
+--keep-one-line-blocks
+--convert-tabs
+--lineend=windows --preserve-date
+--suffix=none
+--recursive
+--ignore-exclude-errors --ignore-exclude-errors-x
+--formatted
+
+# directories
+--exclude=bin
+--exclude=DeCSS
+--exclude=thirdparty
+
+# common files
+--exclude=resource.h
+
+# include dir
+--exclude=atl --exclude=avisynth --exclude=detours --exclude=dx --exclude=lglcd
+--exclude=qt --exclude=realmedia --exclude=vd2 --exclude=winddk --exclude=inttypes.h
+--exclude=MediaInfoDLL.h --exclude=unrar.h --exclude=Utf8.h --exclude=Version_rev.h
+
+# src/DSUtil
+--exclude=deinterlace.cpp --exclude=simd.h --exclude=simd_common.h --exclude=simd_instructions.h
+--exclude=vd_asm.cpp --exclude=vd_asm.h --exclude=vd.cpp --exclude=vd.h
+
+# src/filters/source/D2VSource
+--exclude=idctfpu.cpp --exclude=idctref.cpp --exclude=MPEG2Dec.h --exclude=MPEG2Dec.cpp
+
+# src/filters/transform/MPCVideoDec
+--exclude=ffImgfmt.cpp --exclude=ffImgfmt.h --exclude=H264RandomAccess.cpp
+--exclude=H264RandomAccess.h --exclude=array_allocator.h --exclude=char_t.h
+--exclude=PODtypes.h
+
+# src/filters/transform/Mpeg2DecFilter
+--exclude=attributes.h --exclude=libmpeg2.cpp --exclude=libmpeg2.h
+
+# src/mpc-hc dir
+--exclude=LineNumberEdit.cpp --exclude=LineNumberEdit.h --exclude=Struct.h
+
+# src/MPCTestAPI
+--exclude=HScrollListBox.cpp --exclude=HScrollListBox.h
diff --git a/contrib/checkyear.js b/contrib/checkyear.js
new file mode 100644
index 000000000..afc38f4b0
--- /dev/null
+++ b/contrib/checkyear.js
@@ -0,0 +1,98 @@
+/* This script is a local pre-commit hook script.
+ * It's used to check whether the copyright year of modified files has been
+ * bumped up to the current (2013) year.
+ *
+ * Taken from TortoiseSVN repository, adapted for MPC-HC by thevbm
+ *
+ * Only *.cpp and *.h files are checked
+ *
+ * Set the local hook scripts like this (pre-commit hook):
+ * WScript path/to/this/script/file.js
+ * and set "Wait for the script to finish"
+ */
+
+var ForReading = 1;
+var objArgs, num;
+
+objArgs = WScript.Arguments;
+num = objArgs.length;
+if (num !== 4)
+{
+ WScript.Echo("Usage: [CScript | WScript] checkyear.js path/to/pathsfile depth path/to/messagefile path/to/CWD");
+ WScript.Quit(1);
+}
+
+var re = /^(.+)(2006-2013)(.+)/;
+var basere = /^(.+)see\sAuthors.txt/;
+var filere = /(\.cpp$)|(\.h$)|(\.bat$)|(\.iss$)/;
+var found = true;
+var fs, a, rv, r;
+fs = new ActiveXObject("Scripting.FileSystemObject");
+// remove the quotes
+var files = readPaths(objArgs(0));
+// going backwards with while is believed to be faster
+var fileindex = files.length;
+var errormsg = "";
+
+while (fileindex--)
+{
+ var f = files[fileindex];
+ if (f.match(filere) !== null)
+ {
+ if (fs.FileExists(f))
+ {
+ a = fs.OpenTextFile(f, ForReading, false);
+ var copyrightFound = false;
+ var yearFound = false;
+ while ((!a.AtEndOfStream) && (!yearFound))
+ {
+ r = a.ReadLine();
+ rv = r.match(basere);
+ if (rv !== null)
+ {
+ rv = r.match(re);
+ if (rv !== null)
+ yearFound = true;
+
+ copyrightFound = true;
+ }
+ }
+ a.Close();
+
+ if (copyrightFound && (!yearFound))
+ {
+ if (errormsg !== "")
+ errormsg += "\n";
+ errormsg += f;
+ found = false;
+ }
+ }
+ }
+}
+
+if (found === false)
+{
+ errormsg = "the file(s):\n" + errormsg + "\nhave not the correct copyright year!";
+ WScript.stderr.writeLine(errormsg);
+}
+
+WScript.Quit(!found);
+
+
+// readFileLines
+function readPaths(path)
+{
+ var retPaths = new Array();
+ var fs = new ActiveXObject("Scripting.FileSystemObject");
+ if (fs.FileExists(path))
+ {
+ var a = fs.OpenTextFile(path, ForReading);
+ while (!a.AtEndOfStream)
+ {
+ var line = a.ReadLine();
+ retPaths.push(line);
+ }
+ a.Close();
+ }
+ return retPaths;
+}
diff --git a/contrib/hash2rev.sh b/contrib/hash2rev.sh
new file mode 100644
index 000000000..4bc02cc3f
--- /dev/null
+++ b/contrib/hash2rev.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+# (C) 2013 see Authors.txt
+#
+# This file is part of MPC-HC.
+#
+# MPC-HC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# MPC-HC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+[[ -n "$1" ]] || exit 1
+# This is the last svn changeset, the number and hash can be automatically
+# calculated, but it is slow to do that. So it is better to have it hardcoded.
+svnrev=5597
+svnhash="f669833b77e6515dc5f0a682c5bf665f9a81b2ec"
+
+if [[ ! -d ".git" ]] || ! command -v git >/dev/null 2>&1 ; then
+ # If the folder ".git" doesn't exist or git isn't available exit the script
+ exit 1
+fi
+
+# If the input hash is after the switch to git
+if [[ $(git merge-base $svnhash "$1") == $(git rev-parse --verify "$svnhash") ]] ; then
+ # Count how many changesets we have since the last svn changeset until the input hash
+ ver=$(git rev-list --count "$svnhash..$1")
+ # Now add it with to last svn revision number
+ ver=$((ver+svnrev))
+else
+ # Get the revision by parsing the git-svn-id
+ ver=$(git log -1 --format="%b" "$1")
+ ver=${ver#*@}
+ ver=${ver%% *}
+fi
+
+echo "$ver"
diff --git a/contrib/icl13.diff b/contrib/icl13.diff
new file mode 100644
index 000000000..636a29ea9
--- /dev/null
+++ b/contrib/icl13.diff
@@ -0,0 +1,196 @@
+diff --git a/build_vs2012.bat b/build_vs2012.bat
+index 7752e27..3a08dca 100644
+--- a/build_vs2012.bat
++++ b/build_vs2012.bat
+@@ -321,9 +321,9 @@ IF /I "%~2" == "Win32" (
+ PUSHD "bin12"
+
+ IF DEFINED MPCHC_LITE (
+- SET "PCKG_NAME=%NAME%.%MPCHC_VER%.%ARCH%.VS2012.Lite"
++ SET "PCKG_NAME=%NAME%.%MPCHC_VER%.%ARCH%.ICL13.Lite"
+ ) ELSE (
+- SET "PCKG_NAME=%NAME%.%MPCHC_VER%.%ARCH%.VS2012"
++ SET "PCKG_NAME=%NAME%.%MPCHC_VER%.%ARCH%.ICL13"
+ )
+
+ IF EXIST "%PCKG_NAME%.7z" DEL "%PCKG_NAME%.7z"
+diff --git a/distrib/mpc-hc_setup.iss b/distrib/mpc-hc_setup.iss
+index 2ffe7f8..7d70e9a 100644
+--- a/distrib/mpc-hc_setup.iss
++++ b/distrib/mpc-hc_setup.iss
+@@ -41,7 +41,7 @@
+ #define localize = "true"
+ #endif
+ #endif
+-#define sse_required
++#define sse2_required
+
+
+ ; From now on you shouldn't need to change anything
+@@ -80,7 +80,7 @@
+ #endif
+
+ #if defined(VS2012)
+- #define OutFilename = OutFilename + ".VS2012"
++ #define OutFilename = OutFilename + ".ICL13"
+ #endif
+
+ #ifnexist bindir + "\" + mpchc_exe
+@@ -90,15 +90,15 @@
+
+ #ifdef x64Build
+ #ifdef MPCHC_LITE
+- #define FullAppNameVer = app_vername + " " + app_verhash + "Lite (64-bit)"
++ #define FullAppNameVer = app_vername + " " + app_verhash + "Lite (ICL13, 64-bit)"
+ #else
+- #define FullAppNameVer = app_vername + " " + app_verhash + " (64-bit)"
++ #define FullAppNameVer = app_vername + " " + app_verhash + " (ICL13, 64-bit)"
+ #endif
+ #else
+ #ifdef MPCHC_LITE
+- #define FullAppNameVer = app_vername + " " + app_verhash + " Lite"
++ #define FullAppNameVer = app_vername + " " + app_verhash + " Lite (ICL13)"
+ #else
+- #define FullAppNameVer = app_vername + " " + app_verhash
++ #define FullAppNameVer = app_vername + " " + app_verhash + " (ICL13)"
+ #endif
+ #endif
+
+diff --git a/docs/Readme.txt b/docs/Readme.txt
+index 7f064df..351fb48 100644
+--- a/docs/Readme.txt
++++ b/docs/Readme.txt
+@@ -27,7 +27,7 @@ Main Features:
+
+ System Requirements:
+ ---------------------
+-* An SSE capable CPU
++* An SSE2 capable CPU
+ * Windows XP SP3, Vista, 7, 8 32-bit/64-bit
+
+
+diff --git a/src/common.props b/src/common.props
+index acf99eb..1b111ed 100644
+--- a/src/common.props
++++ b/src/common.props
+@@ -46,11 +46,14 @@
+ <SubSystem>Windows</SubSystem>
+ <TargetMachine Condition="'$(Platform)'=='Win32'">MachineX86</TargetMachine>
+ <TargetMachine Condition="'$(Platform)'=='x64'">MachineX64</TargetMachine>
++ <WPOAsmListLocation>$(IntDir)</WPOAsmListLocation>
++ <WPOObjectFile>$(IntDir)</WPOObjectFile>
+ </Link>
+ <ResourceCompile>
+ <Culture>0x0409</Culture>
+ <PreprocessorDefinitions Condition="'$(Platform)'=='Win32'">WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Platform)'=='x64'">_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++ <SuppressStartupBanner>true</SuppressStartupBanner>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)'=='Debug' Or '$(Configuration)'=='Debug Filter' Or '$(Configuration)'=='Debug Lite'">
+@@ -72,24 +75,27 @@
+ <ItemDefinitionGroup Condition="'$(Configuration)'=='Release' Or '$(Configuration)'=='Release Filter' Or '$(Configuration)'=='Release Lite'">
+ <ClCompile>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+- <EnableEnhancedInstructionSet Condition="'$(Platform)'=='Win32'">StreamingSIMDExtensions</EnableEnhancedInstructionSet>
++ <DisableSpecificDiagnostics>597,997,13200</DisableSpecificDiagnostics>
++ <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
++ <FloatingPointModel>Fast</FloatingPointModel>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
++ <InterproceduralOptimization>SingleFile</InterproceduralOptimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers Condition="'$(Platform)'=='Win32'">true</OmitFramePointers>
+- <Optimization>MaxSpeed</Optimization>
++ <Optimization>MaxSpeedHighLevel</Optimization>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <StringPooling>true</StringPooling>
+- <WholeProgramOptimization Condition="'$(UseLTCG)'=='true'">true</WholeProgramOptimization>
++ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </ClCompile>
+ <Lib>
+- <LinkTimeCodeGeneration Condition="'$(UseLTCG)'=='true'">true</LinkTimeCodeGeneration>
++ <LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
+ </Lib>
+ <Link>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LargeAddressAware Condition="'$(Platform)'=='Win32'">true</LargeAddressAware>
+- <LinkTimeCodeGeneration Condition="'$(UseLTCG)'=='true'">UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
++ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <MergeSections>.rdata=.text</MergeSections>
+ <OptimizeReferences>true</OptimizeReferences>
+ <SetChecksum>true</SetChecksum>
+diff --git a/src/filters/transform/VSFilter/installer/vsfilter_setup.iss b/src/filters/transform/VSFilter/installer/vsfilter_setup.iss
+index 672a59e..44b3004 100644
+--- a/src/filters/transform/VSFilter/installer/vsfilter_setup.iss
++++ b/src/filters/transform/VSFilter/installer/vsfilter_setup.iss
+@@ -33,8 +33,7 @@
+ #define app_version str(VerMajor) + "." + str(VerMinor) + "." + str(MPC_VERSION_REV)
+
+ ; If you want to compile the 64-bit version define "x64Build" (uncomment the define below or use build.bat)
+-;#define VS2012
+-#define sse_required
++#define sse2_required
+ ;#define VS2012
+ ;#define x64Build
+
+@@ -57,7 +56,7 @@
+ #endif
+
+ #if defined(VS2012)
+- #define OutFilename = OutFilename + ".VS2012"
++ #define OutFilename = OutFilename + ".ICL13"
+ #endif
+
+
+@@ -100,10 +99,10 @@ MinVersion=5.01.2600sp3
+ AppID=vsfilter64
+ ArchitecturesAllowed=x64
+ ArchitecturesInstallIn64BitMode=x64
+-UninstallDisplayName=DirectVobSub {#app_version} (64-bit)
++UninstallDisplayName=DirectVobSub {#app_version} (ICL13, 64-bit)
+ #else
+ AppID=vsfilter
+-UninstallDisplayName=DirectVobSub {#app_version}
++UninstallDisplayName=DirectVobSub {#app_version} (ICL13)
+ #endif
+
+
+@@ -113,9 +112,9 @@ Name: en; MessagesFile: compiler:Default.isl
+
+ [Messages]
+ #ifdef x64Build
+-BeveledLabel=DirectVobSub {#app_version} (64-bit)
++BeveledLabel=DirectVobSub {#app_version} (ICL13, 64-bit)
+ #else
+-BeveledLabel=DirectVobSub {#app_version}
++BeveledLabel=DirectVobSub {#app_version} (ICL13)
+ #endif
+ SetupAppTitle=Setup - DirectVobSub
+ SetupWindowTitle=Setup - DirectVobSub
+diff --git a/src/platform.props b/src/platform.props
+index 09927fd..f28b853 100644
+--- a/src/platform.props
++++ b/src/platform.props
+@@ -1,6 +1,6 @@
+ <?xml version="1.0" encoding="utf-8"?>
+ <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup Label="Configuration" Condition="'$(VisualStudioVersion)'=='11.0'">
+- <PlatformToolset>v110_xp</PlatformToolset>
++ <PlatformToolset>Intel C++ Compiler XE 13.0</PlatformToolset>
+ </PropertyGroup>
+ </Project>
+diff --git a/src/thirdparty/ffmpeg/Makefile b/src/thirdparty/ffmpeg/Makefile
+index 22dbf59..05c170e 100644
+--- a/src/thirdparty/ffmpeg/Makefile
++++ b/src/thirdparty/ffmpeg/Makefile
+@@ -56,7 +56,7 @@ ifeq ($(64BIT),yes)
+ else
+ TARGET_OS = i686-w64-mingw32
+ CFLAGS += -DWIN32 -D_WIN32 -DARCH_X86_32
+- OPTFLAGS += -m32 -march=i686 -mmmx -msse -mfpmath=sse
++ OPTFLAGS += -m32 -march=i686 -mmmx -msse -msse2 -mfpmath=sse
+ YASMFLAGS += -f win32 -m x86 -DWIN32=1 -DARCH_X86_32=1 -DARCH_X86_64=0 -DPREFIX
+ endif
+
diff --git a/contrib/mpc-hc.cppcheck b/contrib/mpc-hc.cppcheck
new file mode 100644
index 000000000..3ff9f9ecf
--- /dev/null
+++ b/contrib/mpc-hc.cppcheck
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="1">
+ <root name="."/>
+ <includedir>
+ <dir name="include/"/>
+ </includedir>
+ <paths>
+ <dir name="../../"/>
+ </paths>
+ <exclude>
+ <path name="src/thirdparty/"/>
+ </exclude>
+</project>
diff --git a/contrib/rev2hash.sh b/contrib/rev2hash.sh
new file mode 100644
index 000000000..837bc4259
--- /dev/null
+++ b/contrib/rev2hash.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+# (C) 2013 see Authors.txt
+#
+# This file is part of MPC-HC.
+#
+# MPC-HC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# MPC-HC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+(( $1 > 0 )) || exit
+# This is the last svn changeset, the number and hash can be automatically
+# calculated, but it is slow to do that. So it is better to have it hardcoded.
+svnrev=5597
+svnhash="f669833b77e6515dc5f0a682c5bf665f9a81b2ec"
+
+if [[ ! -d ".git" ]] || ! command -v git >/dev/null 2>&1 ; then
+ # If the folder ".git" doesn't exist or git isn't available exit the script
+ exit
+fi
+
+# If this revision is after the switch to git
+if (( $1 > svnrev)); then
+ # Calculate how many changesets we need to traverse from the svnrev to HEAD
+ n=$(($1 - svnrev))
+
+ # List the changes from svnhash..HEAD in reverse order and pick the ${n}th
+ hash=$(git rev-list --reverse $svnhash..HEAD | sed -n "${n}p")
+else
+ # Get the hash by parsing the git-svn-id
+ # --all is needed in case the given ref is not part of trunk/master but in a tag / svn branch
+ hash=$(git log --all -1 --format="%H" --grep="git-svn-id: .*@$1 ")
+fi
+
+echo "$hash"
diff --git a/contrib/run_astyle.bat b/contrib/run_astyle.bat
new file mode 100644
index 000000000..0a0b282c1
--- /dev/null
+++ b/contrib/run_astyle.bat
@@ -0,0 +1,14 @@
+@ECHO OFF
+SETLOCAL
+
+PUSHD %~dp0
+TITLE Running astyle using astyle.ini
+astyle --options=astyle.ini ..\*.h ..\*.cpp
+IF %ERRORLEVEL% NEQ 0 ECHO. & ECHO ERROR: Something went wrong!
+POPD
+
+:END
+ECHO Press any key to close this window...
+PAUSE >NUL
+ENDLOCAL
+EXIT /B