-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
146 changed files
with
50,133 additions
and
19,619 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ cd ../ | |
|
||
cd Builder | ||
./remove_all.sh | ||
./install_all.sh | ||
./install_all.sh | ||
./clear-cache.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
if(NOT DEFINED NASM) | ||
find_program(NASM NAMES nasm yasm DOC "Path to NASM/YASM executable") | ||
endif() | ||
message(STATUS "NASM = ${NASM}") | ||
|
||
if(SIMD_X86_64) | ||
set(NAFLAGS -fwin64 -DWIN64 -D__x86_64__) | ||
else() | ||
if(BORLAND) | ||
set(NAFLAGS -fobj -DOBJ32) | ||
else() | ||
set(NAFLAGS -fwin32 -DWIN32) | ||
endif() | ||
endif() | ||
set(NAFLAGS ${NAFLAGS} -I${CMAKE_SOURCE_DIR}/win/ -I${CMAKE_CURRENT_SOURCE_DIR}/) | ||
|
||
# This only works if building from the command line. There is currently no way | ||
# to set a variable's value based on the build type when using the MSVC IDE. | ||
if(CMAKE_BUILD_TYPE STREQUAL "Debug" | ||
OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") | ||
set(NAFLAGS ${NAFLAGS} -g) | ||
endif() | ||
|
||
if(SIMD_X86_64) | ||
set(SIMD_BASENAMES jfdctflt-sse-64 jccolor-sse2-64 jcgray-sse2-64 | ||
jchuff-sse2-64 jcsample-sse2-64 jdcolor-sse2-64 jdmerge-sse2-64 | ||
jdsample-sse2-64 jfdctfst-sse2-64 jfdctint-sse2-64 jidctflt-sse2-64 | ||
jidctfst-sse2-64 jidctint-sse2-64 jidctred-sse2-64 jquantf-sse2-64 | ||
jquanti-sse2-64) | ||
message(STATUS "Building x86_64 SIMD extensions") | ||
else() | ||
set(SIMD_BASENAMES jsimdcpu jfdctflt-3dn jidctflt-3dn jquant-3dn jccolor-mmx | ||
jcgray-mmx jcsample-mmx jdcolor-mmx jdmerge-mmx jdsample-mmx jfdctfst-mmx | ||
jfdctint-mmx jidctfst-mmx jidctint-mmx jidctred-mmx jquant-mmx jfdctflt-sse | ||
jidctflt-sse jquant-sse jccolor-sse2 jcgray-sse2 jchuff-sse2 jcsample-sse2 | ||
jdcolor-sse2 jdmerge-sse2 jdsample-sse2 jfdctfst-sse2 jfdctint-sse2 | ||
jidctflt-sse2 jidctfst-sse2 jidctint-sse2 jidctred-sse2 jquantf-sse2 | ||
jquanti-sse2) | ||
message(STATUS "Building i386 SIMD extensions") | ||
endif() | ||
|
||
if(MSVC_IDE) | ||
set(OBJDIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}") | ||
else() | ||
set(OBJDIR ${CMAKE_CURRENT_BINARY_DIR}) | ||
endif() | ||
|
||
file(GLOB INC_FILES *.inc) | ||
|
||
foreach(file ${SIMD_BASENAMES}) | ||
set(DEPFILE "") | ||
set(SIMD_SRC ${CMAKE_CURRENT_SOURCE_DIR}/${file}.asm) | ||
if(${file} MATCHES jccolor) | ||
set(DEPFILE ${file}) | ||
string(REGEX REPLACE "jccolor" "jccolext" DEPFILE ${DEPFILE}) | ||
set(DEPFILE ${CMAKE_CURRENT_SOURCE_DIR}/${DEPFILE}.asm) | ||
endif() | ||
if(${file} MATCHES jcgray) | ||
set(DEPFILE ${file}) | ||
string(REGEX REPLACE "jcgray" "jcgryext" DEPFILE ${DEPFILE}) | ||
set(DEPFILE ${CMAKE_CURRENT_SOURCE_DIR}/${DEPFILE}.asm) | ||
endif() | ||
if(${file} MATCHES jdcolor) | ||
set(DEPFILE ${file}) | ||
string(REGEX REPLACE "jdcolor" "jdcolext" DEPFILE ${DEPFILE}) | ||
set(DEPFILE ${CMAKE_CURRENT_SOURCE_DIR}/${DEPFILE}.asm) | ||
endif() | ||
if(${file} MATCHES jdmerge) | ||
set(DEPFILE ${file}) | ||
string(REGEX REPLACE "jdmerge" "jdmrgext" DEPFILE ${DEPFILE}) | ||
set(DEPFILE ${CMAKE_CURRENT_SOURCE_DIR}/${DEPFILE}.asm) | ||
endif() | ||
set(SIMD_OBJ ${OBJDIR}/${file}.obj) | ||
add_custom_command(OUTPUT ${SIMD_OBJ} | ||
DEPENDS ${SIMD_SRC} ${DEPFILE} ${INC_FILES} | ||
COMMAND ${NASM} ${NAFLAGS} ${SIMD_SRC} -o${SIMD_OBJ}) | ||
set(SIMD_OBJS ${SIMD_OBJS} ${SIMD_OBJ}) | ||
endforeach() | ||
|
||
set(SIMD_OBJS ${SIMD_OBJS} PARENT_SCOPE) | ||
add_custom_target(simd DEPENDS ${SIMD_OBJS}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
noinst_LTLIBRARIES = libsimd.la | ||
|
||
BUILT_SOURCES = jsimdcfg.inc | ||
|
||
EXTRA_DIST = nasm_lt.sh CMakeLists.txt \ | ||
jccolext-mmx.asm jcgryext-mmx.asm jdcolext-mmx.asm jdmrgext-mmx.asm \ | ||
jccolext-sse2.asm jcgryext-sse2.asm jdcolext-sse2.asm jdmrgext-sse2.asm \ | ||
jccolext-sse2-64.asm jcgryext-sse2-64.asm jdcolext-sse2-64.asm \ | ||
jdmrgext-sse2-64.asm jccolext-altivec.c jcgryext-altivec.c \ | ||
jdcolext-altivec.c jdmrgext-altivec.c | ||
|
||
if SIMD_X86_64 | ||
|
||
libsimd_la_SOURCES = jsimd_x86_64.c jsimd.h jsimdcfg.inc.h jsimdext.inc \ | ||
jcolsamp.inc jdct.inc jpeg_nbits_table.inc jfdctflt-sse-64.asm \ | ||
jccolor-sse2-64.asm jcgray-sse2-64.asm jchuff-sse2-64.asm \ | ||
jcsample-sse2-64.asm jdcolor-sse2-64.asm jdmerge-sse2-64.asm \ | ||
jdsample-sse2-64.asm jfdctfst-sse2-64.asm jfdctint-sse2-64.asm \ | ||
jidctflt-sse2-64.asm jidctfst-sse2-64.asm jidctint-sse2-64.asm \ | ||
jidctred-sse2-64.asm jquantf-sse2-64.asm jquanti-sse2-64.asm | ||
|
||
jccolor-sse2-64.lo: jccolext-sse2-64.asm | ||
jcgray-sse2-64.lo: jcgryext-sse2-64.asm | ||
jdcolor-sse2-64.lo: jdcolext-sse2-64.asm | ||
jdmerge-sse2-64.lo: jdmrgext-sse2-64.asm | ||
|
||
endif | ||
|
||
if SIMD_I386 | ||
|
||
libsimd_la_SOURCES = jsimd_i386.c jsimd.h jsimdcfg.inc.h jsimdext.inc \ | ||
jcolsamp.inc jdct.inc jpeg_nbits_table.inc jsimdcpu.asm \ | ||
jfdctflt-3dn.asm jidctflt-3dn.asm jquant-3dn.asm \ | ||
jccolor-mmx.asm jcgray-mmx.asm jcsample-mmx.asm \ | ||
jdcolor-mmx.asm jdmerge-mmx.asm jdsample-mmx.asm \ | ||
jfdctfst-mmx.asm jfdctint-mmx.asm jidctfst-mmx.asm \ | ||
jidctint-mmx.asm jidctred-mmx.asm jquant-mmx.asm \ | ||
jfdctflt-sse.asm jidctflt-sse.asm jquant-sse.asm \ | ||
jccolor-sse2.asm jcgray-sse2.asm jchuff-sse2.asm \ | ||
jcsample-sse2.asm jdcolor-sse2.asm jdmerge-sse2.asm \ | ||
jdsample-sse2.asm jfdctfst-sse2.asm jfdctint-sse2.asm \ | ||
jidctflt-sse2.asm jidctfst-sse2.asm jidctint-sse2.asm \ | ||
jidctred-sse2.asm jquantf-sse2.asm jquanti-sse2.asm | ||
|
||
jccolor-mmx.lo: jccolext-mmx.asm | ||
jcgray.-mmx.lo: jcgryext-mmx.asm | ||
jdcolor-mmx.lo: jdcolext-mmx.asm | ||
jdmerge-mmx.lo: jdmrgext-mmx.asm | ||
jccolor-sse2.lo: jccolext-sse2.asm | ||
jcgray-sse2.lo: jcgryext-sse2.asm | ||
jdcolor-sse2.lo: jdcolext-sse2.asm | ||
jdmerge-sse2.lo: jdmrgext-sse2.asm | ||
|
||
endif | ||
|
||
if SIMD_ARM | ||
|
||
libsimd_la_SOURCES = jsimd_arm.c jsimd_arm_neon.S | ||
|
||
endif | ||
|
||
if SIMD_ARM_64 | ||
|
||
libsimd_la_SOURCES = jsimd_arm64.c jsimd_arm64_neon.S | ||
|
||
endif | ||
|
||
if SIMD_MIPS | ||
|
||
libsimd_la_SOURCES = jsimd_mips.c jsimd_mips_dspr2_asm.h jsimd_mips_dspr2.S | ||
|
||
endif | ||
|
||
if SIMD_POWERPC | ||
|
||
noinst_LTLIBRARIES += libsimd_altivec.la | ||
|
||
libsimd_altivec_la_SOURCES = \ | ||
jccolor-altivec.c jcgray-altivec.c jcsample-altivec.c \ | ||
jdcolor-altivec.c jdmerge-altivec.c jdsample-altivec.c \ | ||
jfdctfst-altivec.c jfdctint-altivec.c \ | ||
jidctfst-altivec.c jidctint-altivec.c \ | ||
jquanti-altivec.c | ||
libsimd_altivec_la_CFLAGS = -maltivec | ||
|
||
jccolor-altivec.lo: jccolext-altivec.c | ||
jcgray-altivec.lo: jcgryext-altivec.c | ||
jdcolor-altivec.lo: jdcolext-altivec.c | ||
jdmerge-altivec.lo: jdmrgext-altivec.c | ||
|
||
libsimd_la_SOURCES = jsimd_powerpc.c jsimd_altivec.h jcsample.h | ||
libsimd_la_LIBADD = libsimd_altivec.la | ||
|
||
endif | ||
|
||
AM_CPPFLAGS = -I$(top_srcdir) | ||
|
||
.asm.lo: | ||
$(AM_V_GEN) $(LIBTOOL) $(AM_V_lt) --mode=compile --tag NASM $(srcdir)/nasm_lt.sh $(AM_V_lt) $(NASM) $(NAFLAGS) -I$(srcdir) -I. $< -o $@ | ||
|
||
jsimdcfg.inc: $(srcdir)/jsimdcfg.inc.h ../jpeglib.h ../jconfig.h ../jmorecfg.h | ||
$(AM_V_GEN) $(CPP) -I$(top_builddir) -I$(top_builddir)/simd $(srcdir)/jsimdcfg.inc.h | $(EGREP) "^[\;%]|^\ %" | sed 's%_cpp_protection_%%' | sed 's@% define@%define@g' > $@ |
Oops, something went wrong.