2016-07-14 19:16:42 +03:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-26 00:47:22 +04:00
|
|
|
# vim: set filetype=python:
|
|
|
|
# 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/.
|
|
|
|
|
2017-03-07 21:06:45 +03:00
|
|
|
with Files("**"):
|
|
|
|
BUG_COMPONENT = ("Core", "ImageLib")
|
|
|
|
|
2013-04-16 23:24:43 +04:00
|
|
|
EXPORTS += [
|
|
|
|
'jconfig.h',
|
|
|
|
'jerror.h',
|
|
|
|
'jinclude.h',
|
|
|
|
'jmorecfg.h',
|
|
|
|
'jpegint.h',
|
|
|
|
'jpeglib.h',
|
|
|
|
]
|
|
|
|
|
2013-10-25 03:23:05 +04:00
|
|
|
SOURCES += [
|
2013-06-04 19:08:44 +04:00
|
|
|
'jcomapi.c',
|
|
|
|
'jdapimin.c',
|
|
|
|
'jdapistd.c',
|
|
|
|
'jdatadst.c',
|
|
|
|
'jdatasrc.c',
|
|
|
|
'jdcoefct.c',
|
|
|
|
'jdcolor.c',
|
|
|
|
'jddctmgr.c',
|
|
|
|
'jdhuff.c',
|
2018-10-09 18:23:57 +03:00
|
|
|
'jdicc.c',
|
2013-06-04 19:08:44 +04:00
|
|
|
'jdinput.c',
|
|
|
|
'jdmainct.c',
|
|
|
|
'jdmarker.c',
|
|
|
|
'jdmaster.c',
|
|
|
|
'jdmerge.c',
|
|
|
|
'jdphuff.c',
|
|
|
|
'jdpostct.c',
|
|
|
|
'jdsample.c',
|
|
|
|
'jdtrans.c',
|
|
|
|
'jerror.c',
|
|
|
|
'jfdctflt.c',
|
|
|
|
'jfdctfst.c',
|
|
|
|
'jfdctint.c',
|
|
|
|
'jidctflt.c',
|
|
|
|
'jidctfst.c',
|
|
|
|
'jidctint.c',
|
|
|
|
'jidctred.c',
|
|
|
|
'jmemmgr.c',
|
|
|
|
'jmemnobs.c',
|
|
|
|
'jquant1.c',
|
|
|
|
'jquant2.c',
|
|
|
|
'jutils.c',
|
|
|
|
]
|
|
|
|
|
|
|
|
# These files enable support for writing JPEGs
|
2013-10-25 03:23:05 +04:00
|
|
|
SOURCES += [
|
2013-06-04 19:08:44 +04:00
|
|
|
'jcapimin.c',
|
|
|
|
'jcapistd.c',
|
|
|
|
'jccoefct.c',
|
|
|
|
'jccolor.c',
|
|
|
|
'jcdctmgr.c',
|
|
|
|
'jchuff.c',
|
2018-10-09 18:23:57 +03:00
|
|
|
'jcicc.c',
|
2013-06-04 19:08:44 +04:00
|
|
|
'jcinit.c',
|
|
|
|
'jcmainct.c',
|
|
|
|
'jcmarker.c',
|
|
|
|
'jcmaster.c',
|
|
|
|
'jcparam.c',
|
|
|
|
'jcphuff.c',
|
|
|
|
'jcprepct.c',
|
|
|
|
'jcsample.c',
|
|
|
|
'jctrans.c',
|
|
|
|
]
|
|
|
|
|
2018-10-24 23:06:48 +03:00
|
|
|
SOURCES += [
|
|
|
|
'jpeg_nbits_table.c',
|
|
|
|
]
|
|
|
|
|
2016-03-03 19:38:59 +03:00
|
|
|
if CONFIG['LIBJPEG_TURBO_USE_YASM']:
|
|
|
|
USE_YASM = True
|
|
|
|
|
|
|
|
if CONFIG['LIBJPEG_TURBO_ASFLAGS']:
|
2015-05-17 03:37:06 +03:00
|
|
|
if CONFIG['CPU_ARCH'] == 'arm':
|
|
|
|
SOURCES += [
|
2018-10-09 18:23:57 +03:00
|
|
|
'simd/arm/jsimd.c',
|
|
|
|
'simd/arm/jsimd_neon.S',
|
2015-05-17 03:37:06 +03:00
|
|
|
]
|
|
|
|
elif CONFIG['CPU_ARCH'] == 'aarch64':
|
|
|
|
SOURCES += [
|
2018-10-09 18:23:57 +03:00
|
|
|
'simd/arm64/jsimd.c',
|
|
|
|
'simd/arm64/jsimd_neon.S',
|
2015-05-17 03:37:06 +03:00
|
|
|
]
|
2019-06-06 15:39:10 +03:00
|
|
|
elif CONFIG['CPU_ARCH'] == 'mips32':
|
2015-05-17 03:37:06 +03:00
|
|
|
SOURCES += [
|
2018-10-09 18:23:57 +03:00
|
|
|
'simd/mips/jsimd.c',
|
|
|
|
'simd/mips/jsimd_dspr2.S',
|
2015-05-17 03:37:06 +03:00
|
|
|
]
|
2019-06-06 15:39:12 +03:00
|
|
|
if CONFIG['CC_TYPE'] == 'clang':
|
|
|
|
SOURCES['simd/mips/jsimd_dspr2.S'].flags += [
|
|
|
|
'-fno-integrated-as',
|
|
|
|
]
|
2015-05-17 03:37:06 +03:00
|
|
|
elif CONFIG['CPU_ARCH'] == 'x86_64':
|
|
|
|
SOURCES += [
|
2018-10-09 18:23:57 +03:00
|
|
|
'simd/x86_64/jccolor-avx2.asm',
|
|
|
|
'simd/x86_64/jccolor-sse2.asm',
|
|
|
|
'simd/x86_64/jcgray-avx2.asm',
|
|
|
|
'simd/x86_64/jcgray-sse2.asm',
|
|
|
|
'simd/x86_64/jchuff-sse2.asm',
|
|
|
|
'simd/x86_64/jcphuff-sse2.asm',
|
|
|
|
'simd/x86_64/jcsample-avx2.asm',
|
|
|
|
'simd/x86_64/jcsample-sse2.asm',
|
|
|
|
'simd/x86_64/jdcolor-avx2.asm',
|
|
|
|
'simd/x86_64/jdcolor-sse2.asm',
|
|
|
|
'simd/x86_64/jdmerge-avx2.asm',
|
|
|
|
'simd/x86_64/jdmerge-sse2.asm',
|
|
|
|
'simd/x86_64/jdsample-avx2.asm',
|
|
|
|
'simd/x86_64/jdsample-sse2.asm',
|
|
|
|
'simd/x86_64/jfdctflt-sse.asm',
|
|
|
|
'simd/x86_64/jfdctfst-sse2.asm',
|
|
|
|
'simd/x86_64/jfdctint-avx2.asm',
|
|
|
|
'simd/x86_64/jfdctint-sse2.asm',
|
|
|
|
'simd/x86_64/jidctflt-sse2.asm',
|
|
|
|
'simd/x86_64/jidctfst-sse2.asm',
|
|
|
|
'simd/x86_64/jidctint-avx2.asm',
|
|
|
|
'simd/x86_64/jidctint-sse2.asm',
|
|
|
|
'simd/x86_64/jidctred-sse2.asm',
|
|
|
|
'simd/x86_64/jquantf-sse2.asm',
|
|
|
|
'simd/x86_64/jquanti-avx2.asm',
|
|
|
|
'simd/x86_64/jquanti-sse2.asm',
|
|
|
|
'simd/x86_64/jsimd.c',
|
|
|
|
'simd/x86_64/jsimdcpu.asm',
|
2015-05-17 03:37:06 +03:00
|
|
|
]
|
|
|
|
elif CONFIG['CPU_ARCH'] == 'x86':
|
|
|
|
SOURCES += [
|
2018-10-09 18:23:57 +03:00
|
|
|
'simd/i386/jccolor-avx2.asm',
|
|
|
|
'simd/i386/jccolor-mmx.asm',
|
|
|
|
'simd/i386/jccolor-sse2.asm',
|
|
|
|
'simd/i386/jcgray-avx2.asm',
|
|
|
|
'simd/i386/jcgray-mmx.asm',
|
|
|
|
'simd/i386/jcgray-sse2.asm',
|
|
|
|
'simd/i386/jchuff-sse2.asm',
|
|
|
|
'simd/i386/jcphuff-sse2.asm',
|
|
|
|
'simd/i386/jcsample-avx2.asm',
|
|
|
|
'simd/i386/jcsample-mmx.asm',
|
|
|
|
'simd/i386/jcsample-sse2.asm',
|
|
|
|
'simd/i386/jdcolor-avx2.asm',
|
|
|
|
'simd/i386/jdcolor-mmx.asm',
|
|
|
|
'simd/i386/jdcolor-sse2.asm',
|
|
|
|
'simd/i386/jdmerge-avx2.asm',
|
|
|
|
'simd/i386/jdmerge-mmx.asm',
|
|
|
|
'simd/i386/jdmerge-sse2.asm',
|
|
|
|
'simd/i386/jdsample-avx2.asm',
|
|
|
|
'simd/i386/jdsample-mmx.asm',
|
|
|
|
'simd/i386/jdsample-sse2.asm',
|
|
|
|
'simd/i386/jfdctflt-3dn.asm',
|
|
|
|
'simd/i386/jfdctflt-sse.asm',
|
|
|
|
'simd/i386/jfdctfst-mmx.asm',
|
|
|
|
'simd/i386/jfdctfst-sse2.asm',
|
|
|
|
'simd/i386/jfdctint-avx2.asm',
|
|
|
|
'simd/i386/jfdctint-mmx.asm',
|
|
|
|
'simd/i386/jfdctint-sse2.asm',
|
|
|
|
'simd/i386/jidctflt-3dn.asm',
|
|
|
|
'simd/i386/jidctflt-sse.asm',
|
|
|
|
'simd/i386/jidctflt-sse2.asm',
|
|
|
|
'simd/i386/jidctfst-mmx.asm',
|
|
|
|
'simd/i386/jidctfst-sse2.asm',
|
|
|
|
'simd/i386/jidctint-avx2.asm',
|
|
|
|
'simd/i386/jidctint-mmx.asm',
|
|
|
|
'simd/i386/jidctint-sse2.asm',
|
|
|
|
'simd/i386/jidctred-mmx.asm',
|
|
|
|
'simd/i386/jidctred-sse2.asm',
|
|
|
|
'simd/i386/jquant-3dn.asm',
|
|
|
|
'simd/i386/jquant-mmx.asm',
|
|
|
|
'simd/i386/jquant-sse.asm',
|
|
|
|
'simd/i386/jquantf-sse2.asm',
|
|
|
|
'simd/i386/jquanti-avx2.asm',
|
|
|
|
'simd/i386/jquanti-sse2.asm',
|
|
|
|
'simd/i386/jsimd.c',
|
|
|
|
'simd/i386/jsimdcpu.asm',
|
2015-05-17 03:37:06 +03:00
|
|
|
]
|
2013-06-04 19:08:44 +04:00
|
|
|
else: # No SIMD support?
|
2013-10-25 03:23:05 +04:00
|
|
|
SOURCES += [
|
2013-06-04 19:08:44 +04:00
|
|
|
'jsimd_none.c',
|
|
|
|
]
|
2013-06-17 23:21:01 +04:00
|
|
|
|
2015-05-08 08:13:10 +03:00
|
|
|
ASFLAGS += CONFIG['LIBJPEG_TURBO_ASFLAGS']
|
2018-10-09 18:23:57 +03:00
|
|
|
|
|
|
|
# Make sure the x86 & x86-64 ASM files can see the necessary includes.
|
2018-11-16 04:20:58 +03:00
|
|
|
if CONFIG['CPU_ARCH'] == 'x86':
|
2018-10-09 18:23:57 +03:00
|
|
|
ASFLAGS += ['-I%s/media/libjpeg/simd/nasm/' % TOPSRCDIR]
|
2018-11-16 04:20:58 +03:00
|
|
|
ASFLAGS += ['-I%s/media/libjpeg/simd/i386/' % TOPSRCDIR]
|
|
|
|
if CONFIG['CPU_ARCH'] == 'x86_64':
|
|
|
|
ASFLAGS += ['-I%s/media/libjpeg/simd/nasm/' % TOPSRCDIR]
|
|
|
|
ASFLAGS += ['-I%s/media/libjpeg/simd/x86_64/' % TOPSRCDIR]
|
2015-05-08 08:13:10 +03:00
|
|
|
|
2015-10-20 04:05:20 +03:00
|
|
|
# We allow warnings for third-party code that can be updated from upstream.
|
2017-10-26 01:12:09 +03:00
|
|
|
AllowCompilerWarnings()
|
2015-08-28 06:44:53 +03:00
|
|
|
|
2013-11-19 06:47:14 +04:00
|
|
|
FINAL_LIBRARY = 'gkmedias'
|
2013-11-22 03:16:18 +04:00
|
|
|
|