3rdparty: convert jpgd to external library

This commit is contained in:
kojin 2021-07-15 15:17:32 -04:00 committed by Kojin
parent 975f33df52
commit 9768cfb4ba
7 changed files with 100 additions and 23 deletions

View File

@ -27,7 +27,6 @@
// #define JPGD_USE_SSE2 to 0 to completely disable SSE2 usage.
//
#include "PrecompiledHeader.h"
#include "jpgd.h"
#include <string.h>
#include <algorithm>

67
3rdparty/jpgd/jpgd.vcxproj vendored Normal file
View File

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Devel|Win32">
<Configuration>Devel</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Devel|x64">
<Configuration>Devel</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<Import Project="$(SolutionDir)common\vsprops\WinSDK.props" />
<PropertyGroup Label="Globals">
<ProjectGuid>{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization Condition="$(Configuration.Contains(Release))">true</WholeProgramOptimization>
<UseDebugLibraries Condition="$(Configuration.Contains(Debug))">true</UseDebugLibraries>
<UseDebugLibraries Condition="!$(Configuration.Contains(Debug))">false</UseDebugLibraries>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="PropertySheets">
<Import Project="$(SolutionDir)3rdparty\DefaultProjectRootDir.props" />
<Import Project="$(SolutionDir)3rdparty\3rdparty.props" />
<Import Condition="$(Configuration.Contains(Debug))" Project="$(SolutionDir)common\vsprops\CodeGen_Debug.props" />
<Import Condition="$(Configuration.Contains(Devel))" Project="$(SolutionDir)common\vsprops\CodeGen_Devel.props" />
<Import Condition="$(Configuration.Contains(Release))" Project="$(SolutionDir)common\vsprops\CodeGen_Release.props" />
<Import Condition="!$(Configuration.Contains(Release))" Project="$(SolutionDir)common\vsprops\IncrementalLinking.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<ClCompile Include="jpgd.cpp" />
<ClCompile Include="jpge.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="jpgd.h" />
<ClInclude Include="jpgd_idct.h" />
<ClInclude Include="jpge.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
</Project>

View File

@ -28,7 +28,6 @@
// Code review revealed method load_block_16_8_8() (used for the non-default H2V1 sampling mode to downsample chroma) somehow didn't get the rounding factor fix from v1.02.
// v1.05, March 25, 2020: Added Apache 2.0 alternate license
#include "PrecompiledHeader.h"
#include "jpge.h"
#include <stdlib.h>

View File

@ -70,6 +70,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "yaml", "3rdparty\yaml-cpp\y
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchdr", "3rdparty\libchdr\libchdr.vcxproj", "{A0D2B3AD-1F72-4EE3-8B5C-F2C358DA35F0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpgd", "3rdparty\jpgd\jpgd.vcxproj", "{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug AVX2|Win32 = Debug AVX2|Win32
@ -590,6 +592,30 @@ Global
{A0D2B3AD-1F72-4EE3-8B5C-F2C358DA35F0}.Release|Win32.Build.0 = Release|Win32
{A0D2B3AD-1F72-4EE3-8B5C-F2C358DA35F0}.Release|x64.ActiveCfg = Release|x64
{A0D2B3AD-1F72-4EE3-8B5C-F2C358DA35F0}.Release|x64.Build.0 = Release|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Debug AVX2|Win32.ActiveCfg = Debug|Win32
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Debug AVX2|Win32.Build.0 = Debug|Win32
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Debug AVX2|x64.ActiveCfg = Debug|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Debug AVX2|x64.Build.0 = Debug|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Debug|Win32.ActiveCfg = Debug|Win32
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Debug|Win32.Build.0 = Debug|Win32
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Debug|x64.ActiveCfg = Debug|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Debug|x64.Build.0 = Debug|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Devel AVX2|Win32.ActiveCfg = Devel|Win32
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Devel AVX2|Win32.Build.0 = Devel|Win32
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Devel AVX2|x64.ActiveCfg = Devel|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Devel AVX2|x64.Build.0 = Devel|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Devel|Win32.ActiveCfg = Devel|Win32
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Devel|Win32.Build.0 = Devel|Win32
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Devel|x64.ActiveCfg = Devel|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Devel|x64.Build.0 = Devel|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Release AVX2|Win32.ActiveCfg = Release|Win32
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Release AVX2|Win32.Build.0 = Release|Win32
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Release AVX2|x64.ActiveCfg = Release|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Release AVX2|x64.Build.0 = Release|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Release|Win32.ActiveCfg = Release|Win32
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Release|Win32.Build.0 = Release|Win32
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Release|x64.ActiveCfg = Release|x64
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -616,6 +642,7 @@ Global
{47AFDBEF-F15F-4BC0-B436-5BE443C3F80F} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{48329442-E41B-4A1F-8364-36EEE1B71343} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{A0D2B3AD-1F72-4EE3-8B5C-F2C358DA35F0} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{ED2F21FD-0A36-4A8F-9B90-E7D92A2ACB63} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0BC474EA-3628-45D3-9DBC-E22D0B7E0F77}

View File

@ -14,11 +14,12 @@
*/
#include "PrecompiledHeader.h"
#include <jpgd/jpge.h>
#include "videodev.h"
#include "cam-windows.h"
#include "usb-eyetoy-webcam.h"
#include "jo_mpeg.h"
#include "jpgd/jpge.h"
#include "USB/Win32/Config_usb.h"
#include "USB/Win32/resource_usb.h"

View File

@ -447,8 +447,6 @@
<ClCompile Include="USB\usb-eyetoy\api_init_win32_eyetoy.cpp" />
<ClCompile Include="USB\usb-eyetoy\cam-windows.cpp" />
<ClCompile Include="USB\usb-eyetoy\jo_mpeg.cpp" />
<ClCompile Include="..\3rdparty\jpgd\jpgd.cpp" />
<ClCompile Include="..\3rdparty\jpgd\jpge.cpp" />
<ClCompile Include="USB\usb-eyetoy\usb-eyetoy-webcam.cpp" />
<ClCompile Include="USB\usb-hid\api_init_win32_hid.cpp" />
<ClCompile Include="USB\usb-hid\raw\rawinput.cpp" />
@ -932,8 +930,6 @@
<ClInclude Include="USB\shared\shared_usb.h" />
<ClInclude Include="USB\usb-eyetoy\cam-windows.h" />
<ClInclude Include="USB\usb-eyetoy\jo_mpeg.h" />
<ClInclude Include="..\3rdparty\jpgd\jpgd.h" />
<ClInclude Include="..\3rdparty\jpgd\jpge.h" />
<ClInclude Include="USB\usb-eyetoy\ov519.h" />
<ClInclude Include="USB\usb-eyetoy\usb-eyetoy-webcam.h" />
<ClInclude Include="USB\usb-eyetoy\videodev.h" />
@ -1168,10 +1164,13 @@
<Project>{677b7d11-d5e1-40b3-88b1-9a4df83d2213}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="$(SolutionDir)3rdparty\jpgd\jpgd.vcxproj">
<Project>{ed2f21fd-0a36-4a8f-9b90-e7d92a2acb63}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Manifest Include="windows\PCSX2.manifest" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
</Project>
</Project>

View File

@ -533,9 +533,6 @@
<ClCompile Include="IopMem.cpp">
<Filter>System\Ps2\Iop</Filter>
</ClCompile>
<ClCompile Include="IopSif.cpp">
<Filter>System\Ps2\Iop</Filter>
</ClCompile>
<ClCompile Include="IopSio2.cpp">
<Filter>System\Ps2\Iop</Filter>
</ClCompile>
@ -1212,12 +1209,6 @@
<ClCompile Include="USB\usb-mic\usb-mic-singstar.cpp">
<Filter>System\Ps2\USB\usb-mic</Filter>
</ClCompile>
<ClCompile Include="..\3rdparty\jpgd\jpgd.cpp">
<Filter>System\Ps2\USB\usb-eyetoy\jpgd</Filter>
</ClCompile>
<ClCompile Include="..\3rdparty\jpgd\jpge.cpp">
<Filter>System\Ps2\USB\usb-eyetoy\jpgd</Filter>
</ClCompile>
<ClCompile Include="USB\usb-eyetoy\jo_mpeg.cpp">
<Filter>System\Ps2\USB\usb-eyetoy</Filter>
</ClCompile>
@ -2245,12 +2236,6 @@
<ClInclude Include="USB\usb-eyetoy\videodeviceproxy.h">
<Filter>System\Ps2\USB\usb-eyetoy</Filter>
</ClInclude>
<ClInclude Include="..\3rdparty\jpgd\jpgd.h">
<Filter>System\Ps2\USB\usb-eyetoy\jpgd</Filter>
</ClInclude>
<ClInclude Include="..\3rdparty\jpgd\jpge.h">
<Filter>System\Ps2\USB\usb-eyetoy\jpgd</Filter>
</ClInclude>
<ClInclude Include="USB\usb-hid\hidproxy.h">
<Filter>System\Ps2\USB\usb-hid</Filter>
</ClInclude>