3
0
mirror of https://github.com/XboxDev/nxdk.git synced 2026-02-04 15:25:24 +00:00

libjpeg: Add libjpeg-turbo 2.0.4

This commit is contained in:
Stefan Schmidt
2020-01-03 04:43:31 +01:00
committed by Jannik Vogel
parent deb790de06
commit c08c3328f1
6 changed files with 178 additions and 0 deletions

3
.gitmodules vendored
View File

@ -25,3 +25,6 @@
[submodule "lib/libpng/libpng"]
path = lib/libpng/libpng
url = https://github.com/glennrp/libpng.git
[submodule "lib/libjpeg/libjpeg-turbo"]
path = lib/libjpeg/libjpeg-turbo
url = https://github.com/libjpeg-turbo/libjpeg-turbo.git

View File

@ -9,3 +9,4 @@ include $(NXDK_DIR)/lib/usb/Makefile
include $(NXDK_DIR)/lib/xboxrt/Makefile
include $(NXDK_DIR)/lib/zlib/Makefile
include $(NXDK_DIR)/lib/libpng/Makefile
include $(NXDK_DIR)/lib/libjpeg/Makefile

71
lib/libjpeg/Makefile Normal file
View File

@ -0,0 +1,71 @@
LIBJPEG_TURBO_DIR = $(NXDK_DIR)/lib/libjpeg/libjpeg-turbo
LIBJPEG_TURBO_SRCS = $(LIBJPEG_TURBO_DIR)/jcapimin.c \
$(LIBJPEG_TURBO_DIR)/jcapistd.c \
$(LIBJPEG_TURBO_DIR)/jccoefct.c \
$(LIBJPEG_TURBO_DIR)/jccolor.c \
$(LIBJPEG_TURBO_DIR)/jcdctmgr.c \
$(LIBJPEG_TURBO_DIR)/jchuff.c \
$(LIBJPEG_TURBO_DIR)/jcicc.c \
$(LIBJPEG_TURBO_DIR)/jcinit.c \
$(LIBJPEG_TURBO_DIR)/jcmainct.c \
$(LIBJPEG_TURBO_DIR)/jcmarker.c \
$(LIBJPEG_TURBO_DIR)/jcmaster.c \
$(LIBJPEG_TURBO_DIR)/jcomapi.c \
$(LIBJPEG_TURBO_DIR)/jcparam.c \
$(LIBJPEG_TURBO_DIR)/jcphuff.c \
$(LIBJPEG_TURBO_DIR)/jcprepct.c \
$(LIBJPEG_TURBO_DIR)/jcsample.c \
$(LIBJPEG_TURBO_DIR)/jctrans.c \
$(LIBJPEG_TURBO_DIR)/jdapimin.c \
$(LIBJPEG_TURBO_DIR)/jdapistd.c \
$(LIBJPEG_TURBO_DIR)/jdatadst.c \
$(LIBJPEG_TURBO_DIR)/jdatasrc.c \
$(LIBJPEG_TURBO_DIR)/jdcoefct.c \
$(LIBJPEG_TURBO_DIR)/jdcolor.c \
$(LIBJPEG_TURBO_DIR)/jddctmgr.c \
$(LIBJPEG_TURBO_DIR)/jdhuff.c \
$(LIBJPEG_TURBO_DIR)/jdicc.c \
$(LIBJPEG_TURBO_DIR)/jdinput.c \
$(LIBJPEG_TURBO_DIR)/jdmainct.c \
$(LIBJPEG_TURBO_DIR)/jdmarker.c \
$(LIBJPEG_TURBO_DIR)/jdmaster.c \
$(LIBJPEG_TURBO_DIR)/jdmerge.c \
$(LIBJPEG_TURBO_DIR)/jdphuff.c \
$(LIBJPEG_TURBO_DIR)/jdpostct.c \
$(LIBJPEG_TURBO_DIR)/jdsample.c \
$(LIBJPEG_TURBO_DIR)/jdtrans.c \
$(LIBJPEG_TURBO_DIR)/jerror.c \
$(LIBJPEG_TURBO_DIR)/jfdctflt.c \
$(LIBJPEG_TURBO_DIR)/jfdctfst.c \
$(LIBJPEG_TURBO_DIR)/jfdctint.c \
$(LIBJPEG_TURBO_DIR)/jidctflt.c \
$(LIBJPEG_TURBO_DIR)/jidctfst.c \
$(LIBJPEG_TURBO_DIR)/jidctint.c \
$(LIBJPEG_TURBO_DIR)/jidctred.c \
$(LIBJPEG_TURBO_DIR)/jquant1.c \
$(LIBJPEG_TURBO_DIR)/jquant2.c \
$(LIBJPEG_TURBO_DIR)/jutils.c \
$(LIBJPEG_TURBO_DIR)/jmemmgr.c \
$(LIBJPEG_TURBO_DIR)/jmemnobs.c \
$(LIBJPEG_TURBO_DIR)/jaricom.c \
$(LIBJPEG_TURBO_DIR)/jcarith.c \
$(LIBJPEG_TURBO_DIR)/jdarith.c
# FIXME: MMX/SSE is currently disabled due to requiring nasm
LIBJPEG_TURBO_SRCS += $(LIBJPEG_TURBO_DIR)/jsimd_none.c
LIBJPEG_TURBO_OBJS = $(addsuffix .obj, $(basename $(LIBJPEG_TURBO_SRCS)))
NXDK_CFLAGS += -isystem $(LIBJPEG_TURBO_DIR) -I$(NXDK_DIR)/lib/libjpeg
NXDK_CXXFLAGS += -isystem $(LIBJPEG_TURBO_DIR) -I$(NXDK_DIR)/lib/libjpeg
$(NXDK_DIR)/lib/libjpeg.lib: $(LIBJPEG_TURBO_OBJS)
main.exe: $(NXDK_DIR)/lib/libjpeg.lib
CLEANRULES += clean-libjpeg
.PHONY: clean-libjpeg
clean-libjpeg:
$(VE)rm -f $(LIBJPEG_OBJS) $(NXDK_DIR)/lib/libjpeg.lib

71
lib/libjpeg/jconfig.h Normal file
View File

@ -0,0 +1,71 @@
/* Version ID for the JPEG library.
* Might be useful for tests like "#if JPEG_LIB_VERSION >= 60".
*/
#define JPEG_LIB_VERSION 62
/* libjpeg-turbo version */
#define LIBJPEG_TURBO_VERSION 2.0.4
/* libjpeg-turbo version in integer form */
#define LIBJPEG_TURBO_VERSION_NUMBER 2000004
/* Support arithmetic encoding */
#define C_ARITH_CODING_SUPPORTED 1
/* Support arithmetic decoding */
#define D_ARITH_CODING_SUPPORTED 1
/* Support in-memory source/destination managers */
#define MEM_SRCDST_SUPPORTED 1
/* Use accelerated SIMD routines. */
#define WITH_SIMD 1
/*
* Define BITS_IN_JSAMPLE as either
* 8 for 8-bit sample values (the usual setting)
* 12 for 12-bit sample values
* Only 8 and 12 are legal data precisions for lossy JPEG according to the
* JPEG standard, and the IJG code does not support anything else!
* We do not support run-time selection of data precision, sorry.
*/
#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */
/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1
/* Define to 1 if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define if you need to include <sys/types.h> to get size_t. */
#undef NEED_SYS_TYPES_H
/* Define if you have BSD-like bzero and bcopy in <strings.h> rather than
memset/memcpy in <string.h>. */
#undef NEED_BSD_STRINGS
/* Define to 1 if the system has the type `unsigned char'. */
#define HAVE_UNSIGNED_CHAR 1
/* Define to 1 if the system has the type `unsigned short'. */
#define HAVE_UNSIGNED_SHORT 1
/* Compiler does not support pointers to undefined structures. */
/* #undef INCOMPLETE_TYPES_BROKEN */
/* Define if your (broken) compiler shifts signed values as if they were
unsigned. */
/* #undef RIGHT_SHIFT_IS_UNSIGNED */
/* Define to 1 if type `char' is unsigned and you are not using gcc. */
#undef __CHAR_UNSIGNED__
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */

31
lib/libjpeg/jconfigint.h Normal file
View File

@ -0,0 +1,31 @@
/* libjpeg-turbo build number */
#define BUILD "20191111"
/* Compiler's inline keyword */
#undef inline
/* How to obtain function inlining. */
#define INLINE __inline__ __attribute__((always_inline))
/* Define to the full name of this package. */
#define PACKAGE_NAME "libjpeg-turbo"
/* Version number of package */
#define VERSION "2.0.4"
/* The size of `size_t', as computed by sizeof. */
#define SIZEOF_SIZE_T 4
/* Define if your compiler has __builtin_ctzl() and sizeof(unsigned long) == sizeof(size_t). */
#define HAVE_BUILTIN_CTZL 1
/* Define to 1 if you have the <intrin.h> header file. */
#undef HAVE_INTRIN_H
#if defined(_MSC_VER) && defined(HAVE_INTRIN_H)
#if (SIZEOF_SIZE_T == 8)
#define HAVE_BITSCANFORWARD64
#elif (SIZEOF_SIZE_T == 4)
#define HAVE_BITSCANFORWARD
#endif
#endif