Compare commits

..

No commits in common. "45238d78cd9535b33bfbeeaaac4645af1bd93834" and "6a1278786cd59381ebf3066b650cba4e6352ce5d" have entirely different histories.

9 changed files with 13 additions and 64 deletions

3
.gitignore vendored
View File

@ -1,3 +0,0 @@
/subprojects/*
!/subprojects/*.wrap
!/subprojects/packagefiles

3
.gitmodules vendored
View File

@ -1,3 +1,6 @@
[submodule "wuffs-mirror-release-c"]
path = wuffs-mirror-release-c
url = https://github.com/google/wuffs-mirror-release-c
[submodule "jpeg-quantsmooth"]
path = jpeg-quantsmooth
url = https://github.com/ilyakurdyukov/jpeg-quantsmooth.git

View File

@ -32,7 +32,10 @@
#include <stdio.h>
#include <jpeglib.h>
#include <libjpegqs.h>
// This library is tricky to build, simply make it work at all.
#define NO_SIMD
#include <jpeg-quantsmooth/quantsmooth.h>
#undef NO_SIMD
#endif // HAVE_JPEG_QS
// Colour management must be handled before RGB conversions.

2
fiv.c
View File

@ -1696,7 +1696,7 @@ main(int argc, char *argv[])
gchar **path_args = NULL, *thumbnail_size = NULL;
const GOptionEntry options[] = {
{G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &path_args,
NULL, "[FILE | DIRECTORY | URI]"},
NULL, "[FILE | DIRECTORY]"},
{"list-supported-media-types", 0, G_OPTION_FLAG_IN_MAIN,
G_OPTION_ARG_NONE, &show_supported_media_types,
"Output supported media types and exit", NULL},

1
jpeg-quantsmooth Submodule

@ -0,0 +1 @@
Subproject commit c86c6418ea6c827513d206694847033f9ca50151

View File

@ -17,12 +17,6 @@ add_project_arguments(
# add_project_link_arguments(flags, language : ['c'])
#endif
# The likelihood of this being installed is nearly zero. Enable the wrap.
libjpegqs = dependency('libjpegqs',
required : get_option('libjpegqs'),
allow_fallback : true,
)
lcms2 = dependency('lcms2', required : get_option('lcms2'))
# Note that only libraw_r is thread-safe, but we'll just run it out-of process.
libraw = dependency('libraw', required : get_option('libraw'))
@ -36,6 +30,7 @@ dependencies = [
dependency('pixman-1'),
dependency('libturbojpeg'),
dependency('libjpeg', required : get_option('jpeg-qs')),
dependency('libwebp'),
dependency('libwebpdemux'),
dependency('libwebpdecoder', required : false),
@ -47,7 +42,6 @@ dependencies = [
),
lcms2,
libjpegqs,
libraw,
librsvg,
xcursor,
@ -60,7 +54,8 @@ dependencies = [
conf = configuration_data()
conf.set_quoted('PROJECT_NAME', meson.project_name())
conf.set_quoted('PROJECT_VERSION', meson.project_version())
conf.set('HAVE_JPEG_QS', libjpegqs.found())
# TODO(p): Wrap it in a Meson subproject, try to enable SIMD.
conf.set('HAVE_JPEG_QS', get_option('jpeg-qs').enabled())
conf.set('HAVE_LCMS2', lcms2.found())
conf.set('HAVE_LIBRAW', libraw.found())
conf.set('HAVE_LIBRSVG', librsvg.found())

View File

@ -1,6 +1,6 @@
option('lcms2', type : 'feature', value : 'auto',
description : 'Build with Little CMS colour management')
option('libjpegqs', type : 'feature', value : 'auto',
option('jpeg-qs', type : 'feature', value : 'enabled',
description : 'Build with JPEG Quant Smooth integration')
option('libraw', type : 'feature', value : 'auto',
description : 'Build with raw photo support, requires LibRaw')

View File

@ -1,9 +0,0 @@
[wrap-file]
directory = jpeg-quantsmooth-1.20210408
source_url = https://github.com/ilyakurdyukov/jpeg-quantsmooth/archive/refs/tags/1.20210408.tar.gz
source_filename = jpeg-quantsmooth-1.20210408.tar.gz
source_hash = 5937ca26db33888cab8638c1a8dc7a367a953bd0857ceb1290d5abc6febf3116
patch_directory = libjpegqs
[provide]
libjpegqs = jpegqs_dep

View File

@ -1,41 +0,0 @@
# vim: noet ts=4 sts=4 sw=4:
project('jpeg-qs', 'c')
add_project_arguments(meson.get_compiler('c')
.get_supported_arguments('-Wno-misleading-indentation'),
'-DWITH_LOG', language : 'c')
deps = [
dependency('libjpeg'),
meson.get_compiler('c').find_library('m', required : false),
]
if host_machine.cpu_family() == 'x86_64'
jpegqs_avx512 = static_library('jpegqs-avx512', 'libjpegqs.c',
c_args : ['-DSIMD_SELECT', '-DSIMD_NAME=avx512',
'-mavx512f', '-mfma', '-DSIMD_AVX512'],
dependencies : deps)
jpegqs_avx2 = static_library('jpegqs-avx2', 'libjpegqs.c',
c_args : ['-DSIMD_SELECT', '-DSIMD_NAME=avx2',
'-mavx2', '-mfma', '-DSIMD_AVX2'],
dependencies : deps)
jpegqs_sse2 = static_library('jpegqs-sse2', 'libjpegqs.c',
c_args : ['-DSIMD_SELECT', '-DSIMD_NAME=sse2', '-msse2', '-DSIMD_SSE2'],
dependencies : deps)
jpegqs_base = static_library('jpegqs-base', 'libjpegqs.c',
c_args : ['-DSIMD_SELECT', '-DSIMD_NAME=base', '-DSIMD_BASE'],
dependencies : deps)
jpegqs_lib = static_library('jpegqs', 'libjpegqs.c',
c_args : ['-DSIMD_SELECT'],
dependencies : deps,
link_with : [jpegqs_base, jpegqs_sse2, jpegqs_avx2, jpegqs_avx512])
else
jpegqs_lib = static_library('jpegqs', 'libjpegqs.c',
c_args : ['-DNO_SIMD'],
dependencies : deps)
endif
jpegqs_dep = declare_dependency(
link_with : jpegqs_lib,
include_directories : include_directories('.'),
)