summaryrefslogtreecommitdiff
path: root/media/libwebp/dsp/moz.build
diff options
context:
space:
mode:
Diffstat (limited to 'media/libwebp/dsp/moz.build')
-rw-r--r--media/libwebp/dsp/moz.build123
1 files changed, 87 insertions, 36 deletions
diff --git a/media/libwebp/dsp/moz.build b/media/libwebp/dsp/moz.build
index c00d5e1401..6e2c9deb2c 100644
--- a/media/libwebp/dsp/moz.build
+++ b/media/libwebp/dsp/moz.build
@@ -1,4 +1,5 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# 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/.
@@ -8,53 +9,103 @@ with Files('**'):
SOURCES += [
'alpha_processing.c',
- 'alpha_processing_neon.c',
- 'alpha_processing_sse2.c',
- 'alpha_processing_sse41.c',
+ 'cost.c',
'dec.c',
'dec_clip_tables.c',
- 'dec_neon.c',
- 'dec_sse2.c',
- 'dec_sse41.c',
+ 'enc.c',
'filters.c',
- 'filters_neon.c',
- 'filters_sse2.c',
'lossless.c',
- 'lossless_neon.c',
- 'lossless_sse2.c',
+ 'lossless_enc.c',
'rescaler.c',
- 'rescaler_neon.c',
- 'rescaler_sse2.c',
+ 'ssim.c',
'upsampling.c',
- 'upsampling_neon.c',
- 'upsampling_sse2.c',
- 'upsampling_sse41.c',
'yuv.c',
- 'yuv_neon.c',
- 'yuv_sse2.c',
- 'yuv_sse41.c',
]
if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['BUILD_ARM_NEON']:
- SOURCES['alpha_processing_neon.c'].flags += CONFIG['NEON_FLAGS']
- SOURCES['dec_neon.c'].flags += CONFIG['NEON_FLAGS']
- SOURCES['filters_neon.c'].flags += CONFIG['NEON_FLAGS']
- SOURCES['lossless_neon.c'].flags += CONFIG['NEON_FLAGS']
- SOURCES['rescaler_neon.c'].flags += CONFIG['NEON_FLAGS']
- SOURCES['upsampling_neon.c'].flags += CONFIG['NEON_FLAGS']
- SOURCES['yuv_neon.c'].flags += CONFIG['NEON_FLAGS']
+ SOURCES += [
+ 'alpha_processing_neon.c',
+ 'cost_neon.c',
+ 'dec_neon.c',
+ 'enc_neon.c',
+ 'filters_neon.c',
+ 'lossless_enc_neon.c',
+ 'lossless_neon.c',
+ 'rescaler_neon.c',
+ 'upsampling_neon.c',
+ 'yuv_neon.c',
+ ]
+ DEFINES['WEBP_HAVE_NEON'] = 1;
+ for f in SOURCES:
+ if f.endswith('neon.c'):
+ SOURCES[f].flags += CONFIG['NEON_FLAGS']
+elif CONFIG['CPU_ARCH'] == 'aarch64':
+ SOURCES += [
+ 'alpha_processing_neon.c',
+ 'cost_neon.c',
+ 'dec_neon.c',
+ 'enc_neon.c',
+ 'filters_neon.c',
+ 'lossless_enc_neon.c',
+ 'lossless_neon.c',
+ 'rescaler_neon.c',
+ 'upsampling_neon.c',
+ 'yuv_neon.c',
+ ]
+ DEFINES['WEBP_HAVE_NEON'] = 1;
elif CONFIG['INTEL_ARCHITECTURE']:
- SOURCES['alpha_processing_sse2.c'].flags += CONFIG['SSE2_FLAGS']
- SOURCES['alpha_processing_sse41.c'].flags += CONFIG['SSE2_FLAGS']
- SOURCES['dec_sse2.c'].flags += CONFIG['SSE2_FLAGS']
- SOURCES['dec_sse41.c'].flags += CONFIG['SSE2_FLAGS']
- SOURCES['filters_sse2.c'].flags += CONFIG['SSE2_FLAGS']
- SOURCES['lossless_sse2.c'].flags += CONFIG['SSE2_FLAGS']
- SOURCES['rescaler_sse2.c'].flags += CONFIG['SSE2_FLAGS']
- SOURCES['upsampling_sse2.c'].flags += CONFIG['SSE2_FLAGS']
- SOURCES['upsampling_sse41.c'].flags += CONFIG['SSE2_FLAGS']
- SOURCES['yuv_sse2.c'].flags += CONFIG['SSE2_FLAGS']
- SOURCES['yuv_sse41.c'].flags += CONFIG['SSE2_FLAGS']
+ SOURCES += [
+ 'alpha_processing_sse2.c',
+ 'alpha_processing_sse41.c',
+ 'cost_sse2.c',
+ 'dec_sse2.c',
+ 'dec_sse41.c',
+ 'enc_sse2.c',
+ 'enc_sse41.c',
+ 'filters_sse2.c',
+ 'lossless_enc_sse2.c',
+ 'lossless_enc_sse41.c',
+ 'lossless_sse2.c',
+ 'lossless_sse41.c',
+ 'rescaler_sse2.c',
+ 'ssim_sse2.c',
+ 'upsampling_sse2.c',
+ 'upsampling_sse41.c',
+ 'yuv_sse2.c',
+ 'yuv_sse41.c',
+ ]
+ DEFINES['WEBP_HAVE_SSE2'] = 1;
+ DEFINES['WEBP_HAVE_SSE41'] = 1;
+ for f in SOURCES:
+ if f.endswith('sse2.c'):
+ SOURCES[f].flags += CONFIG['SSE2_FLAGS']
+ elif f.endswith('sse41.c'):
+ SOURCES[f].flags += ['-msse4.1']
+elif CONFIG['CPU_ARCH'].startswith('mips'):
+ SOURCES += [
+ 'alpha_processing_mips_dsp_r2.c',
+ 'cost_mips32.c',
+ 'cost_mips_dsp_r2.c',
+ 'dec_mips32.c',
+ 'dec_mips_dsp_r2.c',
+ 'enc_mips32.c',
+ 'enc_mips_dsp_r2.c',
+ 'filters_mips_dsp_r2.c',
+ 'lossless_enc_mips32.c',
+ 'lossless_enc_mips_dsp_r2.c',
+ 'lossless_mips_dsp_r2.c',
+ 'lossless_msa.c',
+ 'rescaler_mips32.c',
+ 'rescaler_mips_dsp_r2.c',
+ 'rescaler_msa.c',
+ 'upsampling_mips_dsp_r2.c',
+ 'upsampling_msa.c',
+ 'yuv_mips32.c',
+ 'yuv_mips_dsp_r2.c',
+ ]
+
+if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
+ CFLAGS += ['-Wno-unreachable-code']
FINAL_LIBRARY = 'gkmedias'