diff options
author | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
---|---|---|
committer | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
commit | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/nsvdec_vp6 | |
parent | 537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff) | |
download | winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz |
Initial community commit
Diffstat (limited to 'Src/nsvdec_vp6')
-rw-r--r-- | Src/nsvdec_vp6/nsvdec_vp6.sln | 18 | ||||
-rw-r--r-- | Src/nsvdec_vp6/nsvdec_vp6.vcxproj | 172 | ||||
-rw-r--r-- | Src/nsvdec_vp6/nsvdec_vp6.vcxproj.filters | 22 | ||||
-rw-r--r-- | Src/nsvdec_vp6/nsvdec_vp6.xcodeproj/project.pbxproj | 237 | ||||
-rw-r--r-- | Src/nsvdec_vp6/vp6stub.cpp | 208 |
5 files changed, 657 insertions, 0 deletions
diff --git a/Src/nsvdec_vp6/nsvdec_vp6.sln b/Src/nsvdec_vp6/nsvdec_vp6.sln new file mode 100644 index 00000000..b77e093c --- /dev/null +++ b/Src/nsvdec_vp6/nsvdec_vp6.sln @@ -0,0 +1,18 @@ +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nsvdec_vp6", "nsvdec_vp6.vcproj", "{C45BA56F-496D-42B8-BDD3-B1AF323EC130}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C45BA56F-496D-42B8-BDD3-B1AF323EC130}.Debug|Win32.ActiveCfg = Debug|Win32 + {C45BA56F-496D-42B8-BDD3-B1AF323EC130}.Debug|Win32.Build.0 = Debug|Win32 + {C45BA56F-496D-42B8-BDD3-B1AF323EC130}.Release|Win32.ActiveCfg = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Src/nsvdec_vp6/nsvdec_vp6.vcxproj b/Src/nsvdec_vp6/nsvdec_vp6.vcxproj new file mode 100644 index 00000000..664fec72 --- /dev/null +++ b/Src/nsvdec_vp6/nsvdec_vp6.vcxproj @@ -0,0 +1,172 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <VCProjectVersion>17.0</VCProjectVersion> + <ProjectGuid>{C45BA56F-496D-42B8-BDD3-B1AF323EC130}</ProjectGuid> + <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <PlatformToolset>v142</PlatformToolset> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <PlatformToolset>v142</PlatformToolset> + <UseOfMfc>false</UseOfMfc> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup> + <_ProjectFileVersion>17.0.32505.173</_ProjectFileVersion> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <OutDir>$(PlatformShortName)_$(Configuration)\</OutDir> + <IntDir>$(PlatformShortName)_$(Configuration)\</IntDir> + <LinkIncremental>false</LinkIncremental> + <IncludePath>$(IncludePath)</IncludePath> + <LibraryPath>$(LibraryPath)</LibraryPath> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <OutDir>$(Configuration)\</OutDir> + <IntDir>$(Configuration)\</IntDir> + <LinkIncremental>false</LinkIncremental> + <IncludePath>$(IncludePath)</IncludePath> + <LibraryPath>$(LibraryPath)</LibraryPath> + </PropertyGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Midl> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TargetEnvironment>Win32</TargetEnvironment> + <TypeLibraryName>.\nsvdec_vp6___Win32_Debug_Winamp/nsvdec_vp6.tlb</TypeLibraryName> + <HeaderFileName /> + </Midl> + <ClCompile> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\Wasabi;..\libvp6\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;NSVDEC_vp6_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <PrecompiledHeader /> + <PrecompiledHeaderOutputFile>.\nsvdec_vp6___Win32_Debug_Winamp/nsvdec_vp6.pch</PrecompiledHeaderOutputFile> + <AssemblerListingLocation>.\nsvdec_vp6___Win32_Debug_Winamp/</AssemblerListingLocation> + <ObjectFileName>.\nsvdec_vp6___Win32_Debug_Winamp/</ObjectFileName> + <ProgramDataBaseFileName>.\nsvdec_vp6___Win32_Debug_Winamp/</ProgramDataBaseFileName> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0409</Culture> + </ResourceCompile> + <Link> + <AdditionalDependencies>odbc32.lib;odbccp32.lib;winmm.lib;s_cconv.lib;s_cpuid.lib;s_dxv.lib;s_preproc.lib;s_vp60d.lib;s_vpppd.lib;s_vputil.lib;s_vpxblit.lib;on2_mem.lib;msvcrt.lib;libcpmt.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)nsvdec_vp6.dll</OutputFile> + <SuppressStartupBanner>true</SuppressStartupBanner> + <AdditionalLibraryDirectories>..\libvp6\lib\$(PlatformShortName)_$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <GenerateDebugInformation>true</GenerateDebugInformation> + <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention /> + <ImportLibrary>$(IntDir)nsvdec_vp6.lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> + </Link> + <PostBuildEvent> + <Command>xcopy /Y /D $(OutDir)*.dll ..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ </Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Midl> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TargetEnvironment>Win32</TargetEnvironment> + <TypeLibraryName>.\Release/nsvdec_vp6.tlb</TypeLibraryName> + <HeaderFileName /> + </Midl> + <ClCompile> + <Optimization>MinSpace</Optimization> + <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion> + <FavorSizeOrSpeed>Size</FavorSizeOrSpeed> + <OmitFramePointers>true</OmitFramePointers> + <AdditionalIncludeDirectories>..\Wasabi;..\libvp6\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;NSVDEC_vp6_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> + <BufferSecurityCheck>false</BufferSecurityCheck> + <FunctionLevelLinking>true</FunctionLevelLinking> + <PrecompiledHeader /> + <PrecompiledHeaderOutputFile>.\Release/nsvdec_vp6.pch</PrecompiledHeaderOutputFile> + <AssemblerListingLocation>.\Release/</AssemblerListingLocation> + <ObjectFileName>$(IntDir)</ObjectFileName> + <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName> + <WarningLevel>Level3</WarningLevel> + <SuppressStartupBanner>true</SuppressStartupBanner> + <DebugInformationFormat>None</DebugInformationFormat> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0409</Culture> + </ResourceCompile> + <Link> + <AdditionalDependencies>winmm.lib;s_cpuid.lib;s_dxv.lib;s_vp60d.lib;s_vpppd.lib;s_vputil.lib;s_vpxblit.lib;on2_mem.lib;%(AdditionalDependencies)</AdditionalDependencies> + <OutputFile>$(OutDir)nsvdec_vp6.dll</OutputFile> + <SuppressStartupBanner>true</SuppressStartupBanner> + <AdditionalLibraryDirectories>..\libvp6\lib\$(PlatformShortName)_$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <IgnoreSpecificDefaultLibraries>msvcprt.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> + <GenerateDebugInformation>false</GenerateDebugInformation> + <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention /> + <ImportLibrary>$(IntDir)nsvdec_vp6.lib</ImportLibrary> + <TargetMachine>MachineX86</TargetMachine> + <ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers> + </Link> + <PostBuildEvent> + <Command>xcopy /Y /D $(OutDir)*.dll ..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ </Command> + </PostBuildEvent> + </ItemDefinitionGroup> + <ItemGroup> + <ClCompile Include="vp6stub.cpp"> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;NSVDEC_vp6_EXPORTS</PreprocessorDefinitions> + <BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks> + <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization> + <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;NSVDEC_vp6_EXPORTS</PreprocessorDefinitions> + </ClCompile> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/Src/nsvdec_vp6/nsvdec_vp6.vcxproj.filters b/Src/nsvdec_vp6/nsvdec_vp6.vcxproj.filters new file mode 100644 index 00000000..30cf0106 --- /dev/null +++ b/Src/nsvdec_vp6/nsvdec_vp6.vcxproj.filters @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <Filter Include="Source Files"> + <UniqueIdentifier>{aa5cf8a0-8643-459d-8044-0d7c4568140a}</UniqueIdentifier> + <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions> + </Filter> + <Filter Include="Header Files"> + <UniqueIdentifier>{a6dd9f04-a9fb-4d6f-b656-6a031d7b8590}</UniqueIdentifier> + <Extensions>h;hpp;hxx;hm;inl</Extensions> + </Filter> + <Filter Include="Resource Files"> + <UniqueIdentifier>{63b27f48-a8cc-409f-9814-43bbb3ca9650}</UniqueIdentifier> + <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions> + </Filter> + </ItemGroup> + <ItemGroup> + <ClCompile Include="vp6stub.cpp"> + <Filter>Source Files</Filter> + </ClCompile> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/Src/nsvdec_vp6/nsvdec_vp6.xcodeproj/project.pbxproj b/Src/nsvdec_vp6/nsvdec_vp6.xcodeproj/project.pbxproj new file mode 100644 index 00000000..0952d5b5 --- /dev/null +++ b/Src/nsvdec_vp6/nsvdec_vp6.xcodeproj/project.pbxproj @@ -0,0 +1,237 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXBuildFile section */ + 0C14248A0BB820A200FDDAB7 /* libdxv.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C1424890BB820A200FDDAB7 /* libdxv.a */; }; + 0C1424990BB820D700FDDAB7 /* libon2_mem.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C1424980BB820D700FDDAB7 /* libon2_mem.a */; }; + 0C1537720BB797B30098DEFA /* libvp6d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C1537710BB797B30098DEFA /* libvp6d.a */; }; + 0C15378A0BB7981A0098DEFA /* libvputil.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C1537890BB7981A0098DEFA /* libvputil.a */; }; + 0C15379D0BB798500098DEFA /* libvpxblit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C15379C0BB798500098DEFA /* libvpxblit.a */; }; + 0C1537B10BB7987F0098DEFA /* libvppp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0C1537B00BB7987F0098DEFA /* libvppp.a */; }; + 0C33627B0BB79481008CC17A /* vp6stub.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0C33627A0BB79481008CC17A /* vp6stub.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 0C1424890BB820A200FDDAB7 /* libdxv.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libdxv.a; path = ../vp6/lib/osx/Release/libdxv.a; sourceTree = SOURCE_ROOT; }; + 0C1424980BB820D700FDDAB7 /* libon2_mem.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libon2_mem.a; path = ../vp6/lib/osx/Release/libon2_mem.a; sourceTree = SOURCE_ROOT; }; + 0C1537710BB797B30098DEFA /* libvp6d.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvp6d.a; path = ../vp6/lib/osx/Release/libvp6d.a; sourceTree = SOURCE_ROOT; }; + 0C1537890BB7981A0098DEFA /* libvputil.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvputil.a; path = ../vp6/lib/osx/Release/libvputil.a; sourceTree = SOURCE_ROOT; }; + 0C15379C0BB798500098DEFA /* libvpxblit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvpxblit.a; path = ../vp6/lib/osx/Release/libvpxblit.a; sourceTree = SOURCE_ROOT; }; + 0C1537B00BB7987F0098DEFA /* libvppp.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvppp.a; path = ../vp6/lib/osx/Release/libvppp.a; sourceTree = SOURCE_ROOT; }; + 0C33627A0BB79481008CC17A /* vp6stub.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = vp6stub.cpp; sourceTree = "<group>"; }; + D2AAC0630554660B00DB518D /* libnsvdec_vp6.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = libnsvdec_vp6.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D289988505E68E00004EDB86 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C1537720BB797B30098DEFA /* libvp6d.a in Frameworks */, + 0C15378A0BB7981A0098DEFA /* libvputil.a in Frameworks */, + 0C15379D0BB798500098DEFA /* libvpxblit.a in Frameworks */, + 0C1537B10BB7987F0098DEFA /* libvppp.a in Frameworks */, + 0C14248A0BB820A200FDDAB7 /* libdxv.a in Frameworks */, + 0C1424990BB820D700FDDAB7 /* libon2_mem.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 08FB7794FE84155DC02AAC07 /* nsvdec_vp6 */ = { + isa = PBXGroup; + children = ( + 0C3362BB0BB796BA008CC17A /* VP6 */, + 08FB7795FE84155DC02AAC07 /* Source */, + 1AB674ADFE9D54B511CA2CBB /* Products */, + ); + name = nsvdec_vp6; + sourceTree = "<group>"; + }; + 08FB7795FE84155DC02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + 0C33627A0BB79481008CC17A /* vp6stub.cpp */, + ); + name = Source; + sourceTree = "<group>"; + }; + 0C3362BB0BB796BA008CC17A /* VP6 */ = { + isa = PBXGroup; + children = ( + 0C1537710BB797B30098DEFA /* libvp6d.a */, + 0C15379C0BB798500098DEFA /* libvpxblit.a */, + 0C1537B00BB7987F0098DEFA /* libvppp.a */, + 0C1537890BB7981A0098DEFA /* libvputil.a */, + 0C1424890BB820A200FDDAB7 /* libdxv.a */, + 0C1424980BB820D700FDDAB7 /* libon2_mem.a */, + ); + name = VP6; + sourceTree = "<group>"; + }; + 1AB674ADFE9D54B511CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + D2AAC0630554660B00DB518D /* libnsvdec_vp6.dylib */, + ); + name = Products; + sourceTree = "<group>"; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + D2AAC0600554660B00DB518D /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + D2AAC0620554660B00DB518D /* nsvdec_vp6 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB914A08733D8E0010E9CD /* Build configuration list for PBXNativeTarget "nsvdec_vp6" */; + buildPhases = ( + D2AAC0600554660B00DB518D /* Headers */, + D2AAC0610554660B00DB518D /* Sources */, + D289988505E68E00004EDB86 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = nsvdec_vp6; + productName = nsvdec_vp6; + productReference = D2AAC0630554660B00DB518D /* libnsvdec_vp6.dylib */; + productType = "com.apple.product-type.library.dynamic"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 08FB7793FE84155DC02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 1DEB914E08733D8E0010E9CD /* Build configuration list for PBXProject "nsvdec_vp6" */; + hasScannedForEncodings = 1; + mainGroup = 08FB7794FE84155DC02AAC07 /* nsvdec_vp6 */; + projectDirPath = ""; + targets = ( + D2AAC0620554660B00DB518D /* nsvdec_vp6 */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + D2AAC0610554660B00DB518D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C33627B0BB79481008CC17A /* vp6stub.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1DEB914B08733D8E0010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + EXECUTABLE_PREFIX = lib; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INSTALL_PATH = /usr/local/lib; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_2)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_3)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../vp6/lib/Release\""; + LIBRARY_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)/../vp6/lib/osx/Release\""; + LIBRARY_SEARCH_PATHS_QUOTED_3 = "\"$(SRCROOT)/../vp6/lib/osx/Release\""; + PRODUCT_NAME = nsvdec_vp6; + ZERO_LINK = YES; + }; + name = Debug; + }; + 1DEB914C08733D8E0010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + EXECUTABLE_PREFIX = lib; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + INSTALL_PATH = /usr/local/lib; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_2)", + "$(LIBRARY_SEARCH_PATHS_QUOTED_3)", + ); + LIBRARY_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/../vp6/lib/Release\""; + LIBRARY_SEARCH_PATHS_QUOTED_2 = "\"$(SRCROOT)/../vp6/lib/osx/Release\""; + LIBRARY_SEARCH_PATHS_QUOTED_3 = "\"$(SRCROOT)/../vp6/lib/osx/Release\""; + PRODUCT_NAME = nsvdec_vp6; + }; + name = Release; + }; + 1DEB914F08733D8E0010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ../Wasabi; + PREBINDING = NO; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + }; + name = Debug; + }; + 1DEB915008733D8E0010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ../Wasabi; + PREBINDING = NO; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB914A08733D8E0010E9CD /* Build configuration list for PBXNativeTarget "nsvdec_vp6" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB914B08733D8E0010E9CD /* Debug */, + 1DEB914C08733D8E0010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB914E08733D8E0010E9CD /* Build configuration list for PBXProject "nsvdec_vp6" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB914F08733D8E0010E9CD /* Debug */, + 1DEB915008733D8E0010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; +} diff --git a/Src/nsvdec_vp6/vp6stub.cpp b/Src/nsvdec_vp6/vp6stub.cpp new file mode 100644 index 00000000..31d2326a --- /dev/null +++ b/Src/nsvdec_vp6/vp6stub.cpp @@ -0,0 +1,208 @@ +/* +** nsvdec_vp6: vp6stub.cpp - VP6 decompressor +** +** The VP3 portions that this plug-in links with are Copyright (C) On2, Inc. +** For information on the license of VP3, please see: http://www.vp3.com/ +** (or vp32\vp3_license.txt if you got all files with this) +** +** Copyright (C) 2001-2002 Nullsoft, Inc. +** +** This software is provided 'as-is', without any express or implied warranty. +** In no event will the authors be held liable for any damages arising from the use of this software. +** +** Permission is granted to anyone to use this software for any purpose, including commercial +** applications, and to alter it and redistribute it freely, subject to the following restrictions: +** 1. The origin of this software must not be misrepresented; you must not claim that you wrote the +** original software. If you use this software in a product, an acknowledgment in the product +** documentation would be appreciated but is not required. +** 2. Altered source versions must be plainly marked as such, and must not be misrepresented as +** being the original software. +** 3. This notice may not be removed or altered from any source distribution. +** +** +*/ +#ifdef _WIN32 +#include <windows.h> +#endif +#include <bfc/platform/export.h> +#include "../nsv/nsvlib.h" +#include "../nsv/dec_if.h" +#include "duck_dxl.h" +#include <stddef.h> +extern "C" { + void GetImageBufs(DXL_XIMAGE_HANDLE x, YV12_PLANES *p); + void vp60_SetParameter ( DXL_XIMAGE_HANDLE src, int Command, uintptr_t Parameter ); + +}; + +int vp6_postProcess=6; +int vp6_cpuFree=70; +int vp6_deInterlace=0; +int vp6_addNoise=1; + +typedef enum +{ + PBC_SET_POSTPROC, + PBC_SET_CPUFREE, + PBC_MAX_PARAM, + PBC_SET_TESTMODE, + PBC_SET_PBSTRUCT, + PBC_SET_BLACKCLAMP, + PBC_SET_WHITECLAMP, + PBC_SET_REFERENCEFRAME, + PBC_SET_DEINTERLACEMODE, + PBC_SET_ADDNOISE + +} PB_COMMAND_TYPE; + +extern "C" +{ + int vp60_Init(void); + int vp60_Exit(void); +} + +class VP6_Decoder : public IVideoDecoder { + public: + VP6_Decoder(int w, int h); + ~VP6_Decoder(); + int decode(int need_kf, + void *in, int in_len, + void **out, // out is set to a pointer to data + unsigned int *out_type, // 'Y','V','1','2' is currently defined + int *is_kf); + void flush() { } + + void initMmx(); + + private: + int l_tcpu, l_pp; + static int init; + static int mmx_available; + DXL_XIMAGE_HANDLE xim; + YV12_PLANES vidbufdec; +}; + +int VP6_Decoder::init; +int VP6_Decoder::mmx_available; + +VP6_Decoder::VP6_Decoder(int w, int h) +{ + l_tcpu=-1; + l_pp=-1; + if (!init) + { + init=1; + DXL_InitVideo(0,0); + vp60_Init(); + initMmx(); + } + vidbufdec.y.baseAddr=0; + xim = DXL_AlterXImage( NULL, (unsigned char *)"" ,NSV_MAKETYPE('V','P','6','0'), DXRGBNULL,w,h); +} + +void VP6_Decoder::initMmx() +{ +#ifdef _M_IX86 + unsigned __int32 retval1,retval2; + __try { + _asm { + mov eax, 1 // set up CPUID to return processor version and features + // 0 = vendor string, 1 = version info, 2 = cache info + _emit 0x0f // code bytes = 0fh, 0a2h + _emit 0xa2 + mov retval1, eax + mov retval2, edx + } + } __except(EXCEPTION_EXECUTE_HANDLER) { retval1 = retval2 = 0;} + mmx_available = retval1 && (retval2&0x800000); +#else + mmx_available=0; +#endif +} + +VP6_Decoder::~VP6_Decoder() +{ + if ( xim ) DXL_DestroyXImage( xim); +} + +int VP6_Decoder::decode(int need_kf, + void *in, int in_len, + void **out, // out is set to a pointer to data + unsigned int *out_type, // 'Y','V','1','2' is currently defined + int *is_kf) +{ + unsigned char *data=(unsigned char *)in; + + if (!xim) return -1; + + *out_type=NSV_MAKETYPE('Y','V','1','2'); + + if (vp6_postProcess != l_pp || vp6_cpuFree != l_tcpu) + { + l_pp=vp6_postProcess; + l_tcpu=vp6_cpuFree; + if(vp6_cpuFree) + DXL_SetParameter(xim, PBC_SET_CPUFREE, vp6_cpuFree); + else + DXL_SetParameter(xim, PBC_SET_POSTPROC, vp6_postProcess); + + DXL_SetParameter(xim, PBC_SET_DEINTERLACEMODE, vp6_deInterlace ); + DXL_SetParameter(xim, PBC_SET_ADDNOISE, vp6_addNoise); + + DXL_SetParameter(xim, PBC_SET_BLACKCLAMP,0); + DXL_SetParameter(xim, PBC_SET_WHITECLAMP,0); + } + + DXL_AlterXImageData( xim, data); + DXL_SetXImageCSize(xim, in_len); + + *is_kf=!(!in_len || data[0] > 0x7f); + + *out=NULL; + + if ((need_kf && !*is_kf) || !in_len) + { + return 0; + } + + if (!DXL_dxImageToVScreen( xim, NULL)) + { +#ifdef _M_IX86 + if(mmx_available) + { + _asm { + emms; + }; + } +#endif + GetImageBufs(xim,&vidbufdec); + *out=&vidbufdec; + return 0; + } + + return -1; +} + +#ifndef ACTIVEX_CONTROL +extern "C" { +DLLEXPORT IVideoDecoder *CreateVideoDecoder(int w, int h, double framerate, unsigned int fmt, int *flip) +{ + if (fmt == NSV_MAKETYPE('V','P','6','0') || fmt == NSV_MAKETYPE('V','P','6','1') || fmt == NSV_MAKETYPE('V','P','6','2')) + { + *flip=1; + return new VP6_Decoder(w,h); + } + return NULL; +} +} +#else +IVideoDecoder *VP6_CREATE(int w, int h, double framerate, unsigned int fmt, int *flip) +{ + if (fmt == NSV_MAKETYPE('V','P','6','0') || fmt == NSV_MAKETYPE('V','P','6','1') || fmt == NSV_MAKETYPE('V','P','6','2')) + { + *flip=1; + return new VP6_Decoder(w,h); + } + return NULL; +} +#endif
\ No newline at end of file |