diff --git a/build/win32/libx264.vcproj b/build/win32/libx264.vcproj index 8497a35..3b27cff 100644 --- a/build/win32/libx264.vcproj +++ b/build/win32/libx264.vcproj @@ -1,117 +1,318 @@ + RootNamespace="libx264" + TargetFrameworkVersion="131072" + > + Name="Win32" + /> + + + + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + Name="VCPreBuildEventTool" + /> + Name="VCCustomBuildTool" + /> + Name="VCXMLDataGeneratorTool" + /> + Name="VCWebServiceProxyGeneratorTool" + /> + Name="VCMIDLTool" + /> + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="../../common;../../extras;../..;../../gpac/include" + PreprocessorDefinitions="_DEBUG;_LIB;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;HAVE_MMX;ARCH_X86;HAVE_PTHREAD;PTW32_STATIC_LIB" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + PrecompiledHeaderFile="$(OutDir)\libx264.pch" + AssemblerListingLocation="$(OutDir)\" + ObjectFile="$(OutDir)\" + ProgramDataBaseFileName="$(OutDir)\" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + Name="VCManagedResourceCompilerTool" + /> + PreprocessorDefinitions="_DEBUG" + Culture="2052" + /> + + + Name="VCALinkTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + + + Name="VCPreLinkEventTool" + /> + OutputFile=".\bin\Debug64\libx264.lib" + SuppressStartupBanner="true" + /> + + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + + + + Name="VCPreBuildEventTool" + /> + + + + + + + PreprocessorDefinitions="NDEBUG" + Culture="2052" + /> + + + + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCPostBuildEventTool" + /> + + + + + + + + + + + + + + + + + @@ -119,873 +320,1980 @@ + Filter=".c" + > + RelativePath="..\..\encoder\analyse.c" + > + + + + Name="Debug|x64" + > + AssemblerListingLocation="$(OutDir)\Enc\" + ObjectFile="$(OutDir)\Enc\" + ProgramDataBaseFileName="$(OutDir)\Enc\" + /> + Name="Release|Win32" + > + AssemblerListingLocation="$(OutDir)\Enc\" + ObjectFile="$(OutDir)\Enc\" + ProgramDataBaseFileName="$(OutDir)\Enc\" + /> + + + + RelativePath="..\..\encoder\cabac.c" + > + + + + + + + Name="Release|Win32" + > + AssemblerListingLocation="$(OutDir)\Enc\" + ObjectFile="$(OutDir)\Enc\" + ProgramDataBaseFileName="$(OutDir)\Enc\" + /> + Name="Release|x64" + > + AssemblerListingLocation="$(OutDir)\Enc\" + ObjectFile="$(OutDir)\Enc\" + ProgramDataBaseFileName="$(OutDir)\Enc\" + /> + RelativePath="..\..\encoder\cavlc.c" + > + Name="Debug|Win32" + > + AssemblerListingLocation="$(OutDir)\Enc\" + ObjectFile="$(OutDir)\Enc\" + ProgramDataBaseFileName="$(OutDir)\Enc\" + /> + Name="Debug|x64" + > + AssemblerListingLocation="$(OutDir)\Enc\" + ObjectFile="$(OutDir)\Enc\" + ProgramDataBaseFileName="$(OutDir)\Enc\" + /> + + + + + + + RelativePath="..\..\encoder\encoder.c" + > + + + + Name="Debug|x64" + > + AssemblerListingLocation="$(OutDir)\Enc\" + ObjectFile="$(OutDir)\Enc\" + ProgramDataBaseFileName="$(OutDir)\Enc\" + /> + Name="Release|Win32" + > + AssemblerListingLocation="$(OutDir)\Enc\" + ObjectFile="$(OutDir)\Enc\" + ProgramDataBaseFileName="$(OutDir)\Enc\" + /> + + + + RelativePath="..\..\encoder\macroblock.c" + > + + + + + + + Name="Release|Win32" + > + AssemblerListingLocation="$(OutDir)\Enc\" + ObjectFile="$(OutDir)\Enc\" + ProgramDataBaseFileName="$(OutDir)\Enc\" + /> + Name="Release|x64" + > + AssemblerListingLocation="$(OutDir)\Enc\" + ObjectFile="$(OutDir)\Enc\" + ProgramDataBaseFileName="$(OutDir)\Enc\" + /> + RelativePath="..\..\encoder\me.c" + > + Name="Debug|Win32" + > + AssemblerListingLocation="$(OutDir)\Enc\" + ObjectFile="$(OutDir)\Enc\" + ProgramDataBaseFileName="$(OutDir)\Enc\" + /> + Name="Debug|x64" + > + AssemblerListingLocation="$(OutDir)\Enc\" + ObjectFile="$(OutDir)\Enc\" + ProgramDataBaseFileName="$(OutDir)\Enc\" + /> + + + + + + + RelativePath="..\..\encoder\ratecontrol.c" + > + + + + Name="Debug|x64" + > + AssemblerListingLocation="$(OutDir)\Enc\" + ObjectFile="$(OutDir)\Enc\" + ProgramDataBaseFileName="$(OutDir)\Enc\" + /> + Name="Release|Win32" + > + AssemblerListingLocation="$(OutDir)\Enc\" + ObjectFile="$(OutDir)\Enc\" + ProgramDataBaseFileName="$(OutDir)\Enc\" + /> + + + + RelativePath="..\..\encoder\rdo.c" + > + Name="Debug|Win32" + ExcludedFromBuild="true" + > + AssemblerListingLocation="$(OutDir)\Enc\" + ObjectFile="$(OutDir)\Enc\" + ProgramDataBaseFileName="$(OutDir)\Enc\" + /> + Name="Debug|x64" + ExcludedFromBuild="true" + > + AssemblerListingLocation="$(OutDir)\Enc\" + ObjectFile="$(OutDir)\Enc\" + ProgramDataBaseFileName="$(OutDir)\Enc\" + /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Filter=".h" + > + RelativePath="..\..\encoder\analyse.h" + > + RelativePath="..\..\encoder\macroblock.h" + > + RelativePath="..\..\encoder\me.h" + > + RelativePath="..\..\encoder\ratecontrol.h" + > + RelativePath="..\..\encoder\set.h" + > + Filter=".c" + > + RelativePath="..\..\common\cabac.c" + > + Name="Debug|Win32" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + Name="Debug|x64" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> - - + Name="Release|Win32" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + Name="Release|x64" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + RelativePath="..\..\common\common.c" + > + Name="Debug|Win32" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + Name="Debug|x64" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> - - + Name="Release|Win32" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + Name="Release|x64" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + RelativePath="..\..\common\cpu.c" + > + + + + + + + Name="Release|Win32" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + Name="Release|x64" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + RelativePath="..\..\common\dct.c" + > + + + + + + + Name="Release|Win32" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + Name="Release|x64" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + RelativePath="..\..\common\frame.c" + > + + + + + + + Name="Release|Win32" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + Name="Release|x64" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + RelativePath="..\..\common\macroblock.c" + > + + + + Name="Debug|x64" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + Name="Release|Win32" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + + + + RelativePath="..\..\common\mc.c" + > + + + + + + + Name="Release|Win32" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + Name="Release|x64" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + RelativePath="..\..\common\mdate.c" + > + Name="Debug|Win32" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + Name="Debug|x64" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + + + + + + + RelativePath="..\..\common\pixel.c" + > + + + + Name="Debug|x64" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + Name="Release|Win32" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + + + + RelativePath="..\..\common\predict.c" + > + + + + + + + Name="Release|Win32" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + Name="Release|x64" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + RelativePath="..\..\common\quant.c" + > + Name="Debug|Win32" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + Name="Debug|x64" + > + AssemblerListingLocation="$(OutDir)\Core\" + ObjectFile="$(OutDir)\Core\" + ProgramDataBaseFileName="$(OutDir)\Core\" + /> + + + + + + + RelativePath="..\..\common\set.c" + > + + + + + + + + + + + + + RelativePath="..\..\common\vlc.c" + > + + + + + + + + + + + + - - + Filter=".h" + > + RelativePath="..\..\common\bs.h" + > + RelativePath="..\..\common\cabac.h" + > + RelativePath="..\..\common\common.h" + > + RelativePath="..\..\common\cpu.h" + > + RelativePath="..\..\common\dct.h" + > + RelativePath="..\..\common\frame.h" + > + RelativePath="..\..\common\macroblock.h" + > + RelativePath="..\..\common\mc.h" + > + RelativePath="..\..\common\osdep.h" + > + RelativePath="..\..\common\pixel.h" + > + RelativePath="..\..\common\predict.h" + > + RelativePath="..\..\common\quant.h" + > + RelativePath="..\..\common\set.h" + > - - - - - - - - + Filter=".c" + > + RelativePath="..\..\common\x86\mc-c.c" + > + Name="Debug|Win32" + > + Name="VCCLCompilerTool" + AssemblerListingLocation="$(OutDir)\Core\x86\" + ObjectFile="$(OutDir)\Core\x86\" + ProgramDataBaseFileName="$(OutDir)\Core\x86\" + /> + Name="Debug|x64" + > + Name="VCCLCompilerTool" + AssemblerListingLocation="$(OutDir)\Core\x86\" + ObjectFile="$(OutDir)\Core\x86\" + ProgramDataBaseFileName="$(OutDir)\Core\x86\" + /> - - + Name="Release|Win32" + > + Name="VCCLCompilerTool" + AssemblerListingLocation="$(OutDir)\Core\x86\" + ObjectFile="$(OutDir)\Core\x86\" + ProgramDataBaseFileName="$(OutDir)\Core\x86\" + /> + Name="Release|x64" + > + Name="VCCLCompilerTool" + AssemblerListingLocation="$(OutDir)\Core\x86\" + ObjectFile="$(OutDir)\Core\x86\" + ProgramDataBaseFileName="$(OutDir)\Core\x86\" + /> + RelativePath="..\..\common\x86\predict-c.c" + > + Name="Debug|Win32" + > + Name="VCCLCompilerTool" + AssemblerListingLocation="$(OutDir)\Core\x86\" + ObjectFile="$(OutDir)\Core\x86\" + ProgramDataBaseFileName="$(OutDir)\Core\x86\" + /> + Name="Debug|x64" + > + Name="VCCLCompilerTool" + AssemblerListingLocation="$(OutDir)\Core\x86\" + ObjectFile="$(OutDir)\Core\x86\" + ProgramDataBaseFileName="$(OutDir)\Core\x86\" + /> - - + Name="Release|Win32" + > + Name="VCCLCompilerTool" + AssemblerListingLocation="$(OutDir)\Core\x86\" + ObjectFile="$(OutDir)\Core\x86\" + ProgramDataBaseFileName="$(OutDir)\Core\x86\" + /> + Name="Release|x64" + > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + Name="VCCLCompilerTool" + AssemblerListingLocation="$(OutDir)\Core\x86\" + ObjectFile="$(OutDir)\Core\x86\" + ProgramDataBaseFileName="$(OutDir)\Core\x86\" + /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Filter=".c" + > + RelativePath="..\..\extras\getopt.c" + > + + + + Name="Debug|x64" + > + AssemblerListingLocation="$(OutDir)\extras\" + ObjectFile="$(OutDir)\extras\" + ProgramDataBaseFileName="$(OutDir)\extras\" + /> + Name="Release|Win32" + > + AssemblerListingLocation="$(OutDir)\extras\" + ObjectFile="$(OutDir)\extras\" + ProgramDataBaseFileName="$(OutDir)\extras\" + /> + + + + Filter=".h" + > + + + RelativePath="..\..\extras\inttypes.h" + > + RelativePath="..\..\extras\stdint.h" + > diff --git a/build/win32/x264.sln b/build/win32/x264.sln index 8fb518d..720bb68 100644 --- a/build/win32/x264.sln +++ b/build/win32/x264.sln @@ -1,7 +1,6 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libx264", "libx264.vcproj", "{A8D6E4CD-1885-4B03-8E41-5F3DB825BAA6}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x264", "x264.vcproj", "{22E1814D-7955-4456-AEA5-0C9BA7500792}" ProjectSection(ProjectDependencies) = postProject @@ -9,22 +8,31 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x264", "x264.vcproj", "{22E EndProjectSection EndProject Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {22E1814D-7955-4456-AEA5-0C9BA7500792}.Debug.ActiveCfg = Debug|Win32 - {22E1814D-7955-4456-AEA5-0C9BA7500792}.Debug.Build.0 = Debug|Win32 - {22E1814D-7955-4456-AEA5-0C9BA7500792}.Release.ActiveCfg = Release|Win32 - {22E1814D-7955-4456-AEA5-0C9BA7500792}.Release.Build.0 = Release|Win32 - {A8D6E4CD-1885-4B03-8E41-5F3DB825BAA6}.Debug.ActiveCfg = Debug|Win32 - {A8D6E4CD-1885-4B03-8E41-5F3DB825BAA6}.Debug.Build.0 = Debug|Win32 - {A8D6E4CD-1885-4B03-8E41-5F3DB825BAA6}.Release.ActiveCfg = Release|Win32 - {A8D6E4CD-1885-4B03-8E41-5F3DB825BAA6}.Release.Build.0 = Release|Win32 + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A8D6E4CD-1885-4B03-8E41-5F3DB825BAA6}.Debug|Win32.ActiveCfg = Debug|Win32 + {A8D6E4CD-1885-4B03-8E41-5F3DB825BAA6}.Debug|Win32.Build.0 = Debug|Win32 + {A8D6E4CD-1885-4B03-8E41-5F3DB825BAA6}.Debug|x64.ActiveCfg = Debug|x64 + {A8D6E4CD-1885-4B03-8E41-5F3DB825BAA6}.Debug|x64.Build.0 = Debug|x64 + {A8D6E4CD-1885-4B03-8E41-5F3DB825BAA6}.Release|Win32.ActiveCfg = Release|Win32 + {A8D6E4CD-1885-4B03-8E41-5F3DB825BAA6}.Release|Win32.Build.0 = Release|Win32 + {A8D6E4CD-1885-4B03-8E41-5F3DB825BAA6}.Release|x64.ActiveCfg = Release|x64 + {A8D6E4CD-1885-4B03-8E41-5F3DB825BAA6}.Release|x64.Build.0 = Release|x64 + {22E1814D-7955-4456-AEA5-0C9BA7500792}.Debug|Win32.ActiveCfg = Debug|Win32 + {22E1814D-7955-4456-AEA5-0C9BA7500792}.Debug|Win32.Build.0 = Debug|Win32 + {22E1814D-7955-4456-AEA5-0C9BA7500792}.Debug|x64.ActiveCfg = Debug|x64 + {22E1814D-7955-4456-AEA5-0C9BA7500792}.Debug|x64.Build.0 = Debug|x64 + {22E1814D-7955-4456-AEA5-0C9BA7500792}.Release|Win32.ActiveCfg = Release|Win32 + {22E1814D-7955-4456-AEA5-0C9BA7500792}.Release|Win32.Build.0 = Release|Win32 + {22E1814D-7955-4456-AEA5-0C9BA7500792}.Release|x64.ActiveCfg = Release|x64 + {22E1814D-7955-4456-AEA5-0C9BA7500792}.Release|x64.Build.0 = Release|x64 EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE EndGlobalSection EndGlobal diff --git a/build/win32/x264.vcproj b/build/win32/x264.vcproj index c567265..570b3e9 100644 --- a/build/win32/x264.vcproj +++ b/build/win32/x264.vcproj @@ -1,176 +1,408 @@ + RootNamespace="x264" + TargetFrameworkVersion="131072" + > + Name="Win32" + /> + + + + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + CompileAs="0" + /> + + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="2052" + /> + + LargeAddressAware="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + Name="VCALinkTool" + /> + + + + + + + + + + + Name="VCXMLDataGeneratorTool" + /> + Name="VCWebServiceProxyGeneratorTool" + /> + Name="VCMIDLTool" + TargetEnvironment="3" + /> + + + Culture="2052" + /> + + + + Name="VCManifestTool" + /> + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="2" + > + + + + + + SuppressStartupBanner="true" + CompileAs="0" + /> + + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="2052" + /> + + LargeAddressAware="2" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + TargetMachine="1" + /> + Name="VCALinkTool" + /> + + + + + + + + + + + Name="VCXMLDataGeneratorTool" + /> + Name="VCWebServiceProxyGeneratorTool" + /> + Name="VCMIDLTool" + TargetEnvironment="3" + /> + + + Culture="2052" + /> + + + + + Name="VCXDCMakeTool" + /> + Name="VCBscMakeTool" + /> + Name="VCFxCopTool" + /> + Name="VCAppVerifierTool" + /> + Name="VCPostBuildEventTool" + /> + RelativePath="..\..\matroska.c" + > + RelativePath="..\..\matroska.h" + > + RelativePath="..\..\muxers.c" + > + RelativePath="..\..\muxers.h" + > - - - - - - + RelativePath="..\..\x264.c" + > + RelativePath="..\..\x264.h" + > diff --git a/common/macroblock.c b/common/macroblock.c index 836d203..6d2ba79 100644 --- a/common/macroblock.c +++ b/common/macroblock.c @@ -666,6 +666,7 @@ int x264_macroblock_cache_init( x264_t *h ) { int i, j; int i_mb_count = h->mb.i_mb_count; + int buf_hpel, buf_ssim, buf_tesa, me_range; h->mb.i_mb_stride = h->sps->i_mb_width; h->mb.i_b8_stride = h->sps->i_mb_width * 2; @@ -738,10 +739,10 @@ int x264_macroblock_cache_init( x264_t *h ) h->mb.i_neighbour4[15] = h->mb.i_neighbour8[3] = MB_LEFT|MB_TOP|MB_TOPLEFT; - int buf_hpel = (h->param.i_width+48) * sizeof(int16_t); - int buf_ssim = h->param.analyse.b_ssim * 8 * (h->param.i_width/4+3) * sizeof(int); - int me_range = X264_MIN(h->param.analyse.i_me_range, h->param.analyse.i_mv_range); - int buf_tesa = (h->param.analyse.i_me_method >= X264_ME_ESA) * + buf_hpel = (h->param.i_width+48) * sizeof(int16_t); + buf_ssim = h->param.analyse.b_ssim * 8 * (h->param.i_width/4+3) * sizeof(int); + me_range = X264_MIN(h->param.analyse.i_me_range, h->param.analyse.i_mv_range); + buf_tesa = (h->param.analyse.i_me_method >= X264_ME_ESA) * ((me_range*2+18) * sizeof(int16_t) + (me_range+4) * (me_range+1) * 4 * sizeof(mvsad_t)); CHECKED_MALLOC( h->scratch_buffer, X264_MAX3( buf_hpel, buf_ssim, buf_tesa ) ); diff --git a/common/osdep.h b/common/osdep.h index 915ec05..99ff4a5 100644 --- a/common/osdep.h +++ b/common/osdep.h @@ -40,6 +40,7 @@ #endif #ifdef _MSC_VER +#include //_finite #define inline __inline #define strcasecmp stricmp #define strncasecmp strnicmp @@ -48,7 +49,7 @@ #define ftell _ftelli64 #define isfinite _finite #define strtok_r strtok_s -#define _CRT_SECURE_NO_DEPRECATE +#define log2f(x) (logf(x)/logf(2)) #define X264_VERSION "" // no configure script for msvc #endif diff --git a/encoder/me.c b/encoder/me.c index fa14dab..424a18a 100644 --- a/encoder/me.c +++ b/encoder/me.c @@ -350,6 +350,8 @@ me_hex2: * as in JM, except with different early termination */ static const int x264_pixel_size_shift[7] = { 0, 1, 1, 2, 3, 3, 4 }; + int16_t *p_cost_omvx; + int16_t *p_cost_omvy; int ucost1, ucost2; int cross_start = 1; @@ -451,8 +453,8 @@ me_hex2: /* hexagon grid */ omx = bmx; omy = bmy; - const int16_t *p_cost_omvx = p_cost_mvx + omx*4; - const int16_t *p_cost_omvy = p_cost_mvy + omy*4; + p_cost_omvx = p_cost_mvx + omx*4; + p_cost_omvy = p_cost_mvy + omy*4; i = 1; do { diff --git a/encoder/slicetype.c b/encoder/slicetype.c index 2c16429..610da5c 100644 --- a/encoder/slicetype.c +++ b/encoder/slicetype.c @@ -437,18 +437,18 @@ static int x264_slicetype_path_search( x264_t *h, x264_mb_analysis_t *a, x264_fr static int scenecut( x264_t *h, x264_mb_analysis_t *a, x264_frame_t **frames, int p0, int p1 ) { + int res, icost, pcost, i_gop_size; + float f_bias, f_thresh_max, f_thresh_min; x264_frame_t *frame = frames[p1]; x264_slicetype_frame_cost( h, a, frames, p0, p1, p1, 0 ); - int icost = frame->i_cost_est[0][0]; - int pcost = frame->i_cost_est[p1-p0][0]; - float f_bias; - int i_gop_size = frame->i_frame - h->frames.i_last_idr; - float f_thresh_max = h->param.i_scenecut_threshold / 100.0; + icost = frame->i_cost_est[0][0]; + pcost = frame->i_cost_est[p1-p0][0]; + i_gop_size = frame->i_frame - h->frames.i_last_idr; + f_thresh_max = h->param.i_scenecut_threshold / 100.0; /* magic numbers pulled out of thin air */ - float f_thresh_min = f_thresh_max * h->param.i_keyint_min - / ( h->param.i_keyint_max * 4 ); - int res; + f_thresh_min = f_thresh_max * h->param.i_keyint_min + / ( h->param.i_keyint_max * 4 ); if( h->param.i_keyint_min == h->param.i_keyint_max ) f_thresh_min= f_thresh_max; diff --git a/extras/inttypes.h b/extras/inttypes.h new file mode 100644 index 0000000..906382b --- /dev/null +++ b/extras/inttypes.h @@ -0,0 +1,261 @@ +/* 7.8 Format conversion of integer types */ + +#ifndef _INTTYPES_H_ +#define _INTTYPES_H_ + +#include +#define __need_wchar_t +#include + +#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) + +/* 7.8.1 Macros for format specifiers + * + * MS runtime does not yet understand C9x standard "ll" + * length specifier. It appears to treat "ll" as "l". + * The non-standard I64 length specifier causes warning in GCC, + * but understood by MS runtime functions. + */ + +/* fprintf macros for signed types */ +#define PRId8 "d" +#define PRId16 "d" +#define PRId32 "d" +#define PRId64 "I64d" + +#define PRIdLEAST8 "d" +#define PRIdLEAST16 "d" +#define PRIdLEAST32 "d" +#define PRIdLEAST64 "I64d" + +#define PRIdFAST8 "d" +#define PRIdFAST16 "d" +#define PRIdFAST32 "d" +#define PRIdFAST64 "I64d" + +#define PRIdMAX "I64d" + +#define PRIi8 "i" +#define PRIi16 "i" +#define PRIi32 "i" +#define PRIi64 "I64i" + +#define PRIiLEAST8 "i" +#define PRIiLEAST16 "i" +#define PRIiLEAST32 "i" +#define PRIiLEAST64 "I64i" + +#define PRIiFAST8 "i" +#define PRIiFAST16 "i" +#define PRIiFAST32 "i" +#define PRIiFAST64 "I64i" + +#define PRIiMAX "I64i" + +#define PRIo8 "o" +#define PRIo16 "o" +#define PRIo32 "o" +#define PRIo64 "I64o" + +#define PRIoLEAST8 "o" +#define PRIoLEAST16 "o" +#define PRIoLEAST32 "o" +#define PRIoLEAST64 "I64o" + +#define PRIoFAST8 "o" +#define PRIoFAST16 "o" +#define PRIoFAST32 "o" +#define PRIoFAST64 "I64o" + +#define PRIoMAX "I64o" + +/* fprintf macros for unsigned types */ +#define PRIu8 "u" +#define PRIu16 "u" +#define PRIu32 "u" +#define PRIu64 "I64u" + + +#define PRIuLEAST8 "u" +#define PRIuLEAST16 "u" +#define PRIuLEAST32 "u" +#define PRIuLEAST64 "I64u" + +#define PRIuFAST8 "u" +#define PRIuFAST16 "u" +#define PRIuFAST32 "u" +#define PRIuFAST64 "I64u" + +#define PRIuMAX "I64u" + +#define PRIx8 "x" +#define PRIx16 "x" +#define PRIx32 "x" +#define PRIx64 "I64x" + +#define PRIxLEAST8 "x" +#define PRIxLEAST16 "x" +#define PRIxLEAST32 "x" +#define PRIxLEAST64 "I64x" + +#define PRIxFAST8 "x" +#define PRIxFAST16 "x" +#define PRIxFAST32 "x" +#define PRIxFAST64 "I64x" + +#define PRIxMAX "I64x" + +#define PRIX8 "X" +#define PRIX16 "X" +#define PRIX32 "X" +#define PRIX64 "I64X" + +#define PRIXLEAST8 "X" +#define PRIXLEAST16 "X" +#define PRIXLEAST32 "X" +#define PRIXLEAST64 "I64X" + +#define PRIXFAST8 "X" +#define PRIXFAST16 "X" +#define PRIXFAST32 "X" +#define PRIXFAST64 "I64X" + +#define PRIXMAX "I64X" + +/* + * fscanf macros for signed int types + * NOTE: if 32-bit int is used for int_fast8_t and int_fast16_t + * (see stdint.h, 7.18.1.3), FAST8 and FAST16 should have + * no length identifiers + */ + +#define SCNd16 "hd" +#define SCNd32 "d" +#define SCNd64 "I64d" + +#define SCNdLEAST16 "hd" +#define SCNdLEAST32 "d" +#define SCNdLEAST64 "I64d" + +#define SCNdFAST16 "hd" +#define SCNdFAST32 "d" +#define SCNdFAST64 "I64d" + +#define SCNdMAX "I64d" + +#define SCNi16 "hi" +#define SCNi32 "i" +#define SCNi64 "I64i" + +#define SCNiLEAST16 "hi" +#define SCNiLEAST32 "i" +#define SCNiLEAST64 "I64i" + +#define SCNiFAST16 "hi" +#define SCNiFAST32 "i" +#define SCNiFAST64 "I64i" + +#define SCNiMAX "I64i" + +#define SCNo16 "ho" +#define SCNo32 "o" +#define SCNo64 "I64o" + +#define SCNoLEAST16 "ho" +#define SCNoLEAST32 "o" +#define SCNoLEAST64 "I64o" + +#define SCNoFAST16 "ho" +#define SCNoFAST32 "o" +#define SCNoFAST64 "I64o" + +#define SCNoMAX "I64o" + +#define SCNx16 "hx" +#define SCNx32 "x" +#define SCNx64 "I64x" + +#define SCNxLEAST16 "hx" +#define SCNxLEAST32 "x" +#define SCNxLEAST64 "I64x" + +#define SCNxFAST16 "hx" +#define SCNxFAST32 "x" +#define SCNxFAST64 "I64x" + +#define SCNxMAX "I64x" + +/* fscanf macros for unsigned int types */ + +#define SCNu16 "hu" +#define SCNu32 "u" +#define SCNu64 "I64u" + +#define SCNuLEAST16 "hu" +#define SCNuLEAST32 "u" +#define SCNuLEAST64 "I64u" + +#define SCNuFAST16 "hu" +#define SCNuFAST32 "u" +#define SCNuFAST64 "I64u" + +#define SCNuMAX "I64u" + +#ifdef _WIN64 +#define PRIdPTR "I64d" +#define PRIiPTR "I64i" +#define PRIoPTR "I64o" +#define PRIuPTR "I64u" +#define PRIxPTR "I64x" +#define PRIXPTR "I64X" +#define SCNdPTR "I64d" +#define SCNiPTR "I64i" +#define SCNoPTR "I64o" +#define SCNxPTR "I64x" +#define SCNuPTR "I64u" +#else +#define PRIdPTR "d" +#define PRIiPTR "i" +#define PRIoPTR "o" +#define PRIuPTR "u" +#define PRIxPTR "x" +#define PRIXPTR "X" +#define SCNdPTR "d" +#define SCNiPTR "i" +#define SCNoPTR "o" +#define SCNxPTR "x" + #define SCNuPTR "u" +#endif + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +/* + * no length modifier for char types prior to C9x + * MS runtime scanf appears to treat "hh" as "h" + */ + +/* signed char */ +#define SCNd8 "hhd" +#define SCNdLEAST8 "hhd" +#define SCNdFAST8 "hhd" + +#define SCNi8 "hhi" +#define SCNiLEAST8 "hhi" +#define SCNiFAST8 "hhi" + +#define SCNo8 "hho" +#define SCNoLEAST8 "hho" +#define SCNoFAST8 "hho" + +#define SCNx8 "hhx" +#define SCNxLEAST8 "hhx" +#define SCNxFAST8 "hhx" + +/* unsigned char */ +#define SCNu8 "hhu" +#define SCNuLEAST8 "hhu" +#define SCNuFAST8 "hhu" +#endif /* __STDC_VERSION__ >= 199901 */ + +#endif /* !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) */ + +#endif /* ndef _INTTYPES_H */ diff --git a/extras/stdint.h b/extras/stdint.h index 849d9ab..33d790e 100644 --- a/extras/stdint.h +++ b/extras/stdint.h @@ -56,10 +56,6 @@ typedef unsigned int uint_fast32_t; typedef __int64 int_fast64_t; typedef unsigned __int64 uint_fast64_t; -/* 7.18.1.4 Integer types capable of holding object pointers */ -/*typedef int intptr_t; -typedef unsigned uintptr_t;*/ - /* 7.18.1.5 Greatest-width integer types */ typedef __int64 intmax_t; typedef unsigned __int64 uintmax_t; @@ -117,9 +113,15 @@ typedef unsigned __int64 uintmax_t; /* 7.18.2.4 Limits of integer types capable of holding object pointers */ +#ifdef _WIN64 +#define INTPTR_MIN INT64_MIN +#define INTPTR_MAX INT64_MAX +#define UINTPTR_MAX UINT64_MAX +#else #define INTPTR_MIN INT32_MIN #define INTPTR_MAX INT32_MAX #define UINTPTR_MAX UINT32_MAX +#endif /* 7.18.2.5 Limits of greatest-width integer types */ #define INTMAX_MIN INT64_MIN @@ -127,13 +129,24 @@ typedef unsigned __int64 uintmax_t; #define UINTMAX_MAX UINT64_MAX /* 7.18.3 Limits of other integer types */ +#ifdef _WIN64 +#define PTRDIFF_MIN INT64_MIN +#define PTRDIFF_MAX INT64_MAX +#else #define PTRDIFF_MIN INT32_MIN #define PTRDIFF_MAX INT32_MAX +#endif #define SIG_ATOMIC_MIN INT32_MIN #define SIG_ATOMIC_MAX INT32_MAX +#ifndef SIZE_MAX +#ifdef _WIN64 +#define SIZE_MAX UINT64_MAX +#else #define SIZE_MAX UINT32_MAX +#endif +#endif #ifndef WCHAR_MIN /* also in wchar.h */ #define WCHAR_MIN 0