3rdparty: Add libwebp @ v1.3.2

This commit is contained in:
Stenzek 2023-10-02 16:02:42 +10:00 committed by Connor McLaughlin
parent 2b329e6899
commit 2b0593e5ff
5 changed files with 421 additions and 0 deletions

3
.gitmodules vendored
View File

@ -27,3 +27,6 @@
[submodule "3rdparty/rcheevos/rcheevos"] [submodule "3rdparty/rcheevos/rcheevos"]
path = 3rdparty/rcheevos/rcheevos path = 3rdparty/rcheevos/rcheevos
url = https://github.com/RetroAchievements/rcheevos.git url = https://github.com/RetroAchievements/rcheevos.git
[submodule "3rdparty/libwebp/libwebp"]
path = 3rdparty/libwebp/libwebp
url = https://github.com/webmproject/libwebp

82
3rdparty/libwebp/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,82 @@
# Intentionally only includes the decoder, not the encoder, to save on binary size.
add_library(pcsx2-libwebp
libwebp/src/dec/alpha_dec.c
libwebp/src/dec/alphai_dec.h
libwebp/src/dec/buffer_dec.c
libwebp/src/dec/common_dec.h
libwebp/src/dec/frame_dec.c
libwebp/src/dec/idec_dec.c
libwebp/src/dec/io_dec.c
libwebp/src/dec/quant_dec.c
libwebp/src/dec/tree_dec.c
libwebp/src/dec/vp8_dec.c
libwebp/src/dec/vp8_dec.h
libwebp/src/dec/vp8i_dec.h
libwebp/src/dec/vp8l_dec.c
libwebp/src/dec/vp8li_dec.h
libwebp/src/dec/webp_dec.c
libwebp/src/dec/webpi_dec.h
libwebp/src/dsp/alpha_processing.c
libwebp/src/dsp/alpha_processing_sse2.c
libwebp/src/dsp/alpha_processing_sse41.c
libwebp/src/dsp/common_sse2.h
libwebp/src/dsp/common_sse41.h
libwebp/src/dsp/cpu.c
libwebp/src/dsp/cpu.h
libwebp/src/dsp/dec.c
libwebp/src/dsp/dec_clip_tables.c
libwebp/src/dsp/dec_sse2.c
libwebp/src/dsp/dec_sse41.c
libwebp/src/dsp/dsp.h
libwebp/src/dsp/filters.c
libwebp/src/dsp/filters_sse2.c
libwebp/src/dsp/lossless.c
libwebp/src/dsp/lossless.h
libwebp/src/dsp/lossless_common.h
libwebp/src/dsp/lossless_sse2.c
libwebp/src/dsp/lossless_sse41.c
libwebp/src/dsp/rescaler.c
libwebp/src/dsp/rescaler_sse2.c
libwebp/src/dsp/upsampling.c
libwebp/src/dsp/upsampling_sse2.c
libwebp/src/dsp/upsampling_sse41.c
libwebp/src/dsp/yuv.c
libwebp/src/dsp/yuv.h
libwebp/src/dsp/yuv_sse2.c
libwebp/src/dsp/yuv_sse41.c
libwebp/src/utils/bit_reader_utils.c
libwebp/src/utils/bit_reader_utils.h
libwebp/src/utils/color_cache_utils.c
libwebp/src/utils/color_cache_utils.h
libwebp/src/utils/huffman_utils.c
libwebp/src/utils/huffman_utils.h
libwebp/src/utils/quant_levels_dec_utils.c
libwebp/src/utils/quant_levels_dec_utils.h
libwebp/src/utils/random_utils.c
libwebp/src/utils/random_utils.h
libwebp/src/utils/rescaler_utils.c
libwebp/src/utils/rescaler_utils.h
libwebp/src/utils/thread_utils.c
libwebp/src/utils/thread_utils.h
libwebp/src/utils/utils.c
libwebp/src/utils/utils.h
libwebp/src/webp/decode.h
libwebp/src/webp/demux.h
libwebp/src/webp/encode.h
libwebp/src/webp/format_constants.h
libwebp/src/webp/mux.h
libwebp/src/webp/mux_types.h
libwebp/src/webp/types.h
)
if(NOT MSVC OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# clang-cl won't build SSE4 functions without -msse4.1.
target_compile_options(pcsx2-libwebp PRIVATE "-msse4.1")
endif()
target_include_directories(pcsx2-libwebp PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/libwebp")
target_include_directories(pcsx2-libwebp INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/libwebp/src")
add_library(WebP::libwebp ALIAS pcsx2-libwebp)
disable_compiler_warnings_for_target(pcsx2-libwebp)

1
3rdparty/libwebp/libwebp vendored Submodule

@ -0,0 +1 @@
Subproject commit ca332209cb5567c9b249c86788cb2dbf8847e760

113
3rdparty/libwebp/libwebp.vcxproj vendored Normal file
View File

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(SolutionDir)common\vsprops\BaseProjectConfig.props" />
<Import Project="$(SolutionDir)common\vsprops\WinSDK.props" />
<PropertyGroup Label="Globals">
<ProjectGuid>{522DAF2A-1F24-4742-B2C4-A956411F6AB2}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset Condition="!$(Configuration.Contains(Clang))">$(DefaultPlatformToolset)</PlatformToolset>
<PlatformToolset Condition="$(Configuration.Contains(Clang))">ClangCL</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>
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>TurnOffAllWarnings</WarningLevel>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)\libwebp;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalOptions Condition="$(Configuration.Contains(Clang)) And '$(Platform)'=='x64'">%(AdditionalOptions) -msse4.1</AdditionalOptions>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="libwebp\src\dec\alpha_dec.c" />
<ClCompile Include="libwebp\src\dec\buffer_dec.c" />
<ClCompile Include="libwebp\src\dec\frame_dec.c" />
<ClCompile Include="libwebp\src\dec\idec_dec.c" />
<ClCompile Include="libwebp\src\dec\io_dec.c" />
<ClCompile Include="libwebp\src\dec\quant_dec.c" />
<ClCompile Include="libwebp\src\dec\tree_dec.c" />
<ClCompile Include="libwebp\src\dec\vp8l_dec.c" />
<ClCompile Include="libwebp\src\dec\vp8_dec.c" />
<ClCompile Include="libwebp\src\dec\webp_dec.c" />
<ClCompile Include="libwebp\src\dsp\alpha_processing.c" />
<ClCompile Include="libwebp\src\dsp\alpha_processing_sse2.c" />
<ClCompile Include="libwebp\src\dsp\alpha_processing_sse41.c" />
<ClCompile Include="libwebp\src\dsp\cpu.c" />
<ClCompile Include="libwebp\src\dsp\dec.c" />
<ClCompile Include="libwebp\src\dsp\dec_clip_tables.c" />
<ClCompile Include="libwebp\src\dsp\dec_sse2.c" />
<ClCompile Include="libwebp\src\dsp\dec_sse41.c" />
<ClCompile Include="libwebp\src\dsp\filters.c" />
<ClCompile Include="libwebp\src\dsp\filters_sse2.c" />
<ClCompile Include="libwebp\src\dsp\lossless.c" />
<ClCompile Include="libwebp\src\dsp\lossless_sse2.c" />
<ClCompile Include="libwebp\src\dsp\lossless_sse41.c" />
<ClCompile Include="libwebp\src\dsp\rescaler.c" />
<ClCompile Include="libwebp\src\dsp\rescaler_sse2.c" />
<ClCompile Include="libwebp\src\dsp\upsampling.c" />
<ClCompile Include="libwebp\src\dsp\upsampling_sse2.c" />
<ClCompile Include="libwebp\src\dsp\upsampling_sse41.c" />
<ClCompile Include="libwebp\src\dsp\yuv.c" />
<ClCompile Include="libwebp\src\dsp\yuv_sse2.c" />
<ClCompile Include="libwebp\src\dsp\yuv_sse41.c" />
<ClCompile Include="libwebp\src\utils\bit_reader_utils.c" />
<ClCompile Include="libwebp\src\utils\color_cache_utils.c" />
<ClCompile Include="libwebp\src\utils\huffman_utils.c" />
<ClCompile Include="libwebp\src\utils\quant_levels_dec_utils.c" />
<ClCompile Include="libwebp\src\utils\random_utils.c" />
<ClCompile Include="libwebp\src\utils\rescaler_utils.c" />
<ClCompile Include="libwebp\src\utils\thread_utils.c" />
<ClCompile Include="libwebp\src\utils\utils.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="libwebp\src\dec\alphai_dec.h" />
<ClInclude Include="libwebp\src\dec\common_dec.h" />
<ClInclude Include="libwebp\src\dec\vp8i_dec.h" />
<ClInclude Include="libwebp\src\dec\vp8li_dec.h" />
<ClInclude Include="libwebp\src\dec\vp8_dec.h" />
<ClInclude Include="libwebp\src\dec\webpi_dec.h" />
<ClInclude Include="libwebp\src\dsp\common_sse2.h" />
<ClInclude Include="libwebp\src\dsp\common_sse41.h" />
<ClInclude Include="libwebp\src\dsp\cpu.h" />
<ClInclude Include="libwebp\src\dsp\dsp.h" />
<ClInclude Include="libwebp\src\dsp\lossless.h" />
<ClInclude Include="libwebp\src\dsp\lossless_common.h" />
<ClInclude Include="libwebp\src\dsp\yuv.h" />
<ClInclude Include="libwebp\src\utils\bit_reader_utils.h" />
<ClInclude Include="libwebp\src\utils\color_cache_utils.h" />
<ClInclude Include="libwebp\src\utils\huffman_utils.h" />
<ClInclude Include="libwebp\src\utils\quant_levels_dec_utils.h" />
<ClInclude Include="libwebp\src\utils\random_utils.h" />
<ClInclude Include="libwebp\src\utils\rescaler_utils.h" />
<ClInclude Include="libwebp\src\utils\thread_utils.h" />
<ClInclude Include="libwebp\src\utils\utils.h" />
<ClInclude Include="libwebp\src\webp\decode.h" />
<ClInclude Include="libwebp\src\webp\demux.h" />
<ClInclude Include="libwebp\src\webp\encode.h" />
<ClInclude Include="libwebp\src\webp\format_constants.h" />
<ClInclude Include="libwebp\src\webp\mux.h" />
<ClInclude Include="libwebp\src\webp\mux_types.h" />
<ClInclude Include="libwebp\src\webp\types.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
</Project>

222
3rdparty/libwebp/libwebp.vcxproj.filters vendored Normal file
View File

@ -0,0 +1,222 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="dec">
<UniqueIdentifier>{76c0f4d4-ee4a-4d7d-8945-35d0e8d14c31}</UniqueIdentifier>
</Filter>
<Filter Include="webp">
<UniqueIdentifier>{9b72c794-2ba2-4aab-af7d-6bddd88beedd}</UniqueIdentifier>
</Filter>
<Filter Include="utils">
<UniqueIdentifier>{67893497-bdc4-4e15-bb1b-16608bc150e7}</UniqueIdentifier>
</Filter>
<Filter Include="dsp">
<UniqueIdentifier>{98285b2d-d9ad-4642-bd53-59aeb8c9cb19}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="libwebp\src\dec\frame_dec.c">
<Filter>dec</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dec\idec_dec.c">
<Filter>dec</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dec\io_dec.c">
<Filter>dec</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dec\quant_dec.c">
<Filter>dec</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dec\tree_dec.c">
<Filter>dec</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dec\vp8_dec.c">
<Filter>dec</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dec\vp8l_dec.c">
<Filter>dec</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dec\webp_dec.c">
<Filter>dec</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dec\alpha_dec.c">
<Filter>dec</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dec\buffer_dec.c">
<Filter>dec</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\utils\utils.c">
<Filter>utils</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dsp\alpha_processing.c">
<Filter>dsp</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dsp\alpha_processing_sse2.c">
<Filter>dsp</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dsp\alpha_processing_sse41.c">
<Filter>dsp</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\utils\bit_reader_utils.c">
<Filter>utils</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dsp\cpu.c">
<Filter>dsp</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dsp\rescaler_sse2.c">
<Filter>dsp</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dsp\rescaler.c">
<Filter>dsp</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\utils\rescaler_utils.c">
<Filter>utils</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\utils\thread_utils.c">
<Filter>utils</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dsp\yuv_sse2.c">
<Filter>dsp</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dsp\yuv_sse41.c">
<Filter>dsp</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dsp\yuv.c">
<Filter>dsp</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\utils\color_cache_utils.c">
<Filter>utils</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\utils\huffman_utils.c">
<Filter>utils</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dsp\dec_sse41.c">
<Filter>dsp</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dsp\dec.c">
<Filter>dsp</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dsp\dec_sse2.c">
<Filter>dsp</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dsp\lossless_sse41.c">
<Filter>dsp</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dsp\lossless.c">
<Filter>dsp</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dsp\lossless_sse2.c">
<Filter>dsp</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dsp\filters.c">
<Filter>dsp</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dsp\filters_sse2.c">
<Filter>dsp</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dsp\upsampling_sse2.c">
<Filter>dsp</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dsp\upsampling_sse41.c">
<Filter>dsp</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dsp\upsampling.c">
<Filter>dsp</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\utils\random_utils.c">
<Filter>utils</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\utils\quant_levels_dec_utils.c">
<Filter>utils</Filter>
</ClCompile>
<ClCompile Include="libwebp\src\dsp\dec_clip_tables.c">
<Filter>dsp</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="libwebp\src\dec\vp8_dec.h">
<Filter>dec</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\dec\vp8i_dec.h">
<Filter>dec</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\dec\vp8li_dec.h">
<Filter>dec</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\dec\webpi_dec.h">
<Filter>dec</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\dec\alphai_dec.h">
<Filter>dec</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\dec\common_dec.h">
<Filter>dec</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\webp\format_constants.h">
<Filter>webp</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\webp\mux.h">
<Filter>webp</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\webp\mux_types.h">
<Filter>webp</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\webp\types.h">
<Filter>webp</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\webp\decode.h">
<Filter>webp</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\webp\demux.h">
<Filter>webp</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\webp\encode.h">
<Filter>webp</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\utils\utils.h">
<Filter>utils</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\dsp\common_sse41.h">
<Filter>dsp</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\dsp\common_sse2.h">
<Filter>dsp</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\utils\bit_reader_utils.h">
<Filter>utils</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\dsp\cpu.h">
<Filter>dsp</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\utils\rescaler_utils.h">
<Filter>utils</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\utils\thread_utils.h">
<Filter>utils</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\dsp\yuv.h">
<Filter>dsp</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\utils\color_cache_utils.h">
<Filter>utils</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\utils\huffman_utils.h">
<Filter>utils</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\dsp\dsp.h">
<Filter>dsp</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\dsp\lossless.h">
<Filter>dsp</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\dsp\lossless_common.h">
<Filter>dsp</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\utils\random_utils.h">
<Filter>utils</Filter>
</ClInclude>
<ClInclude Include="libwebp\src\utils\quant_levels_dec_utils.h">
<Filter>utils</Filter>
</ClInclude>
</ItemGroup>
</Project>