diff options
Diffstat (limited to '')
-rw-r--r-- | external/libjpeg-turbo/Makefile | 7 | ||||
-rw-r--r-- | external/libjpeg-turbo/Module_libjpeg-turbo.mk | 17 | ||||
-rw-r--r-- | external/libjpeg-turbo/README | 6 | ||||
-rw-r--r-- | external/libjpeg-turbo/StaticLibrary_libjpeg-turbo.mk | 214 | ||||
-rw-r--r-- | external/libjpeg-turbo/UnpackedTarball_libjpeg-turbo.mk | 23 | ||||
-rw-r--r-- | external/libjpeg-turbo/jconfig.h | 86 | ||||
-rw-r--r-- | external/libjpeg-turbo/jconfigint.h | 51 |
7 files changed, 404 insertions, 0 deletions
diff --git a/external/libjpeg-turbo/Makefile b/external/libjpeg-turbo/Makefile new file mode 100644 index 000000000..e4968cf85 --- /dev/null +++ b/external/libjpeg-turbo/Makefile @@ -0,0 +1,7 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- + +module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) + +include $(module_directory)/../../solenv/gbuild/partial_build.mk + +# vim: set noet sw=4 ts=4: diff --git a/external/libjpeg-turbo/Module_libjpeg-turbo.mk b/external/libjpeg-turbo/Module_libjpeg-turbo.mk new file mode 100644 index 000000000..29be90155 --- /dev/null +++ b/external/libjpeg-turbo/Module_libjpeg-turbo.mk @@ -0,0 +1,17 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Module_Module,libjpeg-turbo)) + +$(eval $(call gb_Module_add_targets,libjpeg-turbo,\ + UnpackedTarball_libjpeg-turbo \ + StaticLibrary_libjpeg-turbo \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/libjpeg-turbo/README b/external/libjpeg-turbo/README new file mode 100644 index 000000000..46eff7cb7 --- /dev/null +++ b/external/libjpeg-turbo/README @@ -0,0 +1,6 @@ +External library for reading/writing jpegs + +This is only used by the jpeg import filter that is provided +for use by VCL see [[vcl/source/filter/jpeg]] + +From [http://www.libjpeg-turbo.org/]. diff --git a/external/libjpeg-turbo/StaticLibrary_libjpeg-turbo.mk b/external/libjpeg-turbo/StaticLibrary_libjpeg-turbo.mk new file mode 100644 index 000000000..0b6b3044d --- /dev/null +++ b/external/libjpeg-turbo/StaticLibrary_libjpeg-turbo.mk @@ -0,0 +1,214 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozillarg/MPL/2.0/. +# + +$(eval $(call gb_StaticLibrary_StaticLibrary,libjpeg-turbo)) + +$(eval $(call gb_StaticLibrary_use_unpacked,libjpeg-turbo,libjpeg-turbo)) + +$(eval $(call gb_StaticLibrary_set_warnings_disabled,libjpeg-turbo)) + +$(eval $(call gb_StaticLibrary_set_include,libjpeg-turbo,\ + -I$(call gb_UnpackedTarball_get_dir,libjpeg-turbo) \ + $$(INCLUDE) \ +)) + +ifeq ($(OS),WNT) +$(eval $(call gb_StaticLibrary_add_cflags,libjpeg-turbo,\ + -DHAVE_INTRIN_H=1 \ +)) +endif + +$(eval $(call gb_StaticLibrary_add_cflags,libjpeg-turbo,\ + -DSIZEOF_SIZE_T=$(SIZEOF_SIZE_T) \ +)) + +ifeq ($(COM),GCC) +ifneq ($(ENABLE_OPTIMIZED),) +$(eval $(call gb_StaticLibrary_add_cflags,libjpeg-turbo,\ + -O3 \ +)) +endif +endif + +$(eval $(call gb_StaticLibrary_add_generated_cobjects,libjpeg-turbo,\ + UnpackedTarball/libjpeg-turbo/jcapimin \ + UnpackedTarball/libjpeg-turbo/jcapistd \ + UnpackedTarball/libjpeg-turbo/jccoefct \ + UnpackedTarball/libjpeg-turbo/jccolor \ + UnpackedTarball/libjpeg-turbo/jcdctmgr \ + UnpackedTarball/libjpeg-turbo/jchuff \ + UnpackedTarball/libjpeg-turbo/jcicc \ + UnpackedTarball/libjpeg-turbo/jcinit \ + UnpackedTarball/libjpeg-turbo/jcmainct \ + UnpackedTarball/libjpeg-turbo/jcmarker \ + UnpackedTarball/libjpeg-turbo/jcmaster \ + UnpackedTarball/libjpeg-turbo/jcomapi \ + UnpackedTarball/libjpeg-turbo/jcparam \ + UnpackedTarball/libjpeg-turbo/jcphuff \ + UnpackedTarball/libjpeg-turbo/jcprepct \ + UnpackedTarball/libjpeg-turbo/jcsample \ + UnpackedTarball/libjpeg-turbo/jctrans \ + UnpackedTarball/libjpeg-turbo/jdapimin \ + UnpackedTarball/libjpeg-turbo/jdapistd \ + UnpackedTarball/libjpeg-turbo/jdatadst \ + UnpackedTarball/libjpeg-turbo/jdatasrc \ + UnpackedTarball/libjpeg-turbo/jdcoefct \ + UnpackedTarball/libjpeg-turbo/jdcolor \ + UnpackedTarball/libjpeg-turbo/jddctmgr \ + UnpackedTarball/libjpeg-turbo/jdhuff \ + UnpackedTarball/libjpeg-turbo/jdicc \ + UnpackedTarball/libjpeg-turbo/jdinput \ + UnpackedTarball/libjpeg-turbo/jdmainct \ + UnpackedTarball/libjpeg-turbo/jdmarker \ + UnpackedTarball/libjpeg-turbo/jdmaster \ + UnpackedTarball/libjpeg-turbo/jdmerge \ + UnpackedTarball/libjpeg-turbo/jdphuff \ + UnpackedTarball/libjpeg-turbo/jdpostct \ + UnpackedTarball/libjpeg-turbo/jdsample \ + UnpackedTarball/libjpeg-turbo/jdtrans \ + UnpackedTarball/libjpeg-turbo/jerror \ + UnpackedTarball/libjpeg-turbo/jfdctflt \ + UnpackedTarball/libjpeg-turbo/jfdctfst \ + UnpackedTarball/libjpeg-turbo/jfdctint \ + UnpackedTarball/libjpeg-turbo/jidctflt \ + UnpackedTarball/libjpeg-turbo/jidctfst \ + UnpackedTarball/libjpeg-turbo/jidctint \ + UnpackedTarball/libjpeg-turbo/jidctred \ + UnpackedTarball/libjpeg-turbo/jquant1 \ + UnpackedTarball/libjpeg-turbo/jquant2 \ + UnpackedTarball/libjpeg-turbo/jutils \ + UnpackedTarball/libjpeg-turbo/jmemmgr \ + UnpackedTarball/libjpeg-turbo/jmemnobs \ + UnpackedTarball/libjpeg-turbo/jaricom \ + UnpackedTarball/libjpeg-turbo/jcarith \ + UnpackedTarball/libjpeg-turbo/jdarith \ +)) + +ifneq ($(NASM),) + +$(eval $(call gb_StaticLibrary_add_nasmflags,libjpeg-turbo,\ + -I$(call gb_UnpackedTarball_get_dir,libjpeg-turbo)/simd/nasm/ \ + -I$(dir $(call gb_UnpackedTarball_get_dir,libjpeg-turbo)/$(1)) \ +)) + +ifeq ($(CPUNAME),X86_64) + +$(eval $(call gb_StaticLibrary_add_cflags,libjpeg-turbo,\ + -DWITH_SIMD \ +)) + +$(eval $(call gb_StaticLibrary_add_generated_cobjects,libjpeg-turbo,\ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jsimd \ +)) + +$(eval $(call gb_StaticLibrary_add_generated_nasmobjects,libjpeg-turbo,\ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jsimdcpu.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jfdctflt-sse.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jccolor-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jcgray-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jchuff-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jcphuff-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jcsample-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jdcolor-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jdmerge-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jdsample-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jfdctfst-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jfdctint-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jidctflt-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jidctfst-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jidctint-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jidctred-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jquantf-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jquanti-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jccolor-avx2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jcgray-avx2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jcsample-avx2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jdcolor-avx2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jdmerge-avx2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jdsample-avx2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jfdctint-avx2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jidctint-avx2.asm \ + UnpackedTarball/libjpeg-turbo/simd/x86_64/jquanti-avx2.asm \ +)) + +else ifeq ($(CPUNAME),INTEL) + +$(eval $(call gb_StaticLibrary_add_cflags,libjpeg-turbo,\ + -DWITH_SIMD \ +)) + +$(eval $(call gb_StaticLibrary_add_generated_cobjects,libjpeg-turbo,\ + UnpackedTarball/libjpeg-turbo/simd/i386/jsimd \ +)) + +$(eval $(call gb_StaticLibrary_add_generated_nasmobjects,libjpeg-turbo,\ + UnpackedTarball/libjpeg-turbo/simd/i386/jsimdcpu.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jfdctflt-3dn.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jidctflt-3dn.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jquant-3dn.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jccolor-mmx.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jcgray-mmx.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jcsample-mmx.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jdcolor-mmx.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jdmerge-mmx.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jdsample-mmx.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jfdctfst-mmx.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jfdctint-mmx.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jidctfst-mmx.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jidctint-mmx.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jidctred-mmx.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jquant-mmx.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jfdctflt-sse.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jidctflt-sse.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jquant-sse.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jccolor-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jcgray-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jchuff-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jcphuff-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jcsample-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jdcolor-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jdmerge-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jdsample-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jfdctfst-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jfdctint-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jidctflt-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jidctfst-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jidctint-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jidctred-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jquantf-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jquanti-sse2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jccolor-avx2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jcgray-avx2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jcsample-avx2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jdcolor-avx2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jdmerge-avx2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jdsample-avx2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jfdctint-avx2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jidctint-avx2.asm \ + UnpackedTarball/libjpeg-turbo/simd/i386/jquanti-avx2.asm \ +)) + +else + +$(eval $(call gb_StaticLibrary_add_generated_cobjects,libjpeg-turbo,\ + UnpackedTarball/libjpeg-turbo/jsimd_none \ +)) + +endif + +else + +$(eval $(call gb_StaticLibrary_add_generated_cobjects,libjpeg-turbo,\ + UnpackedTarball/libjpeg-turbo/jsimd_none \ +)) + +endif + + +# vim: set noet sw=4 ts=4: diff --git a/external/libjpeg-turbo/UnpackedTarball_libjpeg-turbo.mk b/external/libjpeg-turbo/UnpackedTarball_libjpeg-turbo.mk new file mode 100644 index 000000000..22777b863 --- /dev/null +++ b/external/libjpeg-turbo/UnpackedTarball_libjpeg-turbo.mk @@ -0,0 +1,23 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,libjpeg-turbo)) + +$(eval $(call gb_UnpackedTarball_set_tarball,libjpeg-turbo,$(LIBJPEG_TURBO_TARBALL))) + +$(eval $(call gb_UnpackedTarball_set_patchlevel,libjpeg-turbo,0)) + +# jconfigint.h and jconfig.h generated via +# cmake -DENABLE_STATIC:BOOL=ON -DENABLE_SHARED:BOOL=NO -DWITH_JAVA:BOOL=OFF -DWITH_TURBOJPEG:BOOL=OFF -DWITH_SIMD:BOOL=ON +# and then tweaking + +$(eval $(call gb_UnpackedTarball_add_file,libjpeg-turbo,jconfigint.h,external/libjpeg-turbo/jconfigint.h)) +$(eval $(call gb_UnpackedTarball_add_file,libjpeg-turbo,jconfig.h,external/libjpeg-turbo/jconfig.h)) + +# vim: set noet sw=4 ts=4: diff --git a/external/libjpeg-turbo/jconfig.h b/external/libjpeg-turbo/jconfig.h new file mode 100644 index 000000000..7cff68812 --- /dev/null +++ b/external/libjpeg-turbo/jconfig.h @@ -0,0 +1,86 @@ +/* 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.1.1 + +/* libjpeg-turbo version in integer form */ +#define LIBJPEG_TURBO_VERSION_NUMBER 2001001 + +/* 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. */ +/* #undef WITH_SIMD */ + +/* + * 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. */ +/* undef HAVE_LOCALE_H */ + +/* 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. */ +#define NEED_SYS_TYPES_H 1 + +/* 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 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 */ + +/* Extra Libreoffice config for windows */ +#ifdef _MSC_VER + +/* Define "boolean" as unsigned char, not int, per Windows custom */ +#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ +typedef unsigned char boolean; +#endif +#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ + +/* Define "INT32" as int, not long, per Windows custom */ +#if !(defined(_BASETSD_H_) || defined(_BASETSD_H)) /* don't conflict if basetsd.h already read */ +typedef short INT16; +typedef signed int INT32; +#endif +#define XMD_H /* prevent jmorecfg.h from redefining it */ + +#endif /* _MSC_VER */ diff --git a/external/libjpeg-turbo/jconfigint.h b/external/libjpeg-turbo/jconfigint.h new file mode 100644 index 000000000..478a4d338 --- /dev/null +++ b/external/libjpeg-turbo/jconfigint.h @@ -0,0 +1,51 @@ +#include <sal/types.h> + +/* libjpeg-turbo build number */ +#define BUILD "20211020" + +/* Compiler's inline keyword */ +#undef inline + +/* How to obtain function inlining. */ +#if defined _MSC_VER +#define INLINE __forceinline +#elif defined __GNUC__ +#define INLINE __attribute__((always_inline)) inline +#else +#define INLINE inline +#endif + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "libjpeg-turbo" + +/* Version number of package */ +#define VERSION "2.1.1" + +/* The size of `size_t', as computed by sizeof. */ +/* #undef SIZEOF_SIZE_T */ + +#if defined(__GNUC__) && SAL_TYPES_SIZEOFLONG == SIZEOF_SIZE_T +/* Define if your compiler has __builtin_ctzl() and sizeof(unsigned long) == sizeof(size_t). */ +#define HAVE_BUILTIN_CTZL +#endif + +/* 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 + +#if defined(__has_attribute) +#if __has_attribute(fallthrough) +#define FALLTHROUGH __attribute__((fallthrough)); +#else +#define FALLTHROUGH +#endif +#else +#define FALLTHROUGH +#endif |