Skip to content

Commit

Permalink
Almost got it linking...
Browse files Browse the repository at this point in the history
  • Loading branch information
MaddTheSane committed Oct 15, 2023
1 parent cfcebd3 commit 9b85e27
Show file tree
Hide file tree
Showing 45 changed files with 47,484 additions and 38 deletions.
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,12 @@
[submodule "Vendor/speexdsp"]
path = Vendor/speexdsp
url = https://github.com/xiph/speexdsp.git
[submodule "Vendor/opusfile"]
path = Vendor/opusfile
url = https://github.com/xiph/opusfile.git
[submodule "Vendor/ogg"]
path = Vendor/ogg
url = https://github.com/xiph/ogg.git
[submodule "Vendor/opus"]
path = Vendor/opus
url = https://github.com/xiph/opus.git
2,061 changes: 2,023 additions & 38 deletions Boxer.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions Other Sources/ADBToolkit/ADBAppKitVersionHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
#define NSAppKitVersionNumber10_8 1187
#endif

#ifdef __cplusplus
extern "C" {
#endif

BOOL isRunningOnLeopard(void);
BOOL isRunningOnSnowLeopard(void);
BOOL isRunningOnLion(void);
Expand All @@ -57,3 +61,6 @@ BOOL isRunningOnLionOrAbove(void);
BOOL isRunningOnMountainLionOrAbove(void);
BOOL isRunningOnMavericksOrAbove(void);

#ifdef __cplusplus
}
#endif
16 changes: 16 additions & 0 deletions Other Sources/Overrides/opus/Archs/celt.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// celt.c
// opus_boxer
//
// Created by C.W. Betts on 10/14/23.
//

#ifdef __x86_64__
#include "celt/x86/celt_lpc_sse4_1.c"
#include "celt/x86/pitch_sse4_1.c"
#include "celt/x86/vq_sse2.c"
#include "celt/x86/pitch_sse2.c"
#elif defined(__aarch64__)
#include "celt/arm/pitch_neon_intr.c"
#include "celt/arm/celt_neon_intr.c"
#endif
20 changes: 20 additions & 0 deletions Other Sources/Overrides/opus/Archs/silk.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// silk.c
// opus_boxer
//
// Created by C.W. Betts on 10/14/23.
//

#ifdef __x86_64__
#include "silk/x86/NSQ_sse4_1.c"
#include "silk/x86/NSQ_del_dec_sse4_1.c"
#include "silk/x86/VAD_sse4_1.c"
#include "silk/x86/VQ_WMat_EC_sse4_1.c"
#include "silk/fixed/x86/vector_ops_FIX_sse4_1.c"
#include "silk/fixed/x86/burg_modified_FIX_sse4_1.c"
#elif defined(__aarch64__)
#include "silk/arm/biquad_alt_neon_intr.c"
#include "silk/arm/NSQ_neon.c"
#include "silk/arm/LPC_inv_pred_gain_neon_intr.c"
#include "silk/arm/NSQ_del_dec_neon_intr.c"
#endif
1,643 changes: 1,643 additions & 0 deletions Other Sources/Overrides/opus/opus.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

202 changes: 202 additions & 0 deletions Vendor/libpng/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
# selectively extracted and adapted from the libpng CMakeLists.txt, which has the following copyright notice:


# Copyright (C) 2018 Cosmin Truta
# Copyright (C) 2007,2009-2018 Glenn Randers-Pehrson
# Written by Christian Ehrlicher, 2007
# Revised by Roger Lowman, 2009-2010
# Revised by Clifford Yapp, 2011-2012,2017
# Revised by Roger Leigh, 2016
# Revised by Andreas Franek, 2016
# Revised by Sam Serrels, 2017
# Revised by Vadim Barkov, 2017
# Revised by Vicky Pfau, 2018
# Revised by Cameron Cawley, 2018
# Revised by Cosmin Truta, 2018
# Revised by Kyle Bentley, 2018

# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h



add_library(png STATIC
png.c
pngerror.c
pngget.c
pngmem.c
pngpread.c
pngread.c
pngrio.c
pngrtran.c
pngrutil.c
pngset.c
pngtrans.c
pngwio.c
pngwrite.c
pngwtran.c
pngwutil.c
)

option(PNG_HARDWARE_OPTIMIZATIONS "Enable hardware optimizations for libpng" OFF)

if(PNG_HARDWARE_OPTIMIZATIONS)

message(STATUS "CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}")

# set definitions and sources for arm
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
set(PNG_ARM_NEON_POSSIBLE_VALUES check on off)
set(PNG_ARM_NEON "check" CACHE STRING "Enable ARM NEON optimizations:
check: (default) use internal checking code;
off: disable the optimizations;
on: turn on unconditionally.")
set_property(CACHE PNG_ARM_NEON PROPERTY STRINGS
${PNG_ARM_NEON_POSSIBLE_VALUES})
list(FIND PNG_ARM_NEON_POSSIBLE_VALUES ${PNG_ARM_NEON} index)
if(index EQUAL -1)
message(FATAL_ERROR
"PNG_ARM_NEON must be one of [${PNG_ARM_NEON_POSSIBLE_VALUES}]")
elseif(NOT ${PNG_ARM_NEON} STREQUAL "off")
target_sources(png PRIVATE
arm/arm_init.c
arm/filter_neon.S
arm/filter_neon_intrinsics.c
arm/palette_neon_intrinsics.c)

if(${PNG_ARM_NEON} STREQUAL "on")
target_compile_definitions(png PUBLIC -DPNG_ARM_NEON_OPT=2)
elseif(${PNG_ARM_NEON} STREQUAL "check")
target_compile_definitions(png PUBLIC -DPNG_ARM_NEON_CHECK_SUPPORTED)
endif()
else()
target_compile_definitions(png PUBLIC -DPNG_ARM_NEON_OPT=0)
endif()
endif()

# set definitions and sources for powerpc
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc*" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64*")
set(PNG_POWERPC_VSX_POSSIBLE_VALUES on off)
set(PNG_POWERPC_VSX "on" CACHE STRING "Enable POWERPC VSX optimizations:
off: disable the optimizations.")
set_property(CACHE PNG_POWERPC_VSX PROPERTY STRINGS
${PNG_POWERPC_VSX_POSSIBLE_VALUES})
list(FIND PNG_POWERPC_VSX_POSSIBLE_VALUES ${PNG_POWERPC_VSX} index)
if(index EQUAL -1)
message(FATAL_ERROR
"PNG_POWERPC_VSX must be one of [${PNG_POWERPC_VSX_POSSIBLE_VALUES}]")
elseif(NOT ${PNG_POWERPC_VSX} STREQUAL "off")
target_sources(png PRIVATE
powerpc/powerpc_init.c
powerpc/filter_vsx_intrinsics.c)
if(${PNG_POWERPC_VSX} STREQUAL "on")
target_compile_definitions(png PUBLIC -DPNG_POWERPC_VSX_OPT=2)
endif()
else()
target_compile_definitions(png PUBLIC -DPNG_POWERPC_VSX_OPT=0)
endif()
endif()

# set definitions and sources for intel
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i?86" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "^x86_64*")
set(PNG_INTEL_SSE_POSSIBLE_VALUES on off)
set(PNG_INTEL_SSE "on" CACHE STRING "Enable INTEL_SSE optimizations:
off: disable the optimizations")
set_property(CACHE PNG_INTEL_SSE PROPERTY STRINGS
${PNG_INTEL_SSE_POSSIBLE_VALUES})
list(FIND PNG_INTEL_SSE_POSSIBLE_VALUES ${PNG_INTEL_SSE} index)
if(index EQUAL -1)
message(FATAL_ERROR
"PNG_INTEL_SSE must be one of [${PNG_INTEL_SSE_POSSIBLE_VALUES}]")
elseif(NOT ${PNG_INTEL_SSE} STREQUAL "off")
target_sources(png PRIVATE
intel/intel_init.c
intel/filter_sse2_intrinsics.c)
if(${PNG_INTEL_SSE} STREQUAL "on")
target_compile_definitions(png PUBLIC -DPNG_INTEL_SSE_OPT=1)
endif()
else()
target_compile_definitions(png PUBLIC -DPNG_INTEL_SSE_OPT=0)
endif()
endif()

# set definitions and sources for MIPS
if(CMAKE_SYSTEM_PROCESSOR MATCHES "mipsel*" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "mips64el*")
set(PNG_MIPS_MSA_POSSIBLE_VALUES on off)
set(PNG_MIPS_MSA "on" CACHE STRING "Enable MIPS_MSA optimizations:
off: disable the optimizations")
set_property(CACHE PNG_MIPS_MSA PROPERTY STRINGS
${PNG_MIPS_MSA_POSSIBLE_VALUES})
list(FIND PNG_MIPS_MSA_POSSIBLE_VALUES ${PNG_MIPS_MSA} index)
if(index EQUAL -1)
message(FATAL_ERROR
"PNG_MIPS_MSA must be one of [${PNG_MIPS_MSA_POSSIBLE_VALUES}]")
elseif(NOT ${PNG_MIPS_MSA} STREQUAL "off")
target_sources(png PRIVATE
mips/mips_init.c
mips/filter_msa_intrinsics.c)
if(${PNG_MIPS_MSA} STREQUAL "on")
target_compile_definitions(png PUBLIC -DPNG_MIPS_MSA_OPT=2)
endif()
else()
target_compile_definitions(png PUBLIC -DPNG_MIPS_MSA_OPT=0)
endif()
endif()

else(PNG_HARDWARE_OPTIMIZATIONS)

# set definitions and sources for arm
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
target_compile_definitions(png PUBLIC -DPNG_ARM_NEON_OPT=0)
endif()

# set definitions and sources for powerpc
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc*" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64*")
target_compile_definitions(png PUBLIC -DPNG_POWERPC_VSX_OPT=0)
endif()

# set definitions and sources for intel
if(CMAKE_SYSTEM_PROCESSOR MATCHES "^i?86" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "^x86_64*")
target_compile_definitions(png PUBLIC -DPNG_INTEL_SSE_OPT=0)
endif()

# set definitions and sources for MIPS
if(CMAKE_SYSTEM_PROCESSOR MATCHES "mipsel*" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "mips64el*")
target_compile_definitions(png PUBLIC -DPNG_MIPS_MSA_OPT=0)
endif()

endif(PNG_HARDWARE_OPTIMIZATIONS)

target_sources(png PRIVATE
# public headers
png.h
pngconf.h
pnglibconf.h

# private headers
pngpriv.h
pngdebug.h
pnginfo.h
pngstruct.h
)

target_include_directories(png PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)

target_link_libraries(png PUBLIC ZLIB::ZLIB)

if(NOT MSVC)
target_compile_options(png PRIVATE
-Wno-self-assign
)
endif()
Loading

0 comments on commit 9b85e27

Please sign in to comment.