From 5fef84a1358310304cb1114924525ec4df794b49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sun, 9 Oct 2016 23:36:17 +0200 Subject: [PATCH 01/19] png: Split library to thirdparty dir and allow unbundling Uses the new structure agreed upon in #6157, but the thirdparty/ folder does not behave following a logic similar to that of modules/ yet. The png driver can't be moved to a module as discussed in #6157, as it's required by core together with a few other ImageLoader implementations (see drivers/register_driver_types.cpp:register_core_driver_types()) Dropped the possibility to disable PNG support, it's a core component of Godot. --- SConstruct | 4 +- drivers/SCsub | 3 +- drivers/png/SCsub | 73 +++++----- drivers/png/image_loader_png.cpp | 1 + drivers/png/image_loader_png.h | 3 +- drivers/png/resource_saver_png.cpp | 10 +- drivers/register_driver_types.cpp | 16 +-- platform/x11/detect.py | 8 +- thirdparty/README.md | 16 +++ thirdparty/libpng/LICENSE | 130 ++++++++++++++++++ .../png => thirdparty/libpng}/arm/arm_init.c | 0 .../libpng}/arm/filter_neon.S | 0 .../libpng}/arm/filter_neon_intrinsics.c | 0 {drivers/png => thirdparty/libpng}/png.c | 0 {drivers/png => thirdparty/libpng}/png.h | 0 {drivers/png => thirdparty/libpng}/pngconf.h | 0 {drivers/png => thirdparty/libpng}/pngdebug.h | 0 {drivers/png => thirdparty/libpng}/pngerror.c | 0 {drivers/png => thirdparty/libpng}/pngget.c | 0 {drivers/png => thirdparty/libpng}/pnginfo.h | 0 .../png => thirdparty/libpng}/pnglibconf.h | 0 {drivers/png => thirdparty/libpng}/pngmem.c | 0 {drivers/png => thirdparty/libpng}/pngpread.c | 0 {drivers/png => thirdparty/libpng}/pngpriv.h | 0 {drivers/png => thirdparty/libpng}/pngread.c | 0 {drivers/png => thirdparty/libpng}/pngrio.c | 0 {drivers/png => thirdparty/libpng}/pngrtran.c | 0 {drivers/png => thirdparty/libpng}/pngrutil.c | 0 {drivers/png => thirdparty/libpng}/pngset.c | 0 .../png => thirdparty/libpng}/pngstruct.h | 0 {drivers/png => thirdparty/libpng}/pngtrans.c | 0 {drivers/png => thirdparty/libpng}/pngwio.c | 0 {drivers/png => thirdparty/libpng}/pngwrite.c | 0 {drivers/png => thirdparty/libpng}/pngwtran.c | 0 {drivers/png => thirdparty/libpng}/pngwutil.c | 0 35 files changed, 203 insertions(+), 61 deletions(-) create mode 100644 thirdparty/README.md create mode 100644 thirdparty/libpng/LICENSE rename {drivers/png => thirdparty/libpng}/arm/arm_init.c (100%) rename {drivers/png => thirdparty/libpng}/arm/filter_neon.S (100%) rename {drivers/png => thirdparty/libpng}/arm/filter_neon_intrinsics.c (100%) rename {drivers/png => thirdparty/libpng}/png.c (100%) rename {drivers/png => thirdparty/libpng}/png.h (100%) rename {drivers/png => thirdparty/libpng}/pngconf.h (100%) rename {drivers/png => thirdparty/libpng}/pngdebug.h (100%) rename {drivers/png => thirdparty/libpng}/pngerror.c (100%) rename {drivers/png => thirdparty/libpng}/pngget.c (100%) rename {drivers/png => thirdparty/libpng}/pnginfo.h (100%) rename {drivers/png => thirdparty/libpng}/pnglibconf.h (100%) rename {drivers/png => thirdparty/libpng}/pngmem.c (100%) rename {drivers/png => thirdparty/libpng}/pngpread.c (100%) rename {drivers/png => thirdparty/libpng}/pngpriv.h (100%) rename {drivers/png => thirdparty/libpng}/pngread.c (100%) rename {drivers/png => thirdparty/libpng}/pngrio.c (100%) rename {drivers/png => thirdparty/libpng}/pngrtran.c (100%) rename {drivers/png => thirdparty/libpng}/pngrutil.c (100%) rename {drivers/png => thirdparty/libpng}/pngset.c (100%) rename {drivers/png => thirdparty/libpng}/pngstruct.h (100%) rename {drivers/png => thirdparty/libpng}/pngtrans.c (100%) rename {drivers/png => thirdparty/libpng}/pngwio.c (100%) rename {drivers/png => thirdparty/libpng}/pngwrite.c (100%) rename {drivers/png => thirdparty/libpng}/pngwtran.c (100%) rename {drivers/png => thirdparty/libpng}/pngwutil.c (100%) diff --git a/SConstruct b/SConstruct index 730af41545f..acc6c2e248a 100644 --- a/SConstruct +++ b/SConstruct @@ -127,7 +127,7 @@ opts.Add('theora','Theora Video (yes/no)','yes') opts.Add('theoralib','Theora Video (yes/no)','no') opts.Add('freetype','Freetype support in editor','builtin') opts.Add('xml','XML Save/Load support (yes/no)','yes') -opts.Add('png','PNG Image loader support (yes/no)','yes') +opts.Add('libpng','libpng library for image loader support (system/builtin)','builtin') opts.Add('jpg','JPG Image loader support (yes/no)','yes') opts.Add('webp','WEBP Image loader support (yes/no)','yes') opts.Add('dds','DDS Texture loader support (yes/no)','yes') @@ -350,8 +350,6 @@ if selected_platform in platform_list: if (env['theoralib']=='yes'): env.Append(CPPFLAGS=['-DTHEORALIB_ENABLED']); - if (env['png']=='yes'): - env.Append(CPPFLAGS=['-DPNG_ENABLED']); if (env['dds']=='yes'): env.Append(CPPFLAGS=['-DDDS_ENABLED']); if (env['pvr']=='yes'): diff --git a/drivers/SCsub b/drivers/SCsub index 5d3c0712965..3fd1bcd00df 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -26,8 +26,7 @@ if (env['openssl']!='no'): SConscript('openssl/SCsub') -if (env["png"]=="yes"): - SConscript("png/SCsub"); +SConscript("png/SCsub"); if (env["jpg"]=="yes"): #SConscript("jpg/SCsub"); SConscript("jpegd/SCsub"); diff --git a/drivers/png/SCsub b/drivers/png/SCsub index 96ef9fa5f87..ea2324c0cfd 100644 --- a/drivers/png/SCsub +++ b/drivers/png/SCsub @@ -1,42 +1,49 @@ Import('env') Import('env_drivers') +# Thirdparty source files -png_sources = [ - "png/png.c", - "png/pngerror.c", - "png/pngget.c", - "png/pngmem.c", - "png/pngpread.c", - "png/pngread.c", - "png/pngrio.c", - "png/pngrtran.c", - "png/pngrutil.c", - "png/pngset.c", - "png/pngtrans.c", - "png/pngwio.c", - "png/pngwrite.c", - "png/pngwtran.c", - "png/pngwutil.c", - "png/resource_saver_png.cpp", - "png/image_loader_png.cpp" -] +if (env["libpng"] == "builtin"): + thirdparty_dir = "#thirdparty/libpng/" + thirdparty_png_sources = [ + thirdparty_dir + "png.c", + thirdparty_dir + "pngerror.c", + thirdparty_dir + "pngget.c", + thirdparty_dir + "pngmem.c", + thirdparty_dir + "pngpread.c", + thirdparty_dir + "pngread.c", + thirdparty_dir + "pngrio.c", + thirdparty_dir + "pngrtran.c", + thirdparty_dir + "pngrutil.c", + thirdparty_dir + "pngset.c", + thirdparty_dir + "pngtrans.c", + thirdparty_dir + "pngwio.c", + thirdparty_dir + "pngwrite.c", + thirdparty_dir + "pngwtran.c", + thirdparty_dir + "pngwutil.c", + ] -# Currently .ASM filter_neon.S does not compile on NT. -import os -if ("neon_enabled" in env and env["neon_enabled"]) and os.name!="nt": - env_drivers.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=2"]) - env_neon = env_drivers.Clone(); - if "S_compiler" in env: - env_neon['CC'] = env['S_compiler'] - #env_neon.Append(CPPFLAGS=["-DPNG_ARM_NEON"]) - png_sources.append(env_neon.Object("#drivers/png/arm/arm_init.c")) - png_sources.append(env_neon.Object("#drivers/png/arm/filter_neon.S")) -else: - env_drivers.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=0"]) + # Currently .ASM filter_neon.S does not compile on NT. + import os + if ("neon_enabled" in env and env["neon_enabled"]) and os.name!="nt": + env_drivers.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=2"]) + env_neon = env_drivers.Clone(); + if "S_compiler" in env: + env_neon['CC'] = env['S_compiler'] + #env_neon.Append(CPPFLAGS=["-DPNG_ARM_NEON"]) + thirdparty_png_sources.append(env_neon.Object(thirdparty_dir + "/arm/arm_init.c")) + thirdparty_png_sources.append(env_neon.Object(thirdparty_dir + "/arm/filter_neon.S")) + else: + env_drivers.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=0"]) -env.drivers_sources+=png_sources + #env_drivers.add_source_files(env.drivers_sources, thirdparty_png_sources) + env.drivers_sources += thirdparty_png_sources # Concatenation necessary for neon objects it seems? + env_drivers.Append(CPPPATH = [thirdparty_dir]) -#env.add_source_files(env.drivers_sources, png_sources) +# Godot's own source files + +env_drivers.add_source_files(env.drivers_sources, "*.cpp") + +Export('env_drivers') Export('env') diff --git a/drivers/png/image_loader_png.cpp b/drivers/png/image_loader_png.cpp index 4967b0f9dfb..ab3f3e78fc0 100644 --- a/drivers/png/image_loader_png.cpp +++ b/drivers/png/image_loader_png.cpp @@ -30,6 +30,7 @@ #include "print_string.h" #include "os/os.h" + #include diff --git a/drivers/png/image_loader_png.h b/drivers/png/image_loader_png.h index d87d67d8985..c146e3f5a16 100644 --- a/drivers/png/image_loader_png.h +++ b/drivers/png/image_loader_png.h @@ -30,7 +30,8 @@ #define IMAGE_LOADER_PNG_H #include "io/image_loader.h" -#include "drivers/png/png.h" + +#include /** @author Juan Linietsky diff --git a/drivers/png/resource_saver_png.cpp b/drivers/png/resource_saver_png.cpp index 2578fe9eb68..e7987f27bf4 100644 --- a/drivers/png/resource_saver_png.cpp +++ b/drivers/png/resource_saver_png.cpp @@ -27,11 +27,13 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "resource_saver_png.h" -#include "scene/resources/texture.h" -#include "drivers/png/png.h" -#include "os/file_access.h" -#include "globals.h" + #include "core/image.h" +#include "globals.h" +#include "os/file_access.h" +#include "scene/resources/texture.h" + +#include static void _write_png_data(png_structp png_ptr,png_bytep data, png_size_t p_length) { diff --git a/drivers/register_driver_types.cpp b/drivers/register_driver_types.cpp index ec02b7da8ed..89ec468442e 100644 --- a/drivers/register_driver_types.cpp +++ b/drivers/register_driver_types.cpp @@ -29,8 +29,8 @@ #include "register_driver_types.h" #include "png/image_loader_png.h" -#include "webp/image_loader_webp.h" #include "png/resource_saver_png.h" +#include "webp/image_loader_webp.h" #include "jpegd/image_loader_jpegd.h" #include "dds/texture_loader_dds.h" #include "etc1/texture_loader_pkm.h" @@ -75,14 +75,11 @@ #include "mpc/audio_stream_mpc.h" #endif -#ifdef PNG_ENABLED static ImageLoaderPNG *image_loader_png=NULL; static ResourceSaverPNG *resource_saver_png=NULL; -#endif #ifdef WEBP_ENABLED static ImageLoaderWEBP *image_loader_webp=NULL; -//static ResourceSaverPNG *resource_saver_png=NULL; #endif #ifdef JPG_ENABLED @@ -132,22 +129,15 @@ static ResourceFormatPBM * pbm_loader=NULL; void register_core_driver_types() { -#ifdef PNG_ENABLED image_loader_png = memnew( ImageLoaderPNG ); ImageLoader::add_image_format_loader( image_loader_png ); resource_saver_png = memnew( ResourceSaverPNG ); ResourceSaver::add_resource_format_saver(resource_saver_png); -#endif - #ifdef WEBP_ENABLED image_loader_webp = memnew( ImageLoaderWEBP ); ImageLoader::add_image_format_loader( image_loader_webp ); - -// resource_saver_png = memnew( ResourceSaverPNG ); -// ResourceSaver::add_resource_format_saver(resource_saver_png); - #endif #ifdef JPG_ENABLED @@ -165,18 +155,14 @@ void register_core_driver_types() { void unregister_core_driver_types() { -#ifdef PNG_ENABLED if (image_loader_png) memdelete( image_loader_png ); if (resource_saver_png) memdelete( resource_saver_png ); -#endif #ifdef WEBP_ENABLED if (image_loader_webp) memdelete( image_loader_webp ); -// if (resource_saver_png) -// memdelete( resource_saver_png ); #endif #ifdef JPG_ENABLED diff --git a/platform/x11/detect.py b/platform/x11/detect.py index ba232f6d4e7..98774e85554 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -71,10 +71,10 @@ def get_flags(): ('builtin_zlib', 'no'), ('glew', 'yes'), ("openssl", "yes"), - ('freetype','yes'), #use system freetype - + ('freetype','yes'), # use system freetype + ('libpng', 'system'), #("theora","no"), - ] + ] @@ -143,6 +143,8 @@ def configure(env): if (env["openssl"]=="yes"): env.ParseConfig('pkg-config openssl --cflags --libs') + if (env["libpng"] == "system"): + env.ParseConfig('pkg-config libpng --cflags --libs') if (env["freetype"]=="yes"): env.ParseConfig('pkg-config freetype2 --cflags --libs') diff --git a/thirdparty/README.md b/thirdparty/README.md new file mode 100644 index 00000000000..55d89810db9 --- /dev/null +++ b/thirdparty/README.md @@ -0,0 +1,16 @@ +# Third party libraries + + +## libpng + +- Upstream: http://libpng.org/pub/png/libpng.html +- Version: 1.6.23 +- License: libpng/zlib + +Files extracted from upstream source: + +- all .c and .h files of the main directory, except from: + * example.c + * pngtest.c +- the arm/ folder +- scripts/pnglibconf.h.prebuilt as pnglibconf.h diff --git a/thirdparty/libpng/LICENSE b/thirdparty/libpng/LICENSE new file mode 100644 index 00000000000..b7ad4b9eaf3 --- /dev/null +++ b/thirdparty/libpng/LICENSE @@ -0,0 +1,130 @@ + +This copy of the libpng notices is provided for your convenience. In case of +any discrepancy between this copy and the notices in the file png.h that is +included in the libpng distribution, the latter shall prevail. + +COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: + +If you modify libpng you may insert additional notices immediately following +this sentence. + +This code is released under the libpng license. + +libpng versions 1.0.7, July 1, 2000 through 1.6.23, June 9, 2016 are +Copyright (c) 2000-2002, 2004, 2006-2016 Glenn Randers-Pehrson, are +derived from libpng-1.0.6, and are distributed according to the same +disclaimer and license as libpng-1.0.6 with the following individuals +added to the list of Contributing Authors: + + Simon-Pierre Cadieux + Eric S. Raymond + Mans Rullgard + Cosmin Truta + Gilles Vollant + James Yu + +and with the following additions to the disclaimer: + + There is no warranty against interference with your enjoyment of the + library or against infringement. There is no warranty that our + efforts or the library will fulfill any of your particular purposes + or needs. This library is provided with all faults, and the entire + risk of satisfactory quality, performance, accuracy, and effort is with + the user. + +Some files in the "contrib" directory and some configure-generated +files that are distributed with libpng have other copyright owners and +are released under other open source licenses. + +libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are +Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from +libpng-0.96, and are distributed according to the same disclaimer and +license as libpng-0.96, with the following individuals added to the list +of Contributing Authors: + + Tom Lane + Glenn Randers-Pehrson + Willem van Schaik + +libpng versions 0.89, June 1996, through 0.96, May 1997, are +Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88, +and are distributed according to the same disclaimer and license as +libpng-0.88, with the following individuals added to the list of +Contributing Authors: + + John Bowler + Kevin Bracey + Sam Bushell + Magnus Holmgren + Greg Roelofs + Tom Tanner + +Some files in the "scripts" directory have other copyright owners +but are released under this license. + +libpng versions 0.5, May 1995, through 0.88, January 1996, are +Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + +For the purposes of this copyright and license, "Contributing Authors" +is defined as the following set of individuals: + + Andreas Dilger + Dave Martindale + Guy Eric Schalnat + Paul Schmidt + Tim Wegner + +The PNG Reference Library is supplied "AS IS". The Contributing Authors +and Group 42, Inc. disclaim all warranties, expressed or implied, +including, without limitation, the warranties of merchantability and of +fitness for any purpose. The Contributing Authors and Group 42, Inc. +assume no liability for direct, indirect, incidental, special, exemplary, +or consequential damages, which may result from the use of the PNG +Reference Library, even if advised of the possibility of such damage. + +Permission is hereby granted to use, copy, modify, and distribute this +source code, or portions hereof, for any purpose, without fee, subject +to the following restrictions: + + 1. The origin of this source code must not be misrepresented. + + 2. Altered versions must be plainly marked as such and must not + be misrepresented as being the original source. + + 3. This Copyright notice may not be removed or altered from any + source or altered source distribution. + +The Contributing Authors and Group 42, Inc. specifically permit, without +fee, and encourage the use of this source code as a component to +supporting the PNG file format in commercial products. If you use this +source code in a product, acknowledgment is not required but would be +appreciated. + +END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE. + +TRADEMARK: + +The name "libpng" has not been registered by the Copyright owner +as a trademark in any jurisdiction. However, because libpng has +been distributed and maintained world-wide, continually since 1995, +the Copyright owner claims "common-law trademark protection" in any +jurisdiction where common-law trademark is recognized. + +OSI CERTIFICATION: + +Libpng is OSI Certified Open Source Software. OSI Certified Open Source is +a certification mark of the Open Source Initiative. OSI has not addressed +the additional disclaimers inserted at version 1.0.7. + +EXPORT CONTROL: + +The Copyright owner believes that the Export Control Classification +Number (ECCN) for libpng is EAR99, which means not subject to export +controls or International Traffic in Arms Regulations (ITAR) because +it is open source, publicly available software, that does not contain +any encryption software. See the EAR, paragraphs 734.3(b)(3) and +734.7(b). + +Glenn Randers-Pehrson +glennrp at users.sourceforge.net +June 9, 2016 diff --git a/drivers/png/arm/arm_init.c b/thirdparty/libpng/arm/arm_init.c similarity index 100% rename from drivers/png/arm/arm_init.c rename to thirdparty/libpng/arm/arm_init.c diff --git a/drivers/png/arm/filter_neon.S b/thirdparty/libpng/arm/filter_neon.S similarity index 100% rename from drivers/png/arm/filter_neon.S rename to thirdparty/libpng/arm/filter_neon.S diff --git a/drivers/png/arm/filter_neon_intrinsics.c b/thirdparty/libpng/arm/filter_neon_intrinsics.c similarity index 100% rename from drivers/png/arm/filter_neon_intrinsics.c rename to thirdparty/libpng/arm/filter_neon_intrinsics.c diff --git a/drivers/png/png.c b/thirdparty/libpng/png.c similarity index 100% rename from drivers/png/png.c rename to thirdparty/libpng/png.c diff --git a/drivers/png/png.h b/thirdparty/libpng/png.h similarity index 100% rename from drivers/png/png.h rename to thirdparty/libpng/png.h diff --git a/drivers/png/pngconf.h b/thirdparty/libpng/pngconf.h similarity index 100% rename from drivers/png/pngconf.h rename to thirdparty/libpng/pngconf.h diff --git a/drivers/png/pngdebug.h b/thirdparty/libpng/pngdebug.h similarity index 100% rename from drivers/png/pngdebug.h rename to thirdparty/libpng/pngdebug.h diff --git a/drivers/png/pngerror.c b/thirdparty/libpng/pngerror.c similarity index 100% rename from drivers/png/pngerror.c rename to thirdparty/libpng/pngerror.c diff --git a/drivers/png/pngget.c b/thirdparty/libpng/pngget.c similarity index 100% rename from drivers/png/pngget.c rename to thirdparty/libpng/pngget.c diff --git a/drivers/png/pnginfo.h b/thirdparty/libpng/pnginfo.h similarity index 100% rename from drivers/png/pnginfo.h rename to thirdparty/libpng/pnginfo.h diff --git a/drivers/png/pnglibconf.h b/thirdparty/libpng/pnglibconf.h similarity index 100% rename from drivers/png/pnglibconf.h rename to thirdparty/libpng/pnglibconf.h diff --git a/drivers/png/pngmem.c b/thirdparty/libpng/pngmem.c similarity index 100% rename from drivers/png/pngmem.c rename to thirdparty/libpng/pngmem.c diff --git a/drivers/png/pngpread.c b/thirdparty/libpng/pngpread.c similarity index 100% rename from drivers/png/pngpread.c rename to thirdparty/libpng/pngpread.c diff --git a/drivers/png/pngpriv.h b/thirdparty/libpng/pngpriv.h similarity index 100% rename from drivers/png/pngpriv.h rename to thirdparty/libpng/pngpriv.h diff --git a/drivers/png/pngread.c b/thirdparty/libpng/pngread.c similarity index 100% rename from drivers/png/pngread.c rename to thirdparty/libpng/pngread.c diff --git a/drivers/png/pngrio.c b/thirdparty/libpng/pngrio.c similarity index 100% rename from drivers/png/pngrio.c rename to thirdparty/libpng/pngrio.c diff --git a/drivers/png/pngrtran.c b/thirdparty/libpng/pngrtran.c similarity index 100% rename from drivers/png/pngrtran.c rename to thirdparty/libpng/pngrtran.c diff --git a/drivers/png/pngrutil.c b/thirdparty/libpng/pngrutil.c similarity index 100% rename from drivers/png/pngrutil.c rename to thirdparty/libpng/pngrutil.c diff --git a/drivers/png/pngset.c b/thirdparty/libpng/pngset.c similarity index 100% rename from drivers/png/pngset.c rename to thirdparty/libpng/pngset.c diff --git a/drivers/png/pngstruct.h b/thirdparty/libpng/pngstruct.h similarity index 100% rename from drivers/png/pngstruct.h rename to thirdparty/libpng/pngstruct.h diff --git a/drivers/png/pngtrans.c b/thirdparty/libpng/pngtrans.c similarity index 100% rename from drivers/png/pngtrans.c rename to thirdparty/libpng/pngtrans.c diff --git a/drivers/png/pngwio.c b/thirdparty/libpng/pngwio.c similarity index 100% rename from drivers/png/pngwio.c rename to thirdparty/libpng/pngwio.c diff --git a/drivers/png/pngwrite.c b/thirdparty/libpng/pngwrite.c similarity index 100% rename from drivers/png/pngwrite.c rename to thirdparty/libpng/pngwrite.c diff --git a/drivers/png/pngwtran.c b/thirdparty/libpng/pngwtran.c similarity index 100% rename from drivers/png/pngwtran.c rename to thirdparty/libpng/pngwtran.c diff --git a/drivers/png/pngwutil.c b/thirdparty/libpng/pngwutil.c similarity index 100% rename from drivers/png/pngwutil.c rename to thirdparty/libpng/pngwutil.c From 16ba665db6bbd7f15aadc35fda87d69d0b220bf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 10 Oct 2016 00:03:33 +0200 Subject: [PATCH 02/19] jpg: Make it a module and split jpgd thirdparty files Similar rationale as in previous commit. --- SConstruct | 3 -- drivers/SCsub | 3 -- drivers/jpegd/SCsub | 11 ----- drivers/register_driver_types.cpp | 17 ------- modules/jpg/SCsub | 19 ++++++++ modules/jpg/config.py | 6 +++ .../jpg}/image_loader_jpegd.cpp | 3 +- .../jpg}/image_loader_jpegd.h | 0 modules/jpg/register_types.cpp | 44 +++++++++++++++++++ modules/jpg/register_types.h | 30 +++++++++++++ thirdparty/README.md | 11 +++++ .../jpeg-compressor}/jpgd.cpp | 0 .../jpeg-compressor}/jpgd.h | 0 13 files changed, 112 insertions(+), 35 deletions(-) delete mode 100644 drivers/jpegd/SCsub create mode 100644 modules/jpg/SCsub create mode 100644 modules/jpg/config.py rename {drivers/jpegd => modules/jpg}/image_loader_jpegd.cpp (99%) rename {drivers/jpegd => modules/jpg}/image_loader_jpegd.h (100%) create mode 100644 modules/jpg/register_types.cpp create mode 100644 modules/jpg/register_types.h rename {drivers/jpegd => thirdparty/jpeg-compressor}/jpgd.cpp (100%) rename {drivers/jpegd => thirdparty/jpeg-compressor}/jpgd.h (100%) diff --git a/SConstruct b/SConstruct index acc6c2e248a..3f2f1e5b234 100644 --- a/SConstruct +++ b/SConstruct @@ -128,7 +128,6 @@ opts.Add('theoralib','Theora Video (yes/no)','no') opts.Add('freetype','Freetype support in editor','builtin') opts.Add('xml','XML Save/Load support (yes/no)','yes') opts.Add('libpng','libpng library for image loader support (system/builtin)','builtin') -opts.Add('jpg','JPG Image loader support (yes/no)','yes') opts.Add('webp','WEBP Image loader support (yes/no)','yes') opts.Add('dds','DDS Texture loader support (yes/no)','yes') opts.Add('pvr','PVR (PowerVR) Texture loader support (yes/no)','yes') @@ -354,8 +353,6 @@ if selected_platform in platform_list: env.Append(CPPFLAGS=['-DDDS_ENABLED']); if (env['pvr']=='yes'): env.Append(CPPFLAGS=['-DPVR_ENABLED']); - if (env['jpg']=='yes'): - env.Append(CPPFLAGS=['-DJPG_ENABLED']); if (env['webp']=='yes'): env.Append(CPPFLAGS=['-DWEBP_ENABLED']); diff --git a/drivers/SCsub b/drivers/SCsub index 3fd1bcd00df..27bd63dfed2 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -27,9 +27,6 @@ if (env['openssl']!='no'): SConscript("png/SCsub"); -if (env["jpg"]=="yes"): - #SConscript("jpg/SCsub"); - SConscript("jpegd/SCsub"); if (env["webp"]=="yes"): SConscript("webp/SCsub"); SConscript("dds/SCsub"); diff --git a/drivers/jpegd/SCsub b/drivers/jpegd/SCsub deleted file mode 100644 index dfdb19402ee..00000000000 --- a/drivers/jpegd/SCsub +++ /dev/null @@ -1,11 +0,0 @@ -Import('env') - - -jpg_sources = [ - "jpegd/jpgd.cpp", - "jpegd/image_loader_jpegd.cpp" - ] - -env.drivers_sources+=jpg_sources - -#env.add_source_files(env.drivers_sources, jpg_sources) diff --git a/drivers/register_driver_types.cpp b/drivers/register_driver_types.cpp index 89ec468442e..ca922da6f08 100644 --- a/drivers/register_driver_types.cpp +++ b/drivers/register_driver_types.cpp @@ -31,7 +31,6 @@ #include "png/image_loader_png.h" #include "png/resource_saver_png.h" #include "webp/image_loader_webp.h" -#include "jpegd/image_loader_jpegd.h" #include "dds/texture_loader_dds.h" #include "etc1/texture_loader_pkm.h" #include "pvr/texture_loader_pvr.h" @@ -82,10 +81,6 @@ static ResourceSaverPNG *resource_saver_png=NULL; static ImageLoaderWEBP *image_loader_webp=NULL; #endif -#ifdef JPG_ENABLED -static ImageLoaderJPG *image_loader_jpg=NULL; -#endif - #ifdef DDS_ENABLED static ResourceFormatDDS *resource_loader_dds=NULL; #endif @@ -140,13 +135,6 @@ void register_core_driver_types() { ImageLoader::add_image_format_loader( image_loader_webp ); #endif -#ifdef JPG_ENABLED - - image_loader_jpg = memnew( ImageLoaderJPG ); - ImageLoader::add_image_format_loader( image_loader_jpg ); -#endif - - pbm_loader = memnew( ResourceFormatPBM ); ResourceLoader::add_resource_format_loader(pbm_loader); @@ -165,11 +153,6 @@ void unregister_core_driver_types() { memdelete( image_loader_webp ); #endif -#ifdef JPG_ENABLED - if (image_loader_jpg) - memdelete( image_loader_jpg ); -#endif - memdelete( pbm_loader ); } diff --git a/modules/jpg/SCsub b/modules/jpg/SCsub new file mode 100644 index 00000000000..409a8b52d0d --- /dev/null +++ b/modules/jpg/SCsub @@ -0,0 +1,19 @@ +Import('env') +Import('env_modules') + +# Thirdparty source files +# Not unbundled for now as they are not commonly available as shared library +thirdparty_dir = "#thirdparty/jpeg-compressor/" +thirdparty_jpg_sources = [ + "jpgd.cpp", +] +thirdparty_jpg_sources = [thirdparty_dir + file for file in thirdparty_jpg_sources] + +env_modules.add_source_files(env.modules_sources, thirdparty_jpg_sources) +env_modules.Append(CPPPATH = [thirdparty_dir]) + +# Godot's own source files +env_modules.add_source_files(env.modules_sources, "*.cpp") + +Export('env_modules') +Export('env') diff --git a/modules/jpg/config.py b/modules/jpg/config.py new file mode 100644 index 00000000000..368e97e152c --- /dev/null +++ b/modules/jpg/config.py @@ -0,0 +1,6 @@ + +def can_build(platform): + return True + +def configure(env): + pass diff --git a/drivers/jpegd/image_loader_jpegd.cpp b/modules/jpg/image_loader_jpegd.cpp similarity index 99% rename from drivers/jpegd/image_loader_jpegd.cpp rename to modules/jpg/image_loader_jpegd.cpp index 496334605d4..03c3b19fc04 100644 --- a/drivers/jpegd/image_loader_jpegd.cpp +++ b/modules/jpg/image_loader_jpegd.cpp @@ -30,7 +30,8 @@ #include "print_string.h" #include "os/os.h" -#include "jpgd.h" + +#include #include diff --git a/drivers/jpegd/image_loader_jpegd.h b/modules/jpg/image_loader_jpegd.h similarity index 100% rename from drivers/jpegd/image_loader_jpegd.h rename to modules/jpg/image_loader_jpegd.h diff --git a/modules/jpg/register_types.cpp b/modules/jpg/register_types.cpp new file mode 100644 index 00000000000..a648423cdfb --- /dev/null +++ b/modules/jpg/register_types.cpp @@ -0,0 +1,44 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "register_types.h" + +#include "image_loader_jpegd.h" + +static ImageLoaderJPG *image_loader_jpg = NULL; + +void register_jpg_types() { + + image_loader_jpg = memnew( ImageLoaderJPG ); + ImageLoader::add_image_format_loader(image_loader_jpg); +} + +void unregister_jpg_types() { + + memdelete( image_loader_jpg ); +} diff --git a/modules/jpg/register_types.h b/modules/jpg/register_types.h new file mode 100644 index 00000000000..0e06c4ff810 --- /dev/null +++ b/modules/jpg/register_types.h @@ -0,0 +1,30 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_jpg_types(); +void unregister_jpg_types(); diff --git a/thirdparty/README.md b/thirdparty/README.md index 55d89810db9..0e512fb8678 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -1,6 +1,17 @@ # Third party libraries +## jpeg-compressor + +- Upstream: https://github.com/richgel999/jpeg-compressor +- Version: 1.04 +- License: Public domain + +Files extracted from upstream source: + +- jpgd.{c,h} + + ## libpng - Upstream: http://libpng.org/pub/png/libpng.html diff --git a/drivers/jpegd/jpgd.cpp b/thirdparty/jpeg-compressor/jpgd.cpp similarity index 100% rename from drivers/jpegd/jpgd.cpp rename to thirdparty/jpeg-compressor/jpgd.cpp diff --git a/drivers/jpegd/jpgd.h b/thirdparty/jpeg-compressor/jpgd.h similarity index 100% rename from drivers/jpegd/jpgd.h rename to thirdparty/jpeg-compressor/jpgd.h From c31ad71f10f68705a456b4257c084d4008c34370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Mon, 10 Oct 2016 19:50:51 +0200 Subject: [PATCH 03/19] enet: Split enet thirdparty files and allow unbundling Building against shared libraries only implemented for Linux X11 so far. TODO: Document Godot's modifications of upstream enet. --- SConstruct | 1 + modules/enet/SCsub | 27 +++++++++++++++--- modules/enet/config.py | 7 +---- modules/enet/networked_multiplayer_enet.cpp | 28 +++++++++++++++++++ modules/enet/networked_multiplayer_enet.h | 28 +++++++++++++++++++ platform/x11/detect.py | 3 +- thirdparty/README.md | 17 +++++++++++ thirdparty/enet/LICENSE | 7 +++++ {modules => thirdparty}/enet/callbacks.c | 0 {modules => thirdparty}/enet/compress.c | 0 {modules => thirdparty}/enet/enet/callbacks.h | 0 {modules => thirdparty}/enet/enet/enet.h | 0 {modules => thirdparty}/enet/enet/list.h | 0 {modules => thirdparty}/enet/enet/protocol.h | 0 {modules => thirdparty}/enet/enet/time.h | 0 {modules => thirdparty}/enet/enet/types.h | 0 {modules => thirdparty}/enet/enet/unix.h | 0 {modules => thirdparty}/enet/enet/utility.h | 0 {modules => thirdparty}/enet/enet/win32.h | 0 {modules => thirdparty}/enet/host.c | 0 {modules => thirdparty}/enet/list.c | 0 {modules => thirdparty}/enet/packet.c | 0 {modules => thirdparty}/enet/peer.c | 0 {modules => thirdparty}/enet/protocol.c | 0 {modules => thirdparty}/enet/unix.c | 0 {modules => thirdparty}/enet/win32.c | 0 26 files changed, 107 insertions(+), 11 deletions(-) create mode 100644 thirdparty/enet/LICENSE rename {modules => thirdparty}/enet/callbacks.c (100%) rename {modules => thirdparty}/enet/compress.c (100%) rename {modules => thirdparty}/enet/enet/callbacks.h (100%) rename {modules => thirdparty}/enet/enet/enet.h (100%) rename {modules => thirdparty}/enet/enet/list.h (100%) rename {modules => thirdparty}/enet/enet/protocol.h (100%) rename {modules => thirdparty}/enet/enet/time.h (100%) rename {modules => thirdparty}/enet/enet/types.h (100%) rename {modules => thirdparty}/enet/enet/unix.h (100%) rename {modules => thirdparty}/enet/enet/utility.h (100%) rename {modules => thirdparty}/enet/enet/win32.h (100%) rename {modules => thirdparty}/enet/host.c (100%) rename {modules => thirdparty}/enet/list.c (100%) rename {modules => thirdparty}/enet/packet.c (100%) rename {modules => thirdparty}/enet/peer.c (100%) rename {modules => thirdparty}/enet/protocol.c (100%) rename {modules => thirdparty}/enet/unix.c (100%) rename {modules => thirdparty}/enet/win32.c (100%) diff --git a/SConstruct b/SConstruct index 3f2f1e5b234..19c62a9d155 100644 --- a/SConstruct +++ b/SConstruct @@ -135,6 +135,7 @@ opts.Add('etc1','etc1 Texture compression support (yes/no)','yes') opts.Add('builtin_zlib','Use built-in zlib (yes/no)','yes') opts.Add('openssl','Use OpenSSL (yes/no/builtin)','no') opts.Add('musepack','Musepack Audio (yes/no)','yes') +opts.Add('enet','ENet library (system/builtin)','builtin') opts.Add("CXX", "C++ Compiler") opts.Add("CC", "C Compiler") opts.Add("CCFLAGS", "Custom flags for the C++ compiler"); diff --git a/modules/enet/SCsub b/modules/enet/SCsub index d2bc8801e42..79231c63e57 100644 --- a/modules/enet/SCsub +++ b/modules/enet/SCsub @@ -1,8 +1,27 @@ Import('env') +Import('env_modules') -env.add_source_files(env.modules_sources,"*.cpp") -env.add_source_files(env.modules_sources,"*.c") -#TODO: Make it possible to build against system enet -env.Append(CPPPATH = ["#modules/enet"]) +# Thirdparty source files +if (env["enet"] != "system"): # builtin + thirdparty_dir = "#thirdparty/enet/" + thirdparty_enet_sources = [ + "callbacks.c", + "compress.c", + "host.c", + "list.c", + "packet.c", + "peer.c", + "protocol.c", + "unix.c", + "win32.c", + ] + thirdparty_enet_sources = [thirdparty_dir + file for file in thirdparty_enet_sources] + + env_modules.add_source_files(env.modules_sources, thirdparty_enet_sources) + env_modules.Append(CPPPATH = [thirdparty_dir]) + +env_modules.add_source_files(env.modules_sources, "*.cpp") + +Export('env_modules') Export('env') diff --git a/modules/enet/config.py b/modules/enet/config.py index ea7e83378a9..368e97e152c 100644 --- a/modules/enet/config.py +++ b/modules/enet/config.py @@ -1,11 +1,6 @@ - def can_build(platform): - return True - + return True def configure(env): pass - - - diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp index ac89c0e9e9e..b4dfa9c62ec 100644 --- a/modules/enet/networked_multiplayer_enet.cpp +++ b/modules/enet/networked_multiplayer_enet.cpp @@ -1,3 +1,31 @@ +/*************************************************************************/ +/* networked_multiplayer_enet.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ #include "os/os.h" #include "io/marshalls.h" #include "networked_multiplayer_enet.h" diff --git a/modules/enet/networked_multiplayer_enet.h b/modules/enet/networked_multiplayer_enet.h index f64db4561ea..3db318c96aa 100644 --- a/modules/enet/networked_multiplayer_enet.h +++ b/modules/enet/networked_multiplayer_enet.h @@ -1,3 +1,31 @@ +/*************************************************************************/ +/* networked_multiplayer_enet.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ #ifndef NETWORKED_MULTIPLAYER_ENET_H #define NETWORKED_MULTIPLAYER_ENET_H diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 98774e85554..10e44976caa 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -149,7 +149,8 @@ def configure(env): if (env["freetype"]=="yes"): env.ParseConfig('pkg-config freetype2 --cflags --libs') - + if (env["enet"] == "system"): + env.ParseConfig('pkg-config libenet --cflags --libs') env.Append(CPPFLAGS=['-DOPENGL_ENABLED']) diff --git a/thirdparty/README.md b/thirdparty/README.md index 0e512fb8678..5c8208b9a53 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -1,6 +1,23 @@ # Third party libraries +## enet + +- Upstream: http://enet.bespin.org +- Version: 1.3.13 +- License: MIT + +Files extracted from upstream source: + +- all *.c files in the main directory +- the include/enet/ folder as enet/ +- LICENSE file + +Important: Some files have been modified by Godot developers so that they work +for all platforms (especially WinRT). Check the diff with the 1.3.13 tarball +before the next update. + + ## jpeg-compressor - Upstream: https://github.com/richgel999/jpeg-compressor diff --git a/thirdparty/enet/LICENSE b/thirdparty/enet/LICENSE new file mode 100644 index 00000000000..39af84a8f67 --- /dev/null +++ b/thirdparty/enet/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2002-2016 Lee Salzman + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/modules/enet/callbacks.c b/thirdparty/enet/callbacks.c similarity index 100% rename from modules/enet/callbacks.c rename to thirdparty/enet/callbacks.c diff --git a/modules/enet/compress.c b/thirdparty/enet/compress.c similarity index 100% rename from modules/enet/compress.c rename to thirdparty/enet/compress.c diff --git a/modules/enet/enet/callbacks.h b/thirdparty/enet/enet/callbacks.h similarity index 100% rename from modules/enet/enet/callbacks.h rename to thirdparty/enet/enet/callbacks.h diff --git a/modules/enet/enet/enet.h b/thirdparty/enet/enet/enet.h similarity index 100% rename from modules/enet/enet/enet.h rename to thirdparty/enet/enet/enet.h diff --git a/modules/enet/enet/list.h b/thirdparty/enet/enet/list.h similarity index 100% rename from modules/enet/enet/list.h rename to thirdparty/enet/enet/list.h diff --git a/modules/enet/enet/protocol.h b/thirdparty/enet/enet/protocol.h similarity index 100% rename from modules/enet/enet/protocol.h rename to thirdparty/enet/enet/protocol.h diff --git a/modules/enet/enet/time.h b/thirdparty/enet/enet/time.h similarity index 100% rename from modules/enet/enet/time.h rename to thirdparty/enet/enet/time.h diff --git a/modules/enet/enet/types.h b/thirdparty/enet/enet/types.h similarity index 100% rename from modules/enet/enet/types.h rename to thirdparty/enet/enet/types.h diff --git a/modules/enet/enet/unix.h b/thirdparty/enet/enet/unix.h similarity index 100% rename from modules/enet/enet/unix.h rename to thirdparty/enet/enet/unix.h diff --git a/modules/enet/enet/utility.h b/thirdparty/enet/enet/utility.h similarity index 100% rename from modules/enet/enet/utility.h rename to thirdparty/enet/enet/utility.h diff --git a/modules/enet/enet/win32.h b/thirdparty/enet/enet/win32.h similarity index 100% rename from modules/enet/enet/win32.h rename to thirdparty/enet/enet/win32.h diff --git a/modules/enet/host.c b/thirdparty/enet/host.c similarity index 100% rename from modules/enet/host.c rename to thirdparty/enet/host.c diff --git a/modules/enet/list.c b/thirdparty/enet/list.c similarity index 100% rename from modules/enet/list.c rename to thirdparty/enet/list.c diff --git a/modules/enet/packet.c b/thirdparty/enet/packet.c similarity index 100% rename from modules/enet/packet.c rename to thirdparty/enet/packet.c diff --git a/modules/enet/peer.c b/thirdparty/enet/peer.c similarity index 100% rename from modules/enet/peer.c rename to thirdparty/enet/peer.c diff --git a/modules/enet/protocol.c b/thirdparty/enet/protocol.c similarity index 100% rename from modules/enet/protocol.c rename to thirdparty/enet/protocol.c diff --git a/modules/enet/unix.c b/thirdparty/enet/unix.c similarity index 100% rename from modules/enet/unix.c rename to thirdparty/enet/unix.c diff --git a/modules/enet/win32.c b/thirdparty/enet/win32.c similarity index 100% rename from modules/enet/win32.c rename to thirdparty/enet/win32.c From b1e8889d969f5f88539c47c2afac6c9ea2a2dc11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 11 Oct 2016 20:44:26 +0200 Subject: [PATCH 04/19] dds/etc1/pbm/pvr: Make those modules and split thirdparty files They are not particularly packaged in Linux distros so we do not facilitate unbundling via SCons. There could be done if/when there is interest. Also s/pnm/pbm/, long-lived typo :) --- SConstruct | 12 +--- drivers/SCsub | 4 -- drivers/dds/SCsub | 10 ---- drivers/etc1/SCsub | 15 ----- drivers/pnm/SCsub | 10 ---- drivers/pvr/SCsub | 15 ----- drivers/register_driver_types.cpp | 56 ------------------- modules/dds/SCsub | 7 +++ modules/dds/config.py | 6 ++ modules/dds/register_types.cpp | 44 +++++++++++++++ modules/dds/register_types.h | 30 ++++++++++ .../dds/texture_loader_dds.cpp | 0 {drivers => modules}/dds/texture_loader_dds.h | 0 modules/etc1/SCsub | 19 +++++++ modules/etc1/config.py | 6 ++ {drivers => modules}/etc1/image_etc.cpp | 0 {drivers => modules}/etc1/image_etc.h | 0 modules/etc1/register_types.cpp | 47 ++++++++++++++++ modules/etc1/register_types.h | 30 ++++++++++ .../etc1/texture_loader_pkm.cpp | 0 .../etc1/texture_loader_pkm.h | 0 modules/pbm/SCsub | 7 +++ .../pbm/bitmap_loader_pbm.cpp | 4 +- .../pbm/bitmap_loader_pbm.h | 6 +- modules/pbm/config.py | 6 ++ modules/pbm/register_types.cpp | 44 +++++++++++++++ modules/pbm/register_types.h | 30 ++++++++++ modules/pvr/SCsub | 23 ++++++++ modules/pvr/config.py | 6 ++ modules/pvr/register_types.cpp | 44 +++++++++++++++ modules/pvr/register_types.h | 30 ++++++++++ .../pvr/texture_loader_pvr.cpp | 0 {drivers => modules}/pvr/texture_loader_pvr.h | 0 thirdparty/README.md | 23 ++++++++ .../pvrtccompressor}/AlphaBitmap.h | 0 .../pvrtccompressor}/BitScale.cpp | 0 .../pvrtccompressor}/BitScale.h | 0 .../pvrtccompressor}/BitUtility.h | 0 .../pvrtccompressor}/Bitmap.h | 0 .../pvrtccompressor}/ColorRgba.h | 0 .../pvrtccompressor}/Interval.h | 0 thirdparty/pvrtccompressor/LICENSE.TXT | 25 +++++++++ .../pvrtccompressor}/MortonTable.cpp | 0 .../pvrtccompressor}/MortonTable.h | 0 .../pvrtccompressor}/Point2.h | 0 .../pvrtccompressor}/PvrTcDecoder.cpp | 0 .../pvrtccompressor}/PvrTcDecoder.h | 0 .../pvrtccompressor}/PvrTcEncoder.cpp | 0 .../pvrtccompressor}/PvrTcEncoder.h | 0 .../pvrtccompressor}/PvrTcPacket.cpp | 0 .../pvrtccompressor}/PvrTcPacket.h | 0 .../pvrtccompressor}/RgbBitmap.h | 0 .../pvrtccompressor}/RgbaBitmap.h | 0 .../etc1 => thirdparty/rg-etc1}/rg_etc1.cpp | 0 .../etc1 => thirdparty/rg-etc1}/rg_etc1.h | 0 55 files changed, 433 insertions(+), 126 deletions(-) delete mode 100644 drivers/dds/SCsub delete mode 100644 drivers/etc1/SCsub delete mode 100644 drivers/pnm/SCsub delete mode 100644 drivers/pvr/SCsub create mode 100644 modules/dds/SCsub create mode 100644 modules/dds/config.py create mode 100644 modules/dds/register_types.cpp create mode 100644 modules/dds/register_types.h rename {drivers => modules}/dds/texture_loader_dds.cpp (100%) rename {drivers => modules}/dds/texture_loader_dds.h (100%) create mode 100644 modules/etc1/SCsub create mode 100644 modules/etc1/config.py rename {drivers => modules}/etc1/image_etc.cpp (100%) rename {drivers => modules}/etc1/image_etc.h (100%) create mode 100644 modules/etc1/register_types.cpp create mode 100644 modules/etc1/register_types.h rename {drivers => modules}/etc1/texture_loader_pkm.cpp (100%) rename {drivers => modules}/etc1/texture_loader_pkm.h (100%) create mode 100644 modules/pbm/SCsub rename drivers/pnm/bitmap_loader_pnm.cpp => modules/pbm/bitmap_loader_pbm.cpp (98%) rename drivers/pnm/bitmap_loader_pnm.h => modules/pbm/bitmap_loader_pbm.h (95%) create mode 100644 modules/pbm/config.py create mode 100644 modules/pbm/register_types.cpp create mode 100644 modules/pbm/register_types.h create mode 100644 modules/pvr/SCsub create mode 100644 modules/pvr/config.py create mode 100644 modules/pvr/register_types.cpp create mode 100644 modules/pvr/register_types.h rename {drivers => modules}/pvr/texture_loader_pvr.cpp (100%) rename {drivers => modules}/pvr/texture_loader_pvr.h (100%) rename {drivers/pvr => thirdparty/pvrtccompressor}/AlphaBitmap.h (100%) rename {drivers/pvr => thirdparty/pvrtccompressor}/BitScale.cpp (100%) rename {drivers/pvr => thirdparty/pvrtccompressor}/BitScale.h (100%) rename {drivers/pvr => thirdparty/pvrtccompressor}/BitUtility.h (100%) rename {drivers/pvr => thirdparty/pvrtccompressor}/Bitmap.h (100%) rename {drivers/pvr => thirdparty/pvrtccompressor}/ColorRgba.h (100%) rename {drivers/pvr => thirdparty/pvrtccompressor}/Interval.h (100%) create mode 100644 thirdparty/pvrtccompressor/LICENSE.TXT rename {drivers/pvr => thirdparty/pvrtccompressor}/MortonTable.cpp (100%) rename {drivers/pvr => thirdparty/pvrtccompressor}/MortonTable.h (100%) rename {drivers/pvr => thirdparty/pvrtccompressor}/Point2.h (100%) rename {drivers/pvr => thirdparty/pvrtccompressor}/PvrTcDecoder.cpp (100%) rename {drivers/pvr => thirdparty/pvrtccompressor}/PvrTcDecoder.h (100%) rename {drivers/pvr => thirdparty/pvrtccompressor}/PvrTcEncoder.cpp (100%) rename {drivers/pvr => thirdparty/pvrtccompressor}/PvrTcEncoder.h (100%) rename {drivers/pvr => thirdparty/pvrtccompressor}/PvrTcPacket.cpp (100%) rename {drivers/pvr => thirdparty/pvrtccompressor}/PvrTcPacket.h (100%) rename {drivers/pvr => thirdparty/pvrtccompressor}/RgbBitmap.h (100%) rename {drivers/pvr => thirdparty/pvrtccompressor}/RgbaBitmap.h (100%) rename {drivers/etc1 => thirdparty/rg-etc1}/rg_etc1.cpp (100%) rename {drivers/etc1 => thirdparty/rg-etc1}/rg_etc1.h (100%) diff --git a/SConstruct b/SConstruct index 19c62a9d155..2e4ff24d3bd 100644 --- a/SConstruct +++ b/SConstruct @@ -129,9 +129,6 @@ opts.Add('freetype','Freetype support in editor','builtin') opts.Add('xml','XML Save/Load support (yes/no)','yes') opts.Add('libpng','libpng library for image loader support (system/builtin)','builtin') opts.Add('webp','WEBP Image loader support (yes/no)','yes') -opts.Add('dds','DDS Texture loader support (yes/no)','yes') -opts.Add('pvr','PVR (PowerVR) Texture loader support (yes/no)','yes') -opts.Add('etc1','etc1 Texture compression support (yes/no)','yes') opts.Add('builtin_zlib','Use built-in zlib (yes/no)','yes') opts.Add('openssl','Use OpenSSL (yes/no/builtin)','no') opts.Add('musepack','Musepack Audio (yes/no)','yes') @@ -157,7 +154,7 @@ for k in platform_opts.keys(): opts.Add(o[0],o[1],o[2]) for x in module_list: - opts.Add('module_'+x+'_enabled', "Enable module '"+x+"'.", "yes") + opts.Add('module_'+x+'_enabled', "Enable module '"+x+"' (yes/no)", "yes") opts.Update(env_base) # update environment Help(opts.GenerateHelpText(env_base)) # generate help @@ -350,10 +347,6 @@ if selected_platform in platform_list: if (env['theoralib']=='yes'): env.Append(CPPFLAGS=['-DTHEORALIB_ENABLED']); - if (env['dds']=='yes'): - env.Append(CPPFLAGS=['-DDDS_ENABLED']); - if (env['pvr']=='yes'): - env.Append(CPPFLAGS=['-DPVR_ENABLED']); if (env['webp']=='yes'): env.Append(CPPFLAGS=['-DWEBP_ENABLED']); @@ -375,9 +368,6 @@ if selected_platform in platform_list: if (env['colored']=='yes'): methods.colored(sys,env) - if (env['etc1']=='yes'): - env.Append(CPPFLAGS=['-DETC1_ENABLED']) - Export('env') #build subdirs, the build order is dependent on link order. diff --git a/drivers/SCsub b/drivers/SCsub index 27bd63dfed2..98849b431e8 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -14,7 +14,6 @@ SConscript('pulseaudio/SCsub'); SConscript('windows/SCsub'); SConscript('gles2/SCsub'); SConscript('gl_context/SCsub'); -SConscript('pnm/SCsub'); if (env['openssl']!='no'): env.Append(CPPFLAGS=['-DOPENSSL_ENABLED']); @@ -29,9 +28,6 @@ if (env['openssl']!='no'): SConscript("png/SCsub"); if (env["webp"]=="yes"): SConscript("webp/SCsub"); -SConscript("dds/SCsub"); -SConscript("pvr/SCsub"); -SConscript("etc1/SCsub") if (env["builtin_zlib"]=="yes"): SConscript("builtin_zlib/SCsub"); diff --git a/drivers/dds/SCsub b/drivers/dds/SCsub deleted file mode 100644 index 159829384f8..00000000000 --- a/drivers/dds/SCsub +++ /dev/null @@ -1,10 +0,0 @@ -Import('env') - - -dds_sources = [ - "dds/texture_loader_dds.cpp" - ] - -env.drivers_sources+=dds_sources - -#env.add_source_files(env.drivers_sources, dds_sources) diff --git a/drivers/etc1/SCsub b/drivers/etc1/SCsub deleted file mode 100644 index 2b9dc1b31c7..00000000000 --- a/drivers/etc1/SCsub +++ /dev/null @@ -1,15 +0,0 @@ -Import('env') - - -etc_sources = [ - "etc1/image_etc.cpp", - "etc1/rg_etc1.cpp", - "etc1/texture_loader_pkm.cpp" -] - -if (env["etc1"] != "no"): - env.drivers_sources+=etc_sources - -#env.add_source_files(env.drivers_sources, etc_sources) - -Export('env') diff --git a/drivers/pnm/SCsub b/drivers/pnm/SCsub deleted file mode 100644 index 28b35773a42..00000000000 --- a/drivers/pnm/SCsub +++ /dev/null @@ -1,10 +0,0 @@ -Import('env') - - -pnm_sources = [ - "pnm/bitmap_loader_pnm.cpp" - ] - -env.drivers_sources+=pnm_sources - -#env.add_source_files(env.drivers_sources, pnm_sources) diff --git a/drivers/pvr/SCsub b/drivers/pvr/SCsub deleted file mode 100644 index 44b8c3d6bb0..00000000000 --- a/drivers/pvr/SCsub +++ /dev/null @@ -1,15 +0,0 @@ -Import('env') - - -pvr_sources = [ - "pvr/BitScale.cpp", - "pvr/MortonTable.cpp", - "pvr/PvrTcDecoder.cpp", - "pvr/PvrTcEncoder.cpp", - "pvr/PvrTcPacket.cpp", - "pvr/texture_loader_pvr.cpp" - ] - -env.drivers_sources+=pvr_sources - -#env.add_source_files(env.drivers_sources, pvr_sources) diff --git a/drivers/register_driver_types.cpp b/drivers/register_driver_types.cpp index ca922da6f08..9623c29b1a9 100644 --- a/drivers/register_driver_types.cpp +++ b/drivers/register_driver_types.cpp @@ -31,12 +31,7 @@ #include "png/image_loader_png.h" #include "png/resource_saver_png.h" #include "webp/image_loader_webp.h" -#include "dds/texture_loader_dds.h" -#include "etc1/texture_loader_pkm.h" -#include "pvr/texture_loader_pvr.h" -#include "etc1/image_etc.h" #include "chibi/event_stream_chibi.h" -#include "pnm/bitmap_loader_pnm.h" #ifdef TOOLS_ENABLED @@ -81,19 +76,6 @@ static ResourceSaverPNG *resource_saver_png=NULL; static ImageLoaderWEBP *image_loader_webp=NULL; #endif -#ifdef DDS_ENABLED -static ResourceFormatDDS *resource_loader_dds=NULL; -#endif - -#ifdef ETC1_ENABLED -static ResourceFormatPKM *resource_loader_pkm=NULL; -#endif - - -#ifdef PVR_ENABLED -static ResourceFormatPVR *resource_loader_pvr=NULL; -#endif - #ifdef TREMOR_ENABLED static ResourceFormatLoaderAudioStreamOGG *vorbis_stream_loader=NULL; #endif @@ -119,9 +101,6 @@ static ResourceFormatLoaderAudioStreamMPC * mpc_stream_loader=NULL; #endif - -static ResourceFormatPBM * pbm_loader=NULL; - void register_core_driver_types() { image_loader_png = memnew( ImageLoaderPNG ); @@ -135,9 +114,6 @@ void register_core_driver_types() { ImageLoader::add_image_format_loader( image_loader_webp ); #endif - pbm_loader = memnew( ResourceFormatPBM ); - ResourceLoader::add_resource_format_loader(pbm_loader); - ObjectTypeDB::register_type(); } @@ -153,7 +129,6 @@ void unregister_core_driver_types() { memdelete( image_loader_webp ); #endif - memdelete( pbm_loader ); } @@ -177,21 +152,6 @@ void register_driver_types() { ObjectTypeDB::register_type(); #endif -#ifdef DDS_ENABLED - resource_loader_dds = memnew( ResourceFormatDDS ); - ResourceLoader::add_resource_format_loader(resource_loader_dds ); -#endif - -#ifdef ETC1_ENABLED - resource_loader_pkm = memnew( ResourceFormatPKM ); - ResourceLoader::add_resource_format_loader(resource_loader_pkm); -#endif - -#ifdef PVR_ENABLED - resource_loader_pvr = memnew( ResourceFormatPVR ); - ResourceLoader::add_resource_format_loader(resource_loader_pvr ); -#endif - #ifdef TOOLS_ENABLED Geometry::_decompose_func=b2d_decompose; @@ -225,10 +185,6 @@ void register_driver_types() { #endif #endif -#ifdef ETC1_ENABLED - _register_etc1_compress_func(); -#endif - initialize_chibi(); } @@ -257,18 +213,6 @@ void unregister_driver_types() { memdelete (mpc_stream_loader); #endif -#ifdef DDS_ENABLED - memdelete(resource_loader_dds); -#endif - -#ifdef ETC1_ENABLED - memdelete(resource_loader_pkm); -#endif - -#ifdef PVR_ENABLED - memdelete(resource_loader_pvr); -#endif - #ifdef OPENSSL_ENABLED unregister_openssl(); diff --git a/modules/dds/SCsub b/modules/dds/SCsub new file mode 100644 index 00000000000..bcea3a84c04 --- /dev/null +++ b/modules/dds/SCsub @@ -0,0 +1,7 @@ +Import('env') +Import('env_modules') + +env_modules.add_source_files(env.modules_sources, "*.cpp") + +Export('env_modules') +Export('env') diff --git a/modules/dds/config.py b/modules/dds/config.py new file mode 100644 index 00000000000..368e97e152c --- /dev/null +++ b/modules/dds/config.py @@ -0,0 +1,6 @@ + +def can_build(platform): + return True + +def configure(env): + pass diff --git a/modules/dds/register_types.cpp b/modules/dds/register_types.cpp new file mode 100644 index 00000000000..0d28e2bbef4 --- /dev/null +++ b/modules/dds/register_types.cpp @@ -0,0 +1,44 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "register_types.h" + +#include "texture_loader_dds.h" + +static ResourceFormatDDS *resource_loader_dds = NULL; + +void register_dds_types() { + + resource_loader_dds = memnew( ResourceFormatDDS ); + ResourceLoader::add_resource_format_loader(resource_loader_dds); +} + +void unregister_dds_types() { + + memdelete(resource_loader_dds); +} diff --git a/modules/dds/register_types.h b/modules/dds/register_types.h new file mode 100644 index 00000000000..f9ecfb8ef9a --- /dev/null +++ b/modules/dds/register_types.h @@ -0,0 +1,30 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_dds_types(); +void unregister_dds_types(); diff --git a/drivers/dds/texture_loader_dds.cpp b/modules/dds/texture_loader_dds.cpp similarity index 100% rename from drivers/dds/texture_loader_dds.cpp rename to modules/dds/texture_loader_dds.cpp diff --git a/drivers/dds/texture_loader_dds.h b/modules/dds/texture_loader_dds.h similarity index 100% rename from drivers/dds/texture_loader_dds.h rename to modules/dds/texture_loader_dds.h diff --git a/modules/etc1/SCsub b/modules/etc1/SCsub new file mode 100644 index 00000000000..93c304fe7fa --- /dev/null +++ b/modules/etc1/SCsub @@ -0,0 +1,19 @@ +Import('env') +Import('env_modules') + +# Thirdparty source files +# Not unbundled so far since not widespread as shared library +thirdparty_dir = "#thirdparty/rg-etc1/" +thirdparty_etc1_sources = [ + "rg_etc1.cpp", +] +thirdparty_etc1_sources = [thirdparty_dir + file for file in thirdparty_etc1_sources] + +env_modules.add_source_files(env.modules_sources, thirdparty_etc1_sources) +env_modules.Append(CPPPATH = [thirdparty_dir]) + +# Godot source files +env_modules.add_source_files(env.modules_sources, "*.cpp") + +Export('env_modules') +Export('env') diff --git a/modules/etc1/config.py b/modules/etc1/config.py new file mode 100644 index 00000000000..368e97e152c --- /dev/null +++ b/modules/etc1/config.py @@ -0,0 +1,6 @@ + +def can_build(platform): + return True + +def configure(env): + pass diff --git a/drivers/etc1/image_etc.cpp b/modules/etc1/image_etc.cpp similarity index 100% rename from drivers/etc1/image_etc.cpp rename to modules/etc1/image_etc.cpp diff --git a/drivers/etc1/image_etc.h b/modules/etc1/image_etc.h similarity index 100% rename from drivers/etc1/image_etc.h rename to modules/etc1/image_etc.h diff --git a/modules/etc1/register_types.cpp b/modules/etc1/register_types.cpp new file mode 100644 index 00000000000..e9eba6c8648 --- /dev/null +++ b/modules/etc1/register_types.cpp @@ -0,0 +1,47 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "register_types.h" + +#include "image_etc.h" +#include "texture_loader_pkm.h" + +static ResourceFormatPKM *resource_loader_pkm = NULL; + +void register_etc1_types() { + + resource_loader_pkm = memnew( ResourceFormatPKM ); + ResourceLoader::add_resource_format_loader(resource_loader_pkm); + + _register_etc1_compress_func(); +} + +void unregister_etc1_types() { + + memdelete(resource_loader_pkm); +} diff --git a/modules/etc1/register_types.h b/modules/etc1/register_types.h new file mode 100644 index 00000000000..bc26699d54a --- /dev/null +++ b/modules/etc1/register_types.h @@ -0,0 +1,30 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_etc1_types(); +void unregister_etc1_types(); diff --git a/drivers/etc1/texture_loader_pkm.cpp b/modules/etc1/texture_loader_pkm.cpp similarity index 100% rename from drivers/etc1/texture_loader_pkm.cpp rename to modules/etc1/texture_loader_pkm.cpp diff --git a/drivers/etc1/texture_loader_pkm.h b/modules/etc1/texture_loader_pkm.h similarity index 100% rename from drivers/etc1/texture_loader_pkm.h rename to modules/etc1/texture_loader_pkm.h diff --git a/modules/pbm/SCsub b/modules/pbm/SCsub new file mode 100644 index 00000000000..bcea3a84c04 --- /dev/null +++ b/modules/pbm/SCsub @@ -0,0 +1,7 @@ +Import('env') +Import('env_modules') + +env_modules.add_source_files(env.modules_sources, "*.cpp") + +Export('env_modules') +Export('env') diff --git a/drivers/pnm/bitmap_loader_pnm.cpp b/modules/pbm/bitmap_loader_pbm.cpp similarity index 98% rename from drivers/pnm/bitmap_loader_pnm.cpp rename to modules/pbm/bitmap_loader_pbm.cpp index e06d4c80f08..1d08b108241 100644 --- a/drivers/pnm/bitmap_loader_pnm.cpp +++ b/modules/pbm/bitmap_loader_pbm.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* bitmap_loader_pnm.cpp */ +/* bitmap_loader_pbm.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -26,7 +26,7 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#include "bitmap_loader_pnm.h" +#include "bitmap_loader_pbm.h" #include "os/file_access.h" #include "scene/resources/bit_mask.h" diff --git a/drivers/pnm/bitmap_loader_pnm.h b/modules/pbm/bitmap_loader_pbm.h similarity index 95% rename from drivers/pnm/bitmap_loader_pnm.h rename to modules/pbm/bitmap_loader_pbm.h index 965cf7a451e..4f7144b3e07 100644 --- a/drivers/pnm/bitmap_loader_pnm.h +++ b/modules/pbm/bitmap_loader_pbm.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* bitmap_loader_pnm.h */ +/* bitmap_loader_pbm.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -26,8 +26,8 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef BITMAP_LOADER_PNM_H -#define BITMAP_LOADER_PNM_H +#ifndef BITMAP_LOADER_PBM_H +#define BITMAP_LOADER_PBM_H #include "io/resource_loader.h" diff --git a/modules/pbm/config.py b/modules/pbm/config.py new file mode 100644 index 00000000000..368e97e152c --- /dev/null +++ b/modules/pbm/config.py @@ -0,0 +1,6 @@ + +def can_build(platform): + return True + +def configure(env): + pass diff --git a/modules/pbm/register_types.cpp b/modules/pbm/register_types.cpp new file mode 100644 index 00000000000..181083773aa --- /dev/null +++ b/modules/pbm/register_types.cpp @@ -0,0 +1,44 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "register_types.h" + +#include "bitmap_loader_pbm.h" + +static ResourceFormatPBM * pbm_loader = NULL; + +void register_pbm_types() { + + pbm_loader = memnew( ResourceFormatPBM ); + ResourceLoader::add_resource_format_loader(pbm_loader); +} + +void unregister_pbm_types() { + + memdelete( pbm_loader ); +} diff --git a/modules/pbm/register_types.h b/modules/pbm/register_types.h new file mode 100644 index 00000000000..20c8133c2c1 --- /dev/null +++ b/modules/pbm/register_types.h @@ -0,0 +1,30 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_pbm_types(); +void unregister_pbm_types(); diff --git a/modules/pvr/SCsub b/modules/pvr/SCsub new file mode 100644 index 00000000000..b1696950187 --- /dev/null +++ b/modules/pvr/SCsub @@ -0,0 +1,23 @@ +Import('env') +Import('env_modules') + +# Thirdparty source files +# Not unbundled so far since not widespread as shared library +thirdparty_dir = "#thirdparty/pvrtccompressor/" +thirdparty_pvr_sources = [ + "BitScale.cpp", + "MortonTable.cpp", + "PvrTcDecoder.cpp", + "PvrTcEncoder.cpp", + "PvrTcPacket.cpp", +] +thirdparty_pvr_sources = [thirdparty_dir + file for file in thirdparty_pvr_sources] + +env_modules.add_source_files(env.modules_sources, thirdparty_pvr_sources) +env_modules.Append(CPPPATH = [thirdparty_dir]) + +# Godot source files +env_modules.add_source_files(env.modules_sources, "*.cpp") + +Export('env_modules') +Export('env') diff --git a/modules/pvr/config.py b/modules/pvr/config.py new file mode 100644 index 00000000000..368e97e152c --- /dev/null +++ b/modules/pvr/config.py @@ -0,0 +1,6 @@ + +def can_build(platform): + return True + +def configure(env): + pass diff --git a/modules/pvr/register_types.cpp b/modules/pvr/register_types.cpp new file mode 100644 index 00000000000..e5e18fb3d1b --- /dev/null +++ b/modules/pvr/register_types.cpp @@ -0,0 +1,44 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "register_types.h" + +#include "texture_loader_pvr.h" + +static ResourceFormatPVR *resource_loader_pvr = NULL; + +void register_pvr_types() { + + resource_loader_pvr = memnew( ResourceFormatPVR ); + ResourceLoader::add_resource_format_loader(resource_loader_pvr); +} + +void unregister_pvr_types() { + + memdelete(resource_loader_pvr); +} diff --git a/modules/pvr/register_types.h b/modules/pvr/register_types.h new file mode 100644 index 00000000000..d600f54d51b --- /dev/null +++ b/modules/pvr/register_types.h @@ -0,0 +1,30 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_pvr_types(); +void unregister_pvr_types(); diff --git a/drivers/pvr/texture_loader_pvr.cpp b/modules/pvr/texture_loader_pvr.cpp similarity index 100% rename from drivers/pvr/texture_loader_pvr.cpp rename to modules/pvr/texture_loader_pvr.cpp diff --git a/drivers/pvr/texture_loader_pvr.h b/modules/pvr/texture_loader_pvr.h similarity index 100% rename from drivers/pvr/texture_loader_pvr.h rename to modules/pvr/texture_loader_pvr.h diff --git a/thirdparty/README.md b/thirdparty/README.md index 5c8208b9a53..78a3d4116e7 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -42,3 +42,26 @@ Files extracted from upstream source: * pngtest.c - the arm/ folder - scripts/pnglibconf.h.prebuilt as pnglibconf.h + + +## pvrtccompressor + +- Upstream: https://bitbucket.org/jthlim/pvrtccompressor +- Version: hg commit cf71777 - 2015-01-08 +- License: BSD-3-Clause + +Files extracted from upstream source: + +- all .cpp and .h files apart from main.cpp +- LICENSE.TXT + + +## rg-etc1 + +- Upstream: https://github.com/richgel999/rg-etc1 +- Version: 1.04 +- License: zlib + +Files extracted from upstream source: + +- all of them: rg_etc1.{cpp,h} diff --git a/drivers/pvr/AlphaBitmap.h b/thirdparty/pvrtccompressor/AlphaBitmap.h similarity index 100% rename from drivers/pvr/AlphaBitmap.h rename to thirdparty/pvrtccompressor/AlphaBitmap.h diff --git a/drivers/pvr/BitScale.cpp b/thirdparty/pvrtccompressor/BitScale.cpp similarity index 100% rename from drivers/pvr/BitScale.cpp rename to thirdparty/pvrtccompressor/BitScale.cpp diff --git a/drivers/pvr/BitScale.h b/thirdparty/pvrtccompressor/BitScale.h similarity index 100% rename from drivers/pvr/BitScale.h rename to thirdparty/pvrtccompressor/BitScale.h diff --git a/drivers/pvr/BitUtility.h b/thirdparty/pvrtccompressor/BitUtility.h similarity index 100% rename from drivers/pvr/BitUtility.h rename to thirdparty/pvrtccompressor/BitUtility.h diff --git a/drivers/pvr/Bitmap.h b/thirdparty/pvrtccompressor/Bitmap.h similarity index 100% rename from drivers/pvr/Bitmap.h rename to thirdparty/pvrtccompressor/Bitmap.h diff --git a/drivers/pvr/ColorRgba.h b/thirdparty/pvrtccompressor/ColorRgba.h similarity index 100% rename from drivers/pvr/ColorRgba.h rename to thirdparty/pvrtccompressor/ColorRgba.h diff --git a/drivers/pvr/Interval.h b/thirdparty/pvrtccompressor/Interval.h similarity index 100% rename from drivers/pvr/Interval.h rename to thirdparty/pvrtccompressor/Interval.h diff --git a/thirdparty/pvrtccompressor/LICENSE.TXT b/thirdparty/pvrtccompressor/LICENSE.TXT new file mode 100644 index 00000000000..974fc09e25d --- /dev/null +++ b/thirdparty/pvrtccompressor/LICENSE.TXT @@ -0,0 +1,25 @@ +Copyright © 2014, Jeffrey Lim. All Rights Reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/drivers/pvr/MortonTable.cpp b/thirdparty/pvrtccompressor/MortonTable.cpp similarity index 100% rename from drivers/pvr/MortonTable.cpp rename to thirdparty/pvrtccompressor/MortonTable.cpp diff --git a/drivers/pvr/MortonTable.h b/thirdparty/pvrtccompressor/MortonTable.h similarity index 100% rename from drivers/pvr/MortonTable.h rename to thirdparty/pvrtccompressor/MortonTable.h diff --git a/drivers/pvr/Point2.h b/thirdparty/pvrtccompressor/Point2.h similarity index 100% rename from drivers/pvr/Point2.h rename to thirdparty/pvrtccompressor/Point2.h diff --git a/drivers/pvr/PvrTcDecoder.cpp b/thirdparty/pvrtccompressor/PvrTcDecoder.cpp similarity index 100% rename from drivers/pvr/PvrTcDecoder.cpp rename to thirdparty/pvrtccompressor/PvrTcDecoder.cpp diff --git a/drivers/pvr/PvrTcDecoder.h b/thirdparty/pvrtccompressor/PvrTcDecoder.h similarity index 100% rename from drivers/pvr/PvrTcDecoder.h rename to thirdparty/pvrtccompressor/PvrTcDecoder.h diff --git a/drivers/pvr/PvrTcEncoder.cpp b/thirdparty/pvrtccompressor/PvrTcEncoder.cpp similarity index 100% rename from drivers/pvr/PvrTcEncoder.cpp rename to thirdparty/pvrtccompressor/PvrTcEncoder.cpp diff --git a/drivers/pvr/PvrTcEncoder.h b/thirdparty/pvrtccompressor/PvrTcEncoder.h similarity index 100% rename from drivers/pvr/PvrTcEncoder.h rename to thirdparty/pvrtccompressor/PvrTcEncoder.h diff --git a/drivers/pvr/PvrTcPacket.cpp b/thirdparty/pvrtccompressor/PvrTcPacket.cpp similarity index 100% rename from drivers/pvr/PvrTcPacket.cpp rename to thirdparty/pvrtccompressor/PvrTcPacket.cpp diff --git a/drivers/pvr/PvrTcPacket.h b/thirdparty/pvrtccompressor/PvrTcPacket.h similarity index 100% rename from drivers/pvr/PvrTcPacket.h rename to thirdparty/pvrtccompressor/PvrTcPacket.h diff --git a/drivers/pvr/RgbBitmap.h b/thirdparty/pvrtccompressor/RgbBitmap.h similarity index 100% rename from drivers/pvr/RgbBitmap.h rename to thirdparty/pvrtccompressor/RgbBitmap.h diff --git a/drivers/pvr/RgbaBitmap.h b/thirdparty/pvrtccompressor/RgbaBitmap.h similarity index 100% rename from drivers/pvr/RgbaBitmap.h rename to thirdparty/pvrtccompressor/RgbaBitmap.h diff --git a/drivers/etc1/rg_etc1.cpp b/thirdparty/rg-etc1/rg_etc1.cpp similarity index 100% rename from drivers/etc1/rg_etc1.cpp rename to thirdparty/rg-etc1/rg_etc1.cpp diff --git a/drivers/etc1/rg_etc1.h b/thirdparty/rg-etc1/rg_etc1.h similarity index 100% rename from drivers/etc1/rg_etc1.h rename to thirdparty/rg-etc1/rg_etc1.h From ee3cf211c6fd4d1e30617467cdbbe945798a68b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 11 Oct 2016 23:35:58 +0200 Subject: [PATCH 05/19] webp: Make it a module and unbundle libwebp thirdparty files Note that there are two Godot-specific changes made to libwebp for the javascript/HTML5 platform. They are documented in the README.md. --- SConstruct | 5 +- drivers/SCsub | 2 - drivers/register_driver_types.cpp | 16 --- drivers/webp/SCsub | 115 ----------------- drivers/webp/extras.h | 51 -------- modules/webp/SCsub | 120 ++++++++++++++++++ modules/webp/config.py | 6 + .../webp/image_loader_webp.cpp | 7 +- {drivers => modules}/webp/image_loader_webp.h | 0 modules/webp/register_types.cpp | 44 +++++++ modules/webp/register_types.h | 30 +++++ platform/x11/detect.py | 3 + thirdparty/README.md | 16 +++ {drivers/webp => thirdparty/libwebp}/AUTHORS | 0 {drivers/webp => thirdparty/libwebp}/COPYING | 0 {drivers/webp => thirdparty/libwebp}/PATENTS | 0 .../webp => thirdparty/libwebp}/dec/alpha.c | 2 +- .../webp => thirdparty/libwebp}/dec/alphai.h | 0 .../webp => thirdparty/libwebp}/dec/buffer.c | 0 .../webp => thirdparty/libwebp}/dec/common.h | 0 .../libwebp}/dec/decode_vp8.h | 2 +- .../webp => thirdparty/libwebp}/dec/frame.c | 0 .../webp => thirdparty/libwebp}/dec/idec.c | 0 {drivers/webp => thirdparty/libwebp}/dec/io.c | 0 .../webp => thirdparty/libwebp}/dec/quant.c | 0 .../webp => thirdparty/libwebp}/dec/tree.c | 0 .../webp => thirdparty/libwebp}/dec/vp8.c | 0 .../webp => thirdparty/libwebp}/dec/vp8i.h | 0 .../webp => thirdparty/libwebp}/dec/vp8l.c | 0 .../webp => thirdparty/libwebp}/dec/vp8li.h | 0 .../webp => thirdparty/libwebp}/dec/webp.c | 2 +- .../webp => thirdparty/libwebp}/dec/webpi.h | 0 .../libwebp}/demux/anim_decode.c | 6 +- .../webp => thirdparty/libwebp}/demux/demux.c | 8 +- .../libwebp}/dsp/alpha_processing.c | 0 .../dsp/alpha_processing_mips_dsp_r2.c | 0 .../libwebp}/dsp/alpha_processing_sse2.c | 0 .../libwebp}/dsp/alpha_processing_sse41.c | 0 .../webp => thirdparty/libwebp}/dsp/argb.c | 0 .../libwebp}/dsp/argb_mips_dsp_r2.c | 0 .../libwebp}/dsp/argb_sse2.c | 0 .../libwebp}/dsp/common_sse2.h | 0 .../webp => thirdparty/libwebp}/dsp/cost.c | 0 .../libwebp}/dsp/cost_mips32.c | 0 .../libwebp}/dsp/cost_mips_dsp_r2.c | 0 .../libwebp}/dsp/cost_sse2.c | 0 .../webp => thirdparty/libwebp}/dsp/cpu.c | 0 .../webp => thirdparty/libwebp}/dsp/dec.c | 0 .../libwebp}/dsp/dec_clip_tables.c | 0 .../libwebp}/dsp/dec_mips32.c | 0 .../libwebp}/dsp/dec_mips_dsp_r2.c | 0 .../webp => thirdparty/libwebp}/dsp/dec_msa.c | 0 .../libwebp}/dsp/dec_neon.c | 0 .../libwebp}/dsp/dec_sse2.c | 0 .../libwebp}/dsp/dec_sse41.c | 0 .../webp => thirdparty/libwebp}/dsp/dsp.h | 4 +- .../webp => thirdparty/libwebp}/dsp/enc.c | 0 .../libwebp}/dsp/enc_avx2.c | 0 .../libwebp}/dsp/enc_mips32.c | 0 .../libwebp}/dsp/enc_mips_dsp_r2.c | 0 .../libwebp}/dsp/enc_neon.c | 0 .../libwebp}/dsp/enc_sse2.c | 0 .../libwebp}/dsp/enc_sse41.c | 0 .../webp => thirdparty/libwebp}/dsp/filters.c | 0 .../libwebp}/dsp/filters_mips_dsp_r2.c | 0 .../libwebp}/dsp/filters_sse2.c | 0 .../libwebp}/dsp/lossless.c | 0 .../libwebp}/dsp/lossless.h | 4 +- .../libwebp}/dsp/lossless_enc.c | 0 .../libwebp}/dsp/lossless_enc_mips32.c | 0 .../libwebp}/dsp/lossless_enc_mips_dsp_r2.c | 0 .../libwebp}/dsp/lossless_enc_neon.c | 0 .../libwebp}/dsp/lossless_enc_sse2.c | 0 .../libwebp}/dsp/lossless_enc_sse41.c | 0 .../libwebp}/dsp/lossless_mips_dsp_r2.c | 0 .../libwebp}/dsp/lossless_neon.c | 0 .../libwebp}/dsp/lossless_sse2.c | 0 .../libwebp}/dsp/mips_macro.h | 0 .../libwebp}/dsp/msa_macro.h | 0 .../webp => thirdparty/libwebp}/dsp/neon.h | 0 .../libwebp}/dsp/rescaler.c | 0 .../libwebp}/dsp/rescaler_mips32.c | 0 .../libwebp}/dsp/rescaler_mips_dsp_r2.c | 0 .../libwebp}/dsp/rescaler_neon.c | 0 .../libwebp}/dsp/rescaler_sse2.c | 0 .../libwebp}/dsp/upsampling.c | 0 .../libwebp}/dsp/upsampling_mips_dsp_r2.c | 0 .../libwebp}/dsp/upsampling_neon.c | 0 .../libwebp}/dsp/upsampling_sse2.c | 0 .../webp => thirdparty/libwebp}/dsp/yuv.c | 0 .../webp => thirdparty/libwebp}/dsp/yuv.h | 0 .../libwebp}/dsp/yuv_mips32.c | 0 .../libwebp}/dsp/yuv_mips_dsp_r2.c | 0 .../libwebp}/dsp/yuv_sse2.c | 0 .../libwebp}/dsp/yuv_tables_sse2.h | 0 .../webp => thirdparty/libwebp}/enc/alpha.c | 2 +- .../libwebp}/enc/analysis.c | 0 .../libwebp}/enc/backward_references.c | 0 .../libwebp}/enc/backward_references.h | 4 +- .../webp => thirdparty/libwebp}/enc/config.c | 2 +- .../webp => thirdparty/libwebp}/enc/cost.c | 0 .../webp => thirdparty/libwebp}/enc/cost.h | 0 .../libwebp}/enc/delta_palettization.c | 2 +- .../libwebp}/enc/delta_palettization.h | 2 +- .../webp => thirdparty/libwebp}/enc/filter.c | 0 .../webp => thirdparty/libwebp}/enc/frame.c | 2 +- .../libwebp}/enc/histogram.c | 2 +- .../libwebp}/enc/histogram.h | 4 +- .../libwebp}/enc/iterator.c | 0 .../libwebp}/enc/near_lossless.c | 0 .../webp => thirdparty/libwebp}/enc/picture.c | 0 .../libwebp}/enc/picture_csp.c | 0 .../libwebp}/enc/picture_psnr.c | 0 .../libwebp}/enc/picture_rescale.c | 0 .../libwebp}/enc/picture_tools.c | 0 .../webp => thirdparty/libwebp}/enc/quant.c | 0 .../webp => thirdparty/libwebp}/enc/syntax.c | 4 +- .../webp => thirdparty/libwebp}/enc/token.c | 0 .../webp => thirdparty/libwebp}/enc/tree.c | 0 .../webp => thirdparty/libwebp}/enc/vp8enci.h | 2 +- .../webp => thirdparty/libwebp}/enc/vp8l.c | 2 +- .../webp => thirdparty/libwebp}/enc/vp8li.h | 4 +- .../webp => thirdparty/libwebp}/enc/webpenc.c | 0 .../libwebp}/mux/anim_encode.c | 8 +- .../webp => thirdparty/libwebp}/mux/muxedit.c | 0 .../webp => thirdparty/libwebp}/mux/muxi.h | 2 +- .../libwebp}/mux/muxinternal.c | 0 .../webp => thirdparty/libwebp}/mux/muxread.c | 0 .../libwebp}/utils/bit_reader.c | 4 +- .../libwebp}/utils/bit_reader.h | 8 +- .../libwebp}/utils/bit_reader_inl.h | 2 +- .../libwebp}/utils/bit_writer.c | 0 .../libwebp}/utils/bit_writer.h | 2 +- .../libwebp}/utils/color_cache.c | 0 .../libwebp}/utils/color_cache.h | 2 +- .../libwebp}/utils/endian_inl.h | 0 .../libwebp}/utils/filters.c | 0 .../libwebp}/utils/filters.h | 2 +- .../libwebp}/utils/huffman.c | 2 +- .../libwebp}/utils/huffman.h | 4 +- .../libwebp}/utils/huffman_encode.c | 2 +- .../libwebp}/utils/huffman_encode.h | 2 +- .../libwebp}/utils/quant_levels.c | 0 .../libwebp}/utils/quant_levels.h | 2 +- .../libwebp}/utils/quant_levels_dec.c | 0 .../libwebp}/utils/quant_levels_dec.h | 2 +- .../libwebp}/utils/random.c | 0 .../libwebp}/utils/random.h | 2 +- .../libwebp}/utils/rescaler.c | 0 .../libwebp}/utils/rescaler.h | 2 +- .../libwebp}/utils/thread.c | 0 .../libwebp}/utils/thread.h | 4 +- .../webp => thirdparty/libwebp}/utils/utils.c | 6 +- .../webp => thirdparty/libwebp}/utils/utils.h | 4 +- {drivers => thirdparty/libwebp}/webp/config.h | 0 {drivers => thirdparty/libwebp}/webp/decode.h | 0 {drivers => thirdparty/libwebp}/webp/demux.h | 0 {drivers => thirdparty/libwebp}/webp/encode.h | 0 .../libwebp}/webp/format_constants.h | 0 {drivers => thirdparty/libwebp}/webp/mux.h | 0 .../libwebp}/webp/mux_types.h | 0 {drivers => thirdparty/libwebp}/webp/types.h | 0 162 files changed, 287 insertions(+), 250 deletions(-) delete mode 100644 drivers/webp/SCsub delete mode 100644 drivers/webp/extras.h create mode 100644 modules/webp/SCsub create mode 100644 modules/webp/config.py rename {drivers => modules}/webp/image_loader_webp.cpp (98%) rename {drivers => modules}/webp/image_loader_webp.h (100%) create mode 100644 modules/webp/register_types.cpp create mode 100644 modules/webp/register_types.h rename {drivers/webp => thirdparty/libwebp}/AUTHORS (100%) rename {drivers/webp => thirdparty/libwebp}/COPYING (100%) rename {drivers/webp => thirdparty/libwebp}/PATENTS (100%) rename {drivers/webp => thirdparty/libwebp}/dec/alpha.c (99%) rename {drivers/webp => thirdparty/libwebp}/dec/alphai.h (100%) rename {drivers/webp => thirdparty/libwebp}/dec/buffer.c (100%) rename {drivers/webp => thirdparty/libwebp}/dec/common.h (100%) rename {drivers/webp => thirdparty/libwebp}/dec/decode_vp8.h (99%) rename {drivers/webp => thirdparty/libwebp}/dec/frame.c (100%) rename {drivers/webp => thirdparty/libwebp}/dec/idec.c (100%) rename {drivers/webp => thirdparty/libwebp}/dec/io.c (100%) rename {drivers/webp => thirdparty/libwebp}/dec/quant.c (100%) rename {drivers/webp => thirdparty/libwebp}/dec/tree.c (100%) rename {drivers/webp => thirdparty/libwebp}/dec/vp8.c (100%) rename {drivers/webp => thirdparty/libwebp}/dec/vp8i.h (100%) rename {drivers/webp => thirdparty/libwebp}/dec/vp8l.c (100%) rename {drivers/webp => thirdparty/libwebp}/dec/vp8li.h (100%) rename {drivers/webp => thirdparty/libwebp}/dec/webp.c (99%) rename {drivers/webp => thirdparty/libwebp}/dec/webpi.h (100%) rename {drivers/webp => thirdparty/libwebp}/demux/anim_decode.c (99%) rename {drivers/webp => thirdparty/libwebp}/demux/demux.c (99%) rename {drivers/webp => thirdparty/libwebp}/dsp/alpha_processing.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/alpha_processing_mips_dsp_r2.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/alpha_processing_sse2.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/alpha_processing_sse41.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/argb.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/argb_mips_dsp_r2.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/argb_sse2.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/common_sse2.h (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/cost.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/cost_mips32.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/cost_mips_dsp_r2.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/cost_sse2.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/cpu.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/dec.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/dec_clip_tables.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/dec_mips32.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/dec_mips_dsp_r2.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/dec_msa.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/dec_neon.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/dec_sse2.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/dec_sse41.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/dsp.h (99%) rename {drivers/webp => thirdparty/libwebp}/dsp/enc.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/enc_avx2.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/enc_mips32.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/enc_mips_dsp_r2.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/enc_neon.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/enc_sse2.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/enc_sse41.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/filters.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/filters_mips_dsp_r2.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/filters_sse2.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/lossless.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/lossless.h (99%) rename {drivers/webp => thirdparty/libwebp}/dsp/lossless_enc.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/lossless_enc_mips32.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/lossless_enc_mips_dsp_r2.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/lossless_enc_neon.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/lossless_enc_sse2.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/lossless_enc_sse41.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/lossless_mips_dsp_r2.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/lossless_neon.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/lossless_sse2.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/mips_macro.h (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/msa_macro.h (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/neon.h (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/rescaler.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/rescaler_mips32.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/rescaler_mips_dsp_r2.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/rescaler_neon.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/rescaler_sse2.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/upsampling.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/upsampling_mips_dsp_r2.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/upsampling_neon.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/upsampling_sse2.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/yuv.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/yuv.h (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/yuv_mips32.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/yuv_mips_dsp_r2.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/yuv_sse2.c (100%) rename {drivers/webp => thirdparty/libwebp}/dsp/yuv_tables_sse2.h (100%) rename {drivers/webp => thirdparty/libwebp}/enc/alpha.c (99%) rename {drivers/webp => thirdparty/libwebp}/enc/analysis.c (100%) rename {drivers/webp => thirdparty/libwebp}/enc/backward_references.c (100%) rename {drivers/webp => thirdparty/libwebp}/enc/backward_references.h (99%) rename {drivers/webp => thirdparty/libwebp}/enc/config.c (99%) rename {drivers/webp => thirdparty/libwebp}/enc/cost.c (100%) rename {drivers/webp => thirdparty/libwebp}/enc/cost.h (100%) rename {drivers/webp => thirdparty/libwebp}/enc/delta_palettization.c (99%) rename {drivers/webp => thirdparty/libwebp}/enc/delta_palettization.h (97%) rename {drivers/webp => thirdparty/libwebp}/enc/filter.c (100%) rename {drivers/webp => thirdparty/libwebp}/enc/frame.c (99%) rename {drivers/webp => thirdparty/libwebp}/enc/histogram.c (99%) rename {drivers/webp => thirdparty/libwebp}/enc/histogram.h (98%) rename {drivers/webp => thirdparty/libwebp}/enc/iterator.c (100%) rename {drivers/webp => thirdparty/libwebp}/enc/near_lossless.c (100%) rename {drivers/webp => thirdparty/libwebp}/enc/picture.c (100%) rename {drivers/webp => thirdparty/libwebp}/enc/picture_csp.c (100%) rename {drivers/webp => thirdparty/libwebp}/enc/picture_psnr.c (100%) rename {drivers/webp => thirdparty/libwebp}/enc/picture_rescale.c (100%) rename {drivers/webp => thirdparty/libwebp}/enc/picture_tools.c (100%) rename {drivers/webp => thirdparty/libwebp}/enc/quant.c (100%) rename {drivers/webp => thirdparty/libwebp}/enc/syntax.c (99%) rename {drivers/webp => thirdparty/libwebp}/enc/token.c (100%) rename {drivers/webp => thirdparty/libwebp}/enc/tree.c (100%) rename {drivers/webp => thirdparty/libwebp}/enc/vp8enci.h (99%) rename {drivers/webp => thirdparty/libwebp}/enc/vp8l.c (99%) rename {drivers/webp => thirdparty/libwebp}/enc/vp8li.h (97%) rename {drivers/webp => thirdparty/libwebp}/enc/webpenc.c (100%) rename {drivers/webp => thirdparty/libwebp}/mux/anim_encode.c (99%) rename {drivers/webp => thirdparty/libwebp}/mux/muxedit.c (100%) rename {drivers/webp => thirdparty/libwebp}/mux/muxi.h (99%) rename {drivers/webp => thirdparty/libwebp}/mux/muxinternal.c (100%) rename {drivers/webp => thirdparty/libwebp}/mux/muxread.c (100%) rename {drivers/webp => thirdparty/libwebp}/utils/bit_reader.c (99%) rename {drivers/webp => thirdparty/libwebp}/utils/bit_reader.h (98%) rename {drivers/webp => thirdparty/libwebp}/utils/bit_reader_inl.h (99%) rename {drivers/webp => thirdparty/libwebp}/utils/bit_writer.c (100%) rename {drivers/webp => thirdparty/libwebp}/utils/bit_writer.h (99%) rename {drivers/webp => thirdparty/libwebp}/utils/color_cache.c (100%) rename {drivers/webp => thirdparty/libwebp}/utils/color_cache.h (98%) rename {drivers/webp => thirdparty/libwebp}/utils/endian_inl.h (100%) rename {drivers/webp => thirdparty/libwebp}/utils/filters.c (100%) rename {drivers/webp => thirdparty/libwebp}/utils/filters.h (97%) rename {drivers/webp => thirdparty/libwebp}/utils/huffman.c (99%) rename {drivers/webp => thirdparty/libwebp}/utils/huffman.h (98%) rename {drivers/webp => thirdparty/libwebp}/utils/huffman_encode.c (99%) rename {drivers/webp => thirdparty/libwebp}/utils/huffman_encode.h (98%) rename {drivers/webp => thirdparty/libwebp}/utils/quant_levels.c (100%) rename {drivers/webp => thirdparty/libwebp}/utils/quant_levels.h (97%) rename {drivers/webp => thirdparty/libwebp}/utils/quant_levels_dec.c (100%) rename {drivers/webp => thirdparty/libwebp}/utils/quant_levels_dec.h (97%) rename {drivers/webp => thirdparty/libwebp}/utils/random.c (100%) rename {drivers/webp => thirdparty/libwebp}/utils/random.h (98%) rename {drivers/webp => thirdparty/libwebp}/utils/rescaler.c (100%) rename {drivers/webp => thirdparty/libwebp}/utils/rescaler.h (99%) rename {drivers/webp => thirdparty/libwebp}/utils/thread.c (100%) rename {drivers/webp => thirdparty/libwebp}/utils/thread.h (98%) rename {drivers/webp => thirdparty/libwebp}/utils/utils.c (98%) rename {drivers/webp => thirdparty/libwebp}/utils/utils.h (99%) rename {drivers => thirdparty/libwebp}/webp/config.h (100%) rename {drivers => thirdparty/libwebp}/webp/decode.h (100%) rename {drivers => thirdparty/libwebp}/webp/demux.h (100%) rename {drivers => thirdparty/libwebp}/webp/encode.h (100%) rename {drivers => thirdparty/libwebp}/webp/format_constants.h (100%) rename {drivers => thirdparty/libwebp}/webp/mux.h (100%) rename {drivers => thirdparty/libwebp}/webp/mux_types.h (100%) rename {drivers => thirdparty/libwebp}/webp/types.h (100%) diff --git a/SConstruct b/SConstruct index 2e4ff24d3bd..a5b7d19df90 100644 --- a/SConstruct +++ b/SConstruct @@ -128,7 +128,7 @@ opts.Add('theoralib','Theora Video (yes/no)','no') opts.Add('freetype','Freetype support in editor','builtin') opts.Add('xml','XML Save/Load support (yes/no)','yes') opts.Add('libpng','libpng library for image loader support (system/builtin)','builtin') -opts.Add('webp','WEBP Image loader support (yes/no)','yes') +opts.Add('libwebp','libwebp library for webp module (system/builtin)','builtin') opts.Add('builtin_zlib','Use built-in zlib (yes/no)','yes') opts.Add('openssl','Use OpenSSL (yes/no/builtin)','no') opts.Add('musepack','Musepack Audio (yes/no)','yes') @@ -347,9 +347,6 @@ if selected_platform in platform_list: if (env['theoralib']=='yes'): env.Append(CPPFLAGS=['-DTHEORALIB_ENABLED']); - if (env['webp']=='yes'): - env.Append(CPPFLAGS=['-DWEBP_ENABLED']); - if (env['tools']=='yes'): env.Append(CPPFLAGS=['-DTOOLS_ENABLED']) if (env['disable_3d']=='yes'): diff --git a/drivers/SCsub b/drivers/SCsub index 98849b431e8..5effc6b2d41 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -26,8 +26,6 @@ if (env['openssl']!='no'): SConscript("png/SCsub"); -if (env["webp"]=="yes"): - SConscript("webp/SCsub"); if (env["builtin_zlib"]=="yes"): SConscript("builtin_zlib/SCsub"); diff --git a/drivers/register_driver_types.cpp b/drivers/register_driver_types.cpp index 9623c29b1a9..cd4fcd18f26 100644 --- a/drivers/register_driver_types.cpp +++ b/drivers/register_driver_types.cpp @@ -30,7 +30,6 @@ #include "png/image_loader_png.h" #include "png/resource_saver_png.h" -#include "webp/image_loader_webp.h" #include "chibi/event_stream_chibi.h" @@ -72,10 +71,6 @@ static ImageLoaderPNG *image_loader_png=NULL; static ResourceSaverPNG *resource_saver_png=NULL; -#ifdef WEBP_ENABLED -static ImageLoaderWEBP *image_loader_webp=NULL; -#endif - #ifdef TREMOR_ENABLED static ResourceFormatLoaderAudioStreamOGG *vorbis_stream_loader=NULL; #endif @@ -109,11 +104,6 @@ void register_core_driver_types() { resource_saver_png = memnew( ResourceSaverPNG ); ResourceSaver::add_resource_format_saver(resource_saver_png); -#ifdef WEBP_ENABLED - image_loader_webp = memnew( ImageLoaderWEBP ); - ImageLoader::add_image_format_loader( image_loader_webp ); -#endif - ObjectTypeDB::register_type(); } @@ -123,12 +113,6 @@ void unregister_core_driver_types() { memdelete( image_loader_png ); if (resource_saver_png) memdelete( resource_saver_png ); - -#ifdef WEBP_ENABLED - if (image_loader_webp) - memdelete( image_loader_webp ); -#endif - } diff --git a/drivers/webp/SCsub b/drivers/webp/SCsub deleted file mode 100644 index f65bd13dba5..00000000000 --- a/drivers/webp/SCsub +++ /dev/null @@ -1,115 +0,0 @@ -Import('env') - -webp_sources = [ -"webp/enc/webpenc.c",\ -"webp/enc/near_lossless.c",\ -"webp/enc/frame.c",\ -"webp/enc/alpha.c",\ -"webp/enc/picture_csp.c",\ -"webp/enc/vp8l.c",\ -"webp/enc/picture_psnr.c",\ -"webp/enc/delta_palettization.c",\ -"webp/enc/syntax.c",\ -"webp/enc/backward_references.c",\ -"webp/enc/token.c",\ -"webp/enc/analysis.c",\ -"webp/enc/iterator.c",\ -"webp/enc/picture_tools.c",\ -"webp/enc/picture_rescale.c",\ -"webp/enc/config.c",\ -"webp/enc/tree.c",\ -"webp/enc/cost.c",\ -"webp/enc/picture.c",\ -"webp/enc/quant.c",\ -"webp/enc/filter.c",\ -"webp/enc/histogram.c",\ -"webp/image_loader_webp.cpp",\ -"webp/utils/rescaler.c",\ -"webp/utils/filters.c",\ -"webp/utils/quant_levels_dec.c",\ -"webp/utils/huffman.c",\ -"webp/utils/thread.c",\ -"webp/utils/quant_levels.c",\ -"webp/utils/bit_writer.c",\ -"webp/utils/bit_reader.c",\ -"webp/utils/random.c",\ -"webp/utils/utils.c",\ -"webp/utils/huffman_encode.c",\ -"webp/utils/color_cache.c",\ -"webp/mux/muxinternal.c",\ -"webp/mux/muxread.c",\ -"webp/mux/anim_encode.c",\ -"webp/mux/muxedit.c",\ -"webp/dec/webp.c",\ -"webp/dec/frame.c",\ -"webp/dec/alpha.c",\ -"webp/dec/vp8l.c",\ -"webp/dec/io.c",\ -"webp/dec/vp8.c",\ -"webp/dec/idec.c",\ -"webp/dec/tree.c",\ -"webp/dec/buffer.c",\ -"webp/dec/quant.c",\ -"webp/demux/demux.c",\ -"webp/demux/anim_decode.c",\ -"webp/dsp/yuv.c",\ -"webp/dsp/filters_sse2.c",\ -"webp/dsp/dec_sse41.c",\ -"webp/dsp/rescaler.c",\ -"webp/dsp/lossless_sse2.c",\ -"webp/dsp/alpha_processing_sse41.c",\ -"webp/dsp/alpha_processing_sse2.c",\ -"webp/dsp/filters.c",\ -"webp/dsp/upsampling_mips_dsp_r2.c",\ -"webp/dsp/dec_neon.c",\ -"webp/dsp/enc_neon.c",\ -"webp/dsp/lossless_enc_mips32.c",\ -"webp/dsp/lossless_enc_sse2.c",\ -"webp/dsp/upsampling.c",\ -"webp/dsp/lossless_enc_neon.c",\ -"webp/dsp/alpha_processing.c",\ -"webp/dsp/cost_sse2.c",\ -"webp/dsp/dec_mips32.c",\ -"webp/dsp/enc_avx2.c",\ -"webp/dsp/rescaler_mips32.c",\ -"webp/dsp/enc.c",\ -"webp/dsp/lossless_enc_sse41.c",\ -"webp/dsp/cost_mips32.c",\ -"webp/dsp/lossless_mips_dsp_r2.c",\ -"webp/dsp/filters_mips_dsp_r2.c",\ -"webp/dsp/upsampling_neon.c",\ -"webp/dsp/alpha_processing_mips_dsp_r2.c",\ -"webp/dsp/enc_mips_dsp_r2.c",\ -"webp/dsp/lossless.c",\ -"webp/dsp/yuv_mips_dsp_r2.c",\ -"webp/dsp/cost_mips_dsp_r2.c",\ -"webp/dsp/argb.c",\ -"webp/dsp/dec_sse2.c",\ -"webp/dsp/rescaler_sse2.c",\ -"webp/dsp/enc_sse41.c",\ -"webp/dsp/argb_mips_dsp_r2.c",\ -"webp/dsp/lossless_enc_mips_dsp_r2.c",\ -"webp/dsp/dec_clip_tables.c",\ -"webp/dsp/yuv_mips32.c",\ -"webp/dsp/cpu.c",\ -"webp/dsp/dec.c",\ -"webp/dsp/argb_sse2.c",\ -"webp/dsp/lossless_neon.c",\ -"webp/dsp/lossless_enc.c",\ -"webp/dsp/enc_mips32.c",\ -"webp/dsp/cost.c",\ -"webp/dsp/rescaler_mips_dsp_r2.c",\ -"webp/dsp/dec_mips_dsp_r2.c",\ -"webp/dsp/rescaler_neon.c",\ -"webp/dsp/yuv_sse2.c",\ -"webp/dsp/enc_sse2.c",\ -"webp/dsp/upsampling_sse2.c" -] - -env.drivers_sources+=webp_sources - -#env.add_source_files(env.drivers_sources, webp_sources) - - -Export('env') - diff --git a/drivers/webp/extras.h b/drivers/webp/extras.h deleted file mode 100644 index 1c24be2e0c1..00000000000 --- a/drivers/webp/extras.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2015 Google Inc. All Rights Reserved. -// -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. -// ----------------------------------------------------------------------------- -// - -#ifndef WEBP_WEBP_EXTRAS_H_ -#define WEBP_WEBP_EXTRAS_H_ - -#include "./types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#include "./encode.h" - -#define WEBP_EXTRAS_ABI_VERSION 0x0000 // MAJOR(8b) + MINOR(8b) - -//------------------------------------------------------------------------------ - -// Returns the version number of the extras library, packed in hexadecimal using -// 8bits for each of major/minor/revision. E.g: v2.5.7 is 0x020507. -WEBP_EXTERN(int) WebPGetExtrasVersion(void); - -//------------------------------------------------------------------------------ -// Ad-hoc colorspace importers. - -// Import luma sample (gray scale image) into 'picture'. The 'picture' -// width and height must be set prior to calling this function. -WEBP_EXTERN(int) WebPImportGray(const uint8_t* gray, WebPPicture* picture); - -// Import rgb sample in RGB565 packed format into 'picture'. The 'picture' -// width and height must be set prior to calling this function. -WEBP_EXTERN(int) WebPImportRGB565(const uint8_t* rgb565, WebPPicture* pic); - -// Import rgb sample in RGB4444 packed format into 'picture'. The 'picture' -// width and height must be set prior to calling this function. -WEBP_EXTERN(int) WebPImportRGB4444(const uint8_t* rgb4444, WebPPicture* pic); - -//------------------------------------------------------------------------------ - -#ifdef __cplusplus -} // extern "C" -#endif - -#endif /* WEBP_WEBP_EXTRAS_H_ */ diff --git a/modules/webp/SCsub b/modules/webp/SCsub new file mode 100644 index 00000000000..f52c5b9af8d --- /dev/null +++ b/modules/webp/SCsub @@ -0,0 +1,120 @@ +Import('env') +Import('env_modules') + +# Thirdparty source files +if (env["libwebp"] != "system"): # builtin + thirdparty_dir = "#thirdparty/libwebp/" + thirdparty_libwebp_sources = [ + "enc/webpenc.c", + "enc/near_lossless.c", + "enc/frame.c", + "enc/alpha.c", + "enc/picture_csp.c", + "enc/vp8l.c", + "enc/picture_psnr.c", + "enc/delta_palettization.c", + "enc/syntax.c", + "enc/backward_references.c", + "enc/token.c", + "enc/analysis.c", + "enc/iterator.c", + "enc/picture_tools.c", + "enc/picture_rescale.c", + "enc/config.c", + "enc/tree.c", + "enc/cost.c", + "enc/picture.c", + "enc/quant.c", + "enc/filter.c", + "enc/histogram.c", + "utils/rescaler.c", + "utils/filters.c", + "utils/quant_levels_dec.c", + "utils/huffman.c", + "utils/thread.c", + "utils/quant_levels.c", + "utils/bit_writer.c", + "utils/bit_reader.c", + "utils/random.c", + "utils/utils.c", + "utils/huffman_encode.c", + "utils/color_cache.c", + "mux/muxinternal.c", + "mux/muxread.c", + "mux/anim_encode.c", + "mux/muxedit.c", + "dec/webp.c", + "dec/frame.c", + "dec/alpha.c", + "dec/vp8l.c", + "dec/io.c", + "dec/vp8.c", + "dec/idec.c", + "dec/tree.c", + "dec/buffer.c", + "dec/quant.c", + "demux/demux.c", + "demux/anim_decode.c", + "dsp/yuv.c", + "dsp/filters_sse2.c", + "dsp/dec_sse41.c", + "dsp/rescaler.c", + "dsp/lossless_sse2.c", + "dsp/alpha_processing_sse41.c", + "dsp/alpha_processing_sse2.c", + "dsp/filters.c", + "dsp/upsampling_mips_dsp_r2.c", + "dsp/dec_neon.c", + "dsp/enc_neon.c", + "dsp/lossless_enc_mips32.c", + "dsp/lossless_enc_sse2.c", + "dsp/upsampling.c", + "dsp/lossless_enc_neon.c", + "dsp/alpha_processing.c", + "dsp/cost_sse2.c", + "dsp/dec_mips32.c", + "dsp/enc_avx2.c", + "dsp/rescaler_mips32.c", + "dsp/enc.c", + "dsp/lossless_enc_sse41.c", + "dsp/cost_mips32.c", + "dsp/lossless_mips_dsp_r2.c", + "dsp/filters_mips_dsp_r2.c", + "dsp/upsampling_neon.c", + "dsp/alpha_processing_mips_dsp_r2.c", + "dsp/enc_mips_dsp_r2.c", + "dsp/lossless.c", + "dsp/yuv_mips_dsp_r2.c", + "dsp/cost_mips_dsp_r2.c", + "dsp/argb.c", + "dsp/dec_sse2.c", + "dsp/rescaler_sse2.c", + "dsp/enc_sse41.c", + "dsp/argb_mips_dsp_r2.c", + "dsp/lossless_enc_mips_dsp_r2.c", + "dsp/dec_clip_tables.c", + "dsp/yuv_mips32.c", + "dsp/cpu.c", + "dsp/dec.c", + "dsp/argb_sse2.c", + "dsp/lossless_neon.c", + "dsp/lossless_enc.c", + "dsp/enc_mips32.c", + "dsp/cost.c", + "dsp/rescaler_mips_dsp_r2.c", + "dsp/dec_mips_dsp_r2.c", + "dsp/rescaler_neon.c", + "dsp/yuv_sse2.c", + "dsp/enc_sse2.c", + "dsp/upsampling_sse2.c", + ] + thirdparty_libwebp_sources = [thirdparty_dir + file for file in thirdparty_libwebp_sources] + + env_modules.add_source_files(env.modules_sources, thirdparty_libwebp_sources) + env_modules.Append(CPPPATH = [thirdparty_dir]) + +# Godot source files +env_modules.add_source_files(env.modules_sources, "*.cpp") + +Export('env_modules') +Export('env') diff --git a/modules/webp/config.py b/modules/webp/config.py new file mode 100644 index 00000000000..368e97e152c --- /dev/null +++ b/modules/webp/config.py @@ -0,0 +1,6 @@ + +def can_build(platform): + return True + +def configure(env): + pass diff --git a/drivers/webp/image_loader_webp.cpp b/modules/webp/image_loader_webp.cpp similarity index 98% rename from drivers/webp/image_loader_webp.cpp rename to modules/webp/image_loader_webp.cpp index 68bb857293f..0fe2db32618 100644 --- a/drivers/webp/image_loader_webp.cpp +++ b/modules/webp/image_loader_webp.cpp @@ -28,12 +28,13 @@ /*************************************************************************/ #include "image_loader_webp.h" +#include "io/marshalls.h" #include "print_string.h" #include "os/os.h" -#include "drivers/webp/decode.h" -#include "drivers/webp/encode.h" -#include "io/marshalls.h" + #include +#include +#include static DVector _webp_lossy_pack(const Image& p_image,float p_quality) { diff --git a/drivers/webp/image_loader_webp.h b/modules/webp/image_loader_webp.h similarity index 100% rename from drivers/webp/image_loader_webp.h rename to modules/webp/image_loader_webp.h diff --git a/modules/webp/register_types.cpp b/modules/webp/register_types.cpp new file mode 100644 index 00000000000..039876bbb9b --- /dev/null +++ b/modules/webp/register_types.cpp @@ -0,0 +1,44 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "register_types.h" + +#include "image_loader_webp.h" + +static ImageLoaderWEBP *image_loader_webp = NULL; + +void register_webp_types() { + + image_loader_webp = memnew( ImageLoaderWEBP ); + ImageLoader::add_image_format_loader(image_loader_webp); +} + +void unregister_webp_types() { + + memdelete( image_loader_webp ); +} diff --git a/modules/webp/register_types.h b/modules/webp/register_types.h new file mode 100644 index 00000000000..a200188e477 --- /dev/null +++ b/modules/webp/register_types.h @@ -0,0 +1,30 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_webp_types(); +void unregister_webp_types(); diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 10e44976caa..6a5ca84cbe8 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -146,6 +146,9 @@ def configure(env): if (env["libpng"] == "system"): env.ParseConfig('pkg-config libpng --cflags --libs') + if (env["libwebp"] == "system"): + env.ParseConfig('pkg-config libwebp --cflags --libs') + if (env["freetype"]=="yes"): env.ParseConfig('pkg-config freetype2 --cflags --libs') diff --git a/thirdparty/README.md b/thirdparty/README.md index 78a3d4116e7..b3aebb51800 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -44,6 +44,22 @@ Files extracted from upstream source: - scripts/pnglibconf.h.prebuilt as pnglibconf.h +## libwebp + +- Upstream: https://chromium.googlesource.com/webm/libwebp/ +- Version: 0.5.1 +- License: BSD-3-Clause + +Files extracted from the upstream source: + +- src/\* except from: \*.am, \*.in, extras/, webp/extras.h +- AUTHORS, COPYING, PATENTS + +Important: The files `utils/bit_reader.{c,h}` have Godot-made +changes to ensure they build for Javascript/HTML5. Those +changes are marked with `// -- GODOT --` comments. + + ## pvrtccompressor - Upstream: https://bitbucket.org/jthlim/pvrtccompressor diff --git a/drivers/webp/AUTHORS b/thirdparty/libwebp/AUTHORS similarity index 100% rename from drivers/webp/AUTHORS rename to thirdparty/libwebp/AUTHORS diff --git a/drivers/webp/COPYING b/thirdparty/libwebp/COPYING similarity index 100% rename from drivers/webp/COPYING rename to thirdparty/libwebp/COPYING diff --git a/drivers/webp/PATENTS b/thirdparty/libwebp/PATENTS similarity index 100% rename from drivers/webp/PATENTS rename to thirdparty/libwebp/PATENTS diff --git a/drivers/webp/dec/alpha.c b/thirdparty/libwebp/dec/alpha.c similarity index 99% rename from drivers/webp/dec/alpha.c rename to thirdparty/libwebp/dec/alpha.c index 19ce548e960..028eb3d50ba 100644 --- a/drivers/webp/dec/alpha.c +++ b/thirdparty/libwebp/dec/alpha.c @@ -18,7 +18,7 @@ #include "../dsp/dsp.h" #include "../utils/quant_levels_dec.h" #include "../utils/utils.h" -#include "webp/format_constants.h" +#include "../webp/format_constants.h" //------------------------------------------------------------------------------ // ALPHDecoder object. diff --git a/drivers/webp/dec/alphai.h b/thirdparty/libwebp/dec/alphai.h similarity index 100% rename from drivers/webp/dec/alphai.h rename to thirdparty/libwebp/dec/alphai.h diff --git a/drivers/webp/dec/buffer.c b/thirdparty/libwebp/dec/buffer.c similarity index 100% rename from drivers/webp/dec/buffer.c rename to thirdparty/libwebp/dec/buffer.c diff --git a/drivers/webp/dec/common.h b/thirdparty/libwebp/dec/common.h similarity index 100% rename from drivers/webp/dec/common.h rename to thirdparty/libwebp/dec/common.h diff --git a/drivers/webp/dec/decode_vp8.h b/thirdparty/libwebp/dec/decode_vp8.h similarity index 99% rename from drivers/webp/dec/decode_vp8.h rename to thirdparty/libwebp/dec/decode_vp8.h index 2bf1bdbbf52..b9337bbec0e 100644 --- a/drivers/webp/dec/decode_vp8.h +++ b/thirdparty/libwebp/dec/decode_vp8.h @@ -14,7 +14,7 @@ #ifndef WEBP_WEBP_DECODE_VP8_H_ #define WEBP_WEBP_DECODE_VP8_H_ -#include "webp/decode.h" +#include "../webp/decode.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/dec/frame.c b/thirdparty/libwebp/dec/frame.c similarity index 100% rename from drivers/webp/dec/frame.c rename to thirdparty/libwebp/dec/frame.c diff --git a/drivers/webp/dec/idec.c b/thirdparty/libwebp/dec/idec.c similarity index 100% rename from drivers/webp/dec/idec.c rename to thirdparty/libwebp/dec/idec.c diff --git a/drivers/webp/dec/io.c b/thirdparty/libwebp/dec/io.c similarity index 100% rename from drivers/webp/dec/io.c rename to thirdparty/libwebp/dec/io.c diff --git a/drivers/webp/dec/quant.c b/thirdparty/libwebp/dec/quant.c similarity index 100% rename from drivers/webp/dec/quant.c rename to thirdparty/libwebp/dec/quant.c diff --git a/drivers/webp/dec/tree.c b/thirdparty/libwebp/dec/tree.c similarity index 100% rename from drivers/webp/dec/tree.c rename to thirdparty/libwebp/dec/tree.c diff --git a/drivers/webp/dec/vp8.c b/thirdparty/libwebp/dec/vp8.c similarity index 100% rename from drivers/webp/dec/vp8.c rename to thirdparty/libwebp/dec/vp8.c diff --git a/drivers/webp/dec/vp8i.h b/thirdparty/libwebp/dec/vp8i.h similarity index 100% rename from drivers/webp/dec/vp8i.h rename to thirdparty/libwebp/dec/vp8i.h diff --git a/drivers/webp/dec/vp8l.c b/thirdparty/libwebp/dec/vp8l.c similarity index 100% rename from drivers/webp/dec/vp8l.c rename to thirdparty/libwebp/dec/vp8l.c diff --git a/drivers/webp/dec/vp8li.h b/thirdparty/libwebp/dec/vp8li.h similarity index 100% rename from drivers/webp/dec/vp8li.h rename to thirdparty/libwebp/dec/vp8li.h diff --git a/drivers/webp/dec/webp.c b/thirdparty/libwebp/dec/webp.c similarity index 99% rename from drivers/webp/dec/webp.c rename to thirdparty/libwebp/dec/webp.c index dd6c090f00e..d0b912f02f6 100644 --- a/drivers/webp/dec/webp.c +++ b/thirdparty/libwebp/dec/webp.c @@ -17,7 +17,7 @@ #include "./vp8li.h" #include "./webpi.h" #include "../utils/utils.h" -#include "webp/mux_types.h" // ALPHA_FLAG +#include "../webp/mux_types.h" // ALPHA_FLAG //------------------------------------------------------------------------------ // RIFF layout is: diff --git a/drivers/webp/dec/webpi.h b/thirdparty/libwebp/dec/webpi.h similarity index 100% rename from drivers/webp/dec/webpi.h rename to thirdparty/libwebp/dec/webpi.h diff --git a/drivers/webp/demux/anim_decode.c b/thirdparty/libwebp/demux/anim_decode.c similarity index 99% rename from drivers/webp/demux/anim_decode.c rename to thirdparty/libwebp/demux/anim_decode.c index 39cf3de1975..1989eb4ab4c 100644 --- a/drivers/webp/demux/anim_decode.c +++ b/thirdparty/libwebp/demux/anim_decode.c @@ -11,15 +11,15 @@ // #ifdef HAVE_CONFIG_H -#include "webp/config.h" +#include "../webp/config.h" #endif #include #include #include "../utils/utils.h" -#include "webp/decode.h" -#include "webp/demux.h" +#include "../webp/decode.h" +#include "../webp/demux.h" #define NUM_CHANNELS 4 diff --git a/drivers/webp/demux/demux.c b/thirdparty/libwebp/demux/demux.c similarity index 99% rename from drivers/webp/demux/demux.c rename to thirdparty/libwebp/demux/demux.c index df93c5b3791..0d2989f6f49 100644 --- a/drivers/webp/demux/demux.c +++ b/thirdparty/libwebp/demux/demux.c @@ -11,7 +11,7 @@ // #ifdef HAVE_CONFIG_H -#include "webp/config.h" +#include "../webp/config.h" #endif #include @@ -19,9 +19,9 @@ #include #include "../utils/utils.h" -#include "webp/decode.h" // WebPGetFeatures -#include "webp/demux.h" -#include "webp/format_constants.h" +#include "../webp/decode.h" // WebPGetFeatures +#include "../webp/demux.h" +#include "../webp/format_constants.h" #define DMUX_MAJ_VERSION 0 #define DMUX_MIN_VERSION 3 diff --git a/drivers/webp/dsp/alpha_processing.c b/thirdparty/libwebp/dsp/alpha_processing.c similarity index 100% rename from drivers/webp/dsp/alpha_processing.c rename to thirdparty/libwebp/dsp/alpha_processing.c diff --git a/drivers/webp/dsp/alpha_processing_mips_dsp_r2.c b/thirdparty/libwebp/dsp/alpha_processing_mips_dsp_r2.c similarity index 100% rename from drivers/webp/dsp/alpha_processing_mips_dsp_r2.c rename to thirdparty/libwebp/dsp/alpha_processing_mips_dsp_r2.c diff --git a/drivers/webp/dsp/alpha_processing_sse2.c b/thirdparty/libwebp/dsp/alpha_processing_sse2.c similarity index 100% rename from drivers/webp/dsp/alpha_processing_sse2.c rename to thirdparty/libwebp/dsp/alpha_processing_sse2.c diff --git a/drivers/webp/dsp/alpha_processing_sse41.c b/thirdparty/libwebp/dsp/alpha_processing_sse41.c similarity index 100% rename from drivers/webp/dsp/alpha_processing_sse41.c rename to thirdparty/libwebp/dsp/alpha_processing_sse41.c diff --git a/drivers/webp/dsp/argb.c b/thirdparty/libwebp/dsp/argb.c similarity index 100% rename from drivers/webp/dsp/argb.c rename to thirdparty/libwebp/dsp/argb.c diff --git a/drivers/webp/dsp/argb_mips_dsp_r2.c b/thirdparty/libwebp/dsp/argb_mips_dsp_r2.c similarity index 100% rename from drivers/webp/dsp/argb_mips_dsp_r2.c rename to thirdparty/libwebp/dsp/argb_mips_dsp_r2.c diff --git a/drivers/webp/dsp/argb_sse2.c b/thirdparty/libwebp/dsp/argb_sse2.c similarity index 100% rename from drivers/webp/dsp/argb_sse2.c rename to thirdparty/libwebp/dsp/argb_sse2.c diff --git a/drivers/webp/dsp/common_sse2.h b/thirdparty/libwebp/dsp/common_sse2.h similarity index 100% rename from drivers/webp/dsp/common_sse2.h rename to thirdparty/libwebp/dsp/common_sse2.h diff --git a/drivers/webp/dsp/cost.c b/thirdparty/libwebp/dsp/cost.c similarity index 100% rename from drivers/webp/dsp/cost.c rename to thirdparty/libwebp/dsp/cost.c diff --git a/drivers/webp/dsp/cost_mips32.c b/thirdparty/libwebp/dsp/cost_mips32.c similarity index 100% rename from drivers/webp/dsp/cost_mips32.c rename to thirdparty/libwebp/dsp/cost_mips32.c diff --git a/drivers/webp/dsp/cost_mips_dsp_r2.c b/thirdparty/libwebp/dsp/cost_mips_dsp_r2.c similarity index 100% rename from drivers/webp/dsp/cost_mips_dsp_r2.c rename to thirdparty/libwebp/dsp/cost_mips_dsp_r2.c diff --git a/drivers/webp/dsp/cost_sse2.c b/thirdparty/libwebp/dsp/cost_sse2.c similarity index 100% rename from drivers/webp/dsp/cost_sse2.c rename to thirdparty/libwebp/dsp/cost_sse2.c diff --git a/drivers/webp/dsp/cpu.c b/thirdparty/libwebp/dsp/cpu.c similarity index 100% rename from drivers/webp/dsp/cpu.c rename to thirdparty/libwebp/dsp/cpu.c diff --git a/drivers/webp/dsp/dec.c b/thirdparty/libwebp/dsp/dec.c similarity index 100% rename from drivers/webp/dsp/dec.c rename to thirdparty/libwebp/dsp/dec.c diff --git a/drivers/webp/dsp/dec_clip_tables.c b/thirdparty/libwebp/dsp/dec_clip_tables.c similarity index 100% rename from drivers/webp/dsp/dec_clip_tables.c rename to thirdparty/libwebp/dsp/dec_clip_tables.c diff --git a/drivers/webp/dsp/dec_mips32.c b/thirdparty/libwebp/dsp/dec_mips32.c similarity index 100% rename from drivers/webp/dsp/dec_mips32.c rename to thirdparty/libwebp/dsp/dec_mips32.c diff --git a/drivers/webp/dsp/dec_mips_dsp_r2.c b/thirdparty/libwebp/dsp/dec_mips_dsp_r2.c similarity index 100% rename from drivers/webp/dsp/dec_mips_dsp_r2.c rename to thirdparty/libwebp/dsp/dec_mips_dsp_r2.c diff --git a/drivers/webp/dsp/dec_msa.c b/thirdparty/libwebp/dsp/dec_msa.c similarity index 100% rename from drivers/webp/dsp/dec_msa.c rename to thirdparty/libwebp/dsp/dec_msa.c diff --git a/drivers/webp/dsp/dec_neon.c b/thirdparty/libwebp/dsp/dec_neon.c similarity index 100% rename from drivers/webp/dsp/dec_neon.c rename to thirdparty/libwebp/dsp/dec_neon.c diff --git a/drivers/webp/dsp/dec_sse2.c b/thirdparty/libwebp/dsp/dec_sse2.c similarity index 100% rename from drivers/webp/dsp/dec_sse2.c rename to thirdparty/libwebp/dsp/dec_sse2.c diff --git a/drivers/webp/dsp/dec_sse41.c b/thirdparty/libwebp/dsp/dec_sse41.c similarity index 100% rename from drivers/webp/dsp/dec_sse41.c rename to thirdparty/libwebp/dsp/dec_sse41.c diff --git a/drivers/webp/dsp/dsp.h b/thirdparty/libwebp/dsp/dsp.h similarity index 99% rename from drivers/webp/dsp/dsp.h rename to thirdparty/libwebp/dsp/dsp.h index 2469f7d3ac5..1faac27b2ba 100644 --- a/drivers/webp/dsp/dsp.h +++ b/thirdparty/libwebp/dsp/dsp.h @@ -15,10 +15,10 @@ #define WEBP_DSP_DSP_H_ #ifdef HAVE_CONFIG_H -#include "webp/config.h" +#include "../webp/config.h" #endif -#include "webp/types.h" +#include "../webp/types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/dsp/enc.c b/thirdparty/libwebp/dsp/enc.c similarity index 100% rename from drivers/webp/dsp/enc.c rename to thirdparty/libwebp/dsp/enc.c diff --git a/drivers/webp/dsp/enc_avx2.c b/thirdparty/libwebp/dsp/enc_avx2.c similarity index 100% rename from drivers/webp/dsp/enc_avx2.c rename to thirdparty/libwebp/dsp/enc_avx2.c diff --git a/drivers/webp/dsp/enc_mips32.c b/thirdparty/libwebp/dsp/enc_mips32.c similarity index 100% rename from drivers/webp/dsp/enc_mips32.c rename to thirdparty/libwebp/dsp/enc_mips32.c diff --git a/drivers/webp/dsp/enc_mips_dsp_r2.c b/thirdparty/libwebp/dsp/enc_mips_dsp_r2.c similarity index 100% rename from drivers/webp/dsp/enc_mips_dsp_r2.c rename to thirdparty/libwebp/dsp/enc_mips_dsp_r2.c diff --git a/drivers/webp/dsp/enc_neon.c b/thirdparty/libwebp/dsp/enc_neon.c similarity index 100% rename from drivers/webp/dsp/enc_neon.c rename to thirdparty/libwebp/dsp/enc_neon.c diff --git a/drivers/webp/dsp/enc_sse2.c b/thirdparty/libwebp/dsp/enc_sse2.c similarity index 100% rename from drivers/webp/dsp/enc_sse2.c rename to thirdparty/libwebp/dsp/enc_sse2.c diff --git a/drivers/webp/dsp/enc_sse41.c b/thirdparty/libwebp/dsp/enc_sse41.c similarity index 100% rename from drivers/webp/dsp/enc_sse41.c rename to thirdparty/libwebp/dsp/enc_sse41.c diff --git a/drivers/webp/dsp/filters.c b/thirdparty/libwebp/dsp/filters.c similarity index 100% rename from drivers/webp/dsp/filters.c rename to thirdparty/libwebp/dsp/filters.c diff --git a/drivers/webp/dsp/filters_mips_dsp_r2.c b/thirdparty/libwebp/dsp/filters_mips_dsp_r2.c similarity index 100% rename from drivers/webp/dsp/filters_mips_dsp_r2.c rename to thirdparty/libwebp/dsp/filters_mips_dsp_r2.c diff --git a/drivers/webp/dsp/filters_sse2.c b/thirdparty/libwebp/dsp/filters_sse2.c similarity index 100% rename from drivers/webp/dsp/filters_sse2.c rename to thirdparty/libwebp/dsp/filters_sse2.c diff --git a/drivers/webp/dsp/lossless.c b/thirdparty/libwebp/dsp/lossless.c similarity index 100% rename from drivers/webp/dsp/lossless.c rename to thirdparty/libwebp/dsp/lossless.c diff --git a/drivers/webp/dsp/lossless.h b/thirdparty/libwebp/dsp/lossless.h similarity index 99% rename from drivers/webp/dsp/lossless.h rename to thirdparty/libwebp/dsp/lossless.h index 7709b4fe85b..9f0d7a25b72 100644 --- a/drivers/webp/dsp/lossless.h +++ b/thirdparty/libwebp/dsp/lossless.h @@ -15,8 +15,8 @@ #ifndef WEBP_DSP_LOSSLESS_H_ #define WEBP_DSP_LOSSLESS_H_ -#include "webp/types.h" -#include "webp/decode.h" +#include "../webp/types.h" +#include "../webp/decode.h" #include "../enc/histogram.h" #include "../utils/utils.h" diff --git a/drivers/webp/dsp/lossless_enc.c b/thirdparty/libwebp/dsp/lossless_enc.c similarity index 100% rename from drivers/webp/dsp/lossless_enc.c rename to thirdparty/libwebp/dsp/lossless_enc.c diff --git a/drivers/webp/dsp/lossless_enc_mips32.c b/thirdparty/libwebp/dsp/lossless_enc_mips32.c similarity index 100% rename from drivers/webp/dsp/lossless_enc_mips32.c rename to thirdparty/libwebp/dsp/lossless_enc_mips32.c diff --git a/drivers/webp/dsp/lossless_enc_mips_dsp_r2.c b/thirdparty/libwebp/dsp/lossless_enc_mips_dsp_r2.c similarity index 100% rename from drivers/webp/dsp/lossless_enc_mips_dsp_r2.c rename to thirdparty/libwebp/dsp/lossless_enc_mips_dsp_r2.c diff --git a/drivers/webp/dsp/lossless_enc_neon.c b/thirdparty/libwebp/dsp/lossless_enc_neon.c similarity index 100% rename from drivers/webp/dsp/lossless_enc_neon.c rename to thirdparty/libwebp/dsp/lossless_enc_neon.c diff --git a/drivers/webp/dsp/lossless_enc_sse2.c b/thirdparty/libwebp/dsp/lossless_enc_sse2.c similarity index 100% rename from drivers/webp/dsp/lossless_enc_sse2.c rename to thirdparty/libwebp/dsp/lossless_enc_sse2.c diff --git a/drivers/webp/dsp/lossless_enc_sse41.c b/thirdparty/libwebp/dsp/lossless_enc_sse41.c similarity index 100% rename from drivers/webp/dsp/lossless_enc_sse41.c rename to thirdparty/libwebp/dsp/lossless_enc_sse41.c diff --git a/drivers/webp/dsp/lossless_mips_dsp_r2.c b/thirdparty/libwebp/dsp/lossless_mips_dsp_r2.c similarity index 100% rename from drivers/webp/dsp/lossless_mips_dsp_r2.c rename to thirdparty/libwebp/dsp/lossless_mips_dsp_r2.c diff --git a/drivers/webp/dsp/lossless_neon.c b/thirdparty/libwebp/dsp/lossless_neon.c similarity index 100% rename from drivers/webp/dsp/lossless_neon.c rename to thirdparty/libwebp/dsp/lossless_neon.c diff --git a/drivers/webp/dsp/lossless_sse2.c b/thirdparty/libwebp/dsp/lossless_sse2.c similarity index 100% rename from drivers/webp/dsp/lossless_sse2.c rename to thirdparty/libwebp/dsp/lossless_sse2.c diff --git a/drivers/webp/dsp/mips_macro.h b/thirdparty/libwebp/dsp/mips_macro.h similarity index 100% rename from drivers/webp/dsp/mips_macro.h rename to thirdparty/libwebp/dsp/mips_macro.h diff --git a/drivers/webp/dsp/msa_macro.h b/thirdparty/libwebp/dsp/msa_macro.h similarity index 100% rename from drivers/webp/dsp/msa_macro.h rename to thirdparty/libwebp/dsp/msa_macro.h diff --git a/drivers/webp/dsp/neon.h b/thirdparty/libwebp/dsp/neon.h similarity index 100% rename from drivers/webp/dsp/neon.h rename to thirdparty/libwebp/dsp/neon.h diff --git a/drivers/webp/dsp/rescaler.c b/thirdparty/libwebp/dsp/rescaler.c similarity index 100% rename from drivers/webp/dsp/rescaler.c rename to thirdparty/libwebp/dsp/rescaler.c diff --git a/drivers/webp/dsp/rescaler_mips32.c b/thirdparty/libwebp/dsp/rescaler_mips32.c similarity index 100% rename from drivers/webp/dsp/rescaler_mips32.c rename to thirdparty/libwebp/dsp/rescaler_mips32.c diff --git a/drivers/webp/dsp/rescaler_mips_dsp_r2.c b/thirdparty/libwebp/dsp/rescaler_mips_dsp_r2.c similarity index 100% rename from drivers/webp/dsp/rescaler_mips_dsp_r2.c rename to thirdparty/libwebp/dsp/rescaler_mips_dsp_r2.c diff --git a/drivers/webp/dsp/rescaler_neon.c b/thirdparty/libwebp/dsp/rescaler_neon.c similarity index 100% rename from drivers/webp/dsp/rescaler_neon.c rename to thirdparty/libwebp/dsp/rescaler_neon.c diff --git a/drivers/webp/dsp/rescaler_sse2.c b/thirdparty/libwebp/dsp/rescaler_sse2.c similarity index 100% rename from drivers/webp/dsp/rescaler_sse2.c rename to thirdparty/libwebp/dsp/rescaler_sse2.c diff --git a/drivers/webp/dsp/upsampling.c b/thirdparty/libwebp/dsp/upsampling.c similarity index 100% rename from drivers/webp/dsp/upsampling.c rename to thirdparty/libwebp/dsp/upsampling.c diff --git a/drivers/webp/dsp/upsampling_mips_dsp_r2.c b/thirdparty/libwebp/dsp/upsampling_mips_dsp_r2.c similarity index 100% rename from drivers/webp/dsp/upsampling_mips_dsp_r2.c rename to thirdparty/libwebp/dsp/upsampling_mips_dsp_r2.c diff --git a/drivers/webp/dsp/upsampling_neon.c b/thirdparty/libwebp/dsp/upsampling_neon.c similarity index 100% rename from drivers/webp/dsp/upsampling_neon.c rename to thirdparty/libwebp/dsp/upsampling_neon.c diff --git a/drivers/webp/dsp/upsampling_sse2.c b/thirdparty/libwebp/dsp/upsampling_sse2.c similarity index 100% rename from drivers/webp/dsp/upsampling_sse2.c rename to thirdparty/libwebp/dsp/upsampling_sse2.c diff --git a/drivers/webp/dsp/yuv.c b/thirdparty/libwebp/dsp/yuv.c similarity index 100% rename from drivers/webp/dsp/yuv.c rename to thirdparty/libwebp/dsp/yuv.c diff --git a/drivers/webp/dsp/yuv.h b/thirdparty/libwebp/dsp/yuv.h similarity index 100% rename from drivers/webp/dsp/yuv.h rename to thirdparty/libwebp/dsp/yuv.h diff --git a/drivers/webp/dsp/yuv_mips32.c b/thirdparty/libwebp/dsp/yuv_mips32.c similarity index 100% rename from drivers/webp/dsp/yuv_mips32.c rename to thirdparty/libwebp/dsp/yuv_mips32.c diff --git a/drivers/webp/dsp/yuv_mips_dsp_r2.c b/thirdparty/libwebp/dsp/yuv_mips_dsp_r2.c similarity index 100% rename from drivers/webp/dsp/yuv_mips_dsp_r2.c rename to thirdparty/libwebp/dsp/yuv_mips_dsp_r2.c diff --git a/drivers/webp/dsp/yuv_sse2.c b/thirdparty/libwebp/dsp/yuv_sse2.c similarity index 100% rename from drivers/webp/dsp/yuv_sse2.c rename to thirdparty/libwebp/dsp/yuv_sse2.c diff --git a/drivers/webp/dsp/yuv_tables_sse2.h b/thirdparty/libwebp/dsp/yuv_tables_sse2.h similarity index 100% rename from drivers/webp/dsp/yuv_tables_sse2.h rename to thirdparty/libwebp/dsp/yuv_tables_sse2.h diff --git a/drivers/webp/enc/alpha.c b/thirdparty/libwebp/enc/alpha.c similarity index 99% rename from drivers/webp/enc/alpha.c rename to thirdparty/libwebp/enc/alpha.c index 464df4db094..03e3ad07f5f 100644 --- a/drivers/webp/enc/alpha.c +++ b/thirdparty/libwebp/enc/alpha.c @@ -19,7 +19,7 @@ #include "../utils/filters.h" #include "../utils/quant_levels.h" #include "../utils/utils.h" -#include "webp/format_constants.h" +#include "../webp/format_constants.h" // ----------------------------------------------------------------------------- // Encodes the given alpha data via specified compression method 'method'. diff --git a/drivers/webp/enc/analysis.c b/thirdparty/libwebp/enc/analysis.c similarity index 100% rename from drivers/webp/enc/analysis.c rename to thirdparty/libwebp/enc/analysis.c diff --git a/drivers/webp/enc/backward_references.c b/thirdparty/libwebp/enc/backward_references.c similarity index 100% rename from drivers/webp/enc/backward_references.c rename to thirdparty/libwebp/enc/backward_references.c diff --git a/drivers/webp/enc/backward_references.h b/thirdparty/libwebp/enc/backward_references.h similarity index 99% rename from drivers/webp/enc/backward_references.h rename to thirdparty/libwebp/enc/backward_references.h index b72a01fb0ee..0cadb11e11e 100644 --- a/drivers/webp/enc/backward_references.h +++ b/thirdparty/libwebp/enc/backward_references.h @@ -15,8 +15,8 @@ #include #include -#include "webp/types.h" -#include "webp/format_constants.h" +#include "../webp/types.h" +#include "../webp/format_constants.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/enc/config.c b/thirdparty/libwebp/enc/config.c similarity index 99% rename from drivers/webp/enc/config.c rename to thirdparty/libwebp/enc/config.c index 8fd2276cb55..f9f7961d588 100644 --- a/drivers/webp/enc/config.c +++ b/thirdparty/libwebp/enc/config.c @@ -11,7 +11,7 @@ // // Author: Skal (pascal.massimino@gmail.com) -#include "webp/encode.h" +#include "../webp/encode.h" //------------------------------------------------------------------------------ // WebPConfig diff --git a/drivers/webp/enc/cost.c b/thirdparty/libwebp/enc/cost.c similarity index 100% rename from drivers/webp/enc/cost.c rename to thirdparty/libwebp/enc/cost.c diff --git a/drivers/webp/enc/cost.h b/thirdparty/libwebp/enc/cost.h similarity index 100% rename from drivers/webp/enc/cost.h rename to thirdparty/libwebp/enc/cost.h diff --git a/drivers/webp/enc/delta_palettization.c b/thirdparty/libwebp/enc/delta_palettization.c similarity index 99% rename from drivers/webp/enc/delta_palettization.c rename to thirdparty/libwebp/enc/delta_palettization.c index 8bd3a3d233d..062e588d79f 100644 --- a/drivers/webp/enc/delta_palettization.c +++ b/thirdparty/libwebp/enc/delta_palettization.c @@ -13,7 +13,7 @@ #include "./delta_palettization.h" #ifdef WEBP_EXPERIMENTAL_FEATURES -#include "webp/types.h" +#include "../webp/types.h" #include "../dsp/lossless.h" #define MK_COL(r, g, b) (((r) << 16) + ((g) << 8) + (b)) diff --git a/drivers/webp/enc/delta_palettization.h b/thirdparty/libwebp/enc/delta_palettization.h similarity index 97% rename from drivers/webp/enc/delta_palettization.h rename to thirdparty/libwebp/enc/delta_palettization.h index 54195d452ca..e41c0c5ab56 100644 --- a/drivers/webp/enc/delta_palettization.h +++ b/thirdparty/libwebp/enc/delta_palettization.h @@ -13,7 +13,7 @@ #ifndef WEBP_ENC_DELTA_PALETTIZATION_H_ #define WEBP_ENC_DELTA_PALETTIZATION_H_ -#include "webp/encode.h" +#include "../webp/encode.h" #include "../enc/vp8li.h" // Replaces enc->argb_[] input by a palettizable approximation of it, diff --git a/drivers/webp/enc/filter.c b/thirdparty/libwebp/enc/filter.c similarity index 100% rename from drivers/webp/enc/filter.c rename to thirdparty/libwebp/enc/filter.c diff --git a/drivers/webp/enc/frame.c b/thirdparty/libwebp/enc/frame.c similarity index 99% rename from drivers/webp/enc/frame.c rename to thirdparty/libwebp/enc/frame.c index 65a98ada4d0..5b7a40b9ad0 100644 --- a/drivers/webp/enc/frame.c +++ b/thirdparty/libwebp/enc/frame.c @@ -17,7 +17,7 @@ #include "./cost.h" #include "./vp8enci.h" #include "../dsp/dsp.h" -#include "webp/format_constants.h" // RIFF constants +#include "../webp/format_constants.h" // RIFF constants #define SEGMENT_VISU 0 #define DEBUG_SEARCH 0 // useful to track search convergence diff --git a/drivers/webp/enc/histogram.c b/thirdparty/libwebp/enc/histogram.c similarity index 99% rename from drivers/webp/enc/histogram.c rename to thirdparty/libwebp/enc/histogram.c index 61544f4ccd5..395372b245a 100644 --- a/drivers/webp/enc/histogram.c +++ b/thirdparty/libwebp/enc/histogram.c @@ -10,7 +10,7 @@ // Author: Jyrki Alakuijala (jyrki@google.com) // #ifdef HAVE_CONFIG_H -#include "webp/config.h" +#include "../webp/config.h" #endif #include diff --git a/drivers/webp/enc/histogram.h b/thirdparty/libwebp/enc/histogram.h similarity index 98% rename from drivers/webp/enc/histogram.h rename to thirdparty/libwebp/enc/histogram.h index 59de42b33e0..d303d1d58ba 100644 --- a/drivers/webp/enc/histogram.h +++ b/thirdparty/libwebp/enc/histogram.h @@ -17,8 +17,8 @@ #include #include "./backward_references.h" -#include "webp/format_constants.h" -#include "webp/types.h" +#include "../webp/format_constants.h" +#include "../webp/types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/enc/iterator.c b/thirdparty/libwebp/enc/iterator.c similarity index 100% rename from drivers/webp/enc/iterator.c rename to thirdparty/libwebp/enc/iterator.c diff --git a/drivers/webp/enc/near_lossless.c b/thirdparty/libwebp/enc/near_lossless.c similarity index 100% rename from drivers/webp/enc/near_lossless.c rename to thirdparty/libwebp/enc/near_lossless.c diff --git a/drivers/webp/enc/picture.c b/thirdparty/libwebp/enc/picture.c similarity index 100% rename from drivers/webp/enc/picture.c rename to thirdparty/libwebp/enc/picture.c diff --git a/drivers/webp/enc/picture_csp.c b/thirdparty/libwebp/enc/picture_csp.c similarity index 100% rename from drivers/webp/enc/picture_csp.c rename to thirdparty/libwebp/enc/picture_csp.c diff --git a/drivers/webp/enc/picture_psnr.c b/thirdparty/libwebp/enc/picture_psnr.c similarity index 100% rename from drivers/webp/enc/picture_psnr.c rename to thirdparty/libwebp/enc/picture_psnr.c diff --git a/drivers/webp/enc/picture_rescale.c b/thirdparty/libwebp/enc/picture_rescale.c similarity index 100% rename from drivers/webp/enc/picture_rescale.c rename to thirdparty/libwebp/enc/picture_rescale.c diff --git a/drivers/webp/enc/picture_tools.c b/thirdparty/libwebp/enc/picture_tools.c similarity index 100% rename from drivers/webp/enc/picture_tools.c rename to thirdparty/libwebp/enc/picture_tools.c diff --git a/drivers/webp/enc/quant.c b/thirdparty/libwebp/enc/quant.c similarity index 100% rename from drivers/webp/enc/quant.c rename to thirdparty/libwebp/enc/quant.c diff --git a/drivers/webp/enc/syntax.c b/thirdparty/libwebp/enc/syntax.c similarity index 99% rename from drivers/webp/enc/syntax.c rename to thirdparty/libwebp/enc/syntax.c index 2b65f15ca1c..a0e79ef4047 100644 --- a/drivers/webp/enc/syntax.c +++ b/thirdparty/libwebp/enc/syntax.c @@ -14,8 +14,8 @@ #include #include "../utils/utils.h" -#include "webp/format_constants.h" // RIFF constants -#include "webp/mux_types.h" // ALPHA_FLAG +#include "../webp/format_constants.h" // RIFF constants +#include "../webp/mux_types.h" // ALPHA_FLAG #include "./vp8enci.h" //------------------------------------------------------------------------------ diff --git a/drivers/webp/enc/token.c b/thirdparty/libwebp/enc/token.c similarity index 100% rename from drivers/webp/enc/token.c rename to thirdparty/libwebp/enc/token.c diff --git a/drivers/webp/enc/tree.c b/thirdparty/libwebp/enc/tree.c similarity index 100% rename from drivers/webp/enc/tree.c rename to thirdparty/libwebp/enc/tree.c diff --git a/drivers/webp/enc/vp8enci.h b/thirdparty/libwebp/enc/vp8enci.h similarity index 99% rename from drivers/webp/enc/vp8enci.h rename to thirdparty/libwebp/enc/vp8enci.h index efd2f19a9b9..c1fbd7644e3 100644 --- a/drivers/webp/enc/vp8enci.h +++ b/thirdparty/libwebp/enc/vp8enci.h @@ -20,7 +20,7 @@ #include "../utils/bit_writer.h" #include "../utils/thread.h" #include "../utils/utils.h" -#include "webp/encode.h" +#include "../webp/encode.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/enc/vp8l.c b/thirdparty/libwebp/enc/vp8l.c similarity index 99% rename from drivers/webp/enc/vp8l.c rename to thirdparty/libwebp/enc/vp8l.c index 1f2d41ea91a..c16e2560ec8 100644 --- a/drivers/webp/enc/vp8l.c +++ b/thirdparty/libwebp/enc/vp8l.c @@ -23,7 +23,7 @@ #include "../utils/bit_writer.h" #include "../utils/huffman_encode.h" #include "../utils/utils.h" -#include "webp/format_constants.h" +#include "../webp/format_constants.h" #include "./delta_palettization.h" diff --git a/drivers/webp/enc/vp8li.h b/thirdparty/libwebp/enc/vp8li.h similarity index 97% rename from drivers/webp/enc/vp8li.h rename to thirdparty/libwebp/enc/vp8li.h index 8e6b360d817..371e276ee09 100644 --- a/drivers/webp/enc/vp8li.h +++ b/thirdparty/libwebp/enc/vp8li.h @@ -17,8 +17,8 @@ #include "./backward_references.h" #include "./histogram.h" #include "../utils/bit_writer.h" -#include "webp/encode.h" -#include "webp/format_constants.h" +#include "../webp/encode.h" +#include "../webp/format_constants.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/enc/webpenc.c b/thirdparty/libwebp/enc/webpenc.c similarity index 100% rename from drivers/webp/enc/webpenc.c rename to thirdparty/libwebp/enc/webpenc.c diff --git a/drivers/webp/mux/anim_encode.c b/thirdparty/libwebp/mux/anim_encode.c similarity index 99% rename from drivers/webp/mux/anim_encode.c rename to thirdparty/libwebp/mux/anim_encode.c index 2226febf135..53e2906a829 100644 --- a/drivers/webp/mux/anim_encode.c +++ b/thirdparty/libwebp/mux/anim_encode.c @@ -17,10 +17,10 @@ #include // for abs() #include "../utils/utils.h" -#include "webp/decode.h" -#include "webp/encode.h" -#include "webp/format_constants.h" -#include "webp/mux.h" +#include "../webp/decode.h" +#include "../webp/encode.h" +#include "../webp/format_constants.h" +#include "../webp/mux.h" #if defined(_MSC_VER) && _MSC_VER < 1900 #define snprintf _snprintf diff --git a/drivers/webp/mux/muxedit.c b/thirdparty/libwebp/mux/muxedit.c similarity index 100% rename from drivers/webp/mux/muxedit.c rename to thirdparty/libwebp/mux/muxedit.c diff --git a/drivers/webp/mux/muxi.h b/thirdparty/libwebp/mux/muxi.h similarity index 99% rename from drivers/webp/mux/muxi.h rename to thirdparty/libwebp/mux/muxi.h index 3f6428c4dff..d4d5cbad916 100644 --- a/drivers/webp/mux/muxi.h +++ b/thirdparty/libwebp/mux/muxi.h @@ -17,7 +17,7 @@ #include #include "../dec/vp8i.h" #include "../dec/vp8li.h" -#include "webp/mux.h" +#include "../webp/mux.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/mux/muxinternal.c b/thirdparty/libwebp/mux/muxinternal.c similarity index 100% rename from drivers/webp/mux/muxinternal.c rename to thirdparty/libwebp/mux/muxinternal.c diff --git a/drivers/webp/mux/muxread.c b/thirdparty/libwebp/mux/muxread.c similarity index 100% rename from drivers/webp/mux/muxread.c rename to thirdparty/libwebp/mux/muxread.c diff --git a/drivers/webp/utils/bit_reader.c b/thirdparty/libwebp/utils/bit_reader.c similarity index 99% rename from drivers/webp/utils/bit_reader.c rename to thirdparty/libwebp/utils/bit_reader.c index 13c6cf316ee..2eb46e0b4bb 100644 --- a/drivers/webp/utils/bit_reader.c +++ b/thirdparty/libwebp/utils/bit_reader.c @@ -12,7 +12,7 @@ // Author: Skal (pascal.massimino@gmail.com) #ifdef HAVE_CONFIG_H -#include "webp/config.h" +#include "../webp/config.h" #endif #include "./bit_reader_inl.h" @@ -41,12 +41,14 @@ void VP8InitBitReader(VP8BitReader* const br, br->bits_ = -8; // to load the very first 8bits br->eof_ = 0; VP8BitReaderSetBuffer(br, start, size); +// -- GODOT -- begin #ifdef JAVASCRIPT_ENABLED // html5 required aligned reads while(((uintptr_t)br->buf_ & 1) != 0 && !br->eof_) VP8LoadFinalBytes(br); #else VP8LoadNewBytes(br); #endif +// -- GODOT -- end } void VP8RemapBitReader(VP8BitReader* const br, ptrdiff_t offset) { diff --git a/drivers/webp/utils/bit_reader.h b/thirdparty/libwebp/utils/bit_reader.h similarity index 98% rename from drivers/webp/utils/bit_reader.h rename to thirdparty/libwebp/utils/bit_reader.h index c2dcc711c0c..ea5c584eb44 100644 --- a/drivers/webp/utils/bit_reader.h +++ b/thirdparty/libwebp/utils/bit_reader.h @@ -19,7 +19,7 @@ #ifdef _MSC_VER #include // _byteswap_ulong #endif -#include "webp/types.h" +#include "../webp/types.h" #ifdef __cplusplus extern "C" { @@ -37,11 +37,11 @@ extern "C" { // BITS can be any multiple of 8 from 8 to 56 (inclusive). // Pick values that fit natural register size. +// -- GODOT -- start #ifdef JAVASCRIPT_ENABLED - #define BITS 16 - #else +// -- GODOT -- end #if defined(__i386__) || defined(_M_IX86) // x86 32bit #define BITS 24 @@ -57,7 +57,9 @@ extern "C" { #define BITS 24 #endif +// -- GODOT -- start #endif +// -- GODOT -- end //------------------------------------------------------------------------------ // Derived types and constants: diff --git a/drivers/webp/utils/bit_reader_inl.h b/thirdparty/libwebp/utils/bit_reader_inl.h similarity index 99% rename from drivers/webp/utils/bit_reader_inl.h rename to thirdparty/libwebp/utils/bit_reader_inl.h index 21faf14d83b..99ed3137d2c 100644 --- a/drivers/webp/utils/bit_reader_inl.h +++ b/thirdparty/libwebp/utils/bit_reader_inl.h @@ -17,7 +17,7 @@ #define WEBP_UTILS_BIT_READER_INL_H_ #ifdef HAVE_CONFIG_H -#include "webp/config.h" +#include "../webp/config.h" #endif #ifdef WEBP_FORCE_ALIGNED diff --git a/drivers/webp/utils/bit_writer.c b/thirdparty/libwebp/utils/bit_writer.c similarity index 100% rename from drivers/webp/utils/bit_writer.c rename to thirdparty/libwebp/utils/bit_writer.c diff --git a/drivers/webp/utils/bit_writer.h b/thirdparty/libwebp/utils/bit_writer.h similarity index 99% rename from drivers/webp/utils/bit_writer.h rename to thirdparty/libwebp/utils/bit_writer.h index 867a5ee0556..ef360d1dc6f 100644 --- a/drivers/webp/utils/bit_writer.h +++ b/thirdparty/libwebp/utils/bit_writer.h @@ -14,7 +14,7 @@ #ifndef WEBP_UTILS_BIT_WRITER_H_ #define WEBP_UTILS_BIT_WRITER_H_ -#include "webp/types.h" +#include "../webp/types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/utils/color_cache.c b/thirdparty/libwebp/utils/color_cache.c similarity index 100% rename from drivers/webp/utils/color_cache.c rename to thirdparty/libwebp/utils/color_cache.c diff --git a/drivers/webp/utils/color_cache.h b/thirdparty/libwebp/utils/color_cache.h similarity index 98% rename from drivers/webp/utils/color_cache.h rename to thirdparty/libwebp/utils/color_cache.h index 34299e4c4e0..a9a9f64270f 100644 --- a/drivers/webp/utils/color_cache.h +++ b/thirdparty/libwebp/utils/color_cache.h @@ -15,7 +15,7 @@ #ifndef WEBP_UTILS_COLOR_CACHE_H_ #define WEBP_UTILS_COLOR_CACHE_H_ -#include "webp/types.h" +#include "../webp/types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/utils/endian_inl.h b/thirdparty/libwebp/utils/endian_inl.h similarity index 100% rename from drivers/webp/utils/endian_inl.h rename to thirdparty/libwebp/utils/endian_inl.h diff --git a/drivers/webp/utils/filters.c b/thirdparty/libwebp/utils/filters.c similarity index 100% rename from drivers/webp/utils/filters.c rename to thirdparty/libwebp/utils/filters.c diff --git a/drivers/webp/utils/filters.h b/thirdparty/libwebp/utils/filters.h similarity index 97% rename from drivers/webp/utils/filters.h rename to thirdparty/libwebp/utils/filters.h index 4aba3fd3b7f..088b132fc5c 100644 --- a/drivers/webp/utils/filters.h +++ b/thirdparty/libwebp/utils/filters.h @@ -14,7 +14,7 @@ #ifndef WEBP_UTILS_FILTERS_H_ #define WEBP_UTILS_FILTERS_H_ -#include "webp/types.h" +#include "../webp/types.h" #include "../dsp/dsp.h" #ifdef __cplusplus diff --git a/drivers/webp/utils/huffman.c b/thirdparty/libwebp/utils/huffman.c similarity index 99% rename from drivers/webp/utils/huffman.c rename to thirdparty/libwebp/utils/huffman.c index 7c9d83db9ae..36e5502836a 100644 --- a/drivers/webp/utils/huffman.c +++ b/thirdparty/libwebp/utils/huffman.c @@ -15,8 +15,8 @@ #include #include #include "./huffman.h" -#include "webp/format_constants.h" #include "./utils.h" +#include "../webp/format_constants.h" // Huffman data read via DecodeImageStream is represented in two (red and green) // bytes. diff --git a/drivers/webp/utils/huffman.h b/thirdparty/libwebp/utils/huffman.h similarity index 98% rename from drivers/webp/utils/huffman.h rename to thirdparty/libwebp/utils/huffman.h index a8cc0da1c36..c6dd6aaa452 100644 --- a/drivers/webp/utils/huffman.h +++ b/thirdparty/libwebp/utils/huffman.h @@ -15,8 +15,8 @@ #define WEBP_UTILS_HUFFMAN_H_ #include -#include "webp/format_constants.h" -#include "webp/types.h" +#include "../webp/format_constants.h" +#include "../webp/types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/utils/huffman_encode.c b/thirdparty/libwebp/utils/huffman_encode.c similarity index 99% rename from drivers/webp/utils/huffman_encode.c rename to thirdparty/libwebp/utils/huffman_encode.c index 0be414a8f8b..4e5ef6b447d 100644 --- a/drivers/webp/utils/huffman_encode.c +++ b/thirdparty/libwebp/utils/huffman_encode.c @@ -15,8 +15,8 @@ #include #include #include "./huffman_encode.h" -#include "webp/format_constants.h" #include "./utils.h" +#include "../webp/format_constants.h" // ----------------------------------------------------------------------------- // Util function to optimize the symbol map for RLE coding diff --git a/drivers/webp/utils/huffman_encode.h b/thirdparty/libwebp/utils/huffman_encode.h similarity index 98% rename from drivers/webp/utils/huffman_encode.h rename to thirdparty/libwebp/utils/huffman_encode.h index 93610066f32..a1571651485 100644 --- a/drivers/webp/utils/huffman_encode.h +++ b/thirdparty/libwebp/utils/huffman_encode.h @@ -14,7 +14,7 @@ #ifndef WEBP_UTILS_HUFFMAN_ENCODE_H_ #define WEBP_UTILS_HUFFMAN_ENCODE_H_ -#include "webp/types.h" +#include "../webp/types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/utils/quant_levels.c b/thirdparty/libwebp/utils/quant_levels.c similarity index 100% rename from drivers/webp/utils/quant_levels.c rename to thirdparty/libwebp/utils/quant_levels.c diff --git a/drivers/webp/utils/quant_levels.h b/thirdparty/libwebp/utils/quant_levels.h similarity index 97% rename from drivers/webp/utils/quant_levels.h rename to thirdparty/libwebp/utils/quant_levels.h index 3916b977ab2..1cb5a32caea 100644 --- a/drivers/webp/utils/quant_levels.h +++ b/thirdparty/libwebp/utils/quant_levels.h @@ -16,7 +16,7 @@ #include -#include "webp/types.h" +#include "../webp/types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/utils/quant_levels_dec.c b/thirdparty/libwebp/utils/quant_levels_dec.c similarity index 100% rename from drivers/webp/utils/quant_levels_dec.c rename to thirdparty/libwebp/utils/quant_levels_dec.c diff --git a/drivers/webp/utils/quant_levels_dec.h b/thirdparty/libwebp/utils/quant_levels_dec.h similarity index 97% rename from drivers/webp/utils/quant_levels_dec.h rename to thirdparty/libwebp/utils/quant_levels_dec.h index c99a4753860..59a13495d33 100644 --- a/drivers/webp/utils/quant_levels_dec.h +++ b/thirdparty/libwebp/utils/quant_levels_dec.h @@ -14,7 +14,7 @@ #ifndef WEBP_UTILS_QUANT_LEVELS_DEC_H_ #define WEBP_UTILS_QUANT_LEVELS_DEC_H_ -#include "webp/types.h" +#include "../webp/types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/utils/random.c b/thirdparty/libwebp/utils/random.c similarity index 100% rename from drivers/webp/utils/random.c rename to thirdparty/libwebp/utils/random.c diff --git a/drivers/webp/utils/random.h b/thirdparty/libwebp/utils/random.h similarity index 98% rename from drivers/webp/utils/random.h rename to thirdparty/libwebp/utils/random.h index 745f3e2e871..c392a615caf 100644 --- a/drivers/webp/utils/random.h +++ b/thirdparty/libwebp/utils/random.h @@ -15,7 +15,7 @@ #define WEBP_UTILS_RANDOM_H_ #include -#include "webp/types.h" +#include "../webp/types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/utils/rescaler.c b/thirdparty/libwebp/utils/rescaler.c similarity index 100% rename from drivers/webp/utils/rescaler.c rename to thirdparty/libwebp/utils/rescaler.c diff --git a/drivers/webp/utils/rescaler.h b/thirdparty/libwebp/utils/rescaler.h similarity index 99% rename from drivers/webp/utils/rescaler.h rename to thirdparty/libwebp/utils/rescaler.h index 868467b4d72..98b01a76d07 100644 --- a/drivers/webp/utils/rescaler.h +++ b/thirdparty/libwebp/utils/rescaler.h @@ -18,7 +18,7 @@ extern "C" { #endif -#include "webp/types.h" +#include "../webp/types.h" #define WEBP_RESCALER_RFIX 32 // fixed-point precision for multiplies #define WEBP_RESCALER_ONE (1ull << WEBP_RESCALER_RFIX) diff --git a/drivers/webp/utils/thread.c b/thirdparty/libwebp/utils/thread.c similarity index 100% rename from drivers/webp/utils/thread.c rename to thirdparty/libwebp/utils/thread.c diff --git a/drivers/webp/utils/thread.h b/thirdparty/libwebp/utils/thread.h similarity index 98% rename from drivers/webp/utils/thread.h rename to thirdparty/libwebp/utils/thread.h index 6008bb7c014..84083118550 100644 --- a/drivers/webp/utils/thread.h +++ b/thirdparty/libwebp/utils/thread.h @@ -15,10 +15,10 @@ #define WEBP_UTILS_THREAD_H_ #ifdef HAVE_CONFIG_H -#include "webp/config.h" +#include "../webp/config.h" #endif -#include "webp/types.h" +#include "../webp/types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/utils/utils.c b/thirdparty/libwebp/utils/utils.c similarity index 98% rename from drivers/webp/utils/utils.c rename to thirdparty/libwebp/utils/utils.c index b2193c4b47b..2602ca3c9f6 100644 --- a/drivers/webp/utils/utils.c +++ b/thirdparty/libwebp/utils/utils.c @@ -13,9 +13,9 @@ #include #include // for memcpy() -#include "webp/decode.h" -#include "webp/encode.h" -#include "webp/format_constants.h" // for MAX_PALETTE_SIZE +#include "../webp/decode.h" +#include "../webp/encode.h" +#include "../webp/format_constants.h" // for MAX_PALETTE_SIZE #include "./utils.h" // If PRINT_MEM_INFO is defined, extra info (like total memory used, number of diff --git a/drivers/webp/utils/utils.h b/thirdparty/libwebp/utils/utils.h similarity index 99% rename from drivers/webp/utils/utils.h rename to thirdparty/libwebp/utils/utils.h index cef496af78a..e0a81126df8 100644 --- a/drivers/webp/utils/utils.h +++ b/thirdparty/libwebp/utils/utils.h @@ -16,13 +16,13 @@ #define WEBP_UTILS_UTILS_H_ #ifdef HAVE_CONFIG_H -#include "webp/config.h" +#include "../webp/config.h" #endif #include #include "../dsp/dsp.h" -#include "webp/types.h" +#include "../webp/types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/webp/config.h b/thirdparty/libwebp/webp/config.h similarity index 100% rename from drivers/webp/config.h rename to thirdparty/libwebp/webp/config.h diff --git a/drivers/webp/decode.h b/thirdparty/libwebp/webp/decode.h similarity index 100% rename from drivers/webp/decode.h rename to thirdparty/libwebp/webp/decode.h diff --git a/drivers/webp/demux.h b/thirdparty/libwebp/webp/demux.h similarity index 100% rename from drivers/webp/demux.h rename to thirdparty/libwebp/webp/demux.h diff --git a/drivers/webp/encode.h b/thirdparty/libwebp/webp/encode.h similarity index 100% rename from drivers/webp/encode.h rename to thirdparty/libwebp/webp/encode.h diff --git a/drivers/webp/format_constants.h b/thirdparty/libwebp/webp/format_constants.h similarity index 100% rename from drivers/webp/format_constants.h rename to thirdparty/libwebp/webp/format_constants.h diff --git a/drivers/webp/mux.h b/thirdparty/libwebp/webp/mux.h similarity index 100% rename from drivers/webp/mux.h rename to thirdparty/libwebp/webp/mux.h diff --git a/drivers/webp/mux_types.h b/thirdparty/libwebp/webp/mux_types.h similarity index 100% rename from drivers/webp/mux_types.h rename to thirdparty/libwebp/webp/mux_types.h diff --git a/drivers/webp/types.h b/thirdparty/libwebp/webp/types.h similarity index 100% rename from drivers/webp/types.h rename to thirdparty/libwebp/webp/types.h From d9a291f6411f2e571c181da0ac89f550ba73f681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 12 Oct 2016 20:37:38 +0200 Subject: [PATCH 06/19] ogg/vorbis/opus: Make them modules and unbundle thirdparty libs Took the opportunity to undo the Godot changed made to the opus source. The opus module should eventually be built in its own environment to avoid polluting others with too many include dirs and defines. TODO: Fix the platform/ stuff for opus. --- SConstruct | 10 +- drivers/SCsub | 7 - drivers/ogg/SCsub | 9 - drivers/opus/SCsub | 196 --------- drivers/register_driver_types.cpp | 55 --- drivers/vorbis/SCsub | 36 -- modules/ogg/SCsub | 20 + modules/ogg/config.py | 6 + modules/ogg/register_types.cpp | 35 ++ modules/ogg/register_types.h | 30 ++ modules/opus/SCsub | 211 ++++++++++ .../opus/audio_stream_opus.cpp | 0 {drivers => modules}/opus/audio_stream_opus.h | 8 +- modules/opus/config.py | 6 + modules/opus/register_types.cpp | 45 +++ modules/opus/register_types.h | 30 ++ modules/vorbis/SCsub | 44 ++ .../vorbis/audio_stream_ogg_vorbis.cpp | 0 .../vorbis/audio_stream_ogg_vorbis.h | 6 +- modules/vorbis/config.py | 6 + modules/vorbis/register_types.cpp | 45 +++ modules/vorbis/register_types.h | 30 ++ platform/android/detect.py | 3 +- platform/iphone/detect.py | 3 +- platform/javascript/detect.py | 5 +- platform/x11/detect.py | 11 + thirdparty/README.md | 40 ++ {drivers/ogg => thirdparty/libogg}/COPYING | 0 {drivers/ogg => thirdparty/libogg}/bitwise.c | 0 {drivers/ogg => thirdparty/libogg}/framing.c | 0 .../libogg}/ogg/config_types.h | 0 {drivers => thirdparty/libogg}/ogg/ogg.h | 0 {drivers => thirdparty/libogg}/ogg/os_types.h | 0 .../vorbis => thirdparty/libvorbis}/COPYING | 0 .../libvorbis}/analysis.c | 0 .../libvorbis}/backends.h | 0 .../vorbis => thirdparty/libvorbis}/barkmel.c | 0 .../vorbis => thirdparty/libvorbis}/bitrate.c | 0 .../vorbis => thirdparty/libvorbis}/bitrate.h | 0 .../vorbis => thirdparty/libvorbis}/block.c | 0 .../libvorbis}/books/coupled/res_books_51.h | 0 .../books/coupled/res_books_stereo.h | 0 .../libvorbis}/books/floor/floor_books.h | 0 .../books/uncoupled/res_books_uncoupled.h | 0 .../libvorbis}/codebook.c | 0 .../libvorbis}/codebook.h | 0 .../libvorbis}/codec_internal.h | 0 .../libvorbis}/envelope.c | 0 .../libvorbis}/envelope.h | 0 .../vorbis => thirdparty/libvorbis}/floor0.c | 0 .../vorbis => thirdparty/libvorbis}/floor1.c | 0 .../libvorbis}/highlevel.h | 0 .../vorbis => thirdparty/libvorbis}/info.c | 0 .../vorbis => thirdparty/libvorbis}/lookup.c | 0 .../vorbis => thirdparty/libvorbis}/lookup.h | 0 .../libvorbis}/lookup_data.h | 0 .../vorbis => thirdparty/libvorbis}/lpc.c | 0 .../vorbis => thirdparty/libvorbis}/lpc.h | 0 .../vorbis => thirdparty/libvorbis}/lsp.c | 0 .../vorbis => thirdparty/libvorbis}/lsp.h | 0 .../libvorbis}/mapping0.c | 0 .../vorbis => thirdparty/libvorbis}/masking.h | 0 .../vorbis => thirdparty/libvorbis}/mdct.c | 0 .../vorbis => thirdparty/libvorbis}/mdct.h | 0 .../vorbis => thirdparty/libvorbis}/misc.h | 0 .../libvorbis}/modes/floor_all.h | 0 .../libvorbis}/modes/psych_11.h | 0 .../libvorbis}/modes/psych_16.h | 0 .../libvorbis}/modes/psych_44.h | 0 .../libvorbis}/modes/psych_8.h | 0 .../libvorbis}/modes/residue_16.h | 0 .../libvorbis}/modes/residue_44.h | 0 .../libvorbis}/modes/residue_44p51.h | 0 .../libvorbis}/modes/residue_44u.h | 0 .../libvorbis}/modes/residue_8.h | 0 .../libvorbis}/modes/setup_11.h | 0 .../libvorbis}/modes/setup_16.h | 0 .../libvorbis}/modes/setup_22.h | 0 .../libvorbis}/modes/setup_32.h | 0 .../libvorbis}/modes/setup_44.h | 0 .../libvorbis}/modes/setup_44p51.h | 0 .../libvorbis}/modes/setup_44u.h | 0 .../libvorbis}/modes/setup_8.h | 0 .../libvorbis}/modes/setup_X.h | 0 {drivers/vorbis => thirdparty/libvorbis}/os.h | 0 .../vorbis => thirdparty/libvorbis}/psy.c | 0 .../vorbis => thirdparty/libvorbis}/psy.h | 0 .../vorbis => thirdparty/libvorbis}/psytune.c | 0 .../libvorbis}/registry.c | 0 .../libvorbis}/registry.h | 0 .../vorbis => thirdparty/libvorbis}/res0.c | 0 .../vorbis => thirdparty/libvorbis}/scales.h | 0 .../libvorbis}/sharedbook.c | 0 .../vorbis => thirdparty/libvorbis}/smallft.c | 0 .../vorbis => thirdparty/libvorbis}/smallft.h | 0 .../libvorbis}/synthesis.c | 0 .../vorbis => thirdparty/libvorbis}/tone.c | 0 .../libvorbis}/vorbis/codec.h | 0 .../libvorbis}/vorbis/vorbisenc.h | 0 .../libvorbis}/vorbis/vorbisfile.h | 0 .../libvorbis}/vorbisenc.c | 0 .../libvorbis}/vorbisfile.c | 0 .../vorbis => thirdparty/libvorbis}/window.c | 0 .../vorbis => thirdparty/libvorbis}/window.h | 0 {drivers => thirdparty}/opus/COPYING | 0 {drivers => thirdparty}/opus/analysis.c | 29 +- {drivers => thirdparty}/opus/analysis.h | 4 +- .../opus/celt/_kiss_fft_guts.h | 14 +- {drivers => thirdparty}/opus/celt/arch.h | 16 +- .../opus/celt/arm/arm2gnu.pl | 0 .../opus/celt/arm/arm_celt_map.c | 11 +- .../opus/celt/arm/armcpu.c | 13 +- .../opus/celt/arm/armcpu.h | 0 .../opus/celt/arm/armopts.s.in | 0 .../opus/celt/arm/celt_ne10_fft.c | 10 +- .../opus/celt/arm/celt_ne10_mdct.c | 12 +- .../opus/celt/arm/celt_neon_intr.c | 7 +- .../opus/celt/arm/celt_pitch_xcorr_arm-gnu.S | 0 .../opus/celt/arm/celt_pitch_xcorr_arm.s | 0 .../opus/celt/arm/fft_arm.h | 4 +- thirdparty/opus/celt/arm/fixed_arm64.h | 35 ++ .../opus/celt/arm/fixed_armv4.h | 0 .../opus/celt/arm/fixed_armv5e.h | 2 +- .../opus/celt/arm/kiss_fft_armv4.h | 2 +- .../opus/celt/arm/kiss_fft_armv5e.h | 2 +- .../opus/celt/arm/mdct_arm.h | 4 +- .../opus/celt/arm/pitch_arm.h | 2 +- {drivers => thirdparty}/opus/celt/bands.c | 49 +-- {drivers => thirdparty}/opus/celt/bands.h | 10 +- {drivers => thirdparty}/opus/celt/celt.c | 37 +- {drivers => thirdparty}/opus/celt/celt.h | 12 +- .../opus/celt/celt_decoder.c | 51 +-- .../opus/celt/celt_encoder.c | 63 +-- {drivers => thirdparty}/opus/celt/celt_lpc.c | 23 +- {drivers => thirdparty}/opus/celt/celt_lpc.h | 6 +- .../opus/celt/cpu_support.h | 8 +- {drivers => thirdparty}/opus/celt/cwrs.c | 13 +- {drivers => thirdparty}/opus/celt/cwrs.h | 8 +- {drivers => thirdparty}/opus/celt/ecintrin.h | 4 +- {drivers => thirdparty}/opus/celt/entcode.c | 9 +- {drivers => thirdparty}/opus/celt/entcode.h | 6 +- {drivers => thirdparty}/opus/celt/entdec.c | 13 +- {drivers => thirdparty}/opus/celt/entdec.h | 2 +- {drivers => thirdparty}/opus/celt/entenc.c | 13 +- {drivers => thirdparty}/opus/celt/entenc.h | 2 +- .../opus/celt/fixed_debug.h | 2 +- .../opus/celt/fixed_generic.h | 2 +- .../opus/celt/float_cast.h | 2 +- {drivers => thirdparty}/opus/celt/kiss_fft.c | 24 +- {drivers => thirdparty}/opus/celt/kiss_fft.h | 12 +- {drivers => thirdparty}/opus/celt/laplace.c | 9 +- {drivers => thirdparty}/opus/celt/laplace.h | 4 +- {drivers => thirdparty}/opus/celt/mathops.c | 9 +- {drivers => thirdparty}/opus/celt/mathops.h | 14 +- {drivers => thirdparty}/opus/celt/mdct.c | 20 +- {drivers => thirdparty}/opus/celt/mdct.h | 8 +- {drivers => thirdparty}/opus/celt/mfrngcod.h | 2 +- .../opus/celt/mips/celt_mipsr1.h | 33 +- .../opus/celt/mips/fixed_generic_mipsr1.h | 0 .../opus/celt/mips/kiss_fft_mipsr1.h | 4 +- .../opus/celt/mips/mdct_mipsr1.h | 18 +- .../opus/celt/mips/pitch_mipsr1.h | 0 .../opus/celt/mips/vq_mipsr1.h | 13 +- {drivers => thirdparty}/opus/celt/modes.c | 27 +- {drivers => thirdparty}/opus/celt/modes.h | 12 +- .../opus/celt/opus_custom_demo.c | 9 +- .../opus/celt/os_support.h | 4 +- {drivers => thirdparty}/opus/celt/pitch.c | 65 +-- {drivers => thirdparty}/opus/celt/pitch.h | 14 +- .../opus/celt/quant_bands.c | 41 +- .../opus/celt/quant_bands.h | 12 +- {drivers => thirdparty}/opus/celt/rate.c | 17 +- {drivers => thirdparty}/opus/celt/rate.h | 4 +- .../opus/celt/stack_alloc.h | 6 +- .../opus/celt/static_modes_fixed.h | 6 +- .../opus/celt/static_modes_fixed_arm_ne10.h | 0 .../opus/celt/static_modes_float.h | 6 +- .../opus/celt/static_modes_float_arm_ne10.h | 0 thirdparty/opus/celt/tests/test_unit_cwrs32.c | 161 ++++++++ thirdparty/opus/celt/tests/test_unit_dft.c | 189 +++++++++ .../opus/celt/tests/test_unit_entropy.c | 382 ++++++++++++++++++ .../opus/celt/tests/test_unit_laplace.c | 93 +++++ .../opus/celt/tests/test_unit_mathops.c | 304 ++++++++++++++ thirdparty/opus/celt/tests/test_unit_mdct.c | 230 +++++++++++ .../opus/celt/tests/test_unit_rotation.c | 120 ++++++ thirdparty/opus/celt/tests/test_unit_types.c | 50 +++ {drivers => thirdparty}/opus/celt/vq.c | 41 +- {drivers => thirdparty}/opus/celt/vq.h | 8 +- .../opus/celt/x86/celt_lpc_sse.c | 15 +- .../opus/celt/x86/celt_lpc_sse.h | 5 +- .../opus/celt/x86/pitch_sse.c | 17 +- .../opus/celt/x86/pitch_sse.h | 5 +- .../opus/celt/x86/pitch_sse2.c | 15 +- .../opus/celt/x86/pitch_sse4_1.c | 17 +- .../opus/celt/x86/x86_celt_map.c | 13 +- .../opus/celt/x86/x86cpu.c | 15 +- .../opus/celt/x86/x86cpu.h | 0 .../opus_config.h => thirdparty/opus/config.h | 0 {drivers => thirdparty}/opus/http.c | 8 +- {drivers => thirdparty}/opus/info.c | 6 +- {drivers => thirdparty}/opus/internal.c | 6 +- {drivers => thirdparty}/opus/internal.h | 2 +- {drivers => thirdparty}/opus/mlp.c | 17 +- {drivers => thirdparty}/opus/mlp.h | 2 +- {drivers => thirdparty}/opus/mlp_data.c | 7 +- {drivers => thirdparty}/opus/opus.c | 9 +- {drivers => thirdparty}/opus/opus.h | 4 +- {drivers => thirdparty}/opus/opus_compare.c | 0 {drivers => thirdparty}/opus/opus_custom.h | 2 +- {drivers => thirdparty}/opus/opus_decoder.c | 43 +- {drivers => thirdparty}/opus/opus_defines.h | 2 +- {drivers => thirdparty}/opus/opus_encoder.c | 67 +-- .../opus/opus_multistream.c | 17 +- .../opus/opus_multistream.h | 2 +- .../opus/opus_multistream_decoder.c | 19 +- .../opus/opus_multistream_encoder.c | 37 +- {drivers => thirdparty}/opus/opus_private.h | 6 +- {drivers => thirdparty}/opus/opus_types.h | 0 {drivers => thirdparty}/opus/opusfile.c | 8 +- {drivers => thirdparty}/opus/opusfile.h | 2 +- {drivers => thirdparty}/opus/repacketizer.c | 11 +- .../opus/repacketizer_demo.c | 7 +- {drivers => thirdparty}/opus/silk/A2NLSF.c | 9 +- {drivers => thirdparty}/opus/silk/API.h | 10 +- {drivers => thirdparty}/opus/silk/CNG.c | 9 +- .../opus/silk/HP_variable_cutoff.c | 15 +- {drivers => thirdparty}/opus/silk/Inlines.h | 0 .../opus/silk/LPC_analysis_filter.c | 13 +- .../opus/silk/LPC_inv_pred_gain.c | 9 +- .../opus/silk/LP_variable_cutoff.c | 7 +- .../opus/silk/MacroCount.h | 0 .../opus/silk/MacroDebug.h | 0 {drivers => thirdparty}/opus/silk/NLSF2A.c | 9 +- {drivers => thirdparty}/opus/silk/NLSF_VQ.c | 7 +- .../opus/silk/NLSF_VQ_weights_laroia.c | 9 +- .../opus/silk/NLSF_decode.c | 7 +- .../opus/silk/NLSF_del_dec_quant.c | 7 +- .../opus/silk/NLSF_encode.c | 9 +- .../opus/silk/NLSF_stabilize.c | 7 +- .../opus/silk/NLSF_unpack.c | 7 +- {drivers => thirdparty}/opus/silk/NSQ.c | 9 +- thirdparty/opus/silk/NSQ.h | 101 +++++ .../opus/silk/NSQ_del_dec.c | 11 +- {drivers => thirdparty}/opus/silk/PLC.c | 11 +- {drivers => thirdparty}/opus/silk/PLC.h | 2 +- .../opus/silk/SigProc_FIX.h | 22 +- {drivers => thirdparty}/opus/silk/VAD.c | 9 +- .../opus/silk/VQ_WMat_EC.c | 7 +- .../opus/silk/ana_filt_bank_1.c | 7 +- thirdparty/opus/silk/arm/NSQ_neon.c | 112 +++++ thirdparty/opus/silk/arm/NSQ_neon.h | 113 ++++++ .../opus/silk/arm/SigProc_FIX_armv4.h | 0 .../opus/silk/arm/SigProc_FIX_armv5e.h | 0 thirdparty/opus/silk/arm/arm_silk_map.c | 55 +++ thirdparty/opus/silk/arm/macros_arm64.h | 39 ++ .../opus/silk/arm/macros_armv4.h | 0 .../opus/silk/arm/macros_armv5e.h | 0 .../opus/silk/biquad_alt.c | 7 +- .../opus/silk/bwexpander.c | 7 +- .../opus/silk/bwexpander_32.c | 7 +- .../opus/silk/check_control_input.c | 11 +- .../opus/silk/code_signs.c | 7 +- {drivers => thirdparty}/opus/silk/control.h | 2 +- .../opus/silk/control_SNR.c | 9 +- .../opus/silk/control_audio_bandwidth.c | 9 +- .../opus/silk/control_codec.c | 23 +- {drivers => thirdparty}/opus/silk/debug.c | 9 +- {drivers => thirdparty}/opus/silk/debug.h | 2 +- {drivers => thirdparty}/opus/silk/dec_API.c | 13 +- .../opus/silk/decode_core.c | 9 +- .../opus/silk/decode_frame.c | 11 +- .../opus/silk/decode_indices.c | 7 +- .../opus/silk/decode_parameters.c | 7 +- .../opus/silk/decode_pitch.c | 9 +- .../opus/silk/decode_pulses.c | 7 +- .../opus/silk/decoder_set_fs.c | 7 +- {drivers => thirdparty}/opus/silk/define.h | 4 +- {drivers => thirdparty}/opus/silk/enc_API.c | 25 +- .../opus/silk/encode_indices.c | 7 +- .../opus/silk/encode_pulses.c | 9 +- {drivers => thirdparty}/opus/silk/errors.h | 0 .../opus/silk/fixed/LTP_analysis_filter_FIX.c | 7 +- .../opus/silk/fixed/LTP_scale_ctrl_FIX.c | 7 +- .../opus/silk/fixed/apply_sine_window_FIX.c | 7 +- .../opus/silk/fixed/autocorr_FIX.c | 9 +- .../opus/silk/fixed/burg_modified_FIX.c | 13 +- .../opus/silk/fixed/corrMatrix_FIX.c | 7 +- .../opus/silk/fixed/encode_frame_FIX.c | 11 +- .../opus/silk/fixed/find_LPC_FIX.c | 11 +- .../opus/silk/fixed/find_LTP_FIX.c | 9 +- .../opus/silk/fixed/find_pitch_lags_FIX.c | 11 +- .../opus/silk/fixed/find_pred_coefs_FIX.c | 9 +- .../opus/silk/fixed/k2a_FIX.c | 7 +- .../opus/silk/fixed/k2a_Q16_FIX.c | 7 +- .../opus/silk/fixed/main_FIX.h | 14 +- .../mips/noise_shape_analysis_FIX_mipsr1.h | 0 .../silk/fixed/mips/prefilter_FIX_mipsr1.h | 11 +- .../mips/warped_autocorrelation_FIX_mipsr1.h | 7 +- .../silk/fixed/noise_shape_analysis_FIX.c | 13 +- .../opus/silk/fixed/pitch_analysis_core_FIX.c | 15 +- .../opus/silk/fixed/prefilter_FIX.c | 13 +- .../opus/silk/fixed/process_gains_FIX.c | 9 +- .../silk/fixed/regularize_correlations_FIX.c | 7 +- .../opus/silk/fixed/residual_energy16_FIX.c | 7 +- .../opus/silk/fixed/residual_energy_FIX.c | 9 +- .../opus/silk/fixed/schur64_FIX.c | 7 +- .../opus/silk/fixed/schur_FIX.c | 7 +- .../opus/silk/fixed/solve_LS_FIX.c | 11 +- .../opus/silk/fixed/structs_FIX.h | 6 +- .../opus/silk/fixed/vector_ops_FIX.c | 11 +- .../silk/fixed/warped_autocorrelation_FIX.c | 9 +- .../silk/fixed/x86/burg_modified_FIX_sse.c | 15 +- .../opus/silk/fixed/x86/prefilter_FIX_sse.c | 9 +- .../opus/silk/fixed/x86/vector_ops_FIX_sse.c | 11 +- .../opus/silk/float/LPC_analysis_filter_FLP.c | 7 +- .../opus/silk/float/LPC_inv_pred_gain_FLP.c | 9 +- .../opus/silk/float/LTP_analysis_filter_FLP.c | 7 +- .../opus/silk/float/LTP_scale_ctrl_FLP.c | 7 +- .../opus/silk/float/SigProc_FLP.h | 4 +- .../opus/silk/float/apply_sine_window_FLP.c | 7 +- .../opus/silk/float/autocorrelation_FLP.c | 9 +- .../opus/silk/float/burg_modified_FLP.c | 11 +- .../opus/silk/float/bwexpander_FLP.c | 7 +- .../opus/silk/float/corrMatrix_FLP.c | 7 +- .../opus/silk/float/encode_frame_FLP.c | 9 +- .../opus/silk/float/energy_FLP.c | 7 +- .../opus/silk/float/find_LPC_FLP.c | 11 +- .../opus/silk/float/find_LTP_FLP.c | 9 +- .../opus/silk/float/find_pitch_lags_FLP.c | 9 +- .../opus/silk/float/find_pred_coefs_FLP.c | 7 +- .../opus/silk/float/inner_product_FLP.c | 7 +- .../opus/silk/float/k2a_FLP.c | 7 +- .../opus/silk/float/levinsondurbin_FLP.c | 7 +- .../opus/silk/float/main_FLP.h | 14 +- .../silk/float/noise_shape_analysis_FLP.c | 9 +- .../opus/silk/float/pitch_analysis_core_FLP.c | 13 +- .../opus/silk/float/prefilter_FLP.c | 9 +- .../opus/silk/float/process_gains_FLP.c | 9 +- .../silk/float/regularize_correlations_FLP.c | 7 +- .../opus/silk/float/residual_energy_FLP.c | 7 +- .../opus/silk/float/scale_copy_vector_FLP.c | 7 +- .../opus/silk/float/scale_vector_FLP.c | 7 +- .../opus/silk/float/schur_FLP.c | 7 +- .../opus/silk/float/solve_LS_FLP.c | 9 +- .../opus/silk/float/sort_FLP.c | 9 +- .../opus/silk/float/structs_FLP.h | 6 +- .../silk/float/warped_autocorrelation_FLP.c | 7 +- .../opus/silk/float/wrappers_FLP.c | 7 +- .../opus/silk/gain_quant.c | 7 +- .../opus/silk/init_decoder.c | 7 +- .../opus/silk/init_encoder.c | 17 +- .../opus/silk/inner_prod_aligned.c | 7 +- .../opus/silk/interpolate.c | 7 +- {drivers => thirdparty}/opus/silk/lin2log.c | 7 +- {drivers => thirdparty}/opus/silk/log2lin.c | 7 +- {drivers => thirdparty}/opus/silk/macros.h | 17 +- {drivers => thirdparty}/opus/silk/main.h | 20 +- .../opus/silk/mips/NSQ_del_dec_mipsr1.h | 9 +- .../opus/silk/mips/macros_mipsr1.h | 0 .../opus/silk/mips/sigproc_fix_mipsr1.h | 0 .../opus/silk/pitch_est_defines.h | 2 +- .../opus/silk/pitch_est_tables.c | 9 +- .../opus/silk/process_NLSFs.c | 7 +- .../opus/silk/quant_LTP_gains.c | 9 +- {drivers => thirdparty}/opus/silk/resampler.c | 7 +- .../opus/silk/resampler_down2.c | 9 +- .../opus/silk/resampler_down2_3.c | 11 +- .../opus/silk/resampler_private.h | 6 +- .../opus/silk/resampler_private_AR2.c | 9 +- .../opus/silk/resampler_private_IIR_FIR.c | 11 +- .../opus/silk/resampler_private_down_FIR.c | 11 +- .../opus/silk/resampler_private_up2_HQ.c | 9 +- .../opus/silk/resampler_rom.c | 7 +- .../opus/silk/resampler_rom.h | 4 +- .../opus/silk/resampler_structs.h | 0 .../opus/silk/shell_coder.c | 7 +- {drivers => thirdparty}/opus/silk/sigm_Q15.c | 7 +- {drivers => thirdparty}/opus/silk/sort.c | 9 +- .../opus/silk/stereo_LR_to_MS.c | 9 +- .../opus/silk/stereo_MS_to_LR.c | 7 +- .../opus/silk/stereo_decode_pred.c | 7 +- .../opus/silk/stereo_encode_pred.c | 7 +- .../opus/silk/stereo_find_predictor.c | 7 +- .../opus/silk/stereo_quant_pred.c | 7 +- {drivers => thirdparty}/opus/silk/structs.h | 10 +- .../opus/silk/sum_sqr_shift.c | 7 +- .../opus/silk/table_LSF_cos.c | 7 +- {drivers => thirdparty}/opus/silk/tables.h | 4 +- .../opus/silk/tables_LTP.c | 7 +- .../opus/silk/tables_NLSF_CB_NB_MB.c | 7 +- .../opus/silk/tables_NLSF_CB_WB.c | 7 +- .../opus/silk/tables_gain.c | 7 +- .../opus/silk/tables_other.c | 11 +- .../opus/silk/tables_pitch_lag.c | 7 +- .../opus/silk/tables_pulses_per_block.c | 7 +- .../opus/silk/tuning_parameters.h | 0 {drivers => thirdparty}/opus/silk/typedef.h | 6 +- .../opus/silk/x86/NSQ_del_dec_sse.c | 11 +- .../opus/silk/x86/NSQ_sse.c | 11 +- .../opus/silk/x86/SigProc_FIX_sse.h | 5 +- .../opus/silk/x86/VAD_sse.c | 9 +- .../opus/silk/x86/VQ_WMat_EC_sse.c | 9 +- .../opus/silk/x86/main_sse.h | 5 +- .../opus/silk/x86/x86_silk_map.c | 17 +- {drivers => thirdparty}/opus/stream.c | 6 +- {drivers => thirdparty}/opus/tansig_table.h | 0 {drivers => thirdparty}/opus/wincerts.c | 7 +- {drivers => thirdparty}/opus/winerrno.h | 0 408 files changed, 4225 insertions(+), 1402 deletions(-) delete mode 100644 drivers/ogg/SCsub delete mode 100644 drivers/opus/SCsub delete mode 100644 drivers/vorbis/SCsub create mode 100644 modules/ogg/SCsub create mode 100644 modules/ogg/config.py create mode 100644 modules/ogg/register_types.cpp create mode 100644 modules/ogg/register_types.h create mode 100644 modules/opus/SCsub rename {drivers => modules}/opus/audio_stream_opus.cpp (100%) rename {drivers => modules}/opus/audio_stream_opus.h (98%) create mode 100644 modules/opus/config.py create mode 100644 modules/opus/register_types.cpp create mode 100644 modules/opus/register_types.h create mode 100644 modules/vorbis/SCsub rename {drivers => modules}/vorbis/audio_stream_ogg_vorbis.cpp (100%) rename {drivers => modules}/vorbis/audio_stream_ogg_vorbis.h (99%) create mode 100644 modules/vorbis/config.py create mode 100644 modules/vorbis/register_types.cpp create mode 100644 modules/vorbis/register_types.h rename {drivers/ogg => thirdparty/libogg}/COPYING (100%) rename {drivers/ogg => thirdparty/libogg}/bitwise.c (100%) rename {drivers/ogg => thirdparty/libogg}/framing.c (100%) rename {drivers => thirdparty/libogg}/ogg/config_types.h (100%) rename {drivers => thirdparty/libogg}/ogg/ogg.h (100%) rename {drivers => thirdparty/libogg}/ogg/os_types.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/COPYING (100%) rename {drivers/vorbis => thirdparty/libvorbis}/analysis.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/backends.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/barkmel.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/bitrate.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/bitrate.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/block.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/books/coupled/res_books_51.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/books/coupled/res_books_stereo.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/books/floor/floor_books.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/books/uncoupled/res_books_uncoupled.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/codebook.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/codebook.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/codec_internal.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/envelope.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/envelope.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/floor0.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/floor1.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/highlevel.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/info.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/lookup.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/lookup.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/lookup_data.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/lpc.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/lpc.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/lsp.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/lsp.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/mapping0.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/masking.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/mdct.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/mdct.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/misc.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/floor_all.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/psych_11.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/psych_16.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/psych_44.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/psych_8.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/residue_16.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/residue_44.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/residue_44p51.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/residue_44u.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/residue_8.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/setup_11.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/setup_16.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/setup_22.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/setup_32.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/setup_44.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/setup_44p51.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/setup_44u.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/setup_8.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/modes/setup_X.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/os.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/psy.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/psy.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/psytune.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/registry.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/registry.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/res0.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/scales.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/sharedbook.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/smallft.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/smallft.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/synthesis.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/tone.c (100%) rename {drivers => thirdparty/libvorbis}/vorbis/codec.h (100%) rename {drivers => thirdparty/libvorbis}/vorbis/vorbisenc.h (100%) rename {drivers => thirdparty/libvorbis}/vorbis/vorbisfile.h (100%) rename {drivers/vorbis => thirdparty/libvorbis}/vorbisenc.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/vorbisfile.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/window.c (100%) rename {drivers/vorbis => thirdparty/libvorbis}/window.h (100%) rename {drivers => thirdparty}/opus/COPYING (100%) rename {drivers => thirdparty}/opus/analysis.c (98%) rename {drivers => thirdparty}/opus/analysis.h (98%) rename {drivers => thirdparty}/opus/celt/_kiss_fft_guts.h (96%) rename {drivers => thirdparty}/opus/celt/arch.h (96%) rename {drivers => thirdparty}/opus/celt/arm/arm2gnu.pl (100%) rename {drivers => thirdparty}/opus/celt/arm/arm_celt_map.c (97%) rename {drivers => thirdparty}/opus/celt/arm/armcpu.c (96%) rename {drivers => thirdparty}/opus/celt/arm/armcpu.h (100%) rename {drivers => thirdparty}/opus/celt/arm/armopts.s.in (100%) rename {drivers => thirdparty}/opus/celt/arm/celt_ne10_fft.c (97%) rename {drivers => thirdparty}/opus/celt/arm/celt_ne10_mdct.c (97%) rename {drivers => thirdparty}/opus/celt/arm/celt_neon_intr.c (99%) rename {drivers => thirdparty}/opus/celt/arm/celt_pitch_xcorr_arm-gnu.S (100%) rename {drivers => thirdparty}/opus/celt/arm/celt_pitch_xcorr_arm.s (100%) rename {drivers => thirdparty}/opus/celt/arm/fft_arm.h (97%) create mode 100644 thirdparty/opus/celt/arm/fixed_arm64.h rename {drivers => thirdparty}/opus/celt/arm/fixed_armv4.h (100%) rename {drivers => thirdparty}/opus/celt/arm/fixed_armv5e.h (99%) rename {drivers => thirdparty}/opus/celt/arm/kiss_fft_armv4.h (99%) rename {drivers => thirdparty}/opus/celt/arm/kiss_fft_armv5e.h (99%) rename {drivers => thirdparty}/opus/celt/arm/mdct_arm.h (97%) rename {drivers => thirdparty}/opus/celt/arm/pitch_arm.h (98%) rename {drivers => thirdparty}/opus/celt/bands.c (98%) rename {drivers => thirdparty}/opus/celt/bands.h (97%) rename {drivers => thirdparty}/opus/celt/celt.c (93%) rename {drivers => thirdparty}/opus/celt/celt.h (97%) rename {drivers => thirdparty}/opus/celt/celt_decoder.c (98%) rename {drivers => thirdparty}/opus/celt/celt_encoder.c (98%) rename {drivers => thirdparty}/opus/celt/celt_lpc.c (96%) rename {drivers => thirdparty}/opus/celt/celt_lpc.h (95%) rename {drivers => thirdparty}/opus/celt/cpu_support.h (94%) rename {drivers => thirdparty}/opus/celt/cwrs.c (99%) rename {drivers => thirdparty}/opus/celt/cwrs.h (93%) rename {drivers => thirdparty}/opus/celt/ecintrin.h (98%) rename {drivers => thirdparty}/opus/celt/entcode.c (98%) rename {drivers => thirdparty}/opus/celt/entcode.h (98%) rename {drivers => thirdparty}/opus/celt/entdec.c (98%) rename {drivers => thirdparty}/opus/celt/entdec.h (99%) rename {drivers => thirdparty}/opus/celt/entenc.c (98%) rename {drivers => thirdparty}/opus/celt/entenc.h (99%) rename {drivers => thirdparty}/opus/celt/fixed_debug.h (99%) rename {drivers => thirdparty}/opus/celt/fixed_generic.h (99%) rename {drivers => thirdparty}/opus/celt/float_cast.h (99%) rename {drivers => thirdparty}/opus/celt/kiss_fft.c (98%) rename {drivers => thirdparty}/opus/celt/kiss_fft.h (97%) rename {drivers => thirdparty}/opus/celt/laplace.c (97%) rename {drivers => thirdparty}/opus/celt/laplace.h (97%) rename {drivers => thirdparty}/opus/celt/mathops.c (98%) rename {drivers => thirdparty}/opus/celt/mathops.h (97%) rename {drivers => thirdparty}/opus/celt/mdct.c (97%) rename {drivers => thirdparty}/opus/celt/mdct.h (97%) rename {drivers => thirdparty}/opus/celt/mfrngcod.h (98%) rename {drivers => thirdparty}/opus/celt/mips/celt_mipsr1.h (91%) rename {drivers => thirdparty}/opus/celt/mips/fixed_generic_mipsr1.h (100%) rename {drivers => thirdparty}/opus/celt/mips/kiss_fft_mipsr1.h (99%) rename {drivers => thirdparty}/opus/celt/mips/mdct_mipsr1.h (97%) rename {drivers => thirdparty}/opus/celt/mips/pitch_mipsr1.h (100%) rename {drivers => thirdparty}/opus/celt/mips/vq_mipsr1.h (96%) rename {drivers => thirdparty}/opus/celt/modes.c (97%) rename {drivers => thirdparty}/opus/celt/modes.h (93%) rename {drivers => thirdparty}/opus/celt/opus_custom_demo.c (98%) rename {drivers => thirdparty}/opus/celt/os_support.h (98%) rename {drivers => thirdparty}/opus/celt/pitch.c (94%) rename {drivers => thirdparty}/opus/celt/pitch.h (96%) rename {drivers => thirdparty}/opus/celt/quant_bands.c (97%) rename {drivers => thirdparty}/opus/celt/quant_bands.h (94%) rename {drivers => thirdparty}/opus/celt/rate.c (99%) rename {drivers => thirdparty}/opus/celt/rate.h (98%) rename {drivers => thirdparty}/opus/celt/stack_alloc.h (98%) rename {drivers => thirdparty}/opus/celt/static_modes_fixed.h (99%) rename {drivers => thirdparty}/opus/celt/static_modes_fixed_arm_ne10.h (100%) rename {drivers => thirdparty}/opus/celt/static_modes_float.h (99%) rename {drivers => thirdparty}/opus/celt/static_modes_float_arm_ne10.h (100%) create mode 100644 thirdparty/opus/celt/tests/test_unit_cwrs32.c create mode 100644 thirdparty/opus/celt/tests/test_unit_dft.c create mode 100644 thirdparty/opus/celt/tests/test_unit_entropy.c create mode 100644 thirdparty/opus/celt/tests/test_unit_laplace.c create mode 100644 thirdparty/opus/celt/tests/test_unit_mathops.c create mode 100644 thirdparty/opus/celt/tests/test_unit_mdct.c create mode 100644 thirdparty/opus/celt/tests/test_unit_rotation.c create mode 100644 thirdparty/opus/celt/tests/test_unit_types.c rename {drivers => thirdparty}/opus/celt/vq.c (95%) rename {drivers => thirdparty}/opus/celt/vq.h (95%) rename {drivers => thirdparty}/opus/celt/x86/celt_lpc_sse.c (94%) rename {drivers => thirdparty}/opus/celt/x86/celt_lpc_sse.h (97%) rename {drivers => thirdparty}/opus/celt/x86/pitch_sse.c (96%) rename {drivers => thirdparty}/opus/celt/x86/pitch_sse.h (99%) rename {drivers => thirdparty}/opus/celt/x86/pitch_sse2.c (94%) rename {drivers => thirdparty}/opus/celt/x86/pitch_sse4_1.c (96%) rename {drivers => thirdparty}/opus/celt/x86/x86_celt_map.c (96%) rename {drivers => thirdparty}/opus/celt/x86/x86cpu.c (95%) rename {drivers => thirdparty}/opus/celt/x86/x86cpu.h (100%) rename drivers/opus/opus_config.h => thirdparty/opus/config.h (100%) rename {drivers => thirdparty}/opus/http.c (99%) rename {drivers => thirdparty}/opus/info.c (99%) rename {drivers => thirdparty}/opus/internal.c (95%) rename {drivers => thirdparty}/opus/internal.h (99%) rename {drivers => thirdparty}/opus/mlp.c (95%) rename {drivers => thirdparty}/opus/mlp.h (98%) rename {drivers => thirdparty}/opus/mlp_data.c (98%) rename {drivers => thirdparty}/opus/opus.c (99%) rename {drivers => thirdparty}/opus/opus.h (99%) rename {drivers => thirdparty}/opus/opus_compare.c (100%) rename {drivers => thirdparty}/opus/opus_custom.h (99%) rename {drivers => thirdparty}/opus/opus_decoder.c (98%) rename {drivers => thirdparty}/opus/opus_defines.h (99%) rename {drivers => thirdparty}/opus/opus_encoder.c (98%) rename {drivers => thirdparty}/opus/opus_multistream.c (91%) rename {drivers => thirdparty}/opus/opus_multistream.h (99%) rename {drivers => thirdparty}/opus/opus_multistream_decoder.c (98%) rename {drivers => thirdparty}/opus/opus_multistream_encoder.c (98%) rename {drivers => thirdparty}/opus/opus_private.h (98%) rename {drivers => thirdparty}/opus/opus_types.h (100%) rename {drivers => thirdparty}/opus/opusfile.c (99%) rename {drivers => thirdparty}/opus/opusfile.h (99%) rename {drivers => thirdparty}/opus/repacketizer.c (98%) rename {drivers => thirdparty}/opus/repacketizer_demo.c (98%) rename {drivers => thirdparty}/opus/silk/A2NLSF.c (99%) rename {drivers => thirdparty}/opus/silk/API.h (97%) rename {drivers => thirdparty}/opus/silk/CNG.c (99%) rename {drivers => thirdparty}/opus/silk/HP_variable_cutoff.c (95%) rename {drivers => thirdparty}/opus/silk/Inlines.h (100%) rename {drivers => thirdparty}/opus/silk/LPC_analysis_filter.c (96%) rename {drivers => thirdparty}/opus/silk/LPC_inv_pred_gain.c (98%) rename {drivers => thirdparty}/opus/silk/LP_variable_cutoff.c (98%) rename {drivers => thirdparty}/opus/silk/MacroCount.h (100%) rename {drivers => thirdparty}/opus/silk/MacroDebug.h (100%) rename {drivers => thirdparty}/opus/silk/NLSF2A.c (98%) rename {drivers => thirdparty}/opus/silk/NLSF_VQ.c (98%) rename {drivers => thirdparty}/opus/silk/NLSF_VQ_weights_laroia.c (97%) rename {drivers => thirdparty}/opus/silk/NLSF_decode.c (98%) rename {drivers => thirdparty}/opus/silk/NLSF_del_dec_quant.c (99%) rename {drivers => thirdparty}/opus/silk/NLSF_encode.c (98%) rename {drivers => thirdparty}/opus/silk/NLSF_stabilize.c (98%) rename {drivers => thirdparty}/opus/silk/NLSF_unpack.c (97%) rename {drivers => thirdparty}/opus/silk/NSQ.c (99%) create mode 100644 thirdparty/opus/silk/NSQ.h rename {drivers => thirdparty}/opus/silk/NSQ_del_dec.c (99%) rename {drivers => thirdparty}/opus/silk/PLC.c (99%) rename {drivers => thirdparty}/opus/silk/PLC.h (99%) rename {drivers => thirdparty}/opus/silk/SigProc_FIX.h (98%) rename {drivers => thirdparty}/opus/silk/VAD.c (99%) rename {drivers => thirdparty}/opus/silk/VQ_WMat_EC.c (98%) rename {drivers => thirdparty}/opus/silk/ana_filt_bank_1.c (98%) create mode 100644 thirdparty/opus/silk/arm/NSQ_neon.c create mode 100644 thirdparty/opus/silk/arm/NSQ_neon.h rename {drivers => thirdparty}/opus/silk/arm/SigProc_FIX_armv4.h (100%) rename {drivers => thirdparty}/opus/silk/arm/SigProc_FIX_armv5e.h (100%) create mode 100644 thirdparty/opus/silk/arm/arm_silk_map.c create mode 100644 thirdparty/opus/silk/arm/macros_arm64.h rename {drivers => thirdparty}/opus/silk/arm/macros_armv4.h (100%) rename {drivers => thirdparty}/opus/silk/arm/macros_armv5e.h (100%) rename {drivers => thirdparty}/opus/silk/biquad_alt.c (98%) rename {drivers => thirdparty}/opus/silk/bwexpander.c (97%) rename {drivers => thirdparty}/opus/silk/bwexpander_32.c (97%) rename {drivers => thirdparty}/opus/silk/check_control_input.c (97%) rename {drivers => thirdparty}/opus/silk/code_signs.c (98%) rename {drivers => thirdparty}/opus/silk/control.h (99%) rename {drivers => thirdparty}/opus/silk/control_SNR.c (97%) rename {drivers => thirdparty}/opus/silk/control_audio_bandwidth.c (98%) rename {drivers => thirdparty}/opus/silk/control_codec.c (98%) rename {drivers => thirdparty}/opus/silk/debug.c (98%) rename {drivers => thirdparty}/opus/silk/debug.h (99%) rename {drivers => thirdparty}/opus/silk/dec_API.c (99%) rename {drivers => thirdparty}/opus/silk/decode_core.c (99%) rename {drivers => thirdparty}/opus/silk/decode_frame.c (98%) rename {drivers => thirdparty}/opus/silk/decode_indices.c (99%) rename {drivers => thirdparty}/opus/silk/decode_parameters.c (98%) rename {drivers => thirdparty}/opus/silk/decode_pitch.c (97%) rename {drivers => thirdparty}/opus/silk/decode_pulses.c (98%) rename {drivers => thirdparty}/opus/silk/decoder_set_fs.c (98%) rename {drivers => thirdparty}/opus/silk/define.h (99%) rename {drivers => thirdparty}/opus/silk/enc_API.c (98%) rename {drivers => thirdparty}/opus/silk/encode_indices.c (99%) rename {drivers => thirdparty}/opus/silk/encode_pulses.c (98%) rename {drivers => thirdparty}/opus/silk/errors.h (100%) rename {drivers => thirdparty}/opus/silk/fixed/LTP_analysis_filter_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/LTP_scale_ctrl_FIX.c (97%) rename {drivers => thirdparty}/opus/silk/fixed/apply_sine_window_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/autocorr_FIX.c (96%) rename {drivers => thirdparty}/opus/silk/fixed/burg_modified_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/corrMatrix_FIX.c (99%) rename {drivers => thirdparty}/opus/silk/fixed/encode_frame_FIX.c (99%) rename {drivers => thirdparty}/opus/silk/fixed/find_LPC_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/find_LTP_FIX.c (99%) rename {drivers => thirdparty}/opus/silk/fixed/find_pitch_lags_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/find_pred_coefs_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/k2a_FIX.c (97%) rename {drivers => thirdparty}/opus/silk/fixed/k2a_Q16_FIX.c (97%) rename {drivers => thirdparty}/opus/silk/fixed/main_FIX.h (99%) rename {drivers => thirdparty}/opus/silk/fixed/mips/noise_shape_analysis_FIX_mipsr1.h (100%) rename {drivers => thirdparty}/opus/silk/fixed/mips/prefilter_FIX_mipsr1.h (98%) rename {drivers => thirdparty}/opus/silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h (99%) rename {drivers => thirdparty}/opus/silk/fixed/noise_shape_analysis_FIX.c (99%) rename {drivers => thirdparty}/opus/silk/fixed/pitch_analysis_core_FIX.c (99%) rename {drivers => thirdparty}/opus/silk/fixed/prefilter_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/process_gains_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/regularize_correlations_FIX.c (97%) rename {drivers => thirdparty}/opus/silk/fixed/residual_energy16_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/residual_energy_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/schur64_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/schur_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/solve_LS_FIX.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/structs_FIX.h (98%) rename {drivers => thirdparty}/opus/silk/fixed/vector_ops_FIX.c (97%) rename {drivers => thirdparty}/opus/silk/fixed/warped_autocorrelation_FIX.c (97%) rename {drivers => thirdparty}/opus/silk/fixed/x86/burg_modified_FIX_sse.c (99%) rename {drivers => thirdparty}/opus/silk/fixed/x86/prefilter_FIX_sse.c (98%) rename {drivers => thirdparty}/opus/silk/fixed/x86/vector_ops_FIX_sse.c (96%) rename {drivers => thirdparty}/opus/silk/float/LPC_analysis_filter_FLP.c (99%) rename {drivers => thirdparty}/opus/silk/float/LPC_inv_pred_gain_FLP.c (96%) rename {drivers => thirdparty}/opus/silk/float/LTP_analysis_filter_FLP.c (98%) rename {drivers => thirdparty}/opus/silk/float/LTP_scale_ctrl_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/SigProc_FLP.h (99%) rename {drivers => thirdparty}/opus/silk/float/apply_sine_window_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/autocorrelation_FLP.c (96%) rename {drivers => thirdparty}/opus/silk/float/burg_modified_FLP.c (98%) rename {drivers => thirdparty}/opus/silk/float/bwexpander_FLP.c (96%) rename {drivers => thirdparty}/opus/silk/float/corrMatrix_FLP.c (98%) rename {drivers => thirdparty}/opus/silk/float/encode_frame_FLP.c (99%) rename {drivers => thirdparty}/opus/silk/float/energy_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/find_LPC_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/find_LTP_FLP.c (98%) rename {drivers => thirdparty}/opus/silk/float/find_pitch_lags_FLP.c (98%) rename {drivers => thirdparty}/opus/silk/float/find_pred_coefs_FLP.c (98%) rename {drivers => thirdparty}/opus/silk/float/inner_product_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/k2a_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/levinsondurbin_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/main_FLP.h (98%) rename {drivers => thirdparty}/opus/silk/float/noise_shape_analysis_FLP.c (99%) rename {drivers => thirdparty}/opus/silk/float/pitch_analysis_core_FLP.c (99%) rename {drivers => thirdparty}/opus/silk/float/prefilter_FLP.c (98%) rename {drivers => thirdparty}/opus/silk/float/process_gains_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/regularize_correlations_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/residual_energy_FLP.c (98%) rename {drivers => thirdparty}/opus/silk/float/scale_copy_vector_FLP.c (96%) rename {drivers => thirdparty}/opus/silk/float/scale_vector_FLP.c (96%) rename {drivers => thirdparty}/opus/silk/float/schur_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/solve_LS_FLP.c (98%) rename {drivers => thirdparty}/opus/silk/float/sort_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/structs_FLP.h (98%) rename {drivers => thirdparty}/opus/silk/float/warped_autocorrelation_FLP.c (97%) rename {drivers => thirdparty}/opus/silk/float/wrappers_FLP.c (99%) rename {drivers => thirdparty}/opus/silk/gain_quant.c (99%) rename {drivers => thirdparty}/opus/silk/init_decoder.c (97%) rename {drivers => thirdparty}/opus/silk/init_encoder.c (92%) rename {drivers => thirdparty}/opus/silk/inner_prod_aligned.c (96%) rename {drivers => thirdparty}/opus/silk/interpolate.c (97%) rename {drivers => thirdparty}/opus/silk/lin2log.c (96%) rename {drivers => thirdparty}/opus/silk/log2lin.c (97%) rename {drivers => thirdparty}/opus/silk/macros.h (96%) rename {drivers => thirdparty}/opus/silk/main.h (99%) rename {drivers => thirdparty}/opus/silk/mips/NSQ_del_dec_mipsr1.h (99%) rename {drivers => thirdparty}/opus/silk/mips/macros_mipsr1.h (100%) rename {drivers => thirdparty}/opus/silk/mips/sigproc_fix_mipsr1.h (100%) rename {drivers => thirdparty}/opus/silk/pitch_est_defines.h (99%) rename {drivers => thirdparty}/opus/silk/pitch_est_tables.c (97%) rename {drivers => thirdparty}/opus/silk/process_NLSFs.c (98%) rename {drivers => thirdparty}/opus/silk/quant_LTP_gains.c (98%) rename {drivers => thirdparty}/opus/silk/resampler.c (99%) rename {drivers => thirdparty}/opus/silk/resampler_down2.c (97%) rename {drivers => thirdparty}/opus/silk/resampler_down2_3.c (97%) rename {drivers => thirdparty}/opus/silk/resampler_private.h (97%) rename {drivers => thirdparty}/opus/silk/resampler_private_AR2.c (96%) rename {drivers => thirdparty}/opus/silk/resampler_private_IIR_FIR.c (97%) rename {drivers => thirdparty}/opus/silk/resampler_private_down_FIR.c (98%) rename {drivers => thirdparty}/opus/silk/resampler_private_up2_HQ.c (98%) rename {drivers => thirdparty}/opus/silk/resampler_rom.c (98%) rename {drivers => thirdparty}/opus/silk/resampler_rom.h (97%) rename {drivers => thirdparty}/opus/silk/resampler_structs.h (100%) rename {drivers => thirdparty}/opus/silk/shell_coder.c (99%) rename {drivers => thirdparty}/opus/silk/sigm_Q15.c (97%) rename {drivers => thirdparty}/opus/silk/sort.c (98%) rename {drivers => thirdparty}/opus/silk/stereo_LR_to_MS.c (99%) rename {drivers => thirdparty}/opus/silk/stereo_MS_to_LR.c (98%) rename {drivers => thirdparty}/opus/silk/stereo_decode_pred.c (98%) rename {drivers => thirdparty}/opus/silk/stereo_encode_pred.c (97%) rename {drivers => thirdparty}/opus/silk/stereo_find_predictor.c (98%) rename {drivers => thirdparty}/opus/silk/stereo_quant_pred.c (98%) rename {drivers => thirdparty}/opus/silk/structs.h (99%) rename {drivers => thirdparty}/opus/silk/sum_sqr_shift.c (97%) rename {drivers => thirdparty}/opus/silk/table_LSF_cos.c (98%) rename {drivers => thirdparty}/opus/silk/tables.h (99%) rename {drivers => thirdparty}/opus/silk/tables_LTP.c (99%) rename {drivers => thirdparty}/opus/silk/tables_NLSF_CB_NB_MB.c (99%) rename {drivers => thirdparty}/opus/silk/tables_NLSF_CB_WB.c (99%) rename {drivers => thirdparty}/opus/silk/tables_gain.c (97%) rename {drivers => thirdparty}/opus/silk/tables_other.c (97%) rename {drivers => thirdparty}/opus/silk/tables_pitch_lag.c (97%) rename {drivers => thirdparty}/opus/silk/tables_pulses_per_block.c (99%) rename {drivers => thirdparty}/opus/silk/tuning_parameters.h (100%) rename {drivers => thirdparty}/opus/silk/typedef.h (97%) rename {drivers => thirdparty}/opus/silk/x86/NSQ_del_dec_sse.c (99%) rename {drivers => thirdparty}/opus/silk/x86/NSQ_sse.c (99%) rename {drivers => thirdparty}/opus/silk/x86/SigProc_FIX_sse.h (99%) rename {drivers => thirdparty}/opus/silk/x86/VAD_sse.c (99%) rename {drivers => thirdparty}/opus/silk/x86/VQ_WMat_EC_sse.c (98%) rename {drivers => thirdparty}/opus/silk/x86/main_sse.h (99%) rename {drivers => thirdparty}/opus/silk/x86/x86_silk_map.c (97%) rename {drivers => thirdparty}/opus/stream.c (99%) rename {drivers => thirdparty}/opus/tansig_table.h (100%) rename {drivers => thirdparty}/opus/wincerts.c (98%) rename {drivers => thirdparty}/opus/winerrno.h (100%) diff --git a/SConstruct b/SConstruct index a5b7d19df90..2c92078ae7e 100644 --- a/SConstruct +++ b/SConstruct @@ -119,8 +119,9 @@ opts.Add('platform','Platform: '+str(platform_list)+'.',"") opts.Add('p','Platform (same as platform=).',"") opts.Add('tools','Build Tools (Including Editor): (yes/no)','yes') opts.Add('gdscript','Build GDSCript support: (yes/no)','yes') -opts.Add('vorbis','Build Ogg Vorbis Support: (yes/no)','yes') -opts.Add('opus','Build Opus Audio Format Support: (yes/no)','yes') +opts.Add('libogg','Ogg library for ogg container support (system/builtin)','builtin') +opts.Add('libvorbis','Ogg Vorbis library for vorbis support (system/builtin)','builtin') +opts.Add('opus','Opus and opusfile library for Opus format support: (system/builtin)','builtin') opts.Add('minizip','Build Minizip Archive Support: (yes/no)','yes') opts.Add('squish','Squish BC Texture Compression in editor (yes/no)','yes') opts.Add('theora','Theora Video (yes/no)','yes') @@ -335,11 +336,6 @@ if selected_platform in platform_list: if (env_base['squish']=='yes'): env.Append(CPPFLAGS=['-DSQUISH_ENABLED']); - if (env['vorbis']=='yes'): - env.Append(CPPFLAGS=['-DVORBIS_ENABLED']); - if (env['opus']=='yes'): - env.Append(CPPFLAGS=['-DOPUS_ENABLED']); - if (env['theora']=='yes'): env['theoralib']='yes' diff --git a/drivers/SCsub b/drivers/SCsub index 5effc6b2d41..26da90bfd1a 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -4,7 +4,6 @@ env_drivers = env.Clone() env.drivers_sources=[] #env.add_source_files(env.drivers_sources,"*.cpp") -env_drivers.Append(CPPPATH=["vorbis"]) Export('env_drivers') @@ -32,12 +31,6 @@ if (env["builtin_zlib"]=="yes"): SConscript("rtaudio/SCsub"); SConscript("nrex/SCsub"); SConscript("chibi/SCsub"); -if (env["vorbis"]=="yes" or env["theoralib"]=="yes" or env["opus"]=="yes"): - SConscript("ogg/SCsub"); -if (env["vorbis"]=="yes"): - SConscript("vorbis/SCsub"); -if (env["opus"]=="yes"): - SConscript('opus/SCsub'); if (env["tools"]=="yes"): SConscript("convex_decomp/SCsub"); diff --git a/drivers/ogg/SCsub b/drivers/ogg/SCsub deleted file mode 100644 index 3ee1bb6408c..00000000000 --- a/drivers/ogg/SCsub +++ /dev/null @@ -1,9 +0,0 @@ -Import('env') - -ogg_sources = [ - - "ogg/bitwise.c", - "ogg/framing.c", -] - -env.drivers_sources+=ogg_sources diff --git a/drivers/opus/SCsub b/drivers/opus/SCsub deleted file mode 100644 index bed8b496fcf..00000000000 --- a/drivers/opus/SCsub +++ /dev/null @@ -1,196 +0,0 @@ -Import('env') - -opus_sources = [ - "opus/audio_stream_opus.cpp", -] - -opus_sources_silk=[] - -opus_sources_lib = [ - "opus/silk/tables_other.c", - "opus/silk/sum_sqr_shift.c", - "opus/silk/PLC.c", - "opus/silk/dec_API.c", - "opus/silk/decode_pulses.c", - "opus/silk/inner_prod_aligned.c", - "opus/silk/init_encoder.c", - "opus/silk/interpolate.c", - "opus/silk/stereo_encode_pred.c", - "opus/silk/decode_frame.c", - "opus/silk/NLSF_del_dec_quant.c", - "opus/silk/VAD.c", - "opus/silk/resampler_private_AR2.c", - "opus/silk/NLSF_unpack.c", - "opus/silk/resampler_down2.c", - "opus/silk/sort.c", - "opus/silk/resampler_private_IIR_FIR.c", - "opus/silk/resampler_down2_3.c", - "opus/silk/resampler_private_up2_HQ.c", - "opus/silk/tables_gain.c", - "opus/silk/stereo_find_predictor.c", - "opus/silk/stereo_quant_pred.c", - "opus/silk/NLSF_stabilize.c", - "opus/silk/ana_filt_bank_1.c", - "opus/silk/check_control_input.c", - "opus/silk/bwexpander.c", - "opus/silk/A2NLSF.c", - "opus/silk/LPC_inv_pred_gain.c", - "opus/silk/log2lin.c", - "opus/silk/process_NLSFs.c", - "opus/silk/sigm_Q15.c", - "opus/silk/VQ_WMat_EC.c", - "opus/silk/quant_LTP_gains.c", - "opus/silk/resampler_private_down_FIR.c", - "opus/silk/NLSF_decode.c", - "opus/silk/control_codec.c", - "opus/silk/NLSF_VQ_weights_laroia.c", - "opus/silk/decode_pitch.c", - "opus/silk/stereo_decode_pred.c", - "opus/silk/tables_pulses_per_block.c", - "opus/silk/init_decoder.c", - "opus/silk/table_LSF_cos.c", - "opus/silk/decode_core.c", - "opus/silk/code_signs.c", - "opus/silk/enc_API.c", - "opus/silk/tables_LTP.c", - "opus/silk/pitch_est_tables.c", - "opus/silk/biquad_alt.c", - "opus/silk/encode_indices.c", - "opus/silk/tables_NLSF_CB_WB.c", - "opus/silk/debug.c", - "opus/silk/decode_parameters.c", - "opus/silk/tables_pitch_lag.c", - "opus/silk/NLSF2A.c", - "opus/silk/resampler.c", - "opus/silk/decode_indices.c", - "opus/silk/NLSF_VQ.c", - "opus/silk/bwexpander_32.c", - "opus/silk/tables_NLSF_CB_NB_MB.c", - "opus/silk/encode_pulses.c", - "opus/silk/NSQ_del_dec.c", - "opus/silk/control_SNR.c", - "opus/silk/shell_coder.c", - "opus/silk/NLSF_encode.c", - "opus/silk/stereo_MS_to_LR.c", - "opus/silk/stereo_LR_to_MS.c", - "opus/silk/HP_variable_cutoff.c", - "opus/silk/LPC_analysis_filter.c", - "opus/silk/CNG.c", - "opus/silk/decoder_set_fs.c", - "opus/silk/resampler_rom.c", - "opus/silk/control_audio_bandwidth.c", - "opus/silk/lin2log.c", - "opus/silk/LP_variable_cutoff.c", - "opus/silk/NSQ.c", - "opus/silk/gain_quant.c", - "opus/celt/laplace.c", - "opus/celt/vq.c", - "opus/celt/quant_bands.c", - "opus/celt/kiss_fft.c", - "opus/celt/entcode.c", - "opus/celt/entenc.c", - "opus/celt/celt_lpc.c", - "opus/celt/pitch.c", - "opus/celt/rate.c", - "opus/celt/mathops.c", - #"opus/celt/arm/armcpu.c", - #"opus/celt/arm/celt_neon_intr.c", - #"opus/celt/arm/celt_ne10_mdct.c", - #"opus/celt/arm/celt_ne10_fft.c", - #"opus/celt/arm/arm_celt_map.c", - "opus/celt/celt_encoder.c", - "opus/celt/celt.c", - "opus/celt/bands.c", - "opus/celt/cwrs.c", - "opus/celt/entdec.c", - "opus/celt/celt_decoder.c", - "opus/celt/mdct.c", - "opus/celt/modes.c", - "opus/repacketizer.c", - "opus/mlp_data.c", - "opus/opus_multistream.c", - "opus/opusfile.c", - "opus/opus_encoder.c", - "opus/analysis.c", - "opus/mlp.c", - "opus/info.c", - "opus/stream.c", - "opus/opus_decoder.c", - "opus/internal.c", - "opus/wincerts.c", - "opus/opus.c", - "opus/opus_multistream_encoder.c", - "opus/http.c", - "opus/opus_multistream_decoder.c" -] - -if("opus_fixed_point" in env and env.opus_fixed_point=="yes"): - env.Append(CFLAGS=["-DOPUS_FIXED_POINT"]) - opus_sources_silk = [ - "opus/silk/fixed/schur64_FIX.c", - "opus/silk/fixed/residual_energy16_FIX.c", - "opus/silk/fixed/encode_frame_FIX.c", - "opus/silk/fixed/regularize_correlations_FIX.c", - "opus/silk/fixed/apply_sine_window_FIX.c", - "opus/silk/fixed/solve_LS_FIX.c", - "opus/silk/fixed/schur_FIX.c", - "opus/silk/fixed/pitch_analysis_core_FIX.c", - "opus/silk/fixed/noise_shape_analysis_FIX.c", - "opus/silk/fixed/find_LTP_FIX.c", - "opus/silk/fixed/vector_ops_FIX.c", - "opus/silk/fixed/autocorr_FIX.c", - "opus/silk/fixed/warped_autocorrelation_FIX.c", - "opus/silk/fixed/find_pitch_lags_FIX.c", - "opus/silk/fixed/k2a_Q16_FIX.c", - "opus/silk/fixed/LTP_scale_ctrl_FIX.c", - "opus/silk/fixed/corrMatrix_FIX.c", - "opus/silk/fixed/prefilter_FIX.c", - "opus/silk/fixed/find_LPC_FIX.c", - "opus/silk/fixed/residual_energy_FIX.c", - "opus/silk/fixed/process_gains_FIX.c", - "opus/silk/fixed/LTP_analysis_filter_FIX.c", - "opus/silk/fixed/k2a_FIX.c", - "opus/silk/fixed/burg_modified_FIX.c", - "opus/silk/fixed/find_pred_coefs_FIX.c" - ] -else: - opus_sources_silk = [ - "opus/silk/float/LTP_scale_ctrl_FLP.c", - "opus/silk/float/regularize_correlations_FLP.c", - "opus/silk/float/corrMatrix_FLP.c", - "opus/silk/float/LPC_analysis_filter_FLP.c", - "opus/silk/float/levinsondurbin_FLP.c", - "opus/silk/float/schur_FLP.c", - "opus/silk/float/scale_vector_FLP.c", - "opus/silk/float/apply_sine_window_FLP.c", - "opus/silk/float/pitch_analysis_core_FLP.c", - "opus/silk/float/wrappers_FLP.c", - "opus/silk/float/bwexpander_FLP.c", - "opus/silk/float/warped_autocorrelation_FLP.c", - "opus/silk/float/solve_LS_FLP.c", - "opus/silk/float/find_LPC_FLP.c", - "opus/silk/float/autocorrelation_FLP.c", - "opus/silk/float/find_pred_coefs_FLP.c", - "opus/silk/float/find_pitch_lags_FLP.c", - "opus/silk/float/burg_modified_FLP.c", - "opus/silk/float/find_LTP_FLP.c", - "opus/silk/float/energy_FLP.c", - "opus/silk/float/sort_FLP.c", - "opus/silk/float/LPC_inv_pred_gain_FLP.c", - "opus/silk/float/k2a_FLP.c", - "opus/silk/float/noise_shape_analysis_FLP.c", - "opus/silk/float/inner_product_FLP.c", - "opus/silk/float/process_gains_FLP.c", - "opus/silk/float/encode_frame_FLP.c", - "opus/silk/float/scale_copy_vector_FLP.c", - "opus/silk/float/residual_energy_FLP.c", - "opus/silk/float/LTP_analysis_filter_FLP.c", - "opus/silk/float/prefilter_FLP.c" - ] - - -env.drivers_sources+=opus_sources_silk -env.drivers_sources+=opus_sources_lib -env.drivers_sources+=opus_sources - -Export('env') diff --git a/drivers/register_driver_types.cpp b/drivers/register_driver_types.cpp index cd4fcd18f26..14af9ac1a6d 100644 --- a/drivers/register_driver_types.cpp +++ b/drivers/register_driver_types.cpp @@ -45,18 +45,6 @@ #include "platform/windows/export/export.h" #endif -#ifdef TREMOR_ENABLED -#include "teora/audio_stream_ogg.h" -#endif - -#ifdef VORBIS_ENABLED -#include "vorbis/audio_stream_ogg_vorbis.h" -#endif - -#ifdef OPUS_ENABLED -#include "opus/audio_stream_opus.h" -#endif - #ifdef THEORA_ENABLED #include "theora/video_stream_theora.h" #endif @@ -71,18 +59,6 @@ static ImageLoaderPNG *image_loader_png=NULL; static ResourceSaverPNG *resource_saver_png=NULL; -#ifdef TREMOR_ENABLED -static ResourceFormatLoaderAudioStreamOGG *vorbis_stream_loader=NULL; -#endif - -#ifdef VORBIS_ENABLED -static ResourceFormatLoaderAudioStreamOGGVorbis *vorbis_stream_loader=NULL; -#endif - -#ifdef OPUS_ENABLED -static ResourceFormatLoaderAudioStreamOpus *opus_stream_loader=NULL; -#endif - #ifdef THEORA_ENABLED static ResourceFormatLoaderVideoStreamTheora* theora_stream_loader = NULL; #endif @@ -118,24 +94,6 @@ void unregister_core_driver_types() { void register_driver_types() { -#ifdef TREMOR_ENABLED - vorbis_stream_loader=memnew( ResourceFormatLoaderAudioStreamOGG ); - ResourceLoader::add_resource_format_loader(vorbis_stream_loader ); - ObjectTypeDB::register_type(); -#endif - -#ifdef VORBIS_ENABLED - vorbis_stream_loader=memnew( ResourceFormatLoaderAudioStreamOGGVorbis ); - ResourceLoader::add_resource_format_loader(vorbis_stream_loader ); - ObjectTypeDB::register_type(); -#endif - -#ifdef OPUS_ENABLED - opus_stream_loader=memnew( ResourceFormatLoaderAudioStreamOpus ); - ResourceLoader::add_resource_format_loader( opus_stream_loader ); - ObjectTypeDB::register_type(); -#endif - #ifdef TOOLS_ENABLED Geometry::_decompose_func=b2d_decompose; @@ -174,19 +132,6 @@ void register_driver_types() { void unregister_driver_types() { - -#ifdef TREMOR_ENABLED - memdelete( vorbis_stream_loader ); -#endif - -#ifdef VORBIS_ENABLED - memdelete( vorbis_stream_loader ); -#endif - -#ifdef OPUS_ENABLED - memdelete( opus_stream_loader ); -#endif - #ifdef THEORA_ENABLED memdelete (theora_stream_loader); #endif diff --git a/drivers/vorbis/SCsub b/drivers/vorbis/SCsub deleted file mode 100644 index 4afafcc4ba2..00000000000 --- a/drivers/vorbis/SCsub +++ /dev/null @@ -1,36 +0,0 @@ -Import('env') - -sources = [ - "vorbis/audio_stream_ogg_vorbis.cpp", -] - -sources_lib = [ - #"vorbis/analysis.c", - #"vorbis/barkmel.c", - "vorbis/bitrate.c", - "vorbis/block.c", - "vorbis/codebook.c", - "vorbis/envelope.c", - "vorbis/floor0.c", - "vorbis/floor1.c", - "vorbis/info.c", - "vorbis/lookup.c", - "vorbis/lpc.c", - "vorbis/lsp.c", - "vorbis/mapping0.c", - "vorbis/mdct.c", - "vorbis/psy.c", - #"vorbis/psytune.c", - "vorbis/registry.c", - "vorbis/res0.c", - "vorbis/sharedbook.c", - "vorbis/smallft.c", - "vorbis/synthesis.c", - #"vorbis/tone.c", - #"vorbis/vorbisenc.c", - "vorbis/vorbisfile.c", - "vorbis/window.c", -] - -env.drivers_sources += sources -env.drivers_sources += sources_lib diff --git a/modules/ogg/SCsub b/modules/ogg/SCsub new file mode 100644 index 00000000000..42d593f88e4 --- /dev/null +++ b/modules/ogg/SCsub @@ -0,0 +1,20 @@ +Import('env') +Import('env_modules') + +# Thirdparty source files +if (env["libogg"] != "system"): # builtin + thirdparty_dir = "#thirdparty/libogg/" + thirdparty_libogg_sources = [ + "bitwise.c", + "framing.c", + ] + thirdparty_libogg_sources = [thirdparty_dir + file for file in thirdparty_libogg_sources] + + env_modules.add_source_files(env.modules_sources, thirdparty_libogg_sources) + env_modules.Append(CPPPATH = [thirdparty_dir]) + +# Godot source files +env_modules.add_source_files(env.modules_sources, "*.cpp") + +Export('env_modules') +Export('env') diff --git a/modules/ogg/config.py b/modules/ogg/config.py new file mode 100644 index 00000000000..368e97e152c --- /dev/null +++ b/modules/ogg/config.py @@ -0,0 +1,6 @@ + +def can_build(platform): + return True + +def configure(env): + pass diff --git a/modules/ogg/register_types.cpp b/modules/ogg/register_types.cpp new file mode 100644 index 00000000000..823ca510caa --- /dev/null +++ b/modules/ogg/register_types.cpp @@ -0,0 +1,35 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "register_types.h" + +// Dummy module as libogg is needed by other modules (vorbis, theora, opus, ...) + +void register_ogg_types() {} + +void unregister_ogg_types() {} diff --git a/modules/ogg/register_types.h b/modules/ogg/register_types.h new file mode 100644 index 00000000000..b5268a1df41 --- /dev/null +++ b/modules/ogg/register_types.h @@ -0,0 +1,30 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_ogg_types(); +void unregister_ogg_types(); diff --git a/modules/opus/SCsub b/modules/opus/SCsub new file mode 100644 index 00000000000..a18e008fe0b --- /dev/null +++ b/modules/opus/SCsub @@ -0,0 +1,211 @@ +Import('env') +Import('env_modules') + +# Thirdparty source files +if (env["opus"] != "system"): # builtin + thirdparty_dir = "#thirdparty/opus/" + + thirdparty_opus_sources = [ + "silk/tables_other.c", + "silk/sum_sqr_shift.c", + "silk/PLC.c", + "silk/dec_API.c", + "silk/decode_pulses.c", + "silk/inner_prod_aligned.c", + "silk/init_encoder.c", + "silk/interpolate.c", + "silk/stereo_encode_pred.c", + "silk/decode_frame.c", + "silk/NLSF_del_dec_quant.c", + "silk/VAD.c", + "silk/resampler_private_AR2.c", + "silk/NLSF_unpack.c", + "silk/resampler_down2.c", + "silk/sort.c", + "silk/resampler_private_IIR_FIR.c", + "silk/resampler_down2_3.c", + "silk/resampler_private_up2_HQ.c", + "silk/tables_gain.c", + "silk/stereo_find_predictor.c", + "silk/stereo_quant_pred.c", + "silk/NLSF_stabilize.c", + "silk/ana_filt_bank_1.c", + "silk/check_control_input.c", + "silk/bwexpander.c", + "silk/A2NLSF.c", + "silk/LPC_inv_pred_gain.c", + "silk/log2lin.c", + "silk/process_NLSFs.c", + "silk/sigm_Q15.c", + "silk/VQ_WMat_EC.c", + "silk/quant_LTP_gains.c", + "silk/resampler_private_down_FIR.c", + "silk/NLSF_decode.c", + "silk/control_codec.c", + "silk/NLSF_VQ_weights_laroia.c", + "silk/decode_pitch.c", + "silk/stereo_decode_pred.c", + "silk/tables_pulses_per_block.c", + "silk/init_decoder.c", + "silk/table_LSF_cos.c", + "silk/decode_core.c", + "silk/code_signs.c", + "silk/enc_API.c", + "silk/tables_LTP.c", + "silk/pitch_est_tables.c", + "silk/biquad_alt.c", + "silk/encode_indices.c", + "silk/tables_NLSF_CB_WB.c", + "silk/debug.c", + "silk/decode_parameters.c", + "silk/tables_pitch_lag.c", + "silk/NLSF2A.c", + "silk/resampler.c", + "silk/decode_indices.c", + "silk/NLSF_VQ.c", + "silk/bwexpander_32.c", + "silk/tables_NLSF_CB_NB_MB.c", + "silk/encode_pulses.c", + "silk/NSQ_del_dec.c", + "silk/control_SNR.c", + "silk/shell_coder.c", + "silk/NLSF_encode.c", + "silk/stereo_MS_to_LR.c", + "silk/stereo_LR_to_MS.c", + "silk/HP_variable_cutoff.c", + "silk/LPC_analysis_filter.c", + "silk/CNG.c", + "silk/decoder_set_fs.c", + "silk/resampler_rom.c", + "silk/control_audio_bandwidth.c", + "silk/lin2log.c", + "silk/LP_variable_cutoff.c", + "silk/NSQ.c", + "silk/gain_quant.c", + "celt/laplace.c", + "celt/vq.c", + "celt/quant_bands.c", + "celt/kiss_fft.c", + "celt/entcode.c", + "celt/entenc.c", + "celt/celt_lpc.c", + "celt/pitch.c", + "celt/rate.c", + "celt/mathops.c", + #"celt/arm/armcpu.c", + #"celt/arm/celt_neon_intr.c", + #"celt/arm/celt_ne10_mdct.c", + #"celt/arm/celt_ne10_fft.c", + #"celt/arm/arm_celt_map.c", + "celt/celt_encoder.c", + "celt/celt.c", + "celt/bands.c", + "celt/cwrs.c", + "celt/entdec.c", + "celt/celt_decoder.c", + "celt/mdct.c", + "celt/modes.c", + "repacketizer.c", + "mlp_data.c", + "opus_multistream.c", + "opusfile.c", + "opus_encoder.c", + "analysis.c", + "mlp.c", + "info.c", + "stream.c", + "opus_decoder.c", + "internal.c", + "wincerts.c", + "opus.c", + "opus_multistream_encoder.c", + "http.c", + "opus_multistream_decoder.c" + ] + + opus_sources_silk = [] + + if("opus_fixed_point" in env and env.opus_fixed_point=="yes"): + env_modules.Append(CFLAGS = ["-DFIXED_POINT"]) + opus_sources_silk = [ + "silk/fixed/schur64_FIX.c", + "silk/fixed/residual_energy16_FIX.c", + "silk/fixed/encode_frame_FIX.c", + "silk/fixed/regularize_correlations_FIX.c", + "silk/fixed/apply_sine_window_FIX.c", + "silk/fixed/solve_LS_FIX.c", + "silk/fixed/schur_FIX.c", + "silk/fixed/pitch_analysis_core_FIX.c", + "silk/fixed/noise_shape_analysis_FIX.c", + "silk/fixed/find_LTP_FIX.c", + "silk/fixed/vector_ops_FIX.c", + "silk/fixed/autocorr_FIX.c", + "silk/fixed/warped_autocorrelation_FIX.c", + "silk/fixed/find_pitch_lags_FIX.c", + "silk/fixed/k2a_Q16_FIX.c", + "silk/fixed/LTP_scale_ctrl_FIX.c", + "silk/fixed/corrMatrix_FIX.c", + "silk/fixed/prefilter_FIX.c", + "silk/fixed/find_LPC_FIX.c", + "silk/fixed/residual_energy_FIX.c", + "silk/fixed/process_gains_FIX.c", + "silk/fixed/LTP_analysis_filter_FIX.c", + "silk/fixed/k2a_FIX.c", + "silk/fixed/burg_modified_FIX.c", + "silk/fixed/find_pred_coefs_FIX.c" + ] + else: + opus_sources_silk = [ + "silk/float/LTP_scale_ctrl_FLP.c", + "silk/float/regularize_correlations_FLP.c", + "silk/float/corrMatrix_FLP.c", + "silk/float/LPC_analysis_filter_FLP.c", + "silk/float/levinsondurbin_FLP.c", + "silk/float/schur_FLP.c", + "silk/float/scale_vector_FLP.c", + "silk/float/apply_sine_window_FLP.c", + "silk/float/pitch_analysis_core_FLP.c", + "silk/float/wrappers_FLP.c", + "silk/float/bwexpander_FLP.c", + "silk/float/warped_autocorrelation_FLP.c", + "silk/float/solve_LS_FLP.c", + "silk/float/find_LPC_FLP.c", + "silk/float/autocorrelation_FLP.c", + "silk/float/find_pred_coefs_FLP.c", + "silk/float/find_pitch_lags_FLP.c", + "silk/float/burg_modified_FLP.c", + "silk/float/find_LTP_FLP.c", + "silk/float/energy_FLP.c", + "silk/float/sort_FLP.c", + "silk/float/LPC_inv_pred_gain_FLP.c", + "silk/float/k2a_FLP.c", + "silk/float/noise_shape_analysis_FLP.c", + "silk/float/inner_product_FLP.c", + "silk/float/process_gains_FLP.c", + "silk/float/encode_frame_FLP.c", + "silk/float/scale_copy_vector_FLP.c", + "silk/float/residual_energy_FLP.c", + "silk/float/LTP_analysis_filter_FLP.c", + "silk/float/prefilter_FLP.c" + ] + + thirdparty_opus_sources = [thirdparty_dir + file for file in thirdparty_opus_sources + opus_sources_silk] + + env_modules.add_source_files(env.modules_sources, thirdparty_opus_sources) + # FIXME: Clone the environment to make a env_opus and not pollute the modules env + env_modules.Append(CFLAGS=["-DHAVE_CONFIG_H"]) + + thirdparty_include_paths = [ + "", + "celt", + "silk", + "silk/fixed", + "silk/float", + ] + env_modules.Append(CPPPATH = [thirdparty_dir + "/" + dir for dir in thirdparty_include_paths]) + +# Module files +env_modules.add_source_files(env.modules_sources, "*.cpp") + +Export('env_modules') +Export('env') diff --git a/drivers/opus/audio_stream_opus.cpp b/modules/opus/audio_stream_opus.cpp similarity index 100% rename from drivers/opus/audio_stream_opus.cpp rename to modules/opus/audio_stream_opus.cpp diff --git a/drivers/opus/audio_stream_opus.h b/modules/opus/audio_stream_opus.h similarity index 98% rename from drivers/opus/audio_stream_opus.h rename to modules/opus/audio_stream_opus.h index fc5531470d1..4da66fe1672 100644 --- a/drivers/opus/audio_stream_opus.h +++ b/modules/opus/audio_stream_opus.h @@ -32,11 +32,11 @@ #ifndef AUDIO_STREAM_OPUS_H #define AUDIO_STREAM_OPUS_H -#include "scene/resources/audio_stream.h" -#include "opus/opusfile.h" -#include "opus/internal.h" -#include "os/file_access.h" #include "io/resource_loader.h" +#include "os/file_access.h" +#include "scene/resources/audio_stream.h" + +#include class AudioStreamPlaybackOpus : public AudioStreamPlayback { diff --git a/modules/opus/config.py b/modules/opus/config.py new file mode 100644 index 00000000000..368e97e152c --- /dev/null +++ b/modules/opus/config.py @@ -0,0 +1,6 @@ + +def can_build(platform): + return True + +def configure(env): + pass diff --git a/modules/opus/register_types.cpp b/modules/opus/register_types.cpp new file mode 100644 index 00000000000..a4d71a52c77 --- /dev/null +++ b/modules/opus/register_types.cpp @@ -0,0 +1,45 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "register_types.h" + +#include "audio_stream_opus.h" + +static ResourceFormatLoaderAudioStreamOpus *opus_stream_loader = NULL; + +void register_opus_types() { + + opus_stream_loader = memnew( ResourceFormatLoaderAudioStreamOpus ); + ResourceLoader::add_resource_format_loader(opus_stream_loader); + ObjectTypeDB::register_type(); +} + +void unregister_opus_types() { + + memdelete( opus_stream_loader ); +} diff --git a/modules/opus/register_types.h b/modules/opus/register_types.h new file mode 100644 index 00000000000..f4386c373a7 --- /dev/null +++ b/modules/opus/register_types.h @@ -0,0 +1,30 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_opus_types(); +void unregister_opus_types(); diff --git a/modules/vorbis/SCsub b/modules/vorbis/SCsub new file mode 100644 index 00000000000..5427348c394 --- /dev/null +++ b/modules/vorbis/SCsub @@ -0,0 +1,44 @@ +Import('env') +Import('env_modules') + +# Thirdparty source files +if (env["libvorbis"] != "system"): # builtin + thirdparty_dir = "#thirdparty/libvorbis/" + thirdparty_libvorbis_sources = [ + #"analysis.c", + #"barkmel.c", + "bitrate.c", + "block.c", + "codebook.c", + "envelope.c", + "floor0.c", + "floor1.c", + "info.c", + "lookup.c", + "lpc.c", + "lsp.c", + "mapping0.c", + "mdct.c", + "psy.c", + #"psytune.c", + "registry.c", + "res0.c", + "sharedbook.c", + "smallft.c", + "synthesis.c", + #"tone.c", + #"vorbisenc.c", + "vorbisfile.c", + "window.c", + ] + + thirdparty_libvorbis_sources = [thirdparty_dir + file for file in thirdparty_libvorbis_sources] + + env_modules.add_source_files(env.modules_sources, thirdparty_libvorbis_sources) + env_modules.Append(CPPPATH = [thirdparty_dir]) + +# Godot source files +env_modules.add_source_files(env.modules_sources, "*.cpp") + +Export('env_modules') +Export('env') diff --git a/drivers/vorbis/audio_stream_ogg_vorbis.cpp b/modules/vorbis/audio_stream_ogg_vorbis.cpp similarity index 100% rename from drivers/vorbis/audio_stream_ogg_vorbis.cpp rename to modules/vorbis/audio_stream_ogg_vorbis.cpp diff --git a/drivers/vorbis/audio_stream_ogg_vorbis.h b/modules/vorbis/audio_stream_ogg_vorbis.h similarity index 99% rename from drivers/vorbis/audio_stream_ogg_vorbis.h rename to modules/vorbis/audio_stream_ogg_vorbis.h index bb4d521c1e2..8d8d7392b5d 100644 --- a/drivers/vorbis/audio_stream_ogg_vorbis.h +++ b/modules/vorbis/audio_stream_ogg_vorbis.h @@ -29,12 +29,12 @@ #ifndef AUDIO_STREAM_OGG_VORBIS_H #define AUDIO_STREAM_OGG_VORBIS_H -#include "scene/resources/audio_stream.h" -#include "vorbis/vorbisfile.h" -#include "os/file_access.h" #include "io/resource_loader.h" +#include "os/file_access.h" #include "os/thread_safe.h" +#include "scene/resources/audio_stream.h" +#include class AudioStreamPlaybackOGGVorbis : public AudioStreamPlayback { diff --git a/modules/vorbis/config.py b/modules/vorbis/config.py new file mode 100644 index 00000000000..368e97e152c --- /dev/null +++ b/modules/vorbis/config.py @@ -0,0 +1,6 @@ + +def can_build(platform): + return True + +def configure(env): + pass diff --git a/modules/vorbis/register_types.cpp b/modules/vorbis/register_types.cpp new file mode 100644 index 00000000000..ae63b5af3c4 --- /dev/null +++ b/modules/vorbis/register_types.cpp @@ -0,0 +1,45 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "register_types.h" + +#include "audio_stream_ogg_vorbis.h" + +static ResourceFormatLoaderAudioStreamOGGVorbis *vorbis_stream_loader = NULL; + +void register_vorbis_types() { + + vorbis_stream_loader = memnew( ResourceFormatLoaderAudioStreamOGGVorbis ); + ResourceLoader::add_resource_format_loader(vorbis_stream_loader); + ObjectTypeDB::register_type(); +} + +void unregister_vorbis_types() { + + memdelete( vorbis_stream_loader ); +} diff --git a/modules/vorbis/register_types.h b/modules/vorbis/register_types.h new file mode 100644 index 00000000000..6baaed7ce88 --- /dev/null +++ b/modules/vorbis/register_types.h @@ -0,0 +1,30 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_vorbis_types(); +void unregister_vorbis_types(); diff --git a/platform/android/detect.py b/platform/android/detect.py index 8e9a58da197..9087d5343e1 100644 --- a/platform/android/detect.py +++ b/platform/android/detect.py @@ -203,7 +203,8 @@ def configure(env): env.Append(CPPFLAGS=['-DANDROID_ENABLED', '-DUNIX_ENABLED', '-DNO_FCNTL','-DMPC_FIXED_POINT']) # env.Append(CPPFLAGS=['-DANDROID_ENABLED', '-DUNIX_ENABLED','-DMPC_FIXED_POINT']) - if(env["opus"]=="yes"): + # TODO: Move that to opus module's config + if("module_opus_enabled" in env and env["module_opus_enabled"] != "no"): if (env["android_arch"]=="armv6" or env["android_arch"]=="armv7"): env.Append(CFLAGS=["-DOPUS_ARM_OPT"]) env.opus_fixed_point="yes" diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py index 9cb52d45612..3de0ba0db9d 100644 --- a/platform/iphone/detect.py +++ b/platform/iphone/detect.py @@ -165,7 +165,8 @@ def configure(env): env['ENV']['CODESIGN_ALLOCATE'] = '/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate' env.Append(CPPFLAGS=['-DIPHONE_ENABLED', '-DUNIX_ENABLED', '-DGLES2_ENABLED', '-DMPC_FIXED_POINT']) - if(env["opus"]=="yes"): + # TODO: Move that to opus module's config + if("module_opus_enabled" in env and env["module_opus_enabled"] != "no"): env.opus_fixed_point="yes" if env["arch"]=="x86": pass diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index 0f1fd23177e..f80c3b4915d 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -70,8 +70,9 @@ def configure(env): #env.Append(CCFLAGS=['-D_DEBUG', '-Wall', '-g4', '-DDEBUG_ENABLED']) env.Append(CPPFLAGS=['-DDEBUG_MEMORY_ALLOC']) - if(env["opus"]=="yes"): - env.opus_fixed_point="yes" + # TODO: Move that to opus module's config + if("module_opus_enabled" in env and env["module_opus_enabled"] != "no"): + env.opus_fixed_point = "yes" env.Append(CPPFLAGS=["-fno-exceptions",'-DNO_SAFE_CAST','-fno-rtti']) env.Append(CPPFLAGS=['-DJAVASCRIPT_ENABLED', '-DUNIX_ENABLED', '-DPTHREAD_NO_RENAME', '-DNO_FCNTL','-DMPC_FIXED_POINT','-DTYPED_METHOD_BIND','-DNO_THREADS']) diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 6a5ca84cbe8..8a156a6bce2 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -155,6 +155,17 @@ def configure(env): if (env["enet"] == "system"): env.ParseConfig('pkg-config libenet --cflags --libs') + if (env["libogg"] == "system"): + env.ParseConfig('pkg-config ogg --cflags --libs') + + if (env["libvorbis"] == "system"): + env["libogg"] = "system" # Needed to link against system libvorbis + env.ParseConfig('pkg-config vorbis vorbisfile ogg --cflags --libs') + + if (env["opus"] == "system"): + env["libogg"] = "system" # Needed to link against system opus + env.ParseConfig('pkg-config opus opusfile ogg --cflags --libs') + env.Append(CPPFLAGS=['-DOPENGL_ENABLED']) diff --git a/thirdparty/README.md b/thirdparty/README.md index b3aebb51800..be4d717bfef 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -29,6 +29,19 @@ Files extracted from upstream source: - jpgd.{c,h} +## libogg + +- Upstream: https://www.xiph.org/ogg +- Version: 1.3.2 +- License: BSD-3-Clause + +Files extracted from upstream source: + +- src/\*.c +- include/ogg/\*.h in ogg/ +- COPYING + + ## libpng - Upstream: http://libpng.org/pub/png/libpng.html @@ -44,6 +57,19 @@ Files extracted from upstream source: - scripts/pnglibconf.h.prebuilt as pnglibconf.h +## libvorbis + +- Upstream: https://www.xiph.org/vorbis +- Version: 1.3.5 +- License: BSD-3-Clause + +Files extracted from upstream source: + +- src/\* except from: lookups.pl, Makefile.\* +- include/vorbis/\*.h as vorbis/ +- COPYING + + ## libwebp - Upstream: https://chromium.googlesource.com/webm/libwebp/ @@ -60,6 +86,20 @@ changes to ensure they build for Javascript/HTML5. Those changes are marked with `// -- GODOT --` comments. +## opus + +- Upstream: https://opus-codec.org +- Version: 1.1.2 (opus) and 0.7 (opusfile) +- License: BSD-3-Clause + +Files extracted from upstream source: + +- all .c and .h files in src/ (both opus and opusfile), + except opus_demo.c +- all .h files in include/ (both opus and opusfile) +- COPYING + + ## pvrtccompressor - Upstream: https://bitbucket.org/jthlim/pvrtccompressor diff --git a/drivers/ogg/COPYING b/thirdparty/libogg/COPYING similarity index 100% rename from drivers/ogg/COPYING rename to thirdparty/libogg/COPYING diff --git a/drivers/ogg/bitwise.c b/thirdparty/libogg/bitwise.c similarity index 100% rename from drivers/ogg/bitwise.c rename to thirdparty/libogg/bitwise.c diff --git a/drivers/ogg/framing.c b/thirdparty/libogg/framing.c similarity index 100% rename from drivers/ogg/framing.c rename to thirdparty/libogg/framing.c diff --git a/drivers/ogg/config_types.h b/thirdparty/libogg/ogg/config_types.h similarity index 100% rename from drivers/ogg/config_types.h rename to thirdparty/libogg/ogg/config_types.h diff --git a/drivers/ogg/ogg.h b/thirdparty/libogg/ogg/ogg.h similarity index 100% rename from drivers/ogg/ogg.h rename to thirdparty/libogg/ogg/ogg.h diff --git a/drivers/ogg/os_types.h b/thirdparty/libogg/ogg/os_types.h similarity index 100% rename from drivers/ogg/os_types.h rename to thirdparty/libogg/ogg/os_types.h diff --git a/drivers/vorbis/COPYING b/thirdparty/libvorbis/COPYING similarity index 100% rename from drivers/vorbis/COPYING rename to thirdparty/libvorbis/COPYING diff --git a/drivers/vorbis/analysis.c b/thirdparty/libvorbis/analysis.c similarity index 100% rename from drivers/vorbis/analysis.c rename to thirdparty/libvorbis/analysis.c diff --git a/drivers/vorbis/backends.h b/thirdparty/libvorbis/backends.h similarity index 100% rename from drivers/vorbis/backends.h rename to thirdparty/libvorbis/backends.h diff --git a/drivers/vorbis/barkmel.c b/thirdparty/libvorbis/barkmel.c similarity index 100% rename from drivers/vorbis/barkmel.c rename to thirdparty/libvorbis/barkmel.c diff --git a/drivers/vorbis/bitrate.c b/thirdparty/libvorbis/bitrate.c similarity index 100% rename from drivers/vorbis/bitrate.c rename to thirdparty/libvorbis/bitrate.c diff --git a/drivers/vorbis/bitrate.h b/thirdparty/libvorbis/bitrate.h similarity index 100% rename from drivers/vorbis/bitrate.h rename to thirdparty/libvorbis/bitrate.h diff --git a/drivers/vorbis/block.c b/thirdparty/libvorbis/block.c similarity index 100% rename from drivers/vorbis/block.c rename to thirdparty/libvorbis/block.c diff --git a/drivers/vorbis/books/coupled/res_books_51.h b/thirdparty/libvorbis/books/coupled/res_books_51.h similarity index 100% rename from drivers/vorbis/books/coupled/res_books_51.h rename to thirdparty/libvorbis/books/coupled/res_books_51.h diff --git a/drivers/vorbis/books/coupled/res_books_stereo.h b/thirdparty/libvorbis/books/coupled/res_books_stereo.h similarity index 100% rename from drivers/vorbis/books/coupled/res_books_stereo.h rename to thirdparty/libvorbis/books/coupled/res_books_stereo.h diff --git a/drivers/vorbis/books/floor/floor_books.h b/thirdparty/libvorbis/books/floor/floor_books.h similarity index 100% rename from drivers/vorbis/books/floor/floor_books.h rename to thirdparty/libvorbis/books/floor/floor_books.h diff --git a/drivers/vorbis/books/uncoupled/res_books_uncoupled.h b/thirdparty/libvorbis/books/uncoupled/res_books_uncoupled.h similarity index 100% rename from drivers/vorbis/books/uncoupled/res_books_uncoupled.h rename to thirdparty/libvorbis/books/uncoupled/res_books_uncoupled.h diff --git a/drivers/vorbis/codebook.c b/thirdparty/libvorbis/codebook.c similarity index 100% rename from drivers/vorbis/codebook.c rename to thirdparty/libvorbis/codebook.c diff --git a/drivers/vorbis/codebook.h b/thirdparty/libvorbis/codebook.h similarity index 100% rename from drivers/vorbis/codebook.h rename to thirdparty/libvorbis/codebook.h diff --git a/drivers/vorbis/codec_internal.h b/thirdparty/libvorbis/codec_internal.h similarity index 100% rename from drivers/vorbis/codec_internal.h rename to thirdparty/libvorbis/codec_internal.h diff --git a/drivers/vorbis/envelope.c b/thirdparty/libvorbis/envelope.c similarity index 100% rename from drivers/vorbis/envelope.c rename to thirdparty/libvorbis/envelope.c diff --git a/drivers/vorbis/envelope.h b/thirdparty/libvorbis/envelope.h similarity index 100% rename from drivers/vorbis/envelope.h rename to thirdparty/libvorbis/envelope.h diff --git a/drivers/vorbis/floor0.c b/thirdparty/libvorbis/floor0.c similarity index 100% rename from drivers/vorbis/floor0.c rename to thirdparty/libvorbis/floor0.c diff --git a/drivers/vorbis/floor1.c b/thirdparty/libvorbis/floor1.c similarity index 100% rename from drivers/vorbis/floor1.c rename to thirdparty/libvorbis/floor1.c diff --git a/drivers/vorbis/highlevel.h b/thirdparty/libvorbis/highlevel.h similarity index 100% rename from drivers/vorbis/highlevel.h rename to thirdparty/libvorbis/highlevel.h diff --git a/drivers/vorbis/info.c b/thirdparty/libvorbis/info.c similarity index 100% rename from drivers/vorbis/info.c rename to thirdparty/libvorbis/info.c diff --git a/drivers/vorbis/lookup.c b/thirdparty/libvorbis/lookup.c similarity index 100% rename from drivers/vorbis/lookup.c rename to thirdparty/libvorbis/lookup.c diff --git a/drivers/vorbis/lookup.h b/thirdparty/libvorbis/lookup.h similarity index 100% rename from drivers/vorbis/lookup.h rename to thirdparty/libvorbis/lookup.h diff --git a/drivers/vorbis/lookup_data.h b/thirdparty/libvorbis/lookup_data.h similarity index 100% rename from drivers/vorbis/lookup_data.h rename to thirdparty/libvorbis/lookup_data.h diff --git a/drivers/vorbis/lpc.c b/thirdparty/libvorbis/lpc.c similarity index 100% rename from drivers/vorbis/lpc.c rename to thirdparty/libvorbis/lpc.c diff --git a/drivers/vorbis/lpc.h b/thirdparty/libvorbis/lpc.h similarity index 100% rename from drivers/vorbis/lpc.h rename to thirdparty/libvorbis/lpc.h diff --git a/drivers/vorbis/lsp.c b/thirdparty/libvorbis/lsp.c similarity index 100% rename from drivers/vorbis/lsp.c rename to thirdparty/libvorbis/lsp.c diff --git a/drivers/vorbis/lsp.h b/thirdparty/libvorbis/lsp.h similarity index 100% rename from drivers/vorbis/lsp.h rename to thirdparty/libvorbis/lsp.h diff --git a/drivers/vorbis/mapping0.c b/thirdparty/libvorbis/mapping0.c similarity index 100% rename from drivers/vorbis/mapping0.c rename to thirdparty/libvorbis/mapping0.c diff --git a/drivers/vorbis/masking.h b/thirdparty/libvorbis/masking.h similarity index 100% rename from drivers/vorbis/masking.h rename to thirdparty/libvorbis/masking.h diff --git a/drivers/vorbis/mdct.c b/thirdparty/libvorbis/mdct.c similarity index 100% rename from drivers/vorbis/mdct.c rename to thirdparty/libvorbis/mdct.c diff --git a/drivers/vorbis/mdct.h b/thirdparty/libvorbis/mdct.h similarity index 100% rename from drivers/vorbis/mdct.h rename to thirdparty/libvorbis/mdct.h diff --git a/drivers/vorbis/misc.h b/thirdparty/libvorbis/misc.h similarity index 100% rename from drivers/vorbis/misc.h rename to thirdparty/libvorbis/misc.h diff --git a/drivers/vorbis/modes/floor_all.h b/thirdparty/libvorbis/modes/floor_all.h similarity index 100% rename from drivers/vorbis/modes/floor_all.h rename to thirdparty/libvorbis/modes/floor_all.h diff --git a/drivers/vorbis/modes/psych_11.h b/thirdparty/libvorbis/modes/psych_11.h similarity index 100% rename from drivers/vorbis/modes/psych_11.h rename to thirdparty/libvorbis/modes/psych_11.h diff --git a/drivers/vorbis/modes/psych_16.h b/thirdparty/libvorbis/modes/psych_16.h similarity index 100% rename from drivers/vorbis/modes/psych_16.h rename to thirdparty/libvorbis/modes/psych_16.h diff --git a/drivers/vorbis/modes/psych_44.h b/thirdparty/libvorbis/modes/psych_44.h similarity index 100% rename from drivers/vorbis/modes/psych_44.h rename to thirdparty/libvorbis/modes/psych_44.h diff --git a/drivers/vorbis/modes/psych_8.h b/thirdparty/libvorbis/modes/psych_8.h similarity index 100% rename from drivers/vorbis/modes/psych_8.h rename to thirdparty/libvorbis/modes/psych_8.h diff --git a/drivers/vorbis/modes/residue_16.h b/thirdparty/libvorbis/modes/residue_16.h similarity index 100% rename from drivers/vorbis/modes/residue_16.h rename to thirdparty/libvorbis/modes/residue_16.h diff --git a/drivers/vorbis/modes/residue_44.h b/thirdparty/libvorbis/modes/residue_44.h similarity index 100% rename from drivers/vorbis/modes/residue_44.h rename to thirdparty/libvorbis/modes/residue_44.h diff --git a/drivers/vorbis/modes/residue_44p51.h b/thirdparty/libvorbis/modes/residue_44p51.h similarity index 100% rename from drivers/vorbis/modes/residue_44p51.h rename to thirdparty/libvorbis/modes/residue_44p51.h diff --git a/drivers/vorbis/modes/residue_44u.h b/thirdparty/libvorbis/modes/residue_44u.h similarity index 100% rename from drivers/vorbis/modes/residue_44u.h rename to thirdparty/libvorbis/modes/residue_44u.h diff --git a/drivers/vorbis/modes/residue_8.h b/thirdparty/libvorbis/modes/residue_8.h similarity index 100% rename from drivers/vorbis/modes/residue_8.h rename to thirdparty/libvorbis/modes/residue_8.h diff --git a/drivers/vorbis/modes/setup_11.h b/thirdparty/libvorbis/modes/setup_11.h similarity index 100% rename from drivers/vorbis/modes/setup_11.h rename to thirdparty/libvorbis/modes/setup_11.h diff --git a/drivers/vorbis/modes/setup_16.h b/thirdparty/libvorbis/modes/setup_16.h similarity index 100% rename from drivers/vorbis/modes/setup_16.h rename to thirdparty/libvorbis/modes/setup_16.h diff --git a/drivers/vorbis/modes/setup_22.h b/thirdparty/libvorbis/modes/setup_22.h similarity index 100% rename from drivers/vorbis/modes/setup_22.h rename to thirdparty/libvorbis/modes/setup_22.h diff --git a/drivers/vorbis/modes/setup_32.h b/thirdparty/libvorbis/modes/setup_32.h similarity index 100% rename from drivers/vorbis/modes/setup_32.h rename to thirdparty/libvorbis/modes/setup_32.h diff --git a/drivers/vorbis/modes/setup_44.h b/thirdparty/libvorbis/modes/setup_44.h similarity index 100% rename from drivers/vorbis/modes/setup_44.h rename to thirdparty/libvorbis/modes/setup_44.h diff --git a/drivers/vorbis/modes/setup_44p51.h b/thirdparty/libvorbis/modes/setup_44p51.h similarity index 100% rename from drivers/vorbis/modes/setup_44p51.h rename to thirdparty/libvorbis/modes/setup_44p51.h diff --git a/drivers/vorbis/modes/setup_44u.h b/thirdparty/libvorbis/modes/setup_44u.h similarity index 100% rename from drivers/vorbis/modes/setup_44u.h rename to thirdparty/libvorbis/modes/setup_44u.h diff --git a/drivers/vorbis/modes/setup_8.h b/thirdparty/libvorbis/modes/setup_8.h similarity index 100% rename from drivers/vorbis/modes/setup_8.h rename to thirdparty/libvorbis/modes/setup_8.h diff --git a/drivers/vorbis/modes/setup_X.h b/thirdparty/libvorbis/modes/setup_X.h similarity index 100% rename from drivers/vorbis/modes/setup_X.h rename to thirdparty/libvorbis/modes/setup_X.h diff --git a/drivers/vorbis/os.h b/thirdparty/libvorbis/os.h similarity index 100% rename from drivers/vorbis/os.h rename to thirdparty/libvorbis/os.h diff --git a/drivers/vorbis/psy.c b/thirdparty/libvorbis/psy.c similarity index 100% rename from drivers/vorbis/psy.c rename to thirdparty/libvorbis/psy.c diff --git a/drivers/vorbis/psy.h b/thirdparty/libvorbis/psy.h similarity index 100% rename from drivers/vorbis/psy.h rename to thirdparty/libvorbis/psy.h diff --git a/drivers/vorbis/psytune.c b/thirdparty/libvorbis/psytune.c similarity index 100% rename from drivers/vorbis/psytune.c rename to thirdparty/libvorbis/psytune.c diff --git a/drivers/vorbis/registry.c b/thirdparty/libvorbis/registry.c similarity index 100% rename from drivers/vorbis/registry.c rename to thirdparty/libvorbis/registry.c diff --git a/drivers/vorbis/registry.h b/thirdparty/libvorbis/registry.h similarity index 100% rename from drivers/vorbis/registry.h rename to thirdparty/libvorbis/registry.h diff --git a/drivers/vorbis/res0.c b/thirdparty/libvorbis/res0.c similarity index 100% rename from drivers/vorbis/res0.c rename to thirdparty/libvorbis/res0.c diff --git a/drivers/vorbis/scales.h b/thirdparty/libvorbis/scales.h similarity index 100% rename from drivers/vorbis/scales.h rename to thirdparty/libvorbis/scales.h diff --git a/drivers/vorbis/sharedbook.c b/thirdparty/libvorbis/sharedbook.c similarity index 100% rename from drivers/vorbis/sharedbook.c rename to thirdparty/libvorbis/sharedbook.c diff --git a/drivers/vorbis/smallft.c b/thirdparty/libvorbis/smallft.c similarity index 100% rename from drivers/vorbis/smallft.c rename to thirdparty/libvorbis/smallft.c diff --git a/drivers/vorbis/smallft.h b/thirdparty/libvorbis/smallft.h similarity index 100% rename from drivers/vorbis/smallft.h rename to thirdparty/libvorbis/smallft.h diff --git a/drivers/vorbis/synthesis.c b/thirdparty/libvorbis/synthesis.c similarity index 100% rename from drivers/vorbis/synthesis.c rename to thirdparty/libvorbis/synthesis.c diff --git a/drivers/vorbis/tone.c b/thirdparty/libvorbis/tone.c similarity index 100% rename from drivers/vorbis/tone.c rename to thirdparty/libvorbis/tone.c diff --git a/drivers/vorbis/codec.h b/thirdparty/libvorbis/vorbis/codec.h similarity index 100% rename from drivers/vorbis/codec.h rename to thirdparty/libvorbis/vorbis/codec.h diff --git a/drivers/vorbis/vorbisenc.h b/thirdparty/libvorbis/vorbis/vorbisenc.h similarity index 100% rename from drivers/vorbis/vorbisenc.h rename to thirdparty/libvorbis/vorbis/vorbisenc.h diff --git a/drivers/vorbis/vorbisfile.h b/thirdparty/libvorbis/vorbis/vorbisfile.h similarity index 100% rename from drivers/vorbis/vorbisfile.h rename to thirdparty/libvorbis/vorbis/vorbisfile.h diff --git a/drivers/vorbis/vorbisenc.c b/thirdparty/libvorbis/vorbisenc.c similarity index 100% rename from drivers/vorbis/vorbisenc.c rename to thirdparty/libvorbis/vorbisenc.c diff --git a/drivers/vorbis/vorbisfile.c b/thirdparty/libvorbis/vorbisfile.c similarity index 100% rename from drivers/vorbis/vorbisfile.c rename to thirdparty/libvorbis/vorbisfile.c diff --git a/drivers/vorbis/window.c b/thirdparty/libvorbis/window.c similarity index 100% rename from drivers/vorbis/window.c rename to thirdparty/libvorbis/window.c diff --git a/drivers/vorbis/window.h b/thirdparty/libvorbis/window.h similarity index 100% rename from drivers/vorbis/window.h rename to thirdparty/libvorbis/window.h diff --git a/drivers/opus/COPYING b/thirdparty/opus/COPYING similarity index 100% rename from drivers/opus/COPYING rename to thirdparty/opus/COPYING diff --git a/drivers/opus/analysis.c b/thirdparty/opus/analysis.c similarity index 98% rename from drivers/opus/analysis.c rename to thirdparty/opus/analysis.c index 6a0cd301132..360ebcc8ddb 100644 --- a/drivers/opus/analysis.c +++ b/thirdparty/opus/analysis.c @@ -24,17 +24,20 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/kiss_fft.h" -#include "opus/celt/celt.h" -#include "opus/celt/modes.h" -#include "opus/celt/arch.h" -#include "opus/celt/quant_bands.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "kiss_fft.h" +#include "celt.h" +#include "modes.h" +#include "arch.h" +#include "quant_bands.h" #include -#include "opus/analysis.h" -#include "opus/mlp.h" -#include "opus/celt/stack_alloc.h" +#include "analysis.h" +#include "mlp.h" +#include "stack_alloc.h" #ifndef M_PI #define M_PI 3.141592653 @@ -273,7 +276,7 @@ static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt downmix(x, &tonal->inmem[240], remaining, offset+ANALYSIS_BUF_SIZE-tonal->mem_fill, c1, c2, C); tonal->mem_fill = 240 + remaining; opus_fft(kfft, in, out, tonal->arch); -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT /* If there's any NaN on the input, the entire output will be NaN, so we only need to check one value. */ if (celt_isnan(out[0].r)) { @@ -345,7 +348,7 @@ static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt { float binE = out[i].r*(float)out[i].r + out[N-i].r*(float)out[N-i].r + out[i].i*(float)out[i].i + out[N-i].i*(float)out[N-i].i; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* FIXME: It's probably best to change the BFCC filter initial state instead */ binE *= 5.55e-17f; #endif @@ -353,7 +356,7 @@ static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt tE += binE*tonality[i]; nE += binE*2.f*(.5f-noisiness[i]); } -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT /* Check for extreme band energies that could cause NaNs later. */ if (!(E<1e9f) || celt_isnan(E)) { @@ -411,7 +414,7 @@ static void tonality_analysis(TonalityAnalysisState *tonal, const CELTMode *celt bandwidth = 0; maxE = 0; noise_floor = 5.7e-4f/(1<<(IMAX(0,lsb_depth-8))); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT noise_floor *= 1<<(15+SIG_SHIFT); #endif noise_floor *= noise_floor; diff --git a/drivers/opus/analysis.h b/thirdparty/opus/analysis.h similarity index 98% rename from drivers/opus/analysis.h rename to thirdparty/opus/analysis.h index 9d81164e254..9eae56a5253 100644 --- a/drivers/opus/analysis.h +++ b/thirdparty/opus/analysis.h @@ -28,8 +28,8 @@ #ifndef ANALYSIS_H #define ANALYSIS_H -#include "opus/celt/celt.h" -#include "opus/opus_private.h" +#include "celt.h" +#include "opus_private.h" #define NB_FRAMES 8 #define NB_TBANDS 18 diff --git a/drivers/opus/celt/_kiss_fft_guts.h b/thirdparty/opus/celt/_kiss_fft_guts.h similarity index 96% rename from drivers/opus/celt/_kiss_fft_guts.h rename to thirdparty/opus/celt/_kiss_fft_guts.h index a41f9a1a05a..5e3d58fd664 100644 --- a/drivers/opus/celt/_kiss_fft_guts.h +++ b/thirdparty/opus/celt/_kiss_fft_guts.h @@ -33,7 +33,7 @@ defines kiss_fft_scalar as either short or a float type and defines typedef struct { kiss_fft_scalar r; kiss_fft_scalar i; }kiss_fft_cpx; */ -#include "opus/celt/kiss_fft.h" +#include "kiss_fft.h" /* Explanation of macros dealing with complex math: @@ -44,8 +44,8 @@ C_SUBFROM( res , a) : res -= a C_ADDTO( res , a) : res += a * */ -#ifdef OPUS_FIXED_POINT -#include "opus/celt/arch.h" +#ifdef FIXED_POINT +#include "arch.h" #define SAMP_MAX 2147483647 @@ -91,14 +91,14 @@ }while(0) #if defined(OPUS_ARM_INLINE_ASM) -#include "opus/celt/arm/kiss_fft_armv4.h" +#include "arm/kiss_fft_armv4.h" #endif #if defined(OPUS_ARM_INLINE_EDSP) -#include "opus/celt/arm/kiss_fft_armv5e.h" +#include "arm/kiss_fft_armv5e.h" #endif #if defined(MIPSr1_ASM) -#include "opus/celt/mips/kiss_fft_mipsr1.h" +#include "mips/kiss_fft_mipsr1.h" #endif #else /* not FIXED_POINT*/ @@ -151,7 +151,7 @@ }while(0) #endif /* C_ADD defined */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /*# define KISS_FFT_COS(phase) TRIG_UPSCALE*floor(MIN(32767,MAX(-32767,.5+32768 * cos (phase)))) # define KISS_FFT_SIN(phase) TRIG_UPSCALE*floor(MIN(32767,MAX(-32767,.5+32768 * sin (phase))))*/ # define KISS_FFT_COS(phase) floor(.5+TWID_MAX*cos (phase)) diff --git a/drivers/opus/celt/arch.h b/thirdparty/opus/celt/arch.h similarity index 96% rename from drivers/opus/celt/arch.h rename to thirdparty/opus/celt/arch.h index 7fb036e9fea..9f74ddd2671 100644 --- a/drivers/opus/celt/arch.h +++ b/thirdparty/opus/celt/arch.h @@ -34,8 +34,8 @@ #ifndef ARCH_H #define ARCH_H -#include "opus/opus_types.h" -#include "opus/opus_defines.h" +#include "opus_types.h" +#include "opus_defines.h" # if !defined(__GNUC_PREREQ) # if defined(__GNUC__)&&defined(__GNUC_MINOR__) @@ -80,7 +80,7 @@ static OPUS_INLINE void _celt_fatal(const char *str, const char *file, int line) #define PRINT_MIPS(file) -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT typedef opus_int16 opus_val16; typedef opus_int32 opus_val32; @@ -113,15 +113,15 @@ static OPUS_INLINE opus_int16 SAT16(opus_int32 x) { } #ifdef FIXED_DEBUG -#include "opus/celt/fixed_debug.h" +#include "fixed_debug.h" #else -#include "opus/celt/fixed_generic.h" +#include "fixed_generic.h" #ifdef OPUS_ARM_INLINE_EDSP -#include "opus/celt/arm/fixed_armv5e.h" +#include "arm/fixed_armv5e.h" #elif defined (OPUS_ARM_INLINE_ASM) -#include "opus/celt/arm/fixed_armv4.h" +#include "arm/fixed_armv4.h" #elif defined (BFIN_ASM) #include "fixed_bfin.h" #elif defined (TI_C5X_ASM) @@ -231,7 +231,7 @@ static OPUS_INLINE int celt_isnan(float x) #endif /* !FIXED_POINT */ #ifndef GLOBAL_STACK_SIZE -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT #define GLOBAL_STACK_SIZE 100000 #else #define GLOBAL_STACK_SIZE 100000 diff --git a/drivers/opus/celt/arm/arm2gnu.pl b/thirdparty/opus/celt/arm/arm2gnu.pl similarity index 100% rename from drivers/opus/celt/arm/arm2gnu.pl rename to thirdparty/opus/celt/arm/arm2gnu.pl diff --git a/drivers/opus/celt/arm/arm_celt_map.c b/thirdparty/opus/celt/arm/arm_celt_map.c similarity index 97% rename from drivers/opus/celt/arm/arm_celt_map.c rename to thirdparty/opus/celt/arm/arm_celt_map.c index 92c83c1763f..ee6c2447866 100644 --- a/drivers/opus/celt/arm/arm_celt_map.c +++ b/thirdparty/opus/celt/arm/arm_celt_map.c @@ -24,11 +24,14 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/pitch.h" -#include "opus/celt/kiss_fft.h" -#include "opus/celt/mdct.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "pitch.h" +#include "kiss_fft.h" +#include "mdct.h" #if defined(OPUS_HAVE_RTCD) diff --git a/drivers/opus/celt/arm/armcpu.c b/thirdparty/opus/celt/arm/armcpu.c similarity index 96% rename from drivers/opus/celt/arm/armcpu.c rename to thirdparty/opus/celt/arm/armcpu.c index ac8ad2ec14a..5e5d10c3444 100644 --- a/drivers/opus/celt/arm/armcpu.c +++ b/thirdparty/opus/celt/arm/armcpu.c @@ -26,14 +26,17 @@ */ /* Original code from libtheora modified to suit to Opus */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #ifdef OPUS_HAVE_RTCD -#include "opus/celt/arm/armcpu.h" -#include "opus/celt/cpu_support.h" -#include "opus/celt/os_support.h" -#include "opus/opus_types.h" +#include "armcpu.h" +#include "cpu_support.h" +#include "os_support.h" +#include "opus_types.h" #define OPUS_CPU_ARM_V4 (1) #define OPUS_CPU_ARM_EDSP (1<<1) diff --git a/drivers/opus/celt/arm/armcpu.h b/thirdparty/opus/celt/arm/armcpu.h similarity index 100% rename from drivers/opus/celt/arm/armcpu.h rename to thirdparty/opus/celt/arm/armcpu.h diff --git a/drivers/opus/celt/arm/armopts.s.in b/thirdparty/opus/celt/arm/armopts.s.in similarity index 100% rename from drivers/opus/celt/arm/armopts.s.in rename to thirdparty/opus/celt/arm/armopts.s.in diff --git a/drivers/opus/celt/arm/celt_ne10_fft.c b/thirdparty/opus/celt/arm/celt_ne10_fft.c similarity index 97% rename from drivers/opus/celt/arm/celt_ne10_fft.c rename to thirdparty/opus/celt/arm/celt_ne10_fft.c index e57d23ee1d0..42d96a71176 100644 --- a/drivers/opus/celt/arm/celt_ne10_fft.c +++ b/thirdparty/opus/celt/arm/celt_ne10_fft.c @@ -31,14 +31,16 @@ */ #ifndef SKIP_CONFIG_H -#include "opus/opus_config.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #endif #include #include -#include "opus/celt/os_support.h" -#include "opus/celt/kiss_fft.h" -#include "opus/celt/stack_alloc.h" +#include "os_support.h" +#include "kiss_fft.h" +#include "stack_alloc.h" #if !defined(FIXED_POINT) # define NE10_FFT_ALLOC_C2C_TYPE_NEON ne10_fft_alloc_c2c_float32_neon diff --git a/drivers/opus/celt/arm/celt_ne10_mdct.c b/thirdparty/opus/celt/arm/celt_ne10_mdct.c similarity index 97% rename from drivers/opus/celt/arm/celt_ne10_mdct.c rename to thirdparty/opus/celt/arm/celt_ne10_mdct.c index eb407b674f3..293c3efd7a2 100644 --- a/drivers/opus/celt/arm/celt_ne10_mdct.c +++ b/thirdparty/opus/celt/arm/celt_ne10_mdct.c @@ -31,13 +31,15 @@ */ #ifndef SKIP_CONFIG_H -#include "opus/opus_config.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #endif -#include "opus/celt/kiss_fft.h" -#include "opus/celt/_kiss_fft_guts.h" -#include "opus/celt/mdct.h" -#include "opus/celt/stack_alloc.h" +#include "kiss_fft.h" +#include "_kiss_fft_guts.h" +#include "mdct.h" +#include "stack_alloc.h" void clt_mdct_forward_neon(const mdct_lookup *l, kiss_fft_scalar *in, diff --git a/drivers/opus/celt/arm/celt_neon_intr.c b/thirdparty/opus/celt/arm/celt_neon_intr.c similarity index 99% rename from drivers/opus/celt/arm/celt_neon_intr.c rename to thirdparty/opus/celt/arm/celt_neon_intr.c index 82b69586447..47dce15ba5f 100644 --- a/drivers/opus/celt/arm/celt_neon_intr.c +++ b/thirdparty/opus/celt/arm/celt_neon_intr.c @@ -29,10 +29,13 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include -#include "opus/celt/pitch.h" +#include "../pitch.h" #if !defined(FIXED_POINT) /* diff --git a/drivers/opus/celt/arm/celt_pitch_xcorr_arm-gnu.S b/thirdparty/opus/celt/arm/celt_pitch_xcorr_arm-gnu.S similarity index 100% rename from drivers/opus/celt/arm/celt_pitch_xcorr_arm-gnu.S rename to thirdparty/opus/celt/arm/celt_pitch_xcorr_arm-gnu.S diff --git a/drivers/opus/celt/arm/celt_pitch_xcorr_arm.s b/thirdparty/opus/celt/arm/celt_pitch_xcorr_arm.s similarity index 100% rename from drivers/opus/celt/arm/celt_pitch_xcorr_arm.s rename to thirdparty/opus/celt/arm/celt_pitch_xcorr_arm.s diff --git a/drivers/opus/celt/arm/fft_arm.h b/thirdparty/opus/celt/arm/fft_arm.h similarity index 97% rename from drivers/opus/celt/arm/fft_arm.h rename to thirdparty/opus/celt/arm/fft_arm.h index c99458b4afa..0cb55d8e22d 100644 --- a/drivers/opus/celt/arm/fft_arm.h +++ b/thirdparty/opus/celt/arm/fft_arm.h @@ -34,8 +34,8 @@ #if !defined(FFT_ARM_H) #define FFT_ARM_H -#include "opus/opus_config.h" -#include "opus/celt/kiss_fft.h" +#include "config.h" +#include "kiss_fft.h" #if defined(HAVE_ARM_NE10) diff --git a/thirdparty/opus/celt/arm/fixed_arm64.h b/thirdparty/opus/celt/arm/fixed_arm64.h new file mode 100644 index 00000000000..c6fbd3db2c1 --- /dev/null +++ b/thirdparty/opus/celt/arm/fixed_arm64.h @@ -0,0 +1,35 @@ +/* Copyright (C) 2015 Vidyo */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef FIXED_ARM64_H +#define FIXED_ARM64_H + +#include + +#undef SIG2WORD16 +#define SIG2WORD16(x) (vqmovns_s32(PSHR32((x), SIG_SHIFT))) + +#endif diff --git a/drivers/opus/celt/arm/fixed_armv4.h b/thirdparty/opus/celt/arm/fixed_armv4.h similarity index 100% rename from drivers/opus/celt/arm/fixed_armv4.h rename to thirdparty/opus/celt/arm/fixed_armv4.h diff --git a/drivers/opus/celt/arm/fixed_armv5e.h b/thirdparty/opus/celt/arm/fixed_armv5e.h similarity index 99% rename from drivers/opus/celt/arm/fixed_armv5e.h rename to thirdparty/opus/celt/arm/fixed_armv5e.h index 2db23262e85..36a63211013 100644 --- a/drivers/opus/celt/arm/fixed_armv5e.h +++ b/thirdparty/opus/celt/arm/fixed_armv5e.h @@ -30,7 +30,7 @@ #ifndef FIXED_ARMv5E_H #define FIXED_ARMv5E_H -#include "opus/celt/arm/fixed_armv4.h" +#include "fixed_armv4.h" /** 16x32 multiplication, followed by a 16-bit shift right. Results fits in 32 bits */ #undef MULT16_32_Q16 diff --git a/drivers/opus/celt/arm/kiss_fft_armv4.h b/thirdparty/opus/celt/arm/kiss_fft_armv4.h similarity index 99% rename from drivers/opus/celt/arm/kiss_fft_armv4.h rename to thirdparty/opus/celt/arm/kiss_fft_armv4.h index 0f5617324d1..e4faad6f2b9 100644 --- a/drivers/opus/celt/arm/kiss_fft_armv4.h +++ b/thirdparty/opus/celt/arm/kiss_fft_armv4.h @@ -30,7 +30,7 @@ #error "This file should only be included from _kiss_fft_guts.h" #endif -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT #undef C_MUL #define C_MUL(m,a,b) \ diff --git a/drivers/opus/celt/arm/kiss_fft_armv5e.h b/thirdparty/opus/celt/arm/kiss_fft_armv5e.h similarity index 99% rename from drivers/opus/celt/arm/kiss_fft_armv5e.h rename to thirdparty/opus/celt/arm/kiss_fft_armv5e.h index 0ab75fbc585..9eca183d77d 100644 --- a/drivers/opus/celt/arm/kiss_fft_armv5e.h +++ b/thirdparty/opus/celt/arm/kiss_fft_armv5e.h @@ -30,7 +30,7 @@ #error "This file should only be included from _kiss_fft_guts.h" #endif -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT #if defined(__thumb__)||defined(__thumb2__) #define LDRD_CONS "Q" diff --git a/drivers/opus/celt/arm/mdct_arm.h b/thirdparty/opus/celt/arm/mdct_arm.h similarity index 97% rename from drivers/opus/celt/arm/mdct_arm.h rename to thirdparty/opus/celt/arm/mdct_arm.h index faf3c8acab8..49cbb445760 100644 --- a/drivers/opus/celt/arm/mdct_arm.h +++ b/thirdparty/opus/celt/arm/mdct_arm.h @@ -33,8 +33,8 @@ #if !defined(MDCT_ARM_H) #define MDCT_ARM_H -#include "opus/opus_config.h" -#include "opus/celt/mdct.h" +#include "config.h" +#include "mdct.h" #if defined(HAVE_ARM_NE10) /** Compute a forward MDCT and scale by 4/N, trashes the input array */ diff --git a/drivers/opus/celt/arm/pitch_arm.h b/thirdparty/opus/celt/arm/pitch_arm.h similarity index 98% rename from drivers/opus/celt/arm/pitch_arm.h rename to thirdparty/opus/celt/arm/pitch_arm.h index 996fbc7fd90..8626ed75b94 100644 --- a/drivers/opus/celt/arm/pitch_arm.h +++ b/thirdparty/opus/celt/arm/pitch_arm.h @@ -28,7 +28,7 @@ #if !defined(PITCH_ARM_H) # define PITCH_ARM_H -# include "opus/celt/arm/armcpu.h" +# include "armcpu.h" # if defined(FIXED_POINT) diff --git a/drivers/opus/celt/bands.c b/thirdparty/opus/celt/bands.c similarity index 98% rename from drivers/opus/celt/bands.c rename to thirdparty/opus/celt/bands.c index bdd87dd3272..25f229e2673 100644 --- a/drivers/opus/celt/bands.c +++ b/thirdparty/opus/celt/bands.c @@ -26,19 +26,22 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include -#include "opus/celt/bands.h" -#include "opus/celt/modes.h" -#include "opus/celt/vq.h" -#include "opus/celt/cwrs.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/os_support.h" -#include "opus/celt/mathops.h" -#include "opus/celt/rate.h" -#include "opus/celt/quant_bands.h" -#include "opus/celt/pitch.h" +#include "bands.h" +#include "modes.h" +#include "vq.h" +#include "cwrs.h" +#include "stack_alloc.h" +#include "os_support.h" +#include "mathops.h" +#include "rate.h" +#include "quant_bands.h" +#include "pitch.h" int hysteresis_decision(opus_val16 val, const opus_val16 *thresholds, const opus_val16 *hysteresis, int N, int prev) { @@ -87,7 +90,7 @@ static int bitexact_log2tan(int isin,int icos) -FRAC_MUL16(icos, FRAC_MUL16(icos, -2597) + 7932); } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* Compute the amplitude (sqrt energy) in each of the bands */ void compute_band_energies(const CELTMode *m, const celt_sig *X, celt_ener *bandE, int end, int C, int LM) { @@ -216,13 +219,13 @@ void denormalise_bands(const CELTMode *m, const celt_norm * OPUS_RESTRICT X, int j, band_end; opus_val16 g; opus_val16 lg; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int shift; #endif j=M*eBands[i]; band_end = M*eBands[i+1]; lg = ADD16(bandLogE[i], SHL16((opus_val16)eMeans[i],6)); -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT g = celt_exp2(lg); #else /* Handle the integer part of the log energy */ @@ -271,7 +274,7 @@ void anti_collapse(const CELTMode *m, celt_norm *X_, unsigned char *collapse_mas int N0; opus_val16 thresh, sqrt_1; int depth; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int shift; opus_val32 thresh32; #endif @@ -281,7 +284,7 @@ void anti_collapse(const CELTMode *m, celt_norm *X_, unsigned char *collapse_mas celt_assert(pulses[i]>=0); depth = celt_udiv(1+pulses[i], (m->eBands[i+1]-m->eBands[i]))>>LM; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT thresh32 = SHR32(celt_exp2(-SHL16(depth, 10-BITRES)),1); thresh = MULT16_32_Q15(QCONST16(0.5f, 15), MIN32(32767,thresh32)); { @@ -314,7 +317,7 @@ void anti_collapse(const CELTMode *m, celt_norm *X_, unsigned char *collapse_mas Ediff = EXTEND32(logE[c*m->nbEBands+i])-EXTEND32(MIN16(prev1,prev2)); Ediff = MAX32(0, Ediff); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT if (Ediff < 16384) { opus_val32 r32 = SHR32(celt_exp2(-EXTRACT16(Ediff)),1); @@ -364,7 +367,7 @@ static void intensity_stereo(const CELTMode *m, celt_norm * OPUS_RESTRICT X, con opus_val16 a1, a2; opus_val16 left, right; opus_val16 norm; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int shift = celt_zlog2(MAX32(bandE[i], bandE[i+m->nbEBands]))-13; #endif left = VSHR32(bandE[i],shift); @@ -401,7 +404,7 @@ static void stereo_merge(celt_norm * OPUS_RESTRICT X, celt_norm * OPUS_RESTRICT opus_val32 xp=0, side=0; opus_val32 El, Er; opus_val16 mid2; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int kl, kr; #endif opus_val32 t, lgain, rgain; @@ -420,7 +423,7 @@ static void stereo_merge(celt_norm * OPUS_RESTRICT X, celt_norm * OPUS_RESTRICT return; } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT kl = celt_ilog2(El)>>1; kr = celt_ilog2(Er)>>1; #endif @@ -429,7 +432,7 @@ static void stereo_merge(celt_norm * OPUS_RESTRICT X, celt_norm * OPUS_RESTRICT t = VSHR32(Er, (kr-7)<<1); rgain = celt_rsqrt_norm(t); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT if (kl < 7) kl = 7; if (kr < 7) @@ -939,7 +942,7 @@ static unsigned quant_partition(struct band_ctx *ctx, celt_norm *X, delta = sctx.delta; itheta = sctx.itheta; qalloc = sctx.qalloc; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT mid = imid; side = iside; #else @@ -1237,7 +1240,7 @@ static unsigned quant_band_stereo(struct band_ctx *ctx, celt_norm *X, celt_norm delta = sctx.delta; itheta = sctx.itheta; qalloc = sctx.qalloc; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT mid = imid; side = iside; #else diff --git a/drivers/opus/celt/bands.h b/thirdparty/opus/celt/bands.h similarity index 97% rename from drivers/opus/celt/bands.h rename to thirdparty/opus/celt/bands.h index eb7ea4cc249..e8bef4bad0e 100644 --- a/drivers/opus/celt/bands.h +++ b/thirdparty/opus/celt/bands.h @@ -30,11 +30,11 @@ #ifndef BANDS_H #define BANDS_H -#include "opus/celt/arch.h" -#include "opus/celt/modes.h" -#include "opus/celt/entenc.h" -#include "opus/celt/entdec.h" -#include "opus/celt/rate.h" +#include "arch.h" +#include "modes.h" +#include "entenc.h" +#include "entdec.h" +#include "rate.h" /** Compute the amplitude (sqrt energy) in each of the bands * @param m Mode data diff --git a/drivers/opus/celt/celt.c b/thirdparty/opus/celt/celt.c similarity index 93% rename from drivers/opus/celt/celt.c rename to thirdparty/opus/celt/celt.c index 4a16651441c..b121c51a1fa 100644 --- a/drivers/opus/celt/celt.c +++ b/thirdparty/opus/celt/celt.c @@ -26,33 +26,36 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #define CELT_C -#include "opus/celt/os_support.h" -#include "opus/celt/mdct.h" +#include "os_support.h" +#include "mdct.h" #include -#include "opus/celt/celt.h" -#include "opus/celt/pitch.h" -#include "opus/celt/bands.h" -#include "opus/celt/modes.h" -#include "opus/celt/entcode.h" -#include "opus/celt/quant_bands.h" -#include "opus/celt/rate.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/mathops.h" -#include "opus/celt/float_cast.h" +#include "celt.h" +#include "pitch.h" +#include "bands.h" +#include "modes.h" +#include "entcode.h" +#include "quant_bands.h" +#include "rate.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "float_cast.h" #include -#include "opus/celt/celt_lpc.h" -#include "opus/celt/vq.h" +#include "celt_lpc.h" +#include "vq.h" #ifndef PACKAGE_VERSION #define PACKAGE_VERSION "unknown" #endif #if defined(MIPSr1_ASM) -#include "opus/celt/mips/celt_mipsr1.h" +#include "mips/celt_mipsr1.h" #endif @@ -286,7 +289,7 @@ const char *opus_get_version_string(void) /* Applications may rely on the presence of this substring in the version string to determine if they have a fixed-point or floating-point build at runtime. */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT "-fixed" #endif #ifdef FUZZING diff --git a/drivers/opus/celt/celt.h b/thirdparty/opus/celt/celt.h similarity index 97% rename from drivers/opus/celt/celt.h rename to thirdparty/opus/celt/celt.h index 72814dc0def..a423b95046a 100644 --- a/drivers/opus/celt/celt.h +++ b/thirdparty/opus/celt/celt.h @@ -35,12 +35,12 @@ #ifndef CELT_H #define CELT_H -#include "opus/opus_types.h" -#include "opus/opus_defines.h" -#include "opus/opus_custom.h" -#include "opus/celt/entenc.h" -#include "opus/celt/entdec.h" -#include "opus/celt/arch.h" +#include "opus_types.h" +#include "opus_defines.h" +#include "opus_custom.h" +#include "entenc.h" +#include "entdec.h" +#include "arch.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/opus/celt/celt_decoder.c b/thirdparty/opus/celt/celt_decoder.c similarity index 98% rename from drivers/opus/celt/celt_decoder.c rename to thirdparty/opus/celt/celt_decoder.c index 88072ed1107..b688f2a4e3f 100644 --- a/drivers/opus/celt/celt_decoder.c +++ b/thirdparty/opus/celt/celt_decoder.c @@ -26,27 +26,30 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #define CELT_DECODER_C -#include "opus/celt/cpu_support.h" -#include "opus/celt/os_support.h" -#include "opus/celt/mdct.h" +#include "cpu_support.h" +#include "os_support.h" +#include "mdct.h" #include -#include "opus/celt/celt.h" -#include "opus/celt/pitch.h" -#include "opus/celt/bands.h" -#include "opus/celt/modes.h" -#include "opus/celt/entcode.h" -#include "opus/celt/quant_bands.h" -#include "opus/celt/rate.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/mathops.h" -#include "opus/celt/float_cast.h" +#include "celt.h" +#include "pitch.h" +#include "bands.h" +#include "modes.h" +#include "entcode.h" +#include "quant_bands.h" +#include "rate.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "float_cast.h" #include -#include "opus/celt/celt_lpc.h" -#include "opus/celt/vq.h" +#include "celt_lpc.h" +#include "vq.h" #if defined(SMALL_FOOTPRINT) && defined(FIXED_POINT) #define NORM_ALIASING_HACK @@ -188,7 +191,7 @@ void deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int C, int downsample, c opus_val16 coef0; VARDECL(celt_sig, scratch); SAVE_STACK; -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT (void)accum; celt_assert(accum==0); #endif @@ -230,7 +233,7 @@ void deemphasis(celt_sig *in[], opus_val16 *pcm, int N, int C, int downsample, c apply_downsampling=1; } else { /* Shortcut for the standard (non-custom modes) case */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT if (accum) { for (j=0;jarch); /* Add a noise floor of -40 dB. */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT ac[0] += SHR32(ac[0],13); #else ac[0] *= 1.0001f; @@ -552,7 +555,7 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM) for (i=1;i<=LPC_ORDER;i++) { /*ac[i] *= exp(-.5*(2*M_PI*.002*i)*(2*M_PI*.002*i));*/ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT ac[i] -= MULT16_32_Q15(2*i*i, ac[i]); #else ac[i] -= ac[i]*(0.008f*0.008f)*i*i; @@ -583,7 +586,7 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM) { opus_val32 E1=1, E2=1; int decay_length; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int shift = IMAX(0,2*celt_zlog2(celt_maxabs16(&exc[MAX_PERIOD-exc_length], exc_length))-20); #endif decay_length = exc_length>>1; @@ -655,7 +658,7 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM) S2 += SHR32(MULT16_16(tmp, tmp), 8); } /* This checks for an "explosion" in the synthesis. */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT if (!(S1 > SHR32(S2,2))) #else /* The float test is written this way to catch NaNs in the output @@ -1071,7 +1074,7 @@ int celt_decode_with_ec(CELTDecoder * OPUS_RESTRICT st, const unsigned char *dat #ifdef CUSTOM_MODES -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int opus_custom_decode(CELTDecoder * OPUS_RESTRICT st, const unsigned char *data, int len, opus_int16 * OPUS_RESTRICT pcm, int frame_size) { return celt_decode_with_ec(st, data, len, pcm, frame_size, NULL, 0); diff --git a/drivers/opus/celt/celt_encoder.c b/thirdparty/opus/celt/celt_encoder.c similarity index 98% rename from drivers/opus/celt/celt_encoder.c rename to thirdparty/opus/celt/celt_encoder.c index 9099bcd278f..41fbfd49c83 100644 --- a/drivers/opus/celt/celt_encoder.c +++ b/thirdparty/opus/celt/celt_encoder.c @@ -26,27 +26,30 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #define CELT_ENCODER_C -#include "opus/celt/cpu_support.h" -#include "opus/celt/os_support.h" -#include "opus/celt/mdct.h" +#include "cpu_support.h" +#include "os_support.h" +#include "mdct.h" #include -#include "opus/celt/celt.h" -#include "opus/celt/pitch.h" -#include "opus/celt/bands.h" -#include "opus/celt/modes.h" -#include "opus/celt/entcode.h" -#include "opus/celt/quant_bands.h" -#include "opus/celt/rate.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/mathops.h" -#include "opus/celt/float_cast.h" +#include "celt.h" +#include "pitch.h" +#include "bands.h" +#include "modes.h" +#include "entcode.h" +#include "quant_bands.h" +#include "rate.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "float_cast.h" #include -#include "opus/celt/celt_lpc.h" -#include "opus/celt/vq.h" +#include "celt_lpc.h" +#include "vq.h" /** Encoder state @@ -259,7 +262,7 @@ static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int opus_val32 x,y; x = SHR32(in[i+c*len],SIG_SHIFT); y = ADD32(mem0, x); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT mem0 = mem1 + y - SHL32(x,1); mem1 = x - SHR32(y,1); #else @@ -273,7 +276,7 @@ static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int /* First few samples are bad because we don't propagate the memory */ OPUS_CLEAR(tmp, 12); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* Normalize tmp to max range */ { int shift=0; @@ -294,7 +297,7 @@ static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int { opus_val16 x2 = PSHR32(MULT16_16(tmp[2*i],tmp[2*i]) + MULT16_16(tmp[2*i+1],tmp[2*i+1]),16); mean += x2; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* FIXME: Use PSHR16() instead */ tmp[i] = mem0 + PSHR32(x2-mem0,4); #else @@ -308,7 +311,7 @@ static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int /* Backward pass to compute the pre-echo threshold */ for (i=len2-1;i>=0;i--) { -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* FIXME: Use PSHR16() instead */ tmp[i] = mem0 + PSHR32(tmp[i]-mem0,3); #else @@ -325,7 +328,7 @@ static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int /* As a compromise with the old transient detector, frame energy is the geometric mean of the energy and half the max */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* Costs two sqrt() to avoid overflows */ mean = MULT16_16(celt_sqrt(mean), celt_sqrt(MULT16_16(maxE,len2>>1))); #else @@ -339,7 +342,7 @@ static int transient_analysis(const opus_val32 * OPUS_RESTRICT in, int len, int for (i=12;iprefilter_gain)prefilter_gain; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT qg = ((gain1+1536)>>10)/3-1; #else qg = (int)floor(.5f+gain1*32/3)-1; @@ -1279,7 +1282,7 @@ static int compute_vbr(const CELTMode *mode, AnalysisInfo *analysis, opus_int32 if ((!has_surround_mask||lfe) && (constrained_vbr || bitrate<64000)) { opus_val16 rate_factor; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT rate_factor = MAX16(0,(bitrate-32000)); #else rate_factor = MAX16(0,(1.f/32768)*(bitrate-32000)); @@ -1509,7 +1512,7 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, sample_max=MAX32(st->overlap_max, celt_maxabs16(pcm, C*(N-overlap)/st->upsample)); st->overlap_max=celt_maxabs16(pcm+C*(N-overlap)/st->upsample, C*overlap/st->upsample); sample_max=MAX32(sample_max, st->overlap_max); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT silence = (sample_max==0); #else silence = (sample_max <= (opus_val16)1/(1<lsb_depth)); @@ -1539,7 +1542,7 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, } c=0; do { int need_clip=0; -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT need_clip = st->clip && sample_max>65536.f; #endif celt_preemphasis(pcm+c, in+c*(N+overlap)+overlap, N, CC, st->upsample, @@ -2156,7 +2159,7 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm, #ifdef CUSTOM_MODES -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int opus_custom_encode(CELTEncoder * OPUS_RESTRICT st, const opus_int16 * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes) { return celt_encode_with_ec(st, pcm, frame_size, compressed, nbCompressedBytes, NULL); diff --git a/drivers/opus/celt/celt_lpc.c b/thirdparty/opus/celt/celt_lpc.c similarity index 96% rename from drivers/opus/celt/celt_lpc.c rename to thirdparty/opus/celt/celt_lpc.c index 5b8c01021fe..f02145af0d4 100644 --- a/drivers/opus/celt/celt_lpc.c +++ b/thirdparty/opus/celt/celt_lpc.c @@ -24,12 +24,15 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/celt_lpc.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/mathops.h" -#include "opus/celt/pitch.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "celt_lpc.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "pitch.h" void _celt_lpc( opus_val16 *_lpc, /* out: [0...p-1] LPC coefficients */ @@ -40,7 +43,7 @@ int p int i, j; opus_val32 r; opus_val32 error = ac[0]; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT opus_val32 lpc[LPC_ORDER]; #else float *lpc = _lpc; @@ -70,7 +73,7 @@ int p error = error - MULT32_32_Q31(MULT32_32_Q31(r,r),error); /* Bail out once we get 30 dB gain */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT if (error ARMv4 @@ -48,7 +48,7 @@ (defined(OPUS_X86_MAY_HAVE_SSE4_1) && !defined(OPUS_X86_PRESUME_SSE4_1)) || \ (defined(OPUS_X86_MAY_HAVE_AVX) && !defined(OPUS_X86_PRESUME_AVX)) -#include "opus/celt/x86/x86cpu.h" +#include "x86/x86cpu.h" /* We currently support 5 x86 variants: * arch[0] -> non-sse * arch[1] -> sse diff --git a/drivers/opus/celt/cwrs.c b/thirdparty/opus/celt/cwrs.c similarity index 99% rename from drivers/opus/celt/cwrs.c rename to thirdparty/opus/celt/cwrs.c index 983d4580a9f..2fa9f89cd6c 100644 --- a/drivers/opus/celt/cwrs.c +++ b/thirdparty/opus/celt/cwrs.c @@ -26,12 +26,15 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/os_support.h" -#include "opus/celt/cwrs.h" -#include "opus/celt/mathops.h" -#include "opus/celt/arch.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "os_support.h" +#include "cwrs.h" +#include "mathops.h" +#include "arch.h" #ifdef CUSTOM_MODES diff --git a/drivers/opus/celt/cwrs.h b/thirdparty/opus/celt/cwrs.h similarity index 93% rename from drivers/opus/celt/cwrs.h rename to thirdparty/opus/celt/cwrs.h index f0ea844e5ea..7cd47174593 100644 --- a/drivers/opus/celt/cwrs.h +++ b/thirdparty/opus/celt/cwrs.h @@ -30,10 +30,10 @@ #ifndef CWRS_H #define CWRS_H -#include "opus/celt/arch.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/entenc.h" -#include "opus/celt/entdec.h" +#include "arch.h" +#include "stack_alloc.h" +#include "entenc.h" +#include "entdec.h" #ifdef CUSTOM_MODES int log2_frac(opus_uint32 val, int frac); diff --git a/drivers/opus/celt/ecintrin.h b/thirdparty/opus/celt/ecintrin.h similarity index 98% rename from drivers/opus/celt/ecintrin.h rename to thirdparty/opus/celt/ecintrin.h index 6ed8fb280e6..2263cff6bdf 100644 --- a/drivers/opus/celt/ecintrin.h +++ b/thirdparty/opus/celt/ecintrin.h @@ -26,10 +26,10 @@ */ /*Some common macros for potential platform-specific optimization.*/ -#include "opus/opus_types.h" +#include "opus_types.h" #include #include -#include "opus/celt/arch.h" +#include "arch.h" #if !defined(_ecintrin_H) # define _ecintrin_H (1) diff --git a/drivers/opus/celt/entcode.c b/thirdparty/opus/celt/entcode.c similarity index 98% rename from drivers/opus/celt/entcode.c rename to thirdparty/opus/celt/entcode.c index d1c6b25c7f6..70f32016ece 100644 --- a/drivers/opus/celt/entcode.c +++ b/thirdparty/opus/celt/entcode.c @@ -24,10 +24,13 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/entcode.h" -#include "opus/celt/arch.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "entcode.h" +#include "arch.h" #if !defined(EC_CLZ) /*This is a fallback for systems where we don't know how to access diff --git a/drivers/opus/celt/entcode.h b/thirdparty/opus/celt/entcode.h similarity index 98% rename from drivers/opus/celt/entcode.h rename to thirdparty/opus/celt/entcode.h index 4d736d4dca8..13d6c84ef0f 100644 --- a/drivers/opus/celt/entcode.h +++ b/thirdparty/opus/celt/entcode.h @@ -25,14 +25,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_types.h" -#include "opus/opus_defines.h" +#include "opus_types.h" +#include "opus_defines.h" #if !defined(_entcode_H) # define _entcode_H (1) # include # include -# include "opus/celt/ecintrin.h" +# include "ecintrin.h" extern const opus_uint32 SMALL_DIV_TABLE[129]; diff --git a/drivers/opus/celt/entdec.c b/thirdparty/opus/celt/entdec.c similarity index 98% rename from drivers/opus/celt/entdec.c rename to thirdparty/opus/celt/entdec.c index fdc49c92c1a..0b3433ed8b9 100644 --- a/drivers/opus/celt/entdec.c +++ b/thirdparty/opus/celt/entdec.c @@ -24,13 +24,16 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include -#include "opus/celt/os_support.h" -#include "opus/celt/arch.h" -#include "opus/celt/entdec.h" -#include "opus/celt/mfrngcod.h" +#include "os_support.h" +#include "arch.h" +#include "entdec.h" +#include "mfrngcod.h" /*A range decoder. This is an entropy decoder based upon \cite{Mar79}, which is itself a diff --git a/drivers/opus/celt/entdec.h b/thirdparty/opus/celt/entdec.h similarity index 99% rename from drivers/opus/celt/entdec.h rename to thirdparty/opus/celt/entdec.h index fda60ab3268..d8ab3187308 100644 --- a/drivers/opus/celt/entdec.h +++ b/thirdparty/opus/celt/entdec.h @@ -28,7 +28,7 @@ #if !defined(_entdec_H) # define _entdec_H (1) # include -# include "opus/celt/entcode.h" +# include "entcode.h" /*Initializes the decoder. _buf: The input buffer to use. diff --git a/drivers/opus/celt/entenc.c b/thirdparty/opus/celt/entenc.c similarity index 98% rename from drivers/opus/celt/entenc.c rename to thirdparty/opus/celt/entenc.c index da7f2c8e624..f1750d25b84 100644 --- a/drivers/opus/celt/entenc.c +++ b/thirdparty/opus/celt/entenc.c @@ -24,11 +24,14 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/os_support.h" -#include "opus/celt/arch.h" -#include "opus/celt/entenc.h" -#include "opus/celt/mfrngcod.h" + +#if defined(HAVE_CONFIG_H) +# include "config.h" +#endif +#include "os_support.h" +#include "arch.h" +#include "entenc.h" +#include "mfrngcod.h" /*A range encoder. See entdec.c and the references for implementation details \cite{Mar79,MNW98}. diff --git a/drivers/opus/celt/entenc.h b/thirdparty/opus/celt/entenc.h similarity index 99% rename from drivers/opus/celt/entenc.h rename to thirdparty/opus/celt/entenc.h index 3f4a3acc93f..796bc4d5727 100644 --- a/drivers/opus/celt/entenc.h +++ b/thirdparty/opus/celt/entenc.h @@ -28,7 +28,7 @@ #if !defined(_entenc_H) # define _entenc_H (1) # include -# include "opus/celt/entcode.h" +# include "entcode.h" /*Initializes the encoder. _buf: The buffer to store output bytes in. diff --git a/drivers/opus/celt/fixed_debug.h b/thirdparty/opus/celt/fixed_debug.h similarity index 99% rename from drivers/opus/celt/fixed_debug.h rename to thirdparty/opus/celt/fixed_debug.h index 3b8d5ef7a92..d28227f5dc7 100644 --- a/drivers/opus/celt/fixed_debug.h +++ b/thirdparty/opus/celt/fixed_debug.h @@ -33,7 +33,7 @@ #define FIXED_DEBUG_H #include -#include "opus/opus_defines.h" +#include "opus_defines.h" #ifdef CELT_C OPUS_EXPORT opus_int64 celt_mips=0; diff --git a/drivers/opus/celt/fixed_generic.h b/thirdparty/opus/celt/fixed_generic.h similarity index 99% rename from drivers/opus/celt/fixed_generic.h rename to thirdparty/opus/celt/fixed_generic.h index 71ab048e4a7..ac67d37ce8c 100644 --- a/drivers/opus/celt/fixed_generic.h +++ b/thirdparty/opus/celt/fixed_generic.h @@ -136,7 +136,7 @@ #define DIV32(a,b) (((opus_val32)(a))/((opus_val32)(b))) #if defined(MIPSr1_ASM) -#include "opus/celt/mips/fixed_generic_mipsr1.h" +#include "mips/fixed_generic_mipsr1.h" #endif static OPUS_INLINE opus_val16 SIG2WORD16_generic(celt_sig x) diff --git a/drivers/opus/celt/float_cast.h b/thirdparty/opus/celt/float_cast.h similarity index 99% rename from drivers/opus/celt/float_cast.h rename to thirdparty/opus/celt/float_cast.h index 36a1bfe6712..ed5a39b5433 100644 --- a/drivers/opus/celt/float_cast.h +++ b/thirdparty/opus/celt/float_cast.h @@ -30,7 +30,7 @@ #define FLOAT_CAST_H -#include "opus/celt/arch.h" +#include "arch.h" /*============================================================================ ** On Intel Pentium processors (especially PIII and probably P4), converting diff --git a/drivers/opus/celt/kiss_fft.c b/thirdparty/opus/celt/kiss_fft.c similarity index 98% rename from drivers/opus/celt/kiss_fft.c rename to thirdparty/opus/celt/kiss_fft.c index cf8d049fa18..4ed37d2bb76 100644 --- a/drivers/opus/celt/kiss_fft.c +++ b/thirdparty/opus/celt/kiss_fft.c @@ -30,14 +30,16 @@ heavily modified to better suit Opus */ #ifndef SKIP_CONFIG_H -#include "opus/opus_config.h" +# ifdef HAVE_CONFIG_H +# include "config.h" +# endif #endif -#include "opus/celt/_kiss_fft_guts.h" -#include "opus/celt/arch.h" -#include "opus/celt/os_support.h" -#include "opus/celt/mathops.h" -#include "opus/celt/stack_alloc.h" +#include "_kiss_fft_guts.h" +#include "arch.h" +#include "os_support.h" +#include "mathops.h" +#include "stack_alloc.h" /* The guts header contains all the multiplication and addition macros that are defined for complex numbers. It also delares the kf_ internal functions. @@ -188,7 +190,7 @@ static void kf_bfly3( kiss_twiddle_cpx epi3; kiss_fft_cpx * Fout_beg = Fout; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT epi3.r = -16384; epi3.i = -28378; #else @@ -246,7 +248,7 @@ static void kf_bfly5( kiss_twiddle_cpx ya,yb; kiss_fft_cpx * Fout_beg = Fout; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT ya.r = 10126; ya.i = -31164; yb.r = -26510; @@ -407,7 +409,7 @@ int kf_factor(int n,opus_int16 * facbuf) static void compute_twiddles(kiss_twiddle_cpx *twiddles, int nfft) { int i; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT for (i=0;infft=nfft; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT st->scale_shift = celt_ilog2(st->nfft); if (st->nfft == 1<scale_shift) st->scale = Q15ONE; @@ -568,7 +570,7 @@ void opus_fft_c(const kiss_fft_state *st,const kiss_fft_cpx *fin,kiss_fft_cpx *f { int i; opus_val16 scale; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* Allows us to scale with MULT16_32_Q16(), which is faster than MULT16_32_Q15() on ARM. */ int scale_shift = st->scale_shift-1; diff --git a/drivers/opus/celt/kiss_fft.h b/thirdparty/opus/celt/kiss_fft.h similarity index 97% rename from drivers/opus/celt/kiss_fft.h rename to thirdparty/opus/celt/kiss_fft.h index 6229044c437..bffa2bfad63 100644 --- a/drivers/opus/celt/kiss_fft.h +++ b/thirdparty/opus/celt/kiss_fft.h @@ -31,8 +31,8 @@ #include #include -#include "opus/celt/arch.h" -#include "opus/celt/cpu_support.h" +#include "arch.h" +#include "cpu_support.h" #ifdef __cplusplus extern "C" { @@ -46,8 +46,8 @@ extern "C" { #define KISS_FFT_MALLOC opus_alloc #endif -#ifdef OPUS_FIXED_POINT -#include "opus/celt/arch.h" +#ifdef FIXED_POINT +#include "arch.h" # define kiss_fft_scalar opus_int32 # define kiss_twiddle_scalar opus_int16 @@ -86,7 +86,7 @@ typedef struct arch_fft_state{ typedef struct kiss_fft_state{ int nfft; opus_val16 scale; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int scale_shift; #endif int shift; @@ -97,7 +97,7 @@ typedef struct kiss_fft_state{ } kiss_fft_state; #if defined(HAVE_ARM_NE10) -#include "opus/celt/arm/fft_arm.h" +#include "arm/fft_arm.h" #endif /*typedef struct kiss_fft_state* kiss_fft_cfg;*/ diff --git a/drivers/opus/celt/laplace.c b/thirdparty/opus/celt/laplace.c similarity index 97% rename from drivers/opus/celt/laplace.c rename to thirdparty/opus/celt/laplace.c index 5bc956af457..a7bca874b6e 100644 --- a/drivers/opus/celt/laplace.c +++ b/thirdparty/opus/celt/laplace.c @@ -25,10 +25,13 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/laplace.h" -#include "opus/celt/mathops.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "laplace.h" +#include "mathops.h" /* The minimum probability of an energy delta (out of 32768). */ #define LAPLACE_LOG_MINP (0) diff --git a/drivers/opus/celt/laplace.h b/thirdparty/opus/celt/laplace.h similarity index 97% rename from drivers/opus/celt/laplace.h rename to thirdparty/opus/celt/laplace.h index 9efcc73aa2d..46c14b5da58 100644 --- a/drivers/opus/celt/laplace.h +++ b/thirdparty/opus/celt/laplace.h @@ -26,8 +26,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/celt/entenc.h" -#include "opus/celt/entdec.h" +#include "entenc.h" +#include "entdec.h" /** Encode a value that is assumed to be the realisation of a Laplace-distributed random process diff --git a/drivers/opus/celt/mathops.c b/thirdparty/opus/celt/mathops.c similarity index 98% rename from drivers/opus/celt/mathops.c rename to thirdparty/opus/celt/mathops.c index 3f7c1a8bdd9..3f8c5dcc0e1 100644 --- a/drivers/opus/celt/mathops.c +++ b/thirdparty/opus/celt/mathops.c @@ -30,9 +30,12 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/mathops.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "mathops.h" /*Compute floor(sqrt(_val)) with exact arithmetic. This has been tested on all possible 32-bit inputs.*/ @@ -61,7 +64,7 @@ unsigned isqrt32(opus_uint32 _val){ return g; } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT opus_val32 frac_div32(opus_val32 a, opus_val32 b) { diff --git a/drivers/opus/celt/mathops.h b/thirdparty/opus/celt/mathops.h similarity index 97% rename from drivers/opus/celt/mathops.h rename to thirdparty/opus/celt/mathops.h index a008d71e185..a0525a96103 100644 --- a/drivers/opus/celt/mathops.h +++ b/thirdparty/opus/celt/mathops.h @@ -34,9 +34,9 @@ #ifndef MATHOPS_H #define MATHOPS_H -#include "opus/celt/arch.h" -#include "opus/celt/entcode.h" -#include "opus/celt/os_support.h" +#include "arch.h" +#include "entcode.h" +#include "os_support.h" /* Multiplies two 16-bit fractional values. Bit-exactness of this macro is important */ #define FRAC_MUL16(a,b) ((16384+((opus_int32)(opus_int16)(a)*(opus_int16)(b)))>>15) @@ -59,7 +59,7 @@ static OPUS_INLINE opus_val32 celt_maxabs16(const opus_val16 *x, int len) #endif #ifndef OVERRIDE_CELT_MAXABS32 -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT static OPUS_INLINE opus_val32 celt_maxabs32(const opus_val32 *x, int len) { int i; @@ -78,7 +78,7 @@ static OPUS_INLINE opus_val32 celt_maxabs32(const opus_val32 *x, int len) #endif -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT #define PI 3.141592653f #define celt_sqrt(x) ((float)sqrt(x)) @@ -139,9 +139,9 @@ static OPUS_INLINE float celt_exp2(float x) #endif -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT -#include "opus/celt/os_support.h" +#include "os_support.h" #ifndef OVERRIDE_CELT_ILOG2 /** Integer log in base2. Undefined for zero and negative numbers */ diff --git a/drivers/opus/celt/mdct.c b/thirdparty/opus/celt/mdct.c similarity index 97% rename from drivers/opus/celt/mdct.c rename to thirdparty/opus/celt/mdct.c index 641a20e49ac..5315ad11a37 100644 --- a/drivers/opus/celt/mdct.c +++ b/thirdparty/opus/celt/mdct.c @@ -40,19 +40,21 @@ */ #ifndef SKIP_CONFIG_H -#include "opus/opus_config.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #endif -#include "opus/celt/mdct.h" -#include "opus/celt/kiss_fft.h" -#include "opus/celt/_kiss_fft_guts.h" +#include "mdct.h" +#include "kiss_fft.h" +#include "_kiss_fft_guts.h" #include -#include "opus/celt/os_support.h" -#include "opus/celt/mathops.h" -#include "opus/celt/stack_alloc.h" +#include "os_support.h" +#include "mathops.h" +#include "stack_alloc.h" #if defined(MIPSr1_ASM) -#include "opus/celt/mips/mdct_mipsr1.h" +#include "mips/mdct_mipsr1.h" #endif @@ -124,7 +126,7 @@ void clt_mdct_forward_c(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scal const kiss_fft_state *st = l->kfft[shift]; const kiss_twiddle_scalar *trig; opus_val16 scale; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* Allows us to scale with MULT16_32_Q16(), which is faster than MULT16_32_Q15() on ARM. */ int scale_shift = st->scale_shift-1; diff --git a/drivers/opus/celt/mdct.h b/thirdparty/opus/celt/mdct.h similarity index 97% rename from drivers/opus/celt/mdct.h rename to thirdparty/opus/celt/mdct.h index 2ec98a92e55..160ae4e0f3b 100644 --- a/drivers/opus/celt/mdct.h +++ b/thirdparty/opus/celt/mdct.h @@ -42,9 +42,9 @@ #ifndef MDCT_H #define MDCT_H -#include "opus/opus_defines.h" -#include "opus/celt/kiss_fft.h" -#include "opus/celt/arch.h" +#include "opus_defines.h" +#include "kiss_fft.h" +#include "arch.h" typedef struct { int n; @@ -54,7 +54,7 @@ typedef struct { } mdct_lookup; #if defined(HAVE_ARM_NE10) -#include "opus/celt/arm/mdct_arm.h" +#include "arm/mdct_arm.h" #endif diff --git a/drivers/opus/celt/mfrngcod.h b/thirdparty/opus/celt/mfrngcod.h similarity index 98% rename from drivers/opus/celt/mfrngcod.h rename to thirdparty/opus/celt/mfrngcod.h index c24d98cde20..809152a59a9 100644 --- a/drivers/opus/celt/mfrngcod.h +++ b/thirdparty/opus/celt/mfrngcod.h @@ -27,7 +27,7 @@ #if !defined(_mfrngcode_H) # define _mfrngcode_H (1) -# include "opus/celt/entcode.h" +# include "entcode.h" /*Constants used by the entropy encoder/decoder.*/ diff --git a/drivers/opus/celt/mips/celt_mipsr1.h b/thirdparty/opus/celt/mips/celt_mipsr1.h similarity index 91% rename from drivers/opus/celt/mips/celt_mipsr1.h rename to thirdparty/opus/celt/mips/celt_mipsr1.h index 906848f1ecb..e85661a6618 100644 --- a/drivers/opus/celt/mips/celt_mipsr1.h +++ b/thirdparty/opus/celt/mips/celt_mipsr1.h @@ -29,26 +29,29 @@ #ifndef __CELT_MIPSR1_H__ #define __CELT_MIPSR1_H__ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #define CELT_C -#include "opus/celt/os_support.h" -#include "opus/celt/mdct.h" +#include "os_support.h" +#include "mdct.h" #include -#include "opus/celt/celt.h" -#include "opus/celt/pitch.h" -#include "opus/celt/bands.h" -#include "opus/celt/modes.h" -#include "opus/celt/entcode.h" -#include "opus/celt/quant_bands.h" -#include "opus/celt/rate.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/mathops.h" -#include "opus/celt/float_cast.h" +#include "celt.h" +#include "pitch.h" +#include "bands.h" +#include "modes.h" +#include "entcode.h" +#include "quant_bands.h" +#include "rate.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "float_cast.h" #include -#include "opus/celt/celt_lpc.h" -#include "opus/celt/vq.h" +#include "celt_lpc.h" +#include "vq.h" #define OVERRIDE_comb_filter void comb_filter(opus_val32 *y, opus_val32 *x, int T0, int T1, int N, diff --git a/drivers/opus/celt/mips/fixed_generic_mipsr1.h b/thirdparty/opus/celt/mips/fixed_generic_mipsr1.h similarity index 100% rename from drivers/opus/celt/mips/fixed_generic_mipsr1.h rename to thirdparty/opus/celt/mips/fixed_generic_mipsr1.h diff --git a/drivers/opus/celt/mips/kiss_fft_mipsr1.h b/thirdparty/opus/celt/mips/kiss_fft_mipsr1.h similarity index 99% rename from drivers/opus/celt/mips/kiss_fft_mipsr1.h rename to thirdparty/opus/celt/mips/kiss_fft_mipsr1.h index 09dc9af4643..400ca4de9c5 100644 --- a/drivers/opus/celt/mips/kiss_fft_mipsr1.h +++ b/thirdparty/opus/celt/mips/kiss_fft_mipsr1.h @@ -30,7 +30,7 @@ #error "This file should only be included from _kiss_fft_guts.h" #endif -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT #define S_MUL_ADD(a, b, c, d) (S_MUL(a,b)+S_MUL(c,d)) #define S_MUL_SUB(a, b, c, d) (S_MUL(a,b)-S_MUL(c,d)) @@ -102,7 +102,7 @@ static void kf_bfly5( kiss_twiddle_cpx ya,yb; kiss_fft_cpx * Fout_beg = Fout; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT ya.r = 10126; ya.i = -31164; yb.r = -26510; diff --git a/drivers/opus/celt/mips/mdct_mipsr1.h b/thirdparty/opus/celt/mips/mdct_mipsr1.h similarity index 97% rename from drivers/opus/celt/mips/mdct_mipsr1.h rename to thirdparty/opus/celt/mips/mdct_mipsr1.h index 0bb8b5a0561..2934dab7768 100644 --- a/drivers/opus/celt/mips/mdct_mipsr1.h +++ b/thirdparty/opus/celt/mips/mdct_mipsr1.h @@ -42,16 +42,18 @@ #define __MDCT_MIPSR1_H__ #ifndef SKIP_CONFIG_H -#include "opus/opus_config.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #endif -#include "opus/celt/mdct.h" -#include "opus/celt/kiss_fft.h" -#include "opus/celt/_kiss_fft_guts.h" +#include "mdct.h" +#include "kiss_fft.h" +#include "_kiss_fft_guts.h" #include -#include "opus/celt/os_support.h" -#include "opus/celt/mathops.h" -#include "opus/celt/stack_alloc.h" +#include "os_support.h" +#include "mathops.h" +#include "stack_alloc.h" /* Forward MDCT trashes the input array */ #define OVERRIDE_clt_mdct_forward @@ -65,7 +67,7 @@ void clt_mdct_forward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scalar const kiss_fft_state *st = l->kfft[shift]; const kiss_twiddle_scalar *trig; opus_val16 scale; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* Allows us to scale with MULT16_32_Q16(), which is faster than MULT16_32_Q15() on ARM. */ int scale_shift = st->scale_shift-1; diff --git a/drivers/opus/celt/mips/pitch_mipsr1.h b/thirdparty/opus/celt/mips/pitch_mipsr1.h similarity index 100% rename from drivers/opus/celt/mips/pitch_mipsr1.h rename to thirdparty/opus/celt/mips/pitch_mipsr1.h diff --git a/drivers/opus/celt/mips/vq_mipsr1.h b/thirdparty/opus/celt/mips/vq_mipsr1.h similarity index 96% rename from drivers/opus/celt/mips/vq_mipsr1.h rename to thirdparty/opus/celt/mips/vq_mipsr1.h index c68159972fe..54cef861337 100644 --- a/drivers/opus/celt/mips/vq_mipsr1.h +++ b/thirdparty/opus/celt/mips/vq_mipsr1.h @@ -28,10 +28,13 @@ #ifndef __VQ_MIPSR1_H__ #define __VQ_MIPSR1_H__ -#include "opus/opus_config.h" -#include "opus/celt/mathops.h" -#include "opus/celt/arch.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "mathops.h" +#include "arch.h" static unsigned extract_collapse_mask(int *iy, int N, int B); static void normalise_residual(int * OPUS_RESTRICT iy, celt_norm * OPUS_RESTRICT X, int N, opus_val32 Ryy, opus_val16 gain); @@ -73,7 +76,7 @@ static void exp_rotation1(celt_norm *X, int len, int stride, opus_val16 c, opus_ void renormalise_vector_mips(celt_norm *X, int N, opus_val16 gain, int arch) { int i; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int k; #endif opus_val32 E = EPSILON; @@ -104,7 +107,7 @@ void renormalise_vector_mips(celt_norm *X, int N, opus_val16 gain, int arch) } asm volatile("MFLO %0, $ac1" : "=r" (E)); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT k = celt_ilog2(E)>>1; #endif t = VSHR32(E, 2*(k-7)); diff --git a/drivers/opus/celt/modes.c b/thirdparty/opus/celt/modes.c similarity index 97% rename from drivers/opus/celt/modes.c rename to thirdparty/opus/celt/modes.c index d628f1468b6..911686e9055 100644 --- a/drivers/opus/celt/modes.c +++ b/thirdparty/opus/celt/modes.c @@ -26,15 +26,18 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/celt.h" -#include "opus/celt/modes.h" -#include "opus/celt/rate.h" -#include "opus/celt/os_support.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/quant_bands.h" -#include "opus/celt/cpu_support.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "celt.h" +#include "modes.h" +#include "rate.h" +#include "os_support.h" +#include "stack_alloc.h" +#include "quant_bands.h" +#include "cpu_support.h" static const opus_int16 eband5ms[] = { /*0 200 400 600 800 1k 1.2 1.4 1.6 2k 2.4 2.8 3.2 4k 4.8 5.6 6.8 8k 9.6 12k 15.6 */ @@ -60,10 +63,10 @@ static const unsigned char band_allocation[] = { }; #ifndef CUSTOM_MODES_ONLY - #ifdef OPUS_FIXED_POINT - #include "opus/celt/static_modes_fixed.h" + #ifdef FIXED_POINT + #include "static_modes_fixed.h" #else - #include "opus/celt/static_modes_float.h" + #include "static_modes_float.h" #endif #endif /* CUSTOM_MODES_ONLY */ @@ -368,7 +371,7 @@ CELTMode *opus_custom_mode_create(opus_int32 Fs, int frame_size, int *error) if (window==NULL) goto failure; -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT for (i=0;ioverlap;i++) window[i] = Q15ONE*sin(.5*M_PI* sin(.5*M_PI*(i+.5)/mode->overlap) * sin(.5*M_PI*(i+.5)/mode->overlap)); #else diff --git a/drivers/opus/celt/modes.h b/thirdparty/opus/celt/modes.h similarity index 93% rename from drivers/opus/celt/modes.h rename to thirdparty/opus/celt/modes.h index a5f1c30ac9c..be813ccc8b4 100644 --- a/drivers/opus/celt/modes.h +++ b/thirdparty/opus/celt/modes.h @@ -30,12 +30,12 @@ #ifndef MODES_H #define MODES_H -#include "opus/opus_types.h" -#include "opus/celt/celt.h" -#include "opus/celt/arch.h" -#include "opus/celt/mdct.h" -#include "opus/celt/entenc.h" -#include "opus/celt/entdec.h" +#include "opus_types.h" +#include "celt.h" +#include "arch.h" +#include "mdct.h" +#include "entenc.h" +#include "entdec.h" #define MAX_PERIOD 1024 diff --git a/drivers/opus/celt/opus_custom_demo.c b/thirdparty/opus/celt/opus_custom_demo.c similarity index 98% rename from drivers/opus/celt/opus_custom_demo.c rename to thirdparty/opus/celt/opus_custom_demo.c index 956bec4e451..ae41c0de5a2 100644 --- a/drivers/opus/celt/opus_custom_demo.c +++ b/thirdparty/opus/celt/opus_custom_demo.c @@ -25,10 +25,13 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/opus_custom.h" -#include "opus/celt/arch.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus_custom.h" +#include "arch.h" #include #include #include diff --git a/drivers/opus/celt/os_support.h b/thirdparty/opus/celt/os_support.h similarity index 98% rename from drivers/opus/celt/os_support.h rename to thirdparty/opus/celt/os_support.h index 5e36b3ae566..a2171971e9d 100644 --- a/drivers/opus/celt/os_support.h +++ b/thirdparty/opus/celt/os_support.h @@ -35,8 +35,8 @@ # include "custom_support.h" #endif -#include "opus/opus_types.h" -#include "opus/opus_defines.h" +#include "opus_types.h" +#include "opus_defines.h" #include #include diff --git a/drivers/opus/celt/pitch.c b/thirdparty/opus/celt/pitch.c similarity index 94% rename from drivers/opus/celt/pitch.c rename to thirdparty/opus/celt/pitch.c index 1bcbabe9436..1d89cb03429 100644 --- a/drivers/opus/celt/pitch.c +++ b/thirdparty/opus/celt/pitch.c @@ -30,18 +30,21 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/pitch.h" -#include "opus/celt/os_support.h" -#include "opus/celt/modes.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/mathops.h" -#include "opus/celt/celt_lpc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "pitch.h" +#include "os_support.h" +#include "modes.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "celt_lpc.h" static void find_best_pitch(opus_val32 *xcorr, opus_val16 *y, int len, int max_pitch, int *best_pitch -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT , int yshift, opus_val32 maxcorr #endif ) @@ -50,7 +53,7 @@ static void find_best_pitch(opus_val32 *xcorr, opus_val16 *y, int len, opus_val32 Syy=1; opus_val16 best_num[2]; opus_val32 best_den[2]; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int xshift; xshift = celt_ilog2(maxcorr)-14; @@ -71,7 +74,7 @@ static void find_best_pitch(opus_val32 *xcorr, opus_val16 *y, int len, opus_val16 num; opus_val32 xcorr16; xcorr16 = EXTRACT16(VSHR32(xcorr[i], xshift)); -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT /* Considering the range of xcorr16, this should avoid both underflows and overflows (inf) when squaring xcorr16 */ xcorr16 *= 1e-12f; @@ -150,7 +153,7 @@ void pitch_downsample(celt_sig * OPUS_RESTRICT x[], opus_val16 * OPUS_RESTRICT x opus_val16 lpc[4], mem[5]={0,0,0,0,0}; opus_val16 lpc2[5]; opus_val16 c1 = QCONST16(.8f,15); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int shift; opus_val32 maxabs = celt_maxabs32(x[0], len); if (C==2) @@ -180,7 +183,7 @@ void pitch_downsample(celt_sig * OPUS_RESTRICT x[], opus_val16 * OPUS_RESTRICT x 4, len>>1, arch); /* Noise floor -40 dB */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT ac[0] += SHR32(ac[0],13); #else ac[0] *= 1.0001f; @@ -189,7 +192,7 @@ void pitch_downsample(celt_sig * OPUS_RESTRICT x[], opus_val16 * OPUS_RESTRICT x for (i=1;i<=4;i++) { /*ac[i] *= exp(-.5*(2*M_PI*.002*i)*(2*M_PI*.002*i));*/ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT ac[i] -= MULT16_32_Q15(2*i*i, ac[i]); #else ac[i] -= ac[i]*(.008f*i)*(.008f*i); @@ -212,7 +215,7 @@ void pitch_downsample(celt_sig * OPUS_RESTRICT x[], opus_val16 * OPUS_RESTRICT x } /* Pure C implementation. */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT opus_val32 #else void @@ -229,7 +232,7 @@ celt_pitch_xcorr(const opus_val16 *_x, const opus_val16 *_y, #if 0 /* This is a simple version of the pitch correlation that should work well on DSPs like Blackfin and TI C5x/C6x */ int i, j; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT opus_val32 maxcorr=1; #endif #if !defined(OVERRIDE_PITCH_XCORR) @@ -241,11 +244,11 @@ celt_pitch_xcorr(const opus_val16 *_x, const opus_val16 *_y, for (j=0;j0); @@ -271,7 +274,7 @@ celt_pitch_xcorr(const opus_val16 *_x, const opus_val16 *_y, xcorr[i+1]=sum[1]; xcorr[i+2]=sum[2]; xcorr[i+3]=sum[3]; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT sum[0] = MAX32(sum[0], sum[1]); sum[2] = MAX32(sum[2], sum[3]); sum[0] = MAX32(sum[0], sum[2]); @@ -288,11 +291,11 @@ celt_pitch_xcorr(const opus_val16 *_x, const opus_val16 *_y, sum = celt_inner_prod(_x, _y+i, len, arch); #endif xcorr[i] = sum; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT maxcorr = MAX32(maxcorr, sum); #endif } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT return maxcorr; #endif #endif @@ -307,7 +310,7 @@ void pitch_search(const opus_val16 * OPUS_RESTRICT x_lp, opus_val16 * OPUS_RESTR VARDECL(opus_val16, x_lp4); VARDECL(opus_val16, y_lp4); VARDECL(opus_val32, xcorr); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT opus_val32 maxcorr; opus_val32 xmax, ymax; int shift=0; @@ -330,7 +333,7 @@ void pitch_search(const opus_val16 * OPUS_RESTRICT x_lp, opus_val16 * OPUS_RESTR for (j=0;j>2;j++) y_lp4[j] = y[2*j]; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT xmax = celt_maxabs16(x_lp4, len>>2); ymax = celt_maxabs16(y_lp4, lag>>2); shift = celt_ilog2(MAX32(1, MAX32(xmax, ymax)))-11; @@ -349,19 +352,19 @@ void pitch_search(const opus_val16 * OPUS_RESTRICT x_lp, opus_val16 * OPUS_RESTR /* Coarse search with 4x decimation */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT maxcorr = #endif celt_pitch_xcorr(x_lp4, y_lp4, xcorr, len>>2, max_pitch>>2, arch); find_best_pitch(xcorr, y_lp4, len>>2, max_pitch>>2, best_pitch -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT , 0, maxcorr #endif ); /* Finer search with 2x decimation */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT maxcorr=1; #endif for (i=0;i>1;i++) @@ -370,7 +373,7 @@ void pitch_search(const opus_val16 * OPUS_RESTRICT x_lp, opus_val16 * OPUS_RESTR xcorr[i] = 0; if (abs(i-2*best_pitch[0])>2 && abs(i-2*best_pitch[1])>2) continue; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT sum = 0; for (j=0;j>1;j++) sum += SHR32(MULT16_16(x_lp[j],y[i+j]), shift); @@ -378,12 +381,12 @@ void pitch_search(const opus_val16 * OPUS_RESTRICT x_lp, opus_val16 * OPUS_RESTR sum = celt_inner_prod_c(x_lp, y+i, len>>1); #endif xcorr[i] = MAX32(-1, sum); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT maxcorr = MAX32(maxcorr, sum); #endif } find_best_pitch(xcorr, y, len>>1, max_pitch>>1, best_pitch -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT , shift+1, maxcorr #endif ); @@ -447,7 +450,7 @@ opus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod, yy = yy_lookup[T0]; best_xy = xy; best_yy = yy; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT { opus_val32 x2y2; int sh, t; @@ -483,7 +486,7 @@ opus_val16 remove_doubling(opus_val16 *x, int maxperiod, int minperiod, dual_inner_prod(x, &x[-T1], &x[-T1b], N, &xy, &xy2, arch); xy += xy2; yy = yy_lookup[T1] + yy_lookup[T1b]; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT { opus_val32 x2y2; int sh, t; diff --git a/drivers/opus/celt/pitch.h b/thirdparty/opus/celt/pitch.h similarity index 96% rename from drivers/opus/celt/pitch.h rename to thirdparty/opus/celt/pitch.h index ecae7667b8d..65a77a6ecc2 100644 --- a/drivers/opus/celt/pitch.h +++ b/thirdparty/opus/celt/pitch.h @@ -34,21 +34,21 @@ #ifndef PITCH_H #define PITCH_H -#include "opus/celt/modes.h" -#include "opus/celt/cpu_support.h" +#include "modes.h" +#include "cpu_support.h" #if (defined(OPUS_X86_MAY_HAVE_SSE) && !defined(FIXED_POINT)) \ || ((defined(OPUS_X86_MAY_HAVE_SSE4_1) || defined(OPUS_X86_MAY_HAVE_SSE2)) && defined(FIXED_POINT)) -#include "opus/celt/x86/pitch_sse.h" +#include "x86/pitch_sse.h" #endif #if defined(MIPSr1_ASM) -#include "opus/celt/mips/pitch_mipsr1.h" +#include "mips/pitch_mipsr1.h" #endif #if ((defined(OPUS_ARM_ASM) && defined(FIXED_POINT)) \ || defined(OPUS_ARM_MAY_HAVE_NEON_INTR)) -# include "opus/celt/arm/pitch_arm.h" +# include "arm/pitch_arm.h" #endif void pitch_downsample(celt_sig * OPUS_RESTRICT x[], opus_val16 * OPUS_RESTRICT x_lp, @@ -178,7 +178,7 @@ void comb_filter_const_c(opus_val32 *y, opus_val32 *x, int T, int N, #endif -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT opus_val32 #else void @@ -206,7 +206,7 @@ void xcorr, len, max_pitch)) # else -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT opus_val32 #else void diff --git a/drivers/opus/celt/quant_bands.c b/thirdparty/opus/celt/quant_bands.c similarity index 97% rename from drivers/opus/celt/quant_bands.c rename to thirdparty/opus/celt/quant_bands.c index b38bfa8b8e6..95076e0af2d 100644 --- a/drivers/opus/celt/quant_bands.c +++ b/thirdparty/opus/celt/quant_bands.c @@ -25,18 +25,21 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/quant_bands.h" -#include "opus/celt/laplace.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "quant_bands.h" +#include "laplace.h" #include -#include "opus/celt/os_support.h" -#include "opus/celt/arch.h" -#include "opus/celt/mathops.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/rate.h" +#include "os_support.h" +#include "arch.h" +#include "mathops.h" +#include "stack_alloc.h" +#include "rate.h" -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* Mean energy in each band quantized in Q4 */ const signed char eMeans[25] = { 103,100, 92, 85, 81, @@ -56,7 +59,7 @@ const opus_val16 eMeans[25] = { }; #endif /* prediction coefficients: 0.9, 0.8, 0.65, 0.5 */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT static const opus_val16 pred_coef[4] = {29440, 26112, 21248, 16384}; static const opus_val16 beta_coef[4] = {30147, 22282, 12124, 6554}; static const opus_val16 beta_intra = 4915; @@ -187,7 +190,7 @@ static int quant_coarse_energy_impl(const CELTMode *m, int start, int end, opus_val16 decay_bound; x = eBands[i+c*m->nbEBands]; oldE = MAX16(-QCONST16(9.f,DB_SHIFT), oldEBands[i+c*m->nbEBands]); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT f = SHL32(EXTEND32(x),7) - PSHR32(MULT16_16(coef,oldE), 8) - prev[c]; /* Rounding to nearest integer here is really important! */ qi = (f+QCONST32(.5f,DB_SHIFT+7))>>(DB_SHIFT+7); @@ -245,7 +248,7 @@ static int quant_coarse_energy_impl(const CELTMode *m, int start, int end, q = (opus_val32)SHL32(EXTEND32(qi),DB_SHIFT); tmp = PSHR32(MULT16_16(coef,oldE),8) + prev[c] + SHL32(q,7); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT tmp = MAX32(-QCONST32(28.f, DB_SHIFT+7), tmp); #endif oldEBands[i+c*m->nbEBands] = PSHR32(tmp, 7); @@ -282,7 +285,7 @@ void quant_coarse_energy(const CELTMode *m, int start, int end, int effEnd, max_decay = QCONST16(16.f,DB_SHIFT); if (end-start>10) { -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT max_decay = MIN32(max_decay, SHL32(EXTEND32(nbAvailableBytes),DB_SHIFT-3)); #else max_decay = MIN32(max_decay, .125f*nbAvailableBytes); @@ -369,7 +372,7 @@ void quant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBa do { int q2; opus_val16 offset; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* Has to be without rounding */ q2 = (error[i+c*m->nbEBands]+QCONST16(.5f,DB_SHIFT))>>(DB_SHIFT-fine_quant[i]); #else @@ -380,7 +383,7 @@ void quant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldEBa if (q2<0) q2 = 0; ec_enc_bits(enc, q2, fine_quant[i]); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT offset = SUB16(SHR32(SHL32(EXTEND32(q2),DB_SHIFT)+QCONST16(.5f,DB_SHIFT),fine_quant[i]),QCONST16(.5f,DB_SHIFT)); #else offset = (q2+.5f)*(1<<(14-fine_quant[i]))*(1.f/16384) - .5f; @@ -409,7 +412,7 @@ void quant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 *ol opus_val16 offset; q2 = error[i+c*m->nbEBands]<0 ? 0 : 1; ec_enc_bits(enc, q2, 1); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT offset = SHR16(SHL16(q2,DB_SHIFT)-QCONST16(.5f,DB_SHIFT),fine_quant[i]+1); #else offset = (q2-.5f)*(1<<(14-fine_quant[i]-1))*(1.f/16384); @@ -477,7 +480,7 @@ void unquant_coarse_energy(const CELTMode *m, int start, int end, opus_val16 *ol oldEBands[i+c*m->nbEBands] = MAX16(-QCONST16(9.f,DB_SHIFT), oldEBands[i+c*m->nbEBands]); tmp = PSHR32(MULT16_16(coef,oldEBands[i+c*m->nbEBands]),8) + prev[c] + SHL32(q,7); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT tmp = MAX32(-QCONST32(28.f, DB_SHIFT+7), tmp); #endif oldEBands[i+c*m->nbEBands] = PSHR32(tmp, 7); @@ -499,7 +502,7 @@ void unquant_fine_energy(const CELTMode *m, int start, int end, opus_val16 *oldE int q2; opus_val16 offset; q2 = ec_dec_bits(dec, fine_quant[i]); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT offset = SUB16(SHR32(SHL32(EXTEND32(q2),DB_SHIFT)+QCONST16(.5f,DB_SHIFT),fine_quant[i]),QCONST16(.5f,DB_SHIFT)); #else offset = (q2+.5f)*(1<<(14-fine_quant[i]))*(1.f/16384) - .5f; @@ -525,7 +528,7 @@ void unquant_energy_finalise(const CELTMode *m, int start, int end, opus_val16 * int q2; opus_val16 offset; q2 = ec_dec_bits(dec, 1); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT offset = SHR16(SHL16(q2,DB_SHIFT)-QCONST16(.5f,DB_SHIFT),fine_quant[i]+1); #else offset = (q2-.5f)*(1<<(14-fine_quant[i]-1))*(1.f/16384); diff --git a/drivers/opus/celt/quant_bands.h b/thirdparty/opus/celt/quant_bands.h similarity index 94% rename from drivers/opus/celt/quant_bands.h rename to thirdparty/opus/celt/quant_bands.h index 31d4b94e416..0490bca4b40 100644 --- a/drivers/opus/celt/quant_bands.h +++ b/thirdparty/opus/celt/quant_bands.h @@ -29,13 +29,13 @@ #ifndef QUANT_BANDS #define QUANT_BANDS -#include "opus/celt/arch.h" -#include "opus/celt/modes.h" -#include "opus/celt/entenc.h" -#include "opus/celt/entdec.h" -#include "opus/celt/mathops.h" +#include "arch.h" +#include "modes.h" +#include "entenc.h" +#include "entdec.h" +#include "mathops.h" -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT extern const signed char eMeans[25]; #else extern const opus_val16 eMeans[25]; diff --git a/drivers/opus/celt/rate.c b/thirdparty/opus/celt/rate.c similarity index 99% rename from drivers/opus/celt/rate.c rename to thirdparty/opus/celt/rate.c index e69fb3f0304..b28d8feccd9 100644 --- a/drivers/opus/celt/rate.c +++ b/thirdparty/opus/celt/rate.c @@ -25,16 +25,19 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include -#include "opus/celt/modes.h" -#include "opus/celt/cwrs.h" -#include "opus/celt/arch.h" -#include "opus/celt/os_support.h" +#include "modes.h" +#include "cwrs.h" +#include "arch.h" +#include "os_support.h" -#include "opus/celt/entcode.h" -#include "opus/celt/rate.h" +#include "entcode.h" +#include "rate.h" static const unsigned char LOG2_FRAC_TABLE[24]={ 0, diff --git a/drivers/opus/celt/rate.h b/thirdparty/opus/celt/rate.h similarity index 98% rename from drivers/opus/celt/rate.h rename to thirdparty/opus/celt/rate.h index cf8085fccfd..515f7687cec 100644 --- a/drivers/opus/celt/rate.h +++ b/thirdparty/opus/celt/rate.h @@ -40,8 +40,8 @@ #define QTHETA_OFFSET 4 #define QTHETA_OFFSET_TWOPHASE 16 -#include "opus/celt/cwrs.h" -#include "opus/celt/modes.h" +#include "cwrs.h" +#include "modes.h" void compute_pulse_cache(CELTMode *m, int LM); diff --git a/drivers/opus/celt/stack_alloc.h b/thirdparty/opus/celt/stack_alloc.h similarity index 98% rename from drivers/opus/celt/stack_alloc.h rename to thirdparty/opus/celt/stack_alloc.h index 7cd6c56ccfc..2b51c8d80cc 100644 --- a/drivers/opus/celt/stack_alloc.h +++ b/thirdparty/opus/celt/stack_alloc.h @@ -32,8 +32,8 @@ #ifndef STACK_ALLOC_H #define STACK_ALLOC_H -#include "opus/opus_types.h" -#include "opus/opus_defines.h" +#include "opus_types.h" +#include "opus_defines.h" #if (!defined (VAR_ARRAYS) && !defined (USE_ALLOCA) && !defined (NONTHREADSAFE_PSEUDOSTACK)) #error "Opus requires one of VAR_ARRAYS, USE_ALLOCA, or NONTHREADSAFE_PSEUDOSTACK be defined to select the temporary allocation mode." @@ -151,7 +151,7 @@ extern char *global_stack_top; #endif /* ENABLE_VALGRIND */ -#include "opus/celt/os_support.h" +#include "os_support.h" #define VARDECL(type, var) type *var #define ALLOC(var, size, type) var = PUSH(global_stack, size, type) #define SAVE_STACK char *_saved_stack = global_stack; diff --git a/drivers/opus/celt/static_modes_fixed.h b/thirdparty/opus/celt/static_modes_fixed.h similarity index 99% rename from drivers/opus/celt/static_modes_fixed.h rename to thirdparty/opus/celt/static_modes_fixed.h index 352642f507f..8717d626cbe 100644 --- a/drivers/opus/celt/static_modes_fixed.h +++ b/thirdparty/opus/celt/static_modes_fixed.h @@ -1,12 +1,12 @@ /* The contents of this file was automatically generated by dump_modes.c with arguments: 48000 960 It contains static definitions for some pre-defined modes. */ -#include "opus/celt/modes.h" -#include "opus/celt/rate.h" +#include "modes.h" +#include "rate.h" #ifdef HAVE_ARM_NE10 #define OVERRIDE_FFT 1 -#include "opus/celt/static_modes_fixed_arm_ne10.h" +#include "static_modes_fixed_arm_ne10.h" #endif #ifndef DEF_WINDOW120 diff --git a/drivers/opus/celt/static_modes_fixed_arm_ne10.h b/thirdparty/opus/celt/static_modes_fixed_arm_ne10.h similarity index 100% rename from drivers/opus/celt/static_modes_fixed_arm_ne10.h rename to thirdparty/opus/celt/static_modes_fixed_arm_ne10.h diff --git a/drivers/opus/celt/static_modes_float.h b/thirdparty/opus/celt/static_modes_float.h similarity index 99% rename from drivers/opus/celt/static_modes_float.h rename to thirdparty/opus/celt/static_modes_float.h index f7d501a9939..e102a383918 100644 --- a/drivers/opus/celt/static_modes_float.h +++ b/thirdparty/opus/celt/static_modes_float.h @@ -1,12 +1,12 @@ /* The contents of this file was automatically generated by dump_modes.c with arguments: 48000 960 It contains static definitions for some pre-defined modes. */ -#include "opus/celt/modes.h" -#include "opus/celt/rate.h" +#include "modes.h" +#include "rate.h" #ifdef HAVE_ARM_NE10 #define OVERRIDE_FFT 1 -#include "opus/celt/static_modes_float_arm_ne10.h" +#include "static_modes_float_arm_ne10.h" #endif #ifndef DEF_WINDOW120 diff --git a/drivers/opus/celt/static_modes_float_arm_ne10.h b/thirdparty/opus/celt/static_modes_float_arm_ne10.h similarity index 100% rename from drivers/opus/celt/static_modes_float_arm_ne10.h rename to thirdparty/opus/celt/static_modes_float_arm_ne10.h diff --git a/thirdparty/opus/celt/tests/test_unit_cwrs32.c b/thirdparty/opus/celt/tests/test_unit_cwrs32.c new file mode 100644 index 00000000000..36dd8af5f5c --- /dev/null +++ b/thirdparty/opus/celt/tests/test_unit_cwrs32.c @@ -0,0 +1,161 @@ +/* Copyright (c) 2008-2011 Xiph.Org Foundation, Mozilla Corporation, + Gregory Maxwell + Written by Jean-Marc Valin, Gregory Maxwell, and Timothy B. Terriberry */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include + +#ifndef CUSTOM_MODES +#define CUSTOM_MODES +#else +#define TEST_CUSTOM_MODES +#endif + +#define CELT_C +#include "stack_alloc.h" +#include "entenc.c" +#include "entdec.c" +#include "entcode.c" +#include "cwrs.c" +#include "mathops.c" +#include "rate.h" + +#define NMAX (240) +#define KMAX (128) + +#ifdef TEST_CUSTOM_MODES + +#define NDIMS (44) +static const int pn[NDIMS]={ + 2, 3, 4, 5, 6, 7, 8, 9, 10, + 11, 12, 13, 14, 15, 16, 18, 20, 22, + 24, 26, 28, 30, 32, 36, 40, 44, 48, + 52, 56, 60, 64, 72, 80, 88, 96, 104, + 112, 120, 128, 144, 160, 176, 192, 208 +}; +static const int pkmax[NDIMS]={ + 128, 128, 128, 128, 88, 52, 36, 26, 22, + 18, 16, 15, 13, 12, 12, 11, 10, 9, + 9, 8, 8, 7, 7, 7, 7, 6, 6, + 6, 6, 6, 5, 5, 5, 5, 5, 5, + 4, 4, 4, 4, 4, 4, 4, 4 +}; + +#else /* TEST_CUSTOM_MODES */ + +#define NDIMS (22) +static const int pn[NDIMS]={ + 2, 3, 4, 6, 8, 9, 11, 12, 16, + 18, 22, 24, 32, 36, 44, 48, 64, 72, + 88, 96, 144, 176 +}; +static const int pkmax[NDIMS]={ + 128, 128, 128, 88, 36, 26, 18, 16, 12, + 11, 9, 9, 7, 7, 6, 6, 5, 5, + 5, 5, 4, 4 +}; + +#endif + +int main(void){ + int t; + int n; + ALLOC_STACK; + for(t=0;tpkmax[t])break; + printf("Testing CWRS with N=%i, K=%i...\n",n,k); +#if defined(SMALL_FOOTPRINT) + nc=ncwrs_urow(n,k,uu); +#else + nc=CELT_PVQ_V(n,k); +#endif + inc=nc/20000; + if(inc<1)inc=1; + for(i=0;i");*/ +#if defined(SMALL_FOOTPRINT) + ii=icwrs(n,k,&v,y,u); +#else + ii=icwrs(n,y); + v=CELT_PVQ_V(n,k); +#endif + if(ii!=i){ + fprintf(stderr,"Combination-index mismatch (%lu!=%lu).\n", + (long)ii,(long)i); + return 1; + } + if(v!=nc){ + fprintf(stderr,"Combination count mismatch (%lu!=%lu).\n", + (long)v,(long)nc); + return 2; + } + /*printf(" %6u\n",i);*/ + } + /*printf("\n");*/ + } + } + return 0; +} diff --git a/thirdparty/opus/celt/tests/test_unit_dft.c b/thirdparty/opus/celt/tests/test_unit_dft.c new file mode 100644 index 00000000000..6166eb0e4fa --- /dev/null +++ b/thirdparty/opus/celt/tests/test_unit_dft.c @@ -0,0 +1,189 @@ +/* Copyright (c) 2008 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#define SKIP_CONFIG_H + +#ifndef CUSTOM_MODES +#define CUSTOM_MODES +#endif + +#include + +#define CELT_C +#define TEST_UNIT_DFT_C +#include "stack_alloc.h" +#include "kiss_fft.h" +#include "kiss_fft.c" +#include "mathops.c" +#include "entcode.c" + +#if defined(OPUS_X86_MAY_HAVE_SSE2) || defined(OPUS_X86_MAY_HAVE_SSE4_1) +# include "x86/x86cpu.c" +#elif defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/armcpu.c" +# include "celt_lpc.c" +# include "pitch.c" +# if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/celt_neon_intr.c" +# if defined(HAVE_ARM_NE10) +# include "mdct.c" +# include "arm/celt_ne10_fft.c" +# include "arm/celt_ne10_mdct.c" +# endif +# endif +# include "arm/arm_celt_map.c" +#endif + +#ifndef M_PI +#define M_PI 3.141592653 +#endif + +int ret = 0; + +void check(kiss_fft_cpx * in,kiss_fft_cpx * out,int nfft,int isinverse) +{ + int bin,k; + double errpow=0,sigpow=0, snr; + + for (bin=0;bin1) { + int k; + for (k=1;k +#include +#include +#include +#include "entcode.h" +#include "entenc.h" +#include "entdec.h" +#include + +#include "entenc.c" +#include "entdec.c" +#include "entcode.c" + +#ifndef M_LOG2E +# define M_LOG2E 1.4426950408889634074 +#endif +#define DATA_SIZE 10000000 +#define DATA_SIZE2 10000 + +int main(int _argc,char **_argv){ + ec_enc enc; + ec_dec dec; + long nbits; + long nbits2; + double entropy; + int ft; + int ftb; + int sz; + int i; + int ret; + unsigned int sym; + unsigned int seed; + unsigned char *ptr; + const char *env_seed; + ret=0; + entropy=0; + if (_argc > 2) { + fprintf(stderr, "Usage: %s []\n", _argv[0]); + return 1; + } + env_seed = getenv("SEED"); + if (_argc > 1) + seed = atoi(_argv[1]); + else if (env_seed) + seed = atoi(env_seed); + else + seed = time(NULL); + /*Testing encoding of raw bit values.*/ + ptr = (unsigned char *)malloc(DATA_SIZE); + ec_enc_init(&enc,ptr, DATA_SIZE); + for(ft=2;ft<1024;ft++){ + for(i=0;i>(rand()%11U))+1U)+10; + sz=rand()/((RAND_MAX>>(rand()%9U))+1U); + data=(unsigned *)malloc(sz*sizeof(*data)); + tell=(unsigned *)malloc((sz+1)*sizeof(*tell)); + ec_enc_init(&enc,ptr,DATA_SIZE2); + zeros = rand()%13==0; + tell[0]=ec_tell_frac(&enc); + for(j=0;j>(rand()%9U))+1U); + logp1=(unsigned *)malloc(sz*sizeof(*logp1)); + data=(unsigned *)malloc(sz*sizeof(*data)); + tell=(unsigned *)malloc((sz+1)*sizeof(*tell)); + enc_method=(unsigned *)malloc(sz*sizeof(*enc_method)); + ec_enc_init(&enc,ptr,DATA_SIZE2); + tell[0]=ec_tell_frac(&enc); + for(j=0;j>1)+1); + logp1[j]=(rand()%15)+1; + enc_method[j]=rand()/((RAND_MAX>>2)+1); + switch(enc_method[j]){ + case 0:{ + ec_encode(&enc,data[j]?(1<>2)+1); + switch(dec_method){ + case 0:{ + fs=ec_decode(&dec,1<=(1<=(1< +#include +#include "laplace.h" +#define CELT_C +#include "stack_alloc.h" + +#include "entenc.c" +#include "entdec.c" +#include "entcode.c" +#include "laplace.c" + +#define DATA_SIZE 40000 + +int ec_laplace_get_start_freq(int decay) +{ + opus_uint32 ft = 32768 - LAPLACE_MINP*(2*LAPLACE_NMIN+1); + int fs = (ft*(16384-decay))/(16384+decay); + return fs+LAPLACE_MINP; +} + +int main(void) +{ + int i; + int ret = 0; + ec_enc enc; + ec_dec dec; + unsigned char *ptr; + int val[10000], decay[10000]; + ALLOC_STACK; + ptr = (unsigned char *)malloc(DATA_SIZE); + ec_enc_init(&enc,ptr,DATA_SIZE); + + val[0] = 3; decay[0] = 6000; + val[1] = 0; decay[1] = 5800; + val[2] = -1; decay[2] = 5600; + for (i=3;i<10000;i++) + { + val[i] = rand()%15-7; + decay[i] = rand()%11000+5000; + } + for (i=0;i<10000;i++) + ec_laplace_encode(&enc, &val[i], + ec_laplace_get_start_freq(decay[i]), decay[i]); + + ec_enc_done(&enc); + + ec_dec_init(&dec,ec_get_buffer(&enc),ec_range_bytes(&enc)); + + for (i=0;i<10000;i++) + { + int d = ec_laplace_decode(&dec, + ec_laplace_get_start_freq(decay[i]), decay[i]); + if (d != val[i]) + { + fprintf (stderr, "Got %d instead of %d\n", d, val[i]); + ret = 1; + } + } + + free(ptr); + return ret; +} diff --git a/thirdparty/opus/celt/tests/test_unit_mathops.c b/thirdparty/opus/celt/tests/test_unit_mathops.c new file mode 100644 index 00000000000..fd3319da91c --- /dev/null +++ b/thirdparty/opus/celt/tests/test_unit_mathops.c @@ -0,0 +1,304 @@ +/* Copyright (c) 2008-2011 Xiph.Org Foundation, Mozilla Corporation, + Gregory Maxwell + Written by Jean-Marc Valin, Gregory Maxwell, and Timothy B. Terriberry */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifndef CUSTOM_MODES +#define CUSTOM_MODES +#endif + +#define CELT_C + +#include +#include +#include "mathops.c" +#include "entenc.c" +#include "entdec.c" +#include "entcode.c" +#include "bands.c" +#include "quant_bands.c" +#include "laplace.c" +#include "vq.c" +#include "cwrs.c" +#include "pitch.c" +#include "celt_lpc.c" +#include "celt.c" + +#if defined(OPUS_X86_MAY_HAVE_SSE) || defined(OPUS_X86_MAY_HAVE_SSE2) || defined(OPUS_X86_MAY_HAVE_SSE4_1) +# if defined(OPUS_X86_MAY_HAVE_SSE) +# include "x86/pitch_sse.c" +# endif +# if defined(OPUS_X86_MAY_HAVE_SSE2) +# include "x86/pitch_sse2.c" +# endif +# if defined(OPUS_X86_MAY_HAVE_SSE4_1) +# include "x86/pitch_sse4_1.c" +# include "x86/celt_lpc_sse.c" +# endif +# include "x86/x86_celt_map.c" +#elif defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/armcpu.c" +# if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/celt_neon_intr.c" +# if defined(HAVE_ARM_NE10) +# include "kiss_fft.c" +# include "mdct.c" +# include "arm/celt_ne10_fft.c" +# include "arm/celt_ne10_mdct.c" +# endif +# endif +# include "arm/arm_celt_map.c" +#endif + +#ifdef FIXED_POINT +#define WORD "%d" +#else +#define WORD "%f" +#endif + +int ret = 0; + +void testdiv(void) +{ + opus_int32 i; + for (i=1;i<=327670;i++) + { + double prod; + opus_val32 val; + val = celt_rcp(i); +#ifdef FIXED_POINT + prod = (1./32768./65526.)*val*i; +#else + prod = val*i; +#endif + if (fabs(prod-1) > .00025) + { + fprintf (stderr, "div failed: 1/%d="WORD" (product = %f)\n", i, val, prod); + ret = 1; + } + } +} + +void testsqrt(void) +{ + opus_int32 i; + for (i=1;i<=1000000000;i++) + { + double ratio; + opus_val16 val; + val = celt_sqrt(i); + ratio = val/sqrt(i); + if (fabs(ratio - 1) > .0005 && fabs(val-sqrt(i)) > 2) + { + fprintf (stderr, "sqrt failed: sqrt(%d)="WORD" (ratio = %f)\n", i, val, ratio); + ret = 1; + } + i+= i>>10; + } +} + +void testbitexactcos(void) +{ + int i; + opus_int32 min_d,max_d,last,chk; + chk=max_d=0; + last=min_d=32767; + for(i=64;i<=16320;i++) + { + opus_int32 d; + opus_int32 q=bitexact_cos(i); + chk ^= q*i; + d = last - q; + if (d>max_d)max_d=d; + if (dmax_d)max_d=d; + if (d0.0009) + { + fprintf (stderr, "celt_log2 failed: fabs((1.442695040888963387*log(x))-celt_log2(x))>0.001 (x = %f, error = %f)\n", x,error); + ret = 1; + } + } +} + +void testexp2(void) +{ + float x; + for (x=-11.0;x<24.0;x+=0.0007) + { + float error = fabs(x-(1.442695040888963387*log(celt_exp2(x)))); + if (error>0.0002) + { + fprintf (stderr, "celt_exp2 failed: fabs(x-(1.442695040888963387*log(celt_exp2(x))))>0.0005 (x = %f, error = %f)\n", x,error); + ret = 1; + } + } +} + +void testexp2log2(void) +{ + float x; + for (x=-11.0;x<24.0;x+=0.0007) + { + float error = fabs(x-(celt_log2(celt_exp2(x)))); + if (error>0.001) + { + fprintf (stderr, "celt_log2/celt_exp2 failed: fabs(x-(celt_log2(celt_exp2(x))))>0.001 (x = %f, error = %f)\n", x,error); + ret = 1; + } + } +} +#else +void testlog2(void) +{ + opus_val32 x; + for (x=8;x<1073741824;x+=(x>>3)) + { + float error = fabs((1.442695040888963387*log(x/16384.0))-celt_log2(x)/1024.0); + if (error>0.003) + { + fprintf (stderr, "celt_log2 failed: x = %ld, error = %f\n", (long)x,error); + ret = 1; + } + } +} + +void testexp2(void) +{ + opus_val16 x; + for (x=-32768;x<15360;x++) + { + float error1 = fabs(x/1024.0-(1.442695040888963387*log(celt_exp2(x)/65536.0))); + float error2 = fabs(exp(0.6931471805599453094*x/1024.0)-celt_exp2(x)/65536.0); + if (error1>0.0002&&error2>0.00004) + { + fprintf (stderr, "celt_exp2 failed: x = "WORD", error1 = %f, error2 = %f\n", x,error1,error2); + ret = 1; + } + } +} + +void testexp2log2(void) +{ + opus_val32 x; + for (x=8;x<65536;x+=(x>>3)) + { + float error = fabs(x-0.25*celt_exp2(celt_log2(x)))/16384; + if (error>0.004) + { + fprintf (stderr, "celt_log2/celt_exp2 failed: fabs(x-(celt_exp2(celt_log2(x))))>0.001 (x = %ld, error = %f)\n", (long)x,error); + ret = 1; + } + } +} + +void testilog2(void) +{ + opus_val32 x; + for (x=1;x<=268435455;x+=127) + { + opus_val32 lg; + opus_val32 y; + + lg = celt_ilog2(x); + if (lg<0 || lg>=31) + { + printf("celt_ilog2 failed: 0<=celt_ilog2(x)<31 (x = %d, celt_ilog2(x) = %d)\n",x,lg); + ret = 1; + } + y = 1<>1)>=y) + { + printf("celt_ilog2 failed: 2**celt_ilog2(x)<=x<2**(celt_ilog2(x)+1) (x = %d, 2**celt_ilog2(x) = %d)\n",x,y); + ret = 1; + } + } +} +#endif + +int main(void) +{ + testbitexactcos(); + testbitexactlog2tan(); + testdiv(); + testsqrt(); + testlog2(); + testexp2(); + testexp2log2(); +#ifdef FIXED_POINT + testilog2(); +#endif + return ret; +} diff --git a/thirdparty/opus/celt/tests/test_unit_mdct.c b/thirdparty/opus/celt/tests/test_unit_mdct.c new file mode 100644 index 00000000000..8dbb9caa2e8 --- /dev/null +++ b/thirdparty/opus/celt/tests/test_unit_mdct.c @@ -0,0 +1,230 @@ +/* Copyright (c) 2008-2011 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#define SKIP_CONFIG_H + +#ifndef CUSTOM_MODES +#define CUSTOM_MODES +#endif + +#include + +#define CELT_C +#include "mdct.h" +#include "stack_alloc.h" + +#include "kiss_fft.c" +#include "mdct.c" +#include "mathops.c" +#include "entcode.c" + +#if defined(OPUS_X86_MAY_HAVE_SSE2) || defined(OPUS_X86_MAY_HAVE_SSE4_1) +# include "x86/x86cpu.c" +#elif defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/armcpu.c" +# include "pitch.c" +# include "celt_lpc.c" +# if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/celt_neon_intr.c" +# if defined(HAVE_ARM_NE10) +# include "arm/celt_ne10_fft.c" +# include "arm/celt_ne10_mdct.c" +# endif +# endif +# include "arm/arm_celt_map.c" +#endif + +#ifndef M_PI +#define M_PI 3.141592653 +#endif + +int ret = 0; +void check(kiss_fft_scalar * in,kiss_fft_scalar * out,int nfft,int isinverse) +{ + int bin,k; + double errpow=0,sigpow=0; + double snr; + for (bin=0;bin1) { + int k; + for (k=1;k +#include +#include "vq.c" +#include "cwrs.c" +#include "entcode.c" +#include "entenc.c" +#include "entdec.c" +#include "mathops.c" +#include "bands.h" +#include "pitch.c" +#include "celt_lpc.c" +#include "celt.c" +#include + +#if defined(OPUS_X86_MAY_HAVE_SSE) || defined(OPUS_X86_MAY_HAVE_SSE2) || defined(OPUS_X86_MAY_HAVE_SSE4_1) +# if defined(OPUS_X86_MAY_HAVE_SSE) +# include "x86/pitch_sse.c" +# endif +# if defined(OPUS_X86_MAY_HAVE_SSE2) +# include "x86/pitch_sse2.c" +# endif +# if defined(OPUS_X86_MAY_HAVE_SSE4_1) +# include "x86/pitch_sse4_1.c" +# include "x86/celt_lpc_sse.c" +# endif +# include "x86/x86_celt_map.c" +#elif defined(OPUS_ARM_ASM) || defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/armcpu.c" +# if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +# include "arm/celt_neon_intr.c" +# if defined(HAVE_ARM_NE10) +# include "kiss_fft.c" +# include "mdct.c" +# include "arm/celt_ne10_fft.c" +# include "arm/celt_ne10_mdct.c" +# endif +# endif +# include "arm/arm_celt_map.c" +#endif + +#define MAX_SIZE 100 + +int ret=0; +void test_rotation(int N, int K) +{ + int i; + double err = 0, ener = 0, snr, snr0; + opus_val16 x0[MAX_SIZE]; + opus_val16 x1[MAX_SIZE]; + for (i=0;i 20) + { + fprintf(stderr, "FAIL!\n"); + ret = 1; + } +} + +int main(void) +{ + ALLOC_STACK; + test_rotation(15, 3); + test_rotation(23, 5); + test_rotation(50, 3); + test_rotation(80, 1); + return ret; +} diff --git a/thirdparty/opus/celt/tests/test_unit_types.c b/thirdparty/opus/celt/tests/test_unit_types.c new file mode 100644 index 00000000000..67a0fb8ed3b --- /dev/null +++ b/thirdparty/opus/celt/tests/test_unit_types.c @@ -0,0 +1,50 @@ +/* Copyright (c) 2008-2011 Xiph.Org Foundation + Written by Jean-Marc Valin */ +/* + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus_types.h" +#include + +int main(void) +{ + opus_int16 i = 1; + i <<= 14; + if (i>>14 != 1) + { + fprintf(stderr, "opus_int16 isn't 16 bits\n"); + return 1; + } + if (sizeof(opus_int16)*2 != sizeof(opus_int32)) + { + fprintf(stderr, "16*2 != 32\n"); + return 1; + } + return 0; +} diff --git a/drivers/opus/celt/vq.c b/thirdparty/opus/celt/vq.c similarity index 95% rename from drivers/opus/celt/vq.c rename to thirdparty/opus/celt/vq.c index 3061e3006f2..f3583960654 100644 --- a/drivers/opus/celt/vq.c +++ b/thirdparty/opus/celt/vq.c @@ -25,16 +25,19 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/mathops.h" -#include "opus/celt/cwrs.h" -#include "opus/celt/vq.h" -#include "opus/celt/arch.h" -#include "opus/celt/os_support.h" -#include "opus/celt/bands.h" -#include "opus/celt/rate.h" -#include "opus/celt/pitch.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "mathops.h" +#include "cwrs.h" +#include "vq.h" +#include "arch.h" +#include "os_support.h" +#include "bands.h" +#include "rate.h" +#include "pitch.h" #ifndef OVERRIDE_vq_exp_rotation1 static void exp_rotation1(celt_norm *X, int len, int stride, opus_val16 c, opus_val16 s) @@ -115,13 +118,13 @@ static void normalise_residual(int * OPUS_RESTRICT iy, celt_norm * OPUS_RESTRICT int N, opus_val32 Ryy, opus_val16 gain) { int i; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int k; #endif opus_val32 t; opus_val16 g; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT k = celt_ilog2(Ryy)>>1; #endif t = VSHR32(Ryy, 2*(k-7)); @@ -208,7 +211,7 @@ unsigned alg_quant(celt_norm *X, int N, int K, int spread, int B, ec_enc *enc } while (++j N+3) @@ -259,10 +262,10 @@ unsigned alg_quant(celt_norm *X, int N, int K, int spread, int B, ec_enc *enc int best_id; opus_val32 best_num = -VERY_LARGE16; opus_val16 best_den = 0; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int rshift; #endif -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT rshift = 1+celt_ilog2(K-pulsesLeft+i+1); #endif best_id = 0; @@ -346,7 +349,7 @@ unsigned alg_unquant(celt_norm *X, int N, int K, int spread, int B, void renormalise_vector(celt_norm *X, int N, opus_val16 gain, int arch) { int i; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int k; #endif opus_val32 E; @@ -354,7 +357,7 @@ void renormalise_vector(celt_norm *X, int N, opus_val16 gain, int arch) opus_val32 t; celt_norm *xptr; E = EPSILON + celt_inner_prod(X, X, N, arch); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT k = celt_ilog2(E)>>1; #endif t = VSHR32(E, 2*(k-7)); @@ -394,7 +397,7 @@ int stereo_itheta(const celt_norm *X, const celt_norm *Y, int stereo, int N, int } mid = celt_sqrt(Emid); side = celt_sqrt(Eside); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* 0.63662 = 2/pi */ itheta = MULT16_16_Q15(QCONST16(0.63662f,15),celt_atan2p(side, mid)); #else diff --git a/drivers/opus/celt/vq.h b/thirdparty/opus/celt/vq.h similarity index 95% rename from drivers/opus/celt/vq.h rename to thirdparty/opus/celt/vq.h index 10b5e553062..5cfcbe50ea0 100644 --- a/drivers/opus/celt/vq.h +++ b/thirdparty/opus/celt/vq.h @@ -33,12 +33,12 @@ #ifndef VQ_H #define VQ_H -#include "opus/celt/entenc.h" -#include "opus/celt/entdec.h" -#include "opus/celt/modes.h" +#include "entenc.h" +#include "entdec.h" +#include "modes.h" #if defined(MIPSr1_ASM) -#include "opus/celt/mips/vq_mipsr1.h" +#include "mips/vq_mipsr1.h" #endif diff --git a/drivers/opus/celt/x86/celt_lpc_sse.c b/thirdparty/opus/celt/x86/celt_lpc_sse.c similarity index 94% rename from drivers/opus/celt/x86/celt_lpc_sse.c rename to thirdparty/opus/celt/x86/celt_lpc_sse.c index cfc86dc66c2..67e5592acf3 100644 --- a/drivers/opus/celt/x86/celt_lpc_sse.c +++ b/thirdparty/opus/celt/x86/celt_lpc_sse.c @@ -24,16 +24,19 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include -#include "opus/celt/celt_lpc.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/mathops.h" -#include "opus/celt/pitch.h" -#include "opus/celt/x86/x86cpu.h" +#include "celt_lpc.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "pitch.h" +#include "x86cpu.h" #if defined(FIXED_POINT) diff --git a/drivers/opus/celt/x86/celt_lpc_sse.h b/thirdparty/opus/celt/x86/celt_lpc_sse.h similarity index 97% rename from drivers/opus/celt/x86/celt_lpc_sse.h rename to thirdparty/opus/celt/x86/celt_lpc_sse.h index 3787afd3ff8..c5ec796ed52 100644 --- a/drivers/opus/celt/x86/celt_lpc_sse.h +++ b/thirdparty/opus/celt/x86/celt_lpc_sse.h @@ -27,7 +27,10 @@ #ifndef CELT_LPC_SSE_H #define CELT_LPC_SSE_H -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #if defined(OPUS_X86_MAY_HAVE_SSE4_1) && defined(FIXED_POINT) #define OVERRIDE_CELT_FIR diff --git a/drivers/opus/celt/x86/pitch_sse.c b/thirdparty/opus/celt/x86/pitch_sse.c similarity index 96% rename from drivers/opus/celt/x86/pitch_sse.c rename to thirdparty/opus/celt/x86/pitch_sse.c index 9f22ffd9ab2..20e73126b62 100644 --- a/drivers/opus/celt/x86/pitch_sse.c +++ b/thirdparty/opus/celt/x86/pitch_sse.c @@ -24,18 +24,21 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/silk/macros.h" -#include "opus/celt/celt_lpc.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/mathops.h" -#include "opus/celt/pitch.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "macros.h" +#include "celt_lpc.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "pitch.h" #if defined(OPUS_X86_MAY_HAVE_SSE) && !defined(FIXED_POINT) #include -#include "opus/celt/arch.h" +#include "arch.h" void xcorr_kernel_sse(const opus_val16 *x, const opus_val16 *y, opus_val32 sum[4], int len) { diff --git a/drivers/opus/celt/x86/pitch_sse.h b/thirdparty/opus/celt/x86/pitch_sse.h similarity index 99% rename from drivers/opus/celt/x86/pitch_sse.h rename to thirdparty/opus/celt/x86/pitch_sse.h index 2b4b54f61f6..d4cbeb8b9cd 100644 --- a/drivers/opus/celt/x86/pitch_sse.h +++ b/thirdparty/opus/celt/x86/pitch_sse.h @@ -32,7 +32,10 @@ #ifndef PITCH_SSE_H #define PITCH_SSE_H -#include "opus/opus_config.h" + +#if defined(HAVE_CONFIG_H) +#include "config.h" +#endif #if defined(OPUS_X86_MAY_HAVE_SSE4_1) && defined(FIXED_POINT) void xcorr_kernel_sse4_1( diff --git a/drivers/opus/celt/x86/pitch_sse2.c b/thirdparty/opus/celt/x86/pitch_sse2.c similarity index 94% rename from drivers/opus/celt/x86/pitch_sse2.c rename to thirdparty/opus/celt/x86/pitch_sse2.c index b5a78b4acde..a0e7d1beaf2 100644 --- a/drivers/opus/celt/x86/pitch_sse2.c +++ b/thirdparty/opus/celt/x86/pitch_sse2.c @@ -24,16 +24,19 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include -#include "opus/silk/macros.h" -#include "opus/celt/celt_lpc.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/mathops.h" -#include "opus/celt/pitch.h" +#include "macros.h" +#include "celt_lpc.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "pitch.h" #if defined(OPUS_X86_MAY_HAVE_SSE2) && defined(FIXED_POINT) opus_val32 celt_inner_prod_sse2(const opus_val16 *x, const opus_val16 *y, diff --git a/drivers/opus/celt/x86/pitch_sse4_1.c b/thirdparty/opus/celt/x86/pitch_sse4_1.c similarity index 96% rename from drivers/opus/celt/x86/pitch_sse4_1.c rename to thirdparty/opus/celt/x86/pitch_sse4_1.c index 57fb3322105..a092c68b243 100644 --- a/drivers/opus/celt/x86/pitch_sse4_1.c +++ b/thirdparty/opus/celt/x86/pitch_sse4_1.c @@ -24,20 +24,23 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include -#include "opus/silk/macros.h" -#include "opus/celt/celt_lpc.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/mathops.h" -#include "opus/celt/pitch.h" +#include "macros.h" +#include "celt_lpc.h" +#include "stack_alloc.h" +#include "mathops.h" +#include "pitch.h" #if defined(OPUS_X86_MAY_HAVE_SSE4_1) && defined(FIXED_POINT) #include -#include "opus/celt/x86/x86cpu.h" +#include "x86cpu.h" opus_val32 celt_inner_prod_sse4_1(const opus_val16 *x, const opus_val16 *y, int N) diff --git a/drivers/opus/celt/x86/x86_celt_map.c b/thirdparty/opus/celt/x86/x86_celt_map.c similarity index 96% rename from drivers/opus/celt/x86/x86_celt_map.c rename to thirdparty/opus/celt/x86/x86_celt_map.c index 5146ea2b384..8e5e449275c 100644 --- a/drivers/opus/celt/x86/x86_celt_map.c +++ b/thirdparty/opus/celt/x86/x86_celt_map.c @@ -24,12 +24,15 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/x86/x86cpu.h" -#include "opus/celt/celt_lpc.h" -#include "opus/celt/pitch.h" -#include "opus/celt/x86/pitch_sse.h" +#if defined(HAVE_CONFIG_H) +#include "config.h" +#endif + +#include "x86/x86cpu.h" +#include "celt_lpc.h" +#include "pitch.h" +#include "pitch_sse.h" #if defined(OPUS_HAVE_RTCD) diff --git a/drivers/opus/celt/x86/x86cpu.c b/thirdparty/opus/celt/x86/x86cpu.c similarity index 95% rename from drivers/opus/celt/x86/x86cpu.c rename to thirdparty/opus/celt/x86/x86cpu.c index 91b9b185c28..555a576b8a2 100644 --- a/drivers/opus/celt/x86/x86cpu.c +++ b/thirdparty/opus/celt/x86/x86cpu.c @@ -24,13 +24,16 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/cpu_support.h" -#include "opus/silk/macros.h" -#include "opus/silk/main.h" -#include "opus/celt/pitch.h" -#include "opus/celt/x86/x86cpu.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "cpu_support.h" +#include "macros.h" +#include "main.h" +#include "pitch.h" +#include "x86cpu.h" #if (defined(OPUS_X86_MAY_HAVE_SSE) && !defined(OPUS_X86_PRESUME_SSE)) || \ (defined(OPUS_X86_MAY_HAVE_SSE2) && !defined(OPUS_X86_PRESUME_SSE2)) || \ diff --git a/drivers/opus/celt/x86/x86cpu.h b/thirdparty/opus/celt/x86/x86cpu.h similarity index 100% rename from drivers/opus/celt/x86/x86cpu.h rename to thirdparty/opus/celt/x86/x86cpu.h diff --git a/drivers/opus/opus_config.h b/thirdparty/opus/config.h similarity index 100% rename from drivers/opus/opus_config.h rename to thirdparty/opus/config.h diff --git a/drivers/opus/http.c b/thirdparty/opus/http.c similarity index 99% rename from drivers/opus/http.c rename to thirdparty/opus/http.c index 602d514f6e5..cfd4e626a4d 100644 --- a/drivers/opus/http.c +++ b/thirdparty/opus/http.c @@ -9,9 +9,11 @@ * by the Xiph.Org Foundation and contributors http://www.xiph.org/ * * * ********************************************************************/ -#include "opus/opus_config.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif -#include "opus/internal.h" +#include "internal.h" #include #include #include @@ -212,7 +214,7 @@ static const char *op_parse_file_url(const char *_src){ # include # include # include -# include "opus/winerrno.h" +# include "winerrno.h" typedef SOCKET op_sock; diff --git a/drivers/opus/info.c b/thirdparty/opus/info.c similarity index 99% rename from drivers/opus/info.c rename to thirdparty/opus/info.c index b94393351e1..55e2906d5fb 100644 --- a/drivers/opus/info.c +++ b/thirdparty/opus/info.c @@ -9,9 +9,11 @@ * by the Xiph.Org Foundation and contributors http://www.xiph.org/ * * * ********************************************************************/ -#include "opus/opus_config.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif -#include "opus/internal.h" +#include "internal.h" #include #include diff --git a/drivers/opus/internal.c b/thirdparty/opus/internal.c similarity index 95% rename from drivers/opus/internal.c rename to thirdparty/opus/internal.c index bd7d2ee4bb7..96c80def82f 100644 --- a/drivers/opus/internal.c +++ b/thirdparty/opus/internal.c @@ -9,9 +9,11 @@ * by the Xiph.Org Foundation and contributors http://www.xiph.org/ * * * ********************************************************************/ -#include "opus/opus_config.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif -#include "opus/internal.h" +#include "internal.h" #if defined(OP_ENABLE_ASSERTIONS) void op_fatal_impl(const char *_str,const char *_file,int _line){ diff --git a/drivers/opus/internal.h b/thirdparty/opus/internal.h similarity index 99% rename from drivers/opus/internal.h rename to thirdparty/opus/internal.h index f7a5bd8c748..ee48ea34c92 100644 --- a/drivers/opus/internal.h +++ b/thirdparty/opus/internal.h @@ -29,7 +29,7 @@ # endif # include -# include "opus/opusfile.h" +# include typedef struct OggOpusLink OggOpusLink; diff --git a/drivers/opus/mlp.c b/thirdparty/opus/mlp.c similarity index 95% rename from drivers/opus/mlp.c rename to thirdparty/opus/mlp.c index 125106e882a..ff9e50df472 100644 --- a/drivers/opus/mlp.c +++ b/thirdparty/opus/mlp.c @@ -24,15 +24,18 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/opus_types.h" -#include "opus/opus_defines.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus_types.h" +#include "opus_defines.h" #include -#include "opus/mlp.h" -#include "opus/celt/arch.h" -#include "opus/tansig_table.h" +#include "mlp.h" +#include "arch.h" +#include "tansig_table.h" #define MAX_NEURONS 100 #if 0 @@ -72,7 +75,7 @@ static OPUS_INLINE float tansig_approx(float x) return 1; if (!(x>-8)) return -1; -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT /* Another check in case of -ffast-math */ if (celt_isnan(x)) return 0; diff --git a/drivers/opus/mlp.h b/thirdparty/opus/mlp.h similarity index 98% rename from drivers/opus/mlp.h rename to thirdparty/opus/mlp.h index 2b4962625d2..618e246e2c4 100644 --- a/drivers/opus/mlp.h +++ b/thirdparty/opus/mlp.h @@ -28,7 +28,7 @@ #ifndef _MLP_H_ #define _MLP_H_ -#include "opus/celt/arch.h" +#include "arch.h" typedef struct { int layers; diff --git a/drivers/opus/mlp_data.c b/thirdparty/opus/mlp_data.c similarity index 98% rename from drivers/opus/mlp_data.c rename to thirdparty/opus/mlp_data.c index c542a509cfc..c2fda4e2e59 100644 --- a/drivers/opus/mlp_data.c +++ b/thirdparty/opus/mlp_data.c @@ -1,8 +1,11 @@ /* The contents of this file was automatically generated by mlp_train.c It contains multi-layer perceptron (MLP) weights. */ -#include "opus/opus_config.h" -#include "opus/mlp.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "mlp.h" /* RMS error was 0.138320, seed was 1361535663 */ diff --git a/drivers/opus/opus.c b/thirdparty/opus/opus.c similarity index 99% rename from drivers/opus/opus.c rename to thirdparty/opus/opus.c index 762a9d74696..e9ce93b3084 100644 --- a/drivers/opus/opus.c +++ b/thirdparty/opus/opus.c @@ -24,10 +24,13 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/opus.h" -#include "opus/opus_private.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus.h" +#include "opus_private.h" #ifndef DISABLE_FLOAT_API OPUS_EXPORT void opus_pcm_soft_clip(float *_x, int N, int C, float *declip_mem) diff --git a/drivers/opus/opus.h b/thirdparty/opus/opus.h similarity index 99% rename from drivers/opus/opus.h rename to thirdparty/opus/opus.h index 4cb171378b5..b0bdf6f2df7 100644 --- a/drivers/opus/opus.h +++ b/thirdparty/opus/opus.h @@ -33,8 +33,8 @@ #ifndef OPUS_H #define OPUS_H -#include "opus/opus_types.h" -#include "opus/opus_defines.h" +#include "opus_types.h" +#include "opus_defines.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/opus/opus_compare.c b/thirdparty/opus/opus_compare.c similarity index 100% rename from drivers/opus/opus_compare.c rename to thirdparty/opus/opus_compare.c diff --git a/drivers/opus/opus_custom.h b/thirdparty/opus/opus_custom.h similarity index 99% rename from drivers/opus/opus_custom.h rename to thirdparty/opus/opus_custom.h index 32fcb81ac79..41f36bf2fbc 100644 --- a/drivers/opus/opus_custom.h +++ b/thirdparty/opus/opus_custom.h @@ -35,7 +35,7 @@ #ifndef OPUS_CUSTOM_H #define OPUS_CUSTOM_H -#include "opus/opus_defines.h" +#include "opus_defines.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/opus/opus_decoder.c b/thirdparty/opus/opus_decoder.c similarity index 98% rename from drivers/opus/opus_decoder.c rename to thirdparty/opus/opus_decoder.c index b954b98f02f..080bec5072a 100644 --- a/drivers/opus/opus_decoder.c +++ b/thirdparty/opus/opus_decoder.c @@ -24,7 +24,10 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #ifndef OPUS_BUILD # error "OPUS_BUILD _MUST_ be defined to build Opus. This probably means you need other defines as well, as in a config.h. See the included build files for details." @@ -35,19 +38,19 @@ #endif #include -#include "opus/celt/celt.h" -#include "opus/opus.h" -#include "opus/celt/entdec.h" -#include "opus/celt/modes.h" -#include "opus/silk/API.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/float_cast.h" -#include "opus/opus_private.h" -#include "opus/celt/os_support.h" -#include "opus/silk/structs.h" -#include "opus/silk/define.h" -#include "opus/celt/mathops.h" -#include "opus/celt/cpu_support.h" +#include "celt.h" +#include "opus.h" +#include "entdec.h" +#include "modes.h" +#include "API.h" +#include "stack_alloc.h" +#include "float_cast.h" +#include "opus_private.h" +#include "os_support.h" +#include "structs.h" +#include "define.h" +#include "mathops.h" +#include "cpu_support.h" struct OpusDecoder { int celt_dec_offset; @@ -68,7 +71,7 @@ struct OpusDecoder { int frame_size; int prev_redundancy; int last_packet_duration; -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT opus_val16 softclip_mem[2]; #endif @@ -291,7 +294,7 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data, /* In fixed-point, we can tell CELT to do the accumulation on top of the SILK PCM buffer. This saves some stack space. */ -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT celt_accum = (mode != MODE_CELT_ONLY) && (frame_size >= F10); #else celt_accum = 0; @@ -335,7 +338,7 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data, { int lost_flag, decoded_samples; opus_int16 *pcm_ptr; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT if (celt_accum) pcm_ptr = pcm; else @@ -504,7 +507,7 @@ static int opus_decode_frame(OpusDecoder *st, const unsigned char *data, if (mode != MODE_CELT_ONLY && !celt_accum) { -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT for (i=0;ichannels;i++) pcm[i] = SAT16(ADD32(pcm[i], pcm_silk[i])); #else @@ -696,7 +699,7 @@ int opus_decode_native(OpusDecoder *st, const unsigned char *data, st->last_packet_duration = nb_samples; if (OPUS_CHECK_ARRAY(pcm, nb_samples*st->channels)) OPUS_PRINT_INT(nb_samples); -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT if (soft_clip) opus_pcm_soft_clip(pcm, nb_samples, st->channels, st->softclip_mem); else @@ -705,7 +708,7 @@ int opus_decode_native(OpusDecoder *st, const unsigned char *data, return nb_samples; } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int opus_decode(OpusDecoder *st, const unsigned char *data, opus_int32 len, opus_val16 *pcm, int frame_size, int decode_fec) diff --git a/drivers/opus/opus_defines.h b/thirdparty/opus/opus_defines.h similarity index 99% rename from drivers/opus/opus_defines.h rename to thirdparty/opus/opus_defines.h index b972ce0eb90..647ed5d6f2e 100644 --- a/drivers/opus/opus_defines.h +++ b/thirdparty/opus/opus_defines.h @@ -33,7 +33,7 @@ #ifndef OPUS_DEFINES_H #define OPUS_DEFINES_H -#include "opus/opus_types.h" +#include "opus_types.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/opus/opus_encoder.c b/thirdparty/opus/opus_encoder.c similarity index 98% rename from drivers/opus/opus_encoder.c rename to thirdparty/opus/opus_encoder.c index 5c6af5a199d..a7e19127d69 100644 --- a/drivers/opus/opus_encoder.c +++ b/thirdparty/opus/opus_encoder.c @@ -24,28 +24,31 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include -#include "opus/celt/celt.h" -#include "opus/celt/entenc.h" -#include "opus/celt/modes.h" -#include "opus/silk/API.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/float_cast.h" -#include "opus/opus.h" -#include "opus/celt/arch.h" -#include "opus/celt/pitch.h" -#include "opus/opus_private.h" -#include "opus/celt/os_support.h" -#include "opus/celt/cpu_support.h" -#include "opus/analysis.h" -#include "opus/celt/mathops.h" -#include "opus/silk/tuning_parameters.h" -#ifdef OPUS_FIXED_POINT -#include "opus/silk/fixed/structs_FIX.h" +#include "celt.h" +#include "entenc.h" +#include "modes.h" +#include "API.h" +#include "stack_alloc.h" +#include "float_cast.h" +#include "opus.h" +#include "arch.h" +#include "pitch.h" +#include "opus_private.h" +#include "os_support.h" +#include "cpu_support.h" +#include "analysis.h" +#include "mathops.h" +#include "tuning_parameters.h" +#ifdef FIXED_POINT +#include "fixed/structs_FIX.h" #else -#include "opus/silk/float/structs_FLP.h" +#include "float/structs_FLP.h" #endif #define MAX_ENCODER_BUFFER 480 @@ -280,7 +283,7 @@ static unsigned char gen_toc(int mode, int framerate, int bandwidth, int channel return toc; } -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT static void silk_biquad_float( const opus_val16 *in, /* I: Input signal */ const opus_int32 *B_Q28, /* I: MA coefficients [3] */ @@ -342,7 +345,7 @@ static void hp_cutoff(const opus_val16 *in, opus_int32 cutoff_Hz, opus_val16 *ou A_Q28[ 0 ] = silk_SMULWW( r_Q22, silk_SMULWW( Fc_Q19, Fc_Q19 ) - SILK_FIX_CONST( 2.0, 22 ) ); A_Q28[ 1 ] = silk_SMULWW( r_Q22, r_Q22 ); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT silk_biquad_alt( in, B_Q28, A_Q28, hp_mem, out, len, channels ); if( channels == 2 ) { silk_biquad_alt( in+1, B_Q28, A_Q28, hp_mem+2, out+1, len, channels ); @@ -355,7 +358,7 @@ static void hp_cutoff(const opus_val16 *in, opus_int32 cutoff_Hz, opus_val16 *ou #endif } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT static void dc_reject(const opus_val16 *in, opus_int32 cutoff_Hz, opus_val16 *out, opus_val32 *hp_mem, int len, int channels, opus_int32 Fs) { int c, i; @@ -727,7 +730,7 @@ static int optimize_framesize(const void *x, int len, int C, opus_int32 Fs, #endif #ifndef DISABLE_FLOAT_API -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT #define PCM2VAL(x) FLOAT2INT16(x) #else #define PCM2VAL(x) SCALEIN(x) @@ -753,7 +756,7 @@ void downmix_float(const void *_x, opus_val32 *sub, int subframe, int offset, in sub[j] += PCM2VAL(x[(j+offset)*C+c]); } } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT scale = (1<silk_mode.complexity >= 10 && st->Fs==48000) #else if (st->silk_mode.complexity >= 7 && st->Fs==48000) @@ -1459,7 +1462,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ } else { dc_reject(pcm, 3, &pcm_buf[total_buffer*st->channels], st->hp_mem, frame_size, st->channels, st->Fs); } -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT if (float_api) { opus_val32 sum; @@ -1480,7 +1483,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ if (st->mode != MODE_CELT_ONLY) { opus_int32 total_bitRate, celt_rate; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT const opus_int16 *pcm_silk; #else VARDECL(opus_int16, pcm_silk); @@ -1628,7 +1631,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ gain_fade(st->delay_buffer+prefill_offset, st->delay_buffer+prefill_offset, 0, Q15ONE, celt_mode->overlap, st->Fs/400, st->channels, celt_mode->window, st->Fs); OPUS_CLEAR(st->delay_buffer, prefill_offset); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT pcm_silk = st->delay_buffer; #else for (i=0;iencoder_buffer*st->channels;i++) @@ -1637,7 +1640,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ silk_Encode( silk_enc, &st->silk_mode, pcm_silk, st->encoder_buffer, NULL, &zero, 1 ); } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT pcm_silk = pcm_buf+total_buffer*st->channels; #else for (i=0;ichannels;i++) @@ -1781,7 +1784,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ opus_val16 g1, g2; g1 = st->hybrid_stereo_width_Q14; g2 = (opus_val16)(st->silk_mode.stereoWidth_Q14); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT g1 = g1==16384 ? Q15ONE : SHL16(g1,1); g2 = g2==16384 ? Q15ONE : SHL16(g2,1); #else @@ -1961,7 +1964,7 @@ opus_int32 opus_encode_native(OpusEncoder *st, const opus_val16 *pcm, int frame_ return ret; } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT #ifndef DISABLE_FLOAT_API opus_int32 opus_encode_float(OpusEncoder *st, const float *pcm, int analysis_frame_size, diff --git a/drivers/opus/opus_multistream.c b/thirdparty/opus/opus_multistream.c similarity index 91% rename from drivers/opus/opus_multistream.c rename to thirdparty/opus/opus_multistream.c index aa948037799..09c3639b7f0 100644 --- a/drivers/opus/opus_multistream.c +++ b/thirdparty/opus/opus_multistream.c @@ -24,15 +24,18 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/opus_multistream.h" -#include "opus/opus.h" -#include "opus/opus_private.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus_multistream.h" +#include "opus.h" +#include "opus_private.h" +#include "stack_alloc.h" #include -#include "opus/celt/float_cast.h" -#include "opus/celt/os_support.h" +#include "float_cast.h" +#include "os_support.h" int validate_layout(const ChannelLayout *layout) diff --git a/drivers/opus/opus_multistream.h b/thirdparty/opus/opus_multistream.h similarity index 99% rename from drivers/opus/opus_multistream.h rename to thirdparty/opus/opus_multistream.h index 5519c46a9f4..47e03900bd5 100644 --- a/drivers/opus/opus_multistream.h +++ b/thirdparty/opus/opus_multistream.h @@ -33,7 +33,7 @@ #ifndef OPUS_MULTISTREAM_H #define OPUS_MULTISTREAM_H -#include "opus/opus.h" +#include "opus.h" #ifdef __cplusplus extern "C" { diff --git a/drivers/opus/opus_multistream_decoder.c b/thirdparty/opus/opus_multistream_decoder.c similarity index 98% rename from drivers/opus/opus_multistream_decoder.c rename to thirdparty/opus/opus_multistream_decoder.c index 25100edba23..b95eaa6eac1 100644 --- a/drivers/opus/opus_multistream_decoder.c +++ b/thirdparty/opus/opus_multistream_decoder.c @@ -24,15 +24,18 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/opus_multistream.h" -#include "opus/opus.h" -#include "opus/opus_private.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus_multistream.h" +#include "opus.h" +#include "opus_private.h" +#include "stack_alloc.h" #include -#include "opus/celt/float_cast.h" -#include "opus/celt/os_support.h" +#include "float_cast.h" +#include "os_support.h" struct OpusMSDecoder { ChannelLayout layout; @@ -358,7 +361,7 @@ static void opus_copy_channel_out_short( -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int opus_multistream_decode( OpusMSDecoder *st, const unsigned char *data, diff --git a/drivers/opus/opus_multistream_encoder.c b/thirdparty/opus/opus_multistream_encoder.c similarity index 98% rename from drivers/opus/opus_multistream_encoder.c rename to thirdparty/opus/opus_multistream_encoder.c index 426c72e9972..9e857735736 100644 --- a/drivers/opus/opus_multistream_encoder.c +++ b/thirdparty/opus/opus_multistream_encoder.c @@ -24,21 +24,24 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/opus_multistream.h" -#include "opus/opus.h" -#include "opus/opus_private.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus_multistream.h" +#include "opus.h" +#include "opus_private.h" +#include "stack_alloc.h" #include -#include "opus/celt/float_cast.h" -#include "opus/celt/os_support.h" -#include "opus/celt/mathops.h" -#include "opus/celt/mdct.h" -#include "opus/celt/modes.h" -#include "opus/celt/bands.h" -#include "opus/celt/quant_bands.h" -#include "opus/celt/pitch.h" +#include "float_cast.h" +#include "os_support.h" +#include "mathops.h" +#include "mdct.h" +#include "modes.h" +#include "bands.h" +#include "quant_bands.h" +#include "pitch.h" typedef struct { int nb_streams; @@ -202,7 +205,7 @@ static opus_val16 logSum(opus_val16 a, opus_val16 b) } if (!(diff < QCONST16(8.f, DB_SHIFT))) /* inverted to catch NaNs */ return max; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT low = SHR32(diff, DB_SHIFT-1); frac = SHL16(diff - SHL16(low, DB_SHIFT-1), 16-DB_SHIFT); #else @@ -258,7 +261,7 @@ void surround_analysis(const CELTMode *celt_mode, const void *pcm, opus_val16 *b OPUS_COPY(in, mem+c*overlap, overlap); (*copy_channel_in)(x, 1, pcm, channels, c, len); celt_preemphasis(x, in+overlap, frame_size, 1, upsample, celt_mode->preemph, preemph_mem+c, 0); -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT { opus_val32 sum; sum = celt_inner_prod(in, in, frame_size+overlap, 0); @@ -668,7 +671,7 @@ static opus_int32 surround_rate_allocation( + nb_lfe*lfe_ratio; channel_rate = 256*(st->bitrate_bps-lfe_offset*nb_lfe-stream_offset*(nb_coupled+nb_uncoupled))/total; } -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT if (st->variable_duration==OPUS_FRAMESIZE_VARIABLE && frame_size != Fs/50) { opus_int32 bonus; @@ -955,7 +958,7 @@ static void opus_copy_channel_in_short( } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT int opus_multistream_encode( OpusMSEncoder *st, const opus_val16 *pcm, diff --git a/drivers/opus/opus_private.h b/thirdparty/opus/opus_private.h similarity index 98% rename from drivers/opus/opus_private.h rename to thirdparty/opus/opus_private.h index 129977ed11a..3b62eed0964 100644 --- a/drivers/opus/opus_private.h +++ b/thirdparty/opus/opus_private.h @@ -29,9 +29,9 @@ #ifndef OPUS_PRIVATE_H #define OPUS_PRIVATE_H -#include "opus/celt/arch.h" -#include "opus/opus.h" -#include "opus/celt/celt.h" +#include "arch.h" +#include "opus.h" +#include "celt.h" #include /* offsetof */ diff --git a/drivers/opus/opus_types.h b/thirdparty/opus/opus_types.h similarity index 100% rename from drivers/opus/opus_types.h rename to thirdparty/opus/opus_types.h diff --git a/drivers/opus/opusfile.c b/thirdparty/opus/opusfile.c similarity index 99% rename from drivers/opus/opusfile.c rename to thirdparty/opus/opusfile.c index a9d6cc4d630..9c9b684ca4d 100644 --- a/drivers/opus/opusfile.c +++ b/thirdparty/opus/opusfile.c @@ -14,9 +14,11 @@ last mod: $Id: vorbisfile.c 17573 2010-10-27 14:53:59Z xiphmont $ ********************************************************************/ -#include "opus/opus_config.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif -#include "opus/internal.h" +#include "internal.h" #include #include #include @@ -24,7 +26,7 @@ #include #include -#include "opus/opusfile.h" +#include "opusfile.h" /*This implementation is largely based off of libvorbisfile. All of the Ogg bits work roughly the same, though I have made some diff --git a/drivers/opus/opusfile.h b/thirdparty/opus/opusfile.h similarity index 99% rename from drivers/opus/opusfile.h rename to thirdparty/opus/opusfile.h index da31a29769d..3604115c31e 100644 --- a/drivers/opus/opusfile.h +++ b/thirdparty/opus/opusfile.h @@ -107,7 +107,7 @@ extern "C" { # include # include # include -# include "opus/opus_multistream.h" +# include /**@cond PRIVATE*/ diff --git a/drivers/opus/repacketizer.c b/thirdparty/opus/repacketizer.c similarity index 98% rename from drivers/opus/repacketizer.c rename to thirdparty/opus/repacketizer.c index 3822f9c86f7..f27e9ab9582 100644 --- a/drivers/opus/repacketizer.c +++ b/thirdparty/opus/repacketizer.c @@ -24,11 +24,14 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/opus.h" -#include "opus/opus_private.h" -#include "opus/celt/os_support.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus.h" +#include "opus_private.h" +#include "os_support.h" int opus_repacketizer_get_size(void) diff --git a/drivers/opus/repacketizer_demo.c b/thirdparty/opus/repacketizer_demo.c similarity index 98% rename from drivers/opus/repacketizer_demo.c rename to thirdparty/opus/repacketizer_demo.c index 57acf6a53f0..dc05c1b3592 100644 --- a/drivers/opus/repacketizer_demo.c +++ b/thirdparty/opus/repacketizer_demo.c @@ -24,9 +24,12 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/opus.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus.h" #include #include #include diff --git a/drivers/opus/silk/A2NLSF.c b/thirdparty/opus/silk/A2NLSF.c similarity index 99% rename from drivers/opus/silk/A2NLSF.c rename to thirdparty/opus/silk/A2NLSF.c index 38dbefc3bfc..b6e9e5ffcca 100644 --- a/drivers/opus/silk/A2NLSF.c +++ b/thirdparty/opus/silk/A2NLSF.c @@ -30,10 +30,13 @@ POSSIBILITY OF SUCH DAMAGE. /* A piecewise linear approximation maps LSF <-> cos(LSF) */ /* Therefore the result is not accurate NLSFs, but the two */ /* functions are accurate inverses of each other */ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/tables.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "tables.h" /* Number of binary divisions, when not in low complexity mode */ #define BIN_DIV_STEPS_A2NLSF_FIX 3 /* must be no higher than 16 - log2( LSF_COS_TAB_SZ_FIX ) */ diff --git a/drivers/opus/silk/API.h b/thirdparty/opus/silk/API.h similarity index 97% rename from drivers/opus/silk/API.h rename to thirdparty/opus/silk/API.h index ce868c0c995..0131acbb08f 100644 --- a/drivers/opus/silk/API.h +++ b/thirdparty/opus/silk/API.h @@ -28,11 +28,11 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_API_H #define SILK_API_H -#include "opus/silk/control.h" -#include "opus/silk/typedef.h" -#include "opus/silk/errors.h" -#include "opus/celt/entenc.h" -#include "opus/celt/entdec.h" +#include "control.h" +#include "typedef.h" +#include "errors.h" +#include "entenc.h" +#include "entdec.h" #ifdef __cplusplus extern "C" diff --git a/drivers/opus/silk/CNG.c b/thirdparty/opus/silk/CNG.c similarity index 99% rename from drivers/opus/silk/CNG.c rename to thirdparty/opus/silk/CNG.c index 595a2888653..61787c2302a 100644 --- a/drivers/opus/silk/CNG.c +++ b/thirdparty/opus/silk/CNG.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "stack_alloc.h" /* Generates excitation for CNG LPC synthesis */ static OPUS_INLINE void silk_CNG_exc( diff --git a/drivers/opus/silk/HP_variable_cutoff.c b/thirdparty/opus/silk/HP_variable_cutoff.c similarity index 95% rename from drivers/opus/silk/HP_variable_cutoff.c rename to thirdparty/opus/silk/HP_variable_cutoff.c index 6b93fdb5a37..bbe10f04cef 100644 --- a/drivers/opus/silk/HP_variable_cutoff.c +++ b/thirdparty/opus/silk/HP_variable_cutoff.c @@ -24,13 +24,16 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#ifdef OPUS_FIXED_POINT -#include "opus/silk/fixed/main_FIX.h" -#else -#include "opus/silk/float/main_FLP.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif -#include "opus/silk/tuning_parameters.h" +#ifdef FIXED_POINT +#include "main_FIX.h" +#else +#include "main_FLP.h" +#endif +#include "tuning_parameters.h" /* High-pass filter with cutoff frequency adaptation based on pitch lag statistics */ void silk_HP_variable_cutoff( diff --git a/drivers/opus/silk/Inlines.h b/thirdparty/opus/silk/Inlines.h similarity index 100% rename from drivers/opus/silk/Inlines.h rename to thirdparty/opus/silk/Inlines.h diff --git a/drivers/opus/silk/LPC_analysis_filter.c b/thirdparty/opus/silk/LPC_analysis_filter.c similarity index 96% rename from drivers/opus/silk/LPC_analysis_filter.c rename to thirdparty/opus/silk/LPC_analysis_filter.c index f3c34b5482b..20906673ff1 100644 --- a/drivers/opus/silk/LPC_analysis_filter.c +++ b/thirdparty/opus/silk/LPC_analysis_filter.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/celt/celt_lpc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "celt_lpc.h" /*******************************************/ /* LPC analysis filter */ @@ -46,7 +49,7 @@ void silk_LPC_analysis_filter( ) { opus_int j; -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT opus_int16 mem[SILK_MAX_ORDER_LPC]; opus_int16 num[SILK_MAX_ORDER_LPC]; #else @@ -59,7 +62,7 @@ void silk_LPC_analysis_filter( silk_assert( (d & 1) == 0 ); silk_assert( d <= len ); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT silk_assert( d <= SILK_MAX_ORDER_LPC ); for ( j = 0; j < d; j++ ) { num[ j ] = -B[ j ]; diff --git a/drivers/opus/silk/LPC_inv_pred_gain.c b/thirdparty/opus/silk/LPC_inv_pred_gain.c similarity index 98% rename from drivers/opus/silk/LPC_inv_pred_gain.c rename to thirdparty/opus/silk/LPC_inv_pred_gain.c index 8ace51500c9..4af89aa5fad 100644 --- a/drivers/opus/silk/LPC_inv_pred_gain.c +++ b/thirdparty/opus/silk/LPC_inv_pred_gain.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" #define QA 24 #define A_LIMIT SILK_FIX_CONST( 0.99975, QA ) @@ -127,7 +130,7 @@ opus_int32 silk_LPC_inverse_pred_gain( /* O Returns inverse predi return LPC_inverse_pred_gain_QA( Atmp_QA, order ); } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* For input in Q24 domain */ opus_int32 silk_LPC_inverse_pred_gain_Q24( /* O Returns inverse prediction gain in energy domain, Q30 */ diff --git a/drivers/opus/silk/LP_variable_cutoff.c b/thirdparty/opus/silk/LP_variable_cutoff.c similarity index 98% rename from drivers/opus/silk/LP_variable_cutoff.c rename to thirdparty/opus/silk/LP_variable_cutoff.c index b39497c4d90..f639e1f899a 100644 --- a/drivers/opus/silk/LP_variable_cutoff.c +++ b/thirdparty/opus/silk/LP_variable_cutoff.c @@ -24,7 +24,10 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* Elliptic/Cauer filters designed with 0.1 dB passband ripple, @@ -32,7 +35,7 @@ POSSIBILITY OF SUCH DAMAGE. [0.95 : 0.15 : 0.35] normalized cut off frequencies. */ -#include "opus/silk/main.h" +#include "main.h" /* Helper function, interpolates the filter taps */ static OPUS_INLINE void silk_LP_interpolate_filter_taps( diff --git a/drivers/opus/silk/MacroCount.h b/thirdparty/opus/silk/MacroCount.h similarity index 100% rename from drivers/opus/silk/MacroCount.h rename to thirdparty/opus/silk/MacroCount.h diff --git a/drivers/opus/silk/MacroDebug.h b/thirdparty/opus/silk/MacroDebug.h similarity index 100% rename from drivers/opus/silk/MacroDebug.h rename to thirdparty/opus/silk/MacroDebug.h diff --git a/drivers/opus/silk/NLSF2A.c b/thirdparty/opus/silk/NLSF2A.c similarity index 98% rename from drivers/opus/silk/NLSF2A.c rename to thirdparty/opus/silk/NLSF2A.c index 09db1c1c3f0..b1c559ea682 100644 --- a/drivers/opus/silk/NLSF2A.c +++ b/thirdparty/opus/silk/NLSF2A.c @@ -24,7 +24,10 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* conversion between prediction filter coefficients and LSFs */ /* order should be even */ @@ -32,8 +35,8 @@ POSSIBILITY OF SUCH DAMAGE. /* therefore the result is not accurate LSFs, but the two */ /* functions are accurate inverses of each other */ -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/tables.h" +#include "SigProc_FIX.h" +#include "tables.h" #define QA 16 diff --git a/drivers/opus/silk/NLSF_VQ.c b/thirdparty/opus/silk/NLSF_VQ.c similarity index 98% rename from drivers/opus/silk/NLSF_VQ.c rename to thirdparty/opus/silk/NLSF_VQ.c index 99a37d4e0d2..69b6e22e189 100644 --- a/drivers/opus/silk/NLSF_VQ.c +++ b/thirdparty/opus/silk/NLSF_VQ.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Compute quantization errors for an LPC_order element input vector for a VQ codebook */ void silk_NLSF_VQ( diff --git a/drivers/opus/silk/NLSF_VQ_weights_laroia.c b/thirdparty/opus/silk/NLSF_VQ_weights_laroia.c similarity index 97% rename from drivers/opus/silk/NLSF_VQ_weights_laroia.c rename to thirdparty/opus/silk/NLSF_VQ_weights_laroia.c index 5743a4dee9f..04894c59ab7 100644 --- a/drivers/opus/silk/NLSF_VQ_weights_laroia.c +++ b/thirdparty/opus/silk/NLSF_VQ_weights_laroia.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/define.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "define.h" +#include "SigProc_FIX.h" /* R. Laroia, N. Phamdo and N. Farvardin, "Robust and Efficient Quantization of Speech LSP diff --git a/drivers/opus/silk/NLSF_decode.c b/thirdparty/opus/silk/NLSF_decode.c similarity index 98% rename from drivers/opus/silk/NLSF_decode.c rename to thirdparty/opus/silk/NLSF_decode.c index 6b922f3eeec..9f715060b8e 100644 --- a/drivers/opus/silk/NLSF_decode.c +++ b/thirdparty/opus/silk/NLSF_decode.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Predictive dequantizer for NLSF residuals */ static OPUS_INLINE void silk_NLSF_residual_dequant( /* O Returns RD value in Q30 */ diff --git a/drivers/opus/silk/NLSF_del_dec_quant.c b/thirdparty/opus/silk/NLSF_del_dec_quant.c similarity index 99% rename from drivers/opus/silk/NLSF_del_dec_quant.c rename to thirdparty/opus/silk/NLSF_del_dec_quant.c index 3f81b2028ce..c3b9efccfa1 100644 --- a/drivers/opus/silk/NLSF_del_dec_quant.c +++ b/thirdparty/opus/silk/NLSF_del_dec_quant.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Delayed-decision quantizer for NLSF residuals */ opus_int32 silk_NLSF_del_dec_quant( /* O Returns RD value in Q25 */ diff --git a/drivers/opus/silk/NLSF_encode.c b/thirdparty/opus/silk/NLSF_encode.c similarity index 98% rename from drivers/opus/silk/NLSF_encode.c rename to thirdparty/opus/silk/NLSF_encode.c index 9efb3e51581..03a036fda2f 100644 --- a/drivers/opus/silk/NLSF_encode.c +++ b/thirdparty/opus/silk/NLSF_encode.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "stack_alloc.h" /***********************/ /* NLSF vector encoder */ diff --git a/drivers/opus/silk/NLSF_stabilize.c b/thirdparty/opus/silk/NLSF_stabilize.c similarity index 98% rename from drivers/opus/silk/NLSF_stabilize.c rename to thirdparty/opus/silk/NLSF_stabilize.c index 1a45e169253..1fa1ea379bd 100644 --- a/drivers/opus/silk/NLSF_stabilize.c +++ b/thirdparty/opus/silk/NLSF_stabilize.c @@ -24,7 +24,10 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* NLSF stabilizer: */ /* */ @@ -35,7 +38,7 @@ POSSIBILITY OF SUCH DAMAGE. /* - Output are sorted NLSF coefficients */ /* */ -#include "opus/silk/SigProc_FIX.h" +#include "SigProc_FIX.h" /* Constant Definitions */ #define MAX_LOOPS 20 diff --git a/drivers/opus/silk/NLSF_unpack.c b/thirdparty/opus/silk/NLSF_unpack.c similarity index 97% rename from drivers/opus/silk/NLSF_unpack.c rename to thirdparty/opus/silk/NLSF_unpack.c index c958f4a6ef1..17bd23f752f 100644 --- a/drivers/opus/silk/NLSF_unpack.c +++ b/thirdparty/opus/silk/NLSF_unpack.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Unpack predictor values and indices for entropy coding tables */ void silk_NLSF_unpack( diff --git a/drivers/opus/silk/NSQ.c b/thirdparty/opus/silk/NSQ.c similarity index 99% rename from drivers/opus/silk/NSQ.c rename to thirdparty/opus/silk/NSQ.c index e41e533bde0..a0658840700 100644 --- a/drivers/opus/silk/NSQ.c +++ b/thirdparty/opus/silk/NSQ.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "stack_alloc.h" static OPUS_INLINE void silk_nsq_scale_states( const silk_encoder_state *psEncC, /* I Encoder State */ diff --git a/thirdparty/opus/silk/NSQ.h b/thirdparty/opus/silk/NSQ.h new file mode 100644 index 00000000000..971832f660e --- /dev/null +++ b/thirdparty/opus/silk/NSQ.h @@ -0,0 +1,101 @@ +/*********************************************************************** +Copyright (c) 2014 Vidyo. +Copyright (c) 2006-2011, Skype Limited. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +- Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +- Neither the name of Internet Society, IETF or IETF Trust, nor the +names of specific contributors, may be used to endorse or promote +products derived from this software without specific prior written +permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +***********************************************************************/ +#ifndef SILK_NSQ_H +#define SILK_NSQ_H + +#include "SigProc_FIX.h" + +#undef silk_short_prediction_create_arch_coef + +static OPUS_INLINE opus_int32 silk_noise_shape_quantizer_short_prediction_c(const opus_int32 *buf32, const opus_int16 *coef16, opus_int order) +{ + opus_int32 out; + silk_assert( order == 10 || order == 16 ); + + /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */ + out = silk_RSHIFT( order, 1 ); + out = silk_SMLAWB( out, buf32[ 0 ], coef16[ 0 ] ); + out = silk_SMLAWB( out, buf32[ -1 ], coef16[ 1 ] ); + out = silk_SMLAWB( out, buf32[ -2 ], coef16[ 2 ] ); + out = silk_SMLAWB( out, buf32[ -3 ], coef16[ 3 ] ); + out = silk_SMLAWB( out, buf32[ -4 ], coef16[ 4 ] ); + out = silk_SMLAWB( out, buf32[ -5 ], coef16[ 5 ] ); + out = silk_SMLAWB( out, buf32[ -6 ], coef16[ 6 ] ); + out = silk_SMLAWB( out, buf32[ -7 ], coef16[ 7 ] ); + out = silk_SMLAWB( out, buf32[ -8 ], coef16[ 8 ] ); + out = silk_SMLAWB( out, buf32[ -9 ], coef16[ 9 ] ); + + if( order == 16 ) + { + out = silk_SMLAWB( out, buf32[ -10 ], coef16[ 10 ] ); + out = silk_SMLAWB( out, buf32[ -11 ], coef16[ 11 ] ); + out = silk_SMLAWB( out, buf32[ -12 ], coef16[ 12 ] ); + out = silk_SMLAWB( out, buf32[ -13 ], coef16[ 13 ] ); + out = silk_SMLAWB( out, buf32[ -14 ], coef16[ 14 ] ); + out = silk_SMLAWB( out, buf32[ -15 ], coef16[ 15 ] ); + } + return out; +} + +#define silk_noise_shape_quantizer_short_prediction(in, coef, coefRev, order, arch) ((void)arch,silk_noise_shape_quantizer_short_prediction_c(in, coef, order)) + +static OPUS_INLINE opus_int32 silk_NSQ_noise_shape_feedback_loop_c(const opus_int32 *data0, opus_int32 *data1, const opus_int16 *coef, opus_int order) +{ + opus_int32 out; + opus_int32 tmp1, tmp2; + opus_int j; + + tmp2 = data0[0]; + tmp1 = data1[0]; + data1[0] = tmp2; + + out = silk_RSHIFT(order, 1); + out = silk_SMLAWB(out, tmp2, coef[0]); + + for (j = 2; j < order; j += 2) { + tmp2 = data1[j - 1]; + data1[j - 1] = tmp1; + out = silk_SMLAWB(out, tmp1, coef[j - 1]); + tmp1 = data1[j + 0]; + data1[j + 0] = tmp2; + out = silk_SMLAWB(out, tmp2, coef[j]); + } + data1[order - 1] = tmp1; + out = silk_SMLAWB(out, tmp1, coef[order - 1]); + /* Q11 -> Q12 */ + out = silk_LSHIFT32( out, 1 ); + return out; +} + +#define silk_NSQ_noise_shape_feedback_loop(data0, data1, coef, order, arch) ((void)arch,silk_NSQ_noise_shape_feedback_loop_c(data0, data1, coef, order)) + +#if defined(OPUS_ARM_MAY_HAVE_NEON_INTR) +#include "arm/NSQ_neon.h" +#endif + +#endif /* SILK_NSQ_H */ diff --git a/drivers/opus/silk/NSQ_del_dec.c b/thirdparty/opus/silk/NSQ_del_dec.c similarity index 99% rename from drivers/opus/silk/NSQ_del_dec.c rename to thirdparty/opus/silk/NSQ_del_dec.c index 28b385e4159..aff560c2210 100644 --- a/drivers/opus/silk/NSQ_del_dec.c +++ b/thirdparty/opus/silk/NSQ_del_dec.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "stack_alloc.h" typedef struct { opus_int32 sLPC_Q14[ MAX_SUB_FRAME_LENGTH + NSQ_LPC_BUF_LENGTH ]; @@ -55,7 +58,7 @@ typedef struct { typedef NSQ_sample_struct NSQ_sample_pair[ 2 ]; #if defined(MIPSr1_ASM) -#include "opus/silk/mips/NSQ_del_dec_mipsr1.h" +#include "mips/NSQ_del_dec_mipsr1.h" #endif static OPUS_INLINE void silk_nsq_del_dec_scale_states( const silk_encoder_state *psEncC, /* I Encoder State */ diff --git a/drivers/opus/silk/PLC.c b/thirdparty/opus/silk/PLC.c similarity index 99% rename from drivers/opus/silk/PLC.c rename to thirdparty/opus/silk/PLC.c index 4007112c5a8..34a94bc313e 100644 --- a/drivers/opus/silk/PLC.c +++ b/thirdparty/opus/silk/PLC.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" -#include "opus/silk/PLC.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "stack_alloc.h" +#include "PLC.h" #define NB_ATT 2 static const opus_int16 HARM_ATT_Q15[NB_ATT] = { 32440, 31130 }; /* 0.99, 0.95 */ diff --git a/drivers/opus/silk/PLC.h b/thirdparty/opus/silk/PLC.h similarity index 99% rename from drivers/opus/silk/PLC.h rename to thirdparty/opus/silk/PLC.h index 209c2de48f7..6438f516330 100644 --- a/drivers/opus/silk/PLC.h +++ b/thirdparty/opus/silk/PLC.h @@ -28,7 +28,7 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_PLC_H #define SILK_PLC_H -#include "opus/silk/main.h" +#include "main.h" #define BWE_COEF 0.99 #define V_PITCH_GAIN_START_MIN_Q14 11469 /* 0.7 in Q14 */ diff --git a/drivers/opus/silk/SigProc_FIX.h b/thirdparty/opus/silk/SigProc_FIX.h similarity index 98% rename from drivers/opus/silk/SigProc_FIX.h rename to thirdparty/opus/silk/SigProc_FIX.h index 743cf7800c3..b63299441e9 100644 --- a/drivers/opus/silk/SigProc_FIX.h +++ b/thirdparty/opus/silk/SigProc_FIX.h @@ -38,13 +38,13 @@ extern "C" #define SILK_MAX_ORDER_LPC 16 /* max order of the LPC analysis in schur() and k2a() */ #include /* for memset(), memcpy(), memmove() */ -#include "opus/silk/typedef.h" -#include "opus/silk/resampler_structs.h" -#include "opus/silk/macros.h" -#include "opus/celt/cpu_support.h" +#include "typedef.h" +#include "resampler_structs.h" +#include "macros.h" +#include "cpu_support.h" #if defined(OPUS_X86_MAY_HAVE_SSE4_1) -#include "opus/silk/x86/SigProc_FIX_sse.h" +#include "x86/SigProc_FIX_sse.h" #endif /********************************************************************/ @@ -591,20 +591,20 @@ static OPUS_INLINE opus_int64 silk_max_64(opus_int64 a, opus_int64 b) ((void)(arch),silk_inner_prod16_aligned_64_c(inVec1, inVec2, len)) #endif -#include "opus/silk/Inlines.h" -#include "opus/silk/MacroCount.h" -#include "opus/silk/MacroDebug.h" +#include "Inlines.h" +#include "MacroCount.h" +#include "MacroDebug.h" #ifdef OPUS_ARM_INLINE_ASM -#include "opus/silk/arm/SigProc_FIX_armv4.h" +#include "arm/SigProc_FIX_armv4.h" #endif #ifdef OPUS_ARM_INLINE_EDSP -#include "opus/silk/arm/SigProc_FIX_armv5e.h" +#include "arm/SigProc_FIX_armv5e.h" #endif #if defined(MIPSr1_ASM) -#include "opus/silk/mips/sigproc_fix_mipsr1.h" +#include "mips/sigproc_fix_mipsr1.h" #endif diff --git a/drivers/opus/silk/VAD.c b/thirdparty/opus/silk/VAD.c similarity index 99% rename from drivers/opus/silk/VAD.c rename to thirdparty/opus/silk/VAD.c index bb664cff875..0a782af2f13 100644 --- a/drivers/opus/silk/VAD.c +++ b/thirdparty/opus/silk/VAD.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "stack_alloc.h" /* Silk VAD noise level estimation */ # if !defined(OPUS_X86_MAY_HAVE_SSE4_1) diff --git a/drivers/opus/silk/VQ_WMat_EC.c b/thirdparty/opus/silk/VQ_WMat_EC.c similarity index 98% rename from drivers/opus/silk/VQ_WMat_EC.c rename to thirdparty/opus/silk/VQ_WMat_EC.c index fec9ee8dde9..7983f1db80c 100644 --- a/drivers/opus/silk/VQ_WMat_EC.c +++ b/thirdparty/opus/silk/VQ_WMat_EC.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Entropy constrained matrix-weighted VQ, hard-coded to 5-element vectors, for a single input data vector */ void silk_VQ_WMat_EC_c( diff --git a/drivers/opus/silk/ana_filt_bank_1.c b/thirdparty/opus/silk/ana_filt_bank_1.c similarity index 98% rename from drivers/opus/silk/ana_filt_bank_1.c rename to thirdparty/opus/silk/ana_filt_bank_1.c index b49bdd90be4..24cfb03fdb2 100644 --- a/drivers/opus/silk/ana_filt_bank_1.c +++ b/thirdparty/opus/silk/ana_filt_bank_1.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Coefficients for 2-band filter bank based on first-order allpass filters */ static opus_int16 A_fb1_20 = 5394 << 1; diff --git a/thirdparty/opus/silk/arm/NSQ_neon.c b/thirdparty/opus/silk/arm/NSQ_neon.c new file mode 100644 index 00000000000..96425299736 --- /dev/null +++ b/thirdparty/opus/silk/arm/NSQ_neon.c @@ -0,0 +1,112 @@ +/*********************************************************************** +Copyright (C) 2014 Vidyo +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +- Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +- Neither the name of Internet Society, IETF or IETF Trust, nor the +names of specific contributors, may be used to endorse or promote +products derived from this software without specific prior written +permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +***********************************************************************/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include "main.h" +#include "stack_alloc.h" +#include "NSQ.h" +#include "celt/cpu_support.h" +#include "celt/arm/armcpu.h" + +opus_int32 silk_noise_shape_quantizer_short_prediction_neon(const opus_int32 *buf32, const opus_int32 *coef32, opus_int order) +{ + int32x4_t coef0 = vld1q_s32(coef32); + int32x4_t coef1 = vld1q_s32(coef32 + 4); + int32x4_t coef2 = vld1q_s32(coef32 + 8); + int32x4_t coef3 = vld1q_s32(coef32 + 12); + + int32x4_t a0 = vld1q_s32(buf32 - 15); + int32x4_t a1 = vld1q_s32(buf32 - 11); + int32x4_t a2 = vld1q_s32(buf32 - 7); + int32x4_t a3 = vld1q_s32(buf32 - 3); + + int32x4_t b0 = vqdmulhq_s32(coef0, a0); + int32x4_t b1 = vqdmulhq_s32(coef1, a1); + int32x4_t b2 = vqdmulhq_s32(coef2, a2); + int32x4_t b3 = vqdmulhq_s32(coef3, a3); + + int32x4_t c0 = vaddq_s32(b0, b1); + int32x4_t c1 = vaddq_s32(b2, b3); + + int32x4_t d = vaddq_s32(c0, c1); + + int64x2_t e = vpaddlq_s32(d); + + int64x1_t f = vadd_s64(vget_low_s64(e), vget_high_s64(e)); + + opus_int32 out = vget_lane_s32(vreinterpret_s32_s64(f), 0); + + out += silk_RSHIFT( order, 1 ); + + return out; +} + + +opus_int32 silk_NSQ_noise_shape_feedback_loop_neon(const opus_int32 *data0, opus_int32 *data1, const opus_int16 *coef, opus_int order) +{ + opus_int32 out; + if (order == 8) + { + int32x4_t a00 = vdupq_n_s32(data0[0]); + int32x4_t a01 = vld1q_s32(data1); /* data1[0] ... [3] */ + + int32x4_t a0 = vextq_s32 (a00, a01, 3); /* data0[0] data1[0] ...[2] */ + int32x4_t a1 = vld1q_s32(data1 + 3); /* data1[3] ... [6] */ + + /*TODO: Convert these once in advance instead of once per sample, like + silk_noise_shape_quantizer_short_prediction_neon() does.*/ + int16x8_t coef16 = vld1q_s16(coef); + int32x4_t coef0 = vmovl_s16(vget_low_s16(coef16)); + int32x4_t coef1 = vmovl_s16(vget_high_s16(coef16)); + + /*This is not bit-exact with the C version, since we do not drop the + lower 16 bits of each multiply, but wait until the end to truncate + precision. This is an encoder-specific calculation (and unlike + silk_noise_shape_quantizer_short_prediction_neon(), is not meant to + simulate what the decoder will do). We still could use vqdmulhq_s32() + like silk_noise_shape_quantizer_short_prediction_neon() and save + half the multiplies, but the speed difference is not large, since we + then need two extra adds.*/ + int64x2_t b0 = vmull_s32(vget_low_s32(a0), vget_low_s32(coef0)); + int64x2_t b1 = vmlal_s32(b0, vget_high_s32(a0), vget_high_s32(coef0)); + int64x2_t b2 = vmlal_s32(b1, vget_low_s32(a1), vget_low_s32(coef1)); + int64x2_t b3 = vmlal_s32(b2, vget_high_s32(a1), vget_high_s32(coef1)); + + int64x1_t c = vadd_s64(vget_low_s64(b3), vget_high_s64(b3)); + int64x1_t cS = vrshr_n_s64(c, 15); + int32x2_t d = vreinterpret_s32_s64(cS); + + out = vget_lane_s32(d, 0); + vst1q_s32(data1, a0); + vst1q_s32(data1 + 4, a1); + return out; + } + return silk_NSQ_noise_shape_feedback_loop_c(data0, data1, coef, order); +} diff --git a/thirdparty/opus/silk/arm/NSQ_neon.h b/thirdparty/opus/silk/arm/NSQ_neon.h new file mode 100644 index 00000000000..77c946af854 --- /dev/null +++ b/thirdparty/opus/silk/arm/NSQ_neon.h @@ -0,0 +1,113 @@ +/*********************************************************************** +Copyright (C) 2014 Vidyo +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +- Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +- Neither the name of Internet Society, IETF or IETF Trust, nor the +names of specific contributors, may be used to endorse or promote +products derived from this software without specific prior written +permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +***********************************************************************/ +#ifndef SILK_NSQ_NEON_H +#define SILK_NSQ_NEON_H + +#include "cpu_support.h" + +#undef silk_short_prediction_create_arch_coef +/* For vectorized calc, reverse a_Q12 coefs, convert to 32-bit, and shift for vqdmulhq_s32. */ +static OPUS_INLINE void silk_short_prediction_create_arch_coef_neon(opus_int32 *out, const opus_int16 *in, opus_int order) +{ + out[15] = in[0] << 15; + out[14] = in[1] << 15; + out[13] = in[2] << 15; + out[12] = in[3] << 15; + out[11] = in[4] << 15; + out[10] = in[5] << 15; + out[9] = in[6] << 15; + out[8] = in[7] << 15; + out[7] = in[8] << 15; + out[6] = in[9] << 15; + + if (order == 16) + { + out[5] = in[10] << 15; + out[4] = in[11] << 15; + out[3] = in[12] << 15; + out[2] = in[13] << 15; + out[1] = in[14] << 15; + out[0] = in[15] << 15; + } + else + { + out[5] = 0; + out[4] = 0; + out[3] = 0; + out[2] = 0; + out[1] = 0; + out[0] = 0; + } +} + +#if defined(OPUS_ARM_PRESUME_NEON_INTR) + +#define silk_short_prediction_create_arch_coef(out, in, order) \ + (silk_short_prediction_create_arch_coef_neon(out, in, order)) + +#elif defined(OPUS_HAVE_RTCD) && defined(OPUS_ARM_MAY_HAVE_NEON_INTR) + +#define silk_short_prediction_create_arch_coef(out, in, order) \ + do { if (arch == OPUS_ARCH_ARM_NEON) { silk_short_prediction_create_arch_coef_neon(out, in, order); } } while (0) + +#endif + +opus_int32 silk_noise_shape_quantizer_short_prediction_neon(const opus_int32 *buf32, const opus_int32 *coef32, opus_int order); + +opus_int32 silk_NSQ_noise_shape_feedback_loop_neon(const opus_int32 *data0, opus_int32 *data1, const opus_int16 *coef, opus_int order); + +#if defined(OPUS_ARM_PRESUME_NEON_INTR) +#undef silk_noise_shape_quantizer_short_prediction +#define silk_noise_shape_quantizer_short_prediction(in, coef, coefRev, order, arch) \ + ((void)arch,silk_noise_shape_quantizer_short_prediction_neon(in, coefRev, order)) + +#undef silk_NSQ_noise_shape_feedback_loop +#define silk_NSQ_noise_shape_feedback_loop(data0, data1, coef, order, arch) ((void)arch,silk_NSQ_noise_shape_feedback_loop_neon(data0, data1, coef, order)) + +#elif defined(OPUS_HAVE_RTCD) && defined(OPUS_ARM_MAY_HAVE_NEON_INTR) + +/* silk_noise_shape_quantizer_short_prediction implementations take different parameters based on arch + (coef vs. coefRev) so can't use the usual IMPL table implementation */ +#undef silk_noise_shape_quantizer_short_prediction +#define silk_noise_shape_quantizer_short_prediction(in, coef, coefRev, order, arch) \ + (arch == OPUS_ARCH_ARM_NEON ? \ + silk_noise_shape_quantizer_short_prediction_neon(in, coefRev, order) : \ + silk_noise_shape_quantizer_short_prediction_c(in, coef, order)) + +extern opus_int32 + (*const SILK_NSQ_NOISE_SHAPE_FEEDBACK_LOOP_IMPL[OPUS_ARCHMASK+1])( + const opus_int32 *data0, opus_int32 *data1, const opus_int16 *coef, + opus_int order); + +#undef silk_NSQ_noise_shape_feedback_loop +#define silk_NSQ_noise_shape_feedback_loop(data0, data1, coef, order, arch) \ + (SILK_NSQ_NOISE_SHAPE_FEEDBACK_LOOP_IMPL[(arch)&OPUS_ARCHMASK](data0, data1, \ + coef, order)) + +#endif + +#endif /* SILK_NSQ_NEON_H */ diff --git a/drivers/opus/silk/arm/SigProc_FIX_armv4.h b/thirdparty/opus/silk/arm/SigProc_FIX_armv4.h similarity index 100% rename from drivers/opus/silk/arm/SigProc_FIX_armv4.h rename to thirdparty/opus/silk/arm/SigProc_FIX_armv4.h diff --git a/drivers/opus/silk/arm/SigProc_FIX_armv5e.h b/thirdparty/opus/silk/arm/SigProc_FIX_armv5e.h similarity index 100% rename from drivers/opus/silk/arm/SigProc_FIX_armv5e.h rename to thirdparty/opus/silk/arm/SigProc_FIX_armv5e.h diff --git a/thirdparty/opus/silk/arm/arm_silk_map.c b/thirdparty/opus/silk/arm/arm_silk_map.c new file mode 100644 index 00000000000..9bd86a7b215 --- /dev/null +++ b/thirdparty/opus/silk/arm/arm_silk_map.c @@ -0,0 +1,55 @@ +/*********************************************************************** +Copyright (C) 2014 Vidyo +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +- Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +- Neither the name of Internet Society, IETF or IETF Trust, nor the +names of specific contributors, may be used to endorse or promote +products derived from this software without specific prior written +permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +***********************************************************************/ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "NSQ.h" + +#if defined(OPUS_HAVE_RTCD) + +# if (defined(OPUS_ARM_MAY_HAVE_NEON_INTR) && \ + !defined(OPUS_ARM_PRESUME_NEON_INTR)) + +/*There is no table for silk_noise_shape_quantizer_short_prediction because the + NEON version takes different parameters than the C version. + Instead RTCD is done via if statements at the call sites. + See NSQ_neon.h for details.*/ + +opus_int32 + (*const SILK_NSQ_NOISE_SHAPE_FEEDBACK_LOOP_IMPL[OPUS_ARCHMASK+1])( + const opus_int32 *data0, opus_int32 *data1, const opus_int16 *coef, + opus_int order) = { + silk_NSQ_noise_shape_feedback_loop_c, /* ARMv4 */ + silk_NSQ_noise_shape_feedback_loop_c, /* EDSP */ + silk_NSQ_noise_shape_feedback_loop_c, /* Media */ + silk_NSQ_noise_shape_feedback_loop_neon, /* NEON */ +}; + +# endif + +#endif /* OPUS_HAVE_RTCD */ diff --git a/thirdparty/opus/silk/arm/macros_arm64.h b/thirdparty/opus/silk/arm/macros_arm64.h new file mode 100644 index 00000000000..ed030413c5c --- /dev/null +++ b/thirdparty/opus/silk/arm/macros_arm64.h @@ -0,0 +1,39 @@ +/*********************************************************************** +Copyright (C) 2015 Vidyo +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +- Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. +- Neither the name of Internet Society, IETF or IETF Trust, nor the +names of specific contributors, may be used to endorse or promote +products derived from this software without specific prior written +permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +***********************************************************************/ + +#ifndef SILK_MACROS_ARM64_H +#define SILK_MACROS_ARM64_H + +#include + +#undef silk_ADD_SAT32 +#define silk_ADD_SAT32(a, b) (vqadds_s32((a), (b))) + +#undef silk_SUB_SAT32 +#define silk_SUB_SAT32(a, b) (vqsubs_s32((a), (b))) + +#endif /* SILK_MACROS_ARM64_H */ diff --git a/drivers/opus/silk/arm/macros_armv4.h b/thirdparty/opus/silk/arm/macros_armv4.h similarity index 100% rename from drivers/opus/silk/arm/macros_armv4.h rename to thirdparty/opus/silk/arm/macros_armv4.h diff --git a/drivers/opus/silk/arm/macros_armv5e.h b/thirdparty/opus/silk/arm/macros_armv5e.h similarity index 100% rename from drivers/opus/silk/arm/macros_armv5e.h rename to thirdparty/opus/silk/arm/macros_armv5e.h diff --git a/drivers/opus/silk/biquad_alt.c b/thirdparty/opus/silk/biquad_alt.c similarity index 98% rename from drivers/opus/silk/biquad_alt.c rename to thirdparty/opus/silk/biquad_alt.c index f797d1e709e..d55f5ee92ec 100644 --- a/drivers/opus/silk/biquad_alt.c +++ b/thirdparty/opus/silk/biquad_alt.c @@ -31,9 +31,12 @@ POSSIBILITY OF SUCH DAMAGE. * Second order ARMA filter * * Can handle slowly varying filter coefficients * * */ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Second order ARMA filter, alternative implementation */ void silk_biquad_alt( diff --git a/drivers/opus/silk/bwexpander.c b/thirdparty/opus/silk/bwexpander.c similarity index 97% rename from drivers/opus/silk/bwexpander.c rename to thirdparty/opus/silk/bwexpander.c index e7cc4485200..2eb4456695e 100644 --- a/drivers/opus/silk/bwexpander.c +++ b/thirdparty/opus/silk/bwexpander.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Chirp (bandwidth expand) LP AR filter */ void silk_bwexpander( diff --git a/drivers/opus/silk/bwexpander_32.c b/thirdparty/opus/silk/bwexpander_32.c similarity index 97% rename from drivers/opus/silk/bwexpander_32.c rename to thirdparty/opus/silk/bwexpander_32.c index dedd213b3e9..d0010f73dfd 100644 --- a/drivers/opus/silk/bwexpander_32.c +++ b/thirdparty/opus/silk/bwexpander_32.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Chirp (bandwidth expand) LP AR filter */ void silk_bwexpander_32( diff --git a/drivers/opus/silk/check_control_input.c b/thirdparty/opus/silk/check_control_input.c similarity index 97% rename from drivers/opus/silk/check_control_input.c rename to thirdparty/opus/silk/check_control_input.c index 61a7cc1f33f..b5de9ce48d6 100644 --- a/drivers/opus/silk/check_control_input.c +++ b/thirdparty/opus/silk/check_control_input.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/silk/control.h" -#include "opus/silk/errors.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "control.h" +#include "errors.h" /* Check encoder control struct */ opus_int check_control_input( diff --git a/drivers/opus/silk/code_signs.c b/thirdparty/opus/silk/code_signs.c similarity index 98% rename from drivers/opus/silk/code_signs.c rename to thirdparty/opus/silk/code_signs.c index 79c18935141..dfd1dca9a18 100644 --- a/drivers/opus/silk/code_signs.c +++ b/thirdparty/opus/silk/code_signs.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /*#define silk_enc_map(a) ((a) > 0 ? 1 : 0)*/ /*#define silk_dec_map(a) ((a) > 0 ? 1 : -1)*/ diff --git a/drivers/opus/silk/control.h b/thirdparty/opus/silk/control.h similarity index 99% rename from drivers/opus/silk/control.h rename to thirdparty/opus/silk/control.h index 4b20c4a8b82..747e5426a0c 100644 --- a/drivers/opus/silk/control.h +++ b/thirdparty/opus/silk/control.h @@ -28,7 +28,7 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_CONTROL_H #define SILK_CONTROL_H -#include "opus/silk/typedef.h" +#include "typedef.h" #ifdef __cplusplus extern "C" diff --git a/drivers/opus/silk/control_SNR.c b/thirdparty/opus/silk/control_SNR.c similarity index 97% rename from drivers/opus/silk/control_SNR.c rename to thirdparty/opus/silk/control_SNR.c index 5aebfcf3850..cee87eb0d8b 100644 --- a/drivers/opus/silk/control_SNR.c +++ b/thirdparty/opus/silk/control_SNR.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "tuning_parameters.h" /* Control SNR of redidual quantizer */ opus_int silk_control_SNR( diff --git a/drivers/opus/silk/control_audio_bandwidth.c b/thirdparty/opus/silk/control_audio_bandwidth.c similarity index 98% rename from drivers/opus/silk/control_audio_bandwidth.c rename to thirdparty/opus/silk/control_audio_bandwidth.c index 04640f53fe0..4f9bc5cbdaa 100644 --- a/drivers/opus/silk/control_audio_bandwidth.c +++ b/thirdparty/opus/silk/control_audio_bandwidth.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "tuning_parameters.h" /* Control internal sampling rate */ opus_int silk_control_audio_bandwidth( diff --git a/drivers/opus/silk/control_codec.c b/thirdparty/opus/silk/control_codec.c similarity index 98% rename from drivers/opus/silk/control_codec.c rename to thirdparty/opus/silk/control_codec.c index 03caab36a91..044eea3f2a8 100644 --- a/drivers/opus/silk/control_codec.c +++ b/thirdparty/opus/silk/control_codec.c @@ -24,17 +24,20 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#ifdef OPUS_FIXED_POINT -#include "opus/silk/fixed/main_FIX.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#ifdef FIXED_POINT +#include "main_FIX.h" #define silk_encoder_state_Fxx silk_encoder_state_FIX #else -#include "opus/silk/float/main_FLP.h" +#include "main_FLP.h" #define silk_encoder_state_Fxx silk_encoder_state_FLP #endif -#include "opus/celt/stack_alloc.h" -#include "opus/silk/tuning_parameters.h" -#include "opus/silk/pitch_est_defines.h" +#include "stack_alloc.h" +#include "tuning_parameters.h" +#include "pitch_est_defines.h" static opus_int silk_setup_resamplers( silk_encoder_state_Fxx *psEnc, /* I/O */ @@ -145,7 +148,7 @@ static opus_int silk_setup_resamplers( } else { VARDECL( opus_int16, x_buf_API_fs_Hz ); VARDECL( silk_resampler_state_struct, temp_resampler_state ); -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT opus_int16 *x_bufFIX = psEnc->x_buf; #else VARDECL( opus_int16, x_bufFIX ); @@ -158,7 +161,7 @@ static opus_int silk_setup_resamplers( buf_length_ms = silk_LSHIFT( psEnc->sCmn.nb_subfr * 5, 1 ) + LA_SHAPE_MS; old_buf_samples = buf_length_ms * psEnc->sCmn.fs_kHz; -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT new_buf_samples = buf_length_ms * fs_kHz; ALLOC( x_bufFIX, silk_max( old_buf_samples, new_buf_samples ), opus_int16 ); @@ -182,7 +185,7 @@ static opus_int silk_setup_resamplers( /* Correct resampler state by resampling buffered data from API_fs_Hz to fs_kHz */ ret += silk_resampler( &psEnc->sCmn.resampler_state, x_bufFIX, x_buf_API_fs_Hz, api_buf_samples ); -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT silk_short2float_array( psEnc->x_buf, x_bufFIX, new_buf_samples); #endif } diff --git a/drivers/opus/silk/debug.c b/thirdparty/opus/silk/debug.c similarity index 98% rename from drivers/opus/silk/debug.c rename to thirdparty/opus/silk/debug.c index ffb3f811a16..9253faf71bf 100644 --- a/drivers/opus/silk/debug.c +++ b/thirdparty/opus/silk/debug.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/debug.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "debug.h" +#include "SigProc_FIX.h" #if SILK_TIC_TOC diff --git a/drivers/opus/silk/debug.h b/thirdparty/opus/silk/debug.h similarity index 99% rename from drivers/opus/silk/debug.h rename to thirdparty/opus/silk/debug.h index d2eccfa1e43..efb6d3e99e7 100644 --- a/drivers/opus/silk/debug.h +++ b/thirdparty/opus/silk/debug.h @@ -28,7 +28,7 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_DEBUG_H #define SILK_DEBUG_H -#include "opus/silk/typedef.h" +#include "typedef.h" #include /* file writing */ #include /* strcpy, strcmp */ diff --git a/drivers/opus/silk/dec_API.c b/thirdparty/opus/silk/dec_API.c similarity index 99% rename from drivers/opus/silk/dec_API.c rename to thirdparty/opus/silk/dec_API.c index 2fd681c0d2a..b7d8ed48d88 100644 --- a/drivers/opus/silk/dec_API.c +++ b/thirdparty/opus/silk/dec_API.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/API.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" -#include "opus/celt/os_support.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include "API.h" +#include "main.h" +#include "stack_alloc.h" +#include "os_support.h" /************************/ /* Decoder Super Struct */ diff --git a/drivers/opus/silk/decode_core.c b/thirdparty/opus/silk/decode_core.c similarity index 99% rename from drivers/opus/silk/decode_core.c rename to thirdparty/opus/silk/decode_core.c index 8ca1adffdde..b88991e349f 100644 --- a/drivers/opus/silk/decode_core.c +++ b/thirdparty/opus/silk/decode_core.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "stack_alloc.h" /**********************************************************/ /* Core decoder. Performs inverse NSQ operation LTP + LPC */ diff --git a/drivers/opus/silk/decode_frame.c b/thirdparty/opus/silk/decode_frame.c similarity index 98% rename from drivers/opus/silk/decode_frame.c rename to thirdparty/opus/silk/decode_frame.c index 18e2bc9b1ad..a605d95ac6a 100644 --- a/drivers/opus/silk/decode_frame.c +++ b/thirdparty/opus/silk/decode_frame.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" -#include "opus/silk/PLC.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "stack_alloc.h" +#include "PLC.h" /****************/ /* Decode frame */ diff --git a/drivers/opus/silk/decode_indices.c b/thirdparty/opus/silk/decode_indices.c similarity index 99% rename from drivers/opus/silk/decode_indices.c rename to thirdparty/opus/silk/decode_indices.c index fa8066e5f7b..7afe5c26c19 100644 --- a/drivers/opus/silk/decode_indices.c +++ b/thirdparty/opus/silk/decode_indices.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Decode side-information parameters from payload */ void silk_decode_indices( diff --git a/drivers/opus/silk/decode_parameters.c b/thirdparty/opus/silk/decode_parameters.c similarity index 98% rename from drivers/opus/silk/decode_parameters.c rename to thirdparty/opus/silk/decode_parameters.c index d17cb8a3dfe..e345b1dcefb 100644 --- a/drivers/opus/silk/decode_parameters.c +++ b/thirdparty/opus/silk/decode_parameters.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Decode parameters from payload */ void silk_decode_parameters( diff --git a/drivers/opus/silk/decode_pitch.c b/thirdparty/opus/silk/decode_pitch.c similarity index 97% rename from drivers/opus/silk/decode_pitch.c rename to thirdparty/opus/silk/decode_pitch.c index 1d98ee7f338..fedbc6a5255 100644 --- a/drivers/opus/silk/decode_pitch.c +++ b/thirdparty/opus/silk/decode_pitch.c @@ -24,13 +24,16 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /*********************************************************** * Pitch analyser function ********************************************************** */ -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/pitch_est_defines.h" +#include "SigProc_FIX.h" +#include "pitch_est_defines.h" void silk_decode_pitch( opus_int16 lagIndex, /* I */ diff --git a/drivers/opus/silk/decode_pulses.c b/thirdparty/opus/silk/decode_pulses.c similarity index 98% rename from drivers/opus/silk/decode_pulses.c rename to thirdparty/opus/silk/decode_pulses.c index c687d3bfa81..d6bbec92252 100644 --- a/drivers/opus/silk/decode_pulses.c +++ b/thirdparty/opus/silk/decode_pulses.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /*********************************************/ /* Decode quantization indices of excitation */ diff --git a/drivers/opus/silk/decoder_set_fs.c b/thirdparty/opus/silk/decoder_set_fs.c similarity index 98% rename from drivers/opus/silk/decoder_set_fs.c rename to thirdparty/opus/silk/decoder_set_fs.c index 0079a506ee2..eef0fd25e18 100644 --- a/drivers/opus/silk/decoder_set_fs.c +++ b/thirdparty/opus/silk/decoder_set_fs.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Set decoder sampling rate */ opus_int silk_decoder_set_fs( diff --git a/drivers/opus/silk/define.h b/thirdparty/opus/silk/define.h similarity index 99% rename from drivers/opus/silk/define.h rename to thirdparty/opus/silk/define.h index c6165e3cff1..19c9b00e259 100644 --- a/drivers/opus/silk/define.h +++ b/thirdparty/opus/silk/define.h @@ -28,8 +28,8 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_DEFINE_H #define SILK_DEFINE_H -#include "opus/silk/errors.h" -#include "opus/silk/typedef.h" +#include "errors.h" +#include "typedef.h" #ifdef __cplusplus extern "C" diff --git a/drivers/opus/silk/enc_API.c b/thirdparty/opus/silk/enc_API.c similarity index 98% rename from drivers/opus/silk/enc_API.c rename to thirdparty/opus/silk/enc_API.c index beb46214d84..f8060286dba 100644 --- a/drivers/opus/silk/enc_API.c +++ b/thirdparty/opus/silk/enc_API.c @@ -24,18 +24,21 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/define.h" -#include "opus/silk/API.h" -#include "opus/silk/control.h" -#include "opus/silk/typedef.h" -#include "opus/celt/stack_alloc.h" -#include "opus/silk/structs.h" -#include "opus/silk/tuning_parameters.h" -#ifdef OPUS_FIXED_POINT -#include "opus/silk/fixed/main_FIX.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include "define.h" +#include "API.h" +#include "control.h" +#include "typedef.h" +#include "stack_alloc.h" +#include "structs.h" +#include "tuning_parameters.h" +#ifdef FIXED_POINT +#include "main_FIX.h" #else -#include "opus/silk/float/main_FLP.h" +#include "main_FLP.h" #endif /***************************************/ diff --git a/drivers/opus/silk/encode_indices.c b/thirdparty/opus/silk/encode_indices.c similarity index 99% rename from drivers/opus/silk/encode_indices.c rename to thirdparty/opus/silk/encode_indices.c index 72fc6a80e8b..666c8c0b13e 100644 --- a/drivers/opus/silk/encode_indices.c +++ b/thirdparty/opus/silk/encode_indices.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Encode side-information parameters to payload */ void silk_encode_indices( diff --git a/drivers/opus/silk/encode_pulses.c b/thirdparty/opus/silk/encode_pulses.c similarity index 98% rename from drivers/opus/silk/encode_pulses.c rename to thirdparty/opus/silk/encode_pulses.c index 238eec1e42e..ab00264f991 100644 --- a/drivers/opus/silk/encode_pulses.c +++ b/thirdparty/opus/silk/encode_pulses.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "stack_alloc.h" /*********************************************/ /* Encode quantization indices of excitation */ diff --git a/drivers/opus/silk/errors.h b/thirdparty/opus/silk/errors.h similarity index 100% rename from drivers/opus/silk/errors.h rename to thirdparty/opus/silk/errors.h diff --git a/drivers/opus/silk/fixed/LTP_analysis_filter_FIX.c b/thirdparty/opus/silk/fixed/LTP_analysis_filter_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/LTP_analysis_filter_FIX.c rename to thirdparty/opus/silk/fixed/LTP_analysis_filter_FIX.c index 041e85f0b9f..5574e7069fe 100644 --- a/drivers/opus/silk/fixed/LTP_analysis_filter_FIX.c +++ b/thirdparty/opus/silk/fixed/LTP_analysis_filter_FIX.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" void silk_LTP_analysis_filter_FIX( opus_int16 *LTP_res, /* O LTP residual signal of length MAX_NB_SUBFR * ( pre_length + subfr_length ) */ diff --git a/drivers/opus/silk/fixed/LTP_scale_ctrl_FIX.c b/thirdparty/opus/silk/fixed/LTP_scale_ctrl_FIX.c similarity index 97% rename from drivers/opus/silk/fixed/LTP_scale_ctrl_FIX.c rename to thirdparty/opus/silk/fixed/LTP_scale_ctrl_FIX.c index dac1fbc08a0..3dcedef8918 100644 --- a/drivers/opus/silk/fixed/LTP_scale_ctrl_FIX.c +++ b/thirdparty/opus/silk/fixed/LTP_scale_ctrl_FIX.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" /* Calculation of LTP state scaling */ void silk_LTP_scale_ctrl_FIX( diff --git a/drivers/opus/silk/fixed/apply_sine_window_FIX.c b/thirdparty/opus/silk/fixed/apply_sine_window_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/apply_sine_window_FIX.c rename to thirdparty/opus/silk/fixed/apply_sine_window_FIX.c index 9d63e7bce21..4502b7130e9 100644 --- a/drivers/opus/silk/fixed/apply_sine_window_FIX.c +++ b/thirdparty/opus/silk/fixed/apply_sine_window_FIX.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Apply sine window to signal vector. */ /* Window types: */ diff --git a/drivers/opus/silk/fixed/autocorr_FIX.c b/thirdparty/opus/silk/fixed/autocorr_FIX.c similarity index 96% rename from drivers/opus/silk/fixed/autocorr_FIX.c rename to thirdparty/opus/silk/fixed/autocorr_FIX.c index db39a0335ba..de95c986936 100644 --- a/drivers/opus/silk/fixed/autocorr_FIX.c +++ b/thirdparty/opus/silk/fixed/autocorr_FIX.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/celt/celt_lpc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "celt_lpc.h" /* Compute autocorrelation */ void silk_autocorr( diff --git a/drivers/opus/silk/fixed/burg_modified_FIX.c b/thirdparty/opus/silk/fixed/burg_modified_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/burg_modified_FIX.c rename to thirdparty/opus/silk/fixed/burg_modified_FIX.c index 48d64eccc59..4878553b65a 100644 --- a/drivers/opus/silk/fixed/burg_modified_FIX.c +++ b/thirdparty/opus/silk/fixed/burg_modified_FIX.c @@ -24,12 +24,15 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/define.h" -#include "opus/silk/tuning_parameters.h" -#include "opus/celt/pitch.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "define.h" +#include "tuning_parameters.h" +#include "pitch.h" #define MAX_FRAME_SIZE 384 /* subfr_length * nb_subfr = ( 0.005 * 16000 + 16 ) * 4 = 384 */ diff --git a/drivers/opus/silk/fixed/corrMatrix_FIX.c b/thirdparty/opus/silk/fixed/corrMatrix_FIX.c similarity index 99% rename from drivers/opus/silk/fixed/corrMatrix_FIX.c rename to thirdparty/opus/silk/fixed/corrMatrix_FIX.c index ac5331fe572..c1d437c7859 100644 --- a/drivers/opus/silk/fixed/corrMatrix_FIX.c +++ b/thirdparty/opus/silk/fixed/corrMatrix_FIX.c @@ -24,13 +24,16 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /********************************************************************** * Correlation Matrix Computations for LS estimate. **********************************************************************/ -#include "opus/silk/fixed/main_FIX.h" +#include "main_FIX.h" /* Calculates correlation vector X'*t */ void silk_corrVector_FIX( diff --git a/drivers/opus/silk/fixed/encode_frame_FIX.c b/thirdparty/opus/silk/fixed/encode_frame_FIX.c similarity index 99% rename from drivers/opus/silk/fixed/encode_frame_FIX.c rename to thirdparty/opus/silk/fixed/encode_frame_FIX.c index e4ead0afefe..5ef44b03fc4 100644 --- a/drivers/opus/silk/fixed/encode_frame_FIX.c +++ b/thirdparty/opus/silk/fixed/encode_frame_FIX.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" -#include "opus/celt/stack_alloc.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" +#include "stack_alloc.h" +#include "tuning_parameters.h" /* Low Bitrate Redundancy (LBRR) encoding. Reuse all parameters but encode with lower bitrate */ static OPUS_INLINE void silk_LBRR_encode_FIX( diff --git a/drivers/opus/silk/fixed/find_LPC_FIX.c b/thirdparty/opus/silk/fixed/find_LPC_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/find_LPC_FIX.c rename to thirdparty/opus/silk/fixed/find_LPC_FIX.c index 5b56c417022..e11cdc86e67 100644 --- a/drivers/opus/silk/fixed/find_LPC_FIX.c +++ b/thirdparty/opus/silk/fixed/find_LPC_FIX.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" -#include "opus/celt/stack_alloc.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" +#include "stack_alloc.h" +#include "tuning_parameters.h" /* Finds LPC vector from correlations, and converts to NLSF */ void silk_find_LPC_FIX( diff --git a/drivers/opus/silk/fixed/find_LTP_FIX.c b/thirdparty/opus/silk/fixed/find_LTP_FIX.c similarity index 99% rename from drivers/opus/silk/fixed/find_LTP_FIX.c rename to thirdparty/opus/silk/fixed/find_LTP_FIX.c index a5a253516dc..1314a281375 100644 --- a/drivers/opus/silk/fixed/find_LTP_FIX.c +++ b/thirdparty/opus/silk/fixed/find_LTP_FIX.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" +#include "tuning_parameters.h" /* Head room for correlations */ #define LTP_CORRS_HEAD_ROOM 2 diff --git a/drivers/opus/silk/fixed/find_pitch_lags_FIX.c b/thirdparty/opus/silk/fixed/find_pitch_lags_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/find_pitch_lags_FIX.c rename to thirdparty/opus/silk/fixed/find_pitch_lags_FIX.c index bfd2c1b2d2f..b8440a8247a 100644 --- a/drivers/opus/silk/fixed/find_pitch_lags_FIX.c +++ b/thirdparty/opus/silk/fixed/find_pitch_lags_FIX.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" -#include "opus/celt/stack_alloc.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" +#include "stack_alloc.h" +#include "tuning_parameters.h" /* Find pitch lags */ void silk_find_pitch_lags_FIX( diff --git a/drivers/opus/silk/fixed/find_pred_coefs_FIX.c b/thirdparty/opus/silk/fixed/find_pred_coefs_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/find_pred_coefs_FIX.c rename to thirdparty/opus/silk/fixed/find_pred_coefs_FIX.c index d0280963bdd..d308e9cf5fe 100644 --- a/drivers/opus/silk/fixed/find_pred_coefs_FIX.c +++ b/thirdparty/opus/silk/fixed/find_pred_coefs_FIX.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" +#include "stack_alloc.h" void silk_find_pred_coefs_FIX( silk_encoder_state_FIX *psEnc, /* I/O encoder state */ diff --git a/drivers/opus/silk/fixed/k2a_FIX.c b/thirdparty/opus/silk/fixed/k2a_FIX.c similarity index 97% rename from drivers/opus/silk/fixed/k2a_FIX.c rename to thirdparty/opus/silk/fixed/k2a_FIX.c index 64771f370c8..5fee599bcb7 100644 --- a/drivers/opus/silk/fixed/k2a_FIX.c +++ b/thirdparty/opus/silk/fixed/k2a_FIX.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Step up function, converts reflection coefficients to prediction coefficients */ void silk_k2a( diff --git a/drivers/opus/silk/fixed/k2a_Q16_FIX.c b/thirdparty/opus/silk/fixed/k2a_Q16_FIX.c similarity index 97% rename from drivers/opus/silk/fixed/k2a_Q16_FIX.c rename to thirdparty/opus/silk/fixed/k2a_Q16_FIX.c index 49d90a862e4..3b039875446 100644 --- a/drivers/opus/silk/fixed/k2a_Q16_FIX.c +++ b/thirdparty/opus/silk/fixed/k2a_Q16_FIX.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Step up function, converts reflection coefficients to prediction coefficients */ void silk_k2a_Q16( diff --git a/drivers/opus/silk/fixed/main_FIX.h b/thirdparty/opus/silk/fixed/main_FIX.h similarity index 99% rename from drivers/opus/silk/fixed/main_FIX.h rename to thirdparty/opus/silk/fixed/main_FIX.h index f824c476533..375b5eb32ee 100644 --- a/drivers/opus/silk/fixed/main_FIX.h +++ b/thirdparty/opus/silk/fixed/main_FIX.h @@ -28,13 +28,13 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_MAIN_FIX_H #define SILK_MAIN_FIX_H -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/fixed/structs_FIX.h" -#include "opus/silk/control.h" -#include "opus/silk/main.h" -#include "opus/silk/PLC.h" -#include "opus/silk/debug.h" -#include "opus/celt/entenc.h" +#include "SigProc_FIX.h" +#include "structs_FIX.h" +#include "control.h" +#include "main.h" +#include "PLC.h" +#include "debug.h" +#include "entenc.h" #ifndef FORCE_CPP_BUILD #ifdef __cplusplus diff --git a/drivers/opus/silk/fixed/mips/noise_shape_analysis_FIX_mipsr1.h b/thirdparty/opus/silk/fixed/mips/noise_shape_analysis_FIX_mipsr1.h similarity index 100% rename from drivers/opus/silk/fixed/mips/noise_shape_analysis_FIX_mipsr1.h rename to thirdparty/opus/silk/fixed/mips/noise_shape_analysis_FIX_mipsr1.h diff --git a/drivers/opus/silk/fixed/mips/prefilter_FIX_mipsr1.h b/thirdparty/opus/silk/fixed/mips/prefilter_FIX_mipsr1.h similarity index 98% rename from drivers/opus/silk/fixed/mips/prefilter_FIX_mipsr1.h rename to thirdparty/opus/silk/fixed/mips/prefilter_FIX_mipsr1.h index c7f04279a0d..21b256885f3 100644 --- a/drivers/opus/silk/fixed/mips/prefilter_FIX_mipsr1.h +++ b/thirdparty/opus/silk/fixed/mips/prefilter_FIX_mipsr1.h @@ -26,11 +26,14 @@ POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ #ifndef __PREFILTER_FIX_MIPSR1_H__ #define __PREFILTER_FIX_MIPSR1_H__ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" -#include "opus/celt/stack_alloc.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" +#include "stack_alloc.h" +#include "tuning_parameters.h" #define OVERRIDE_silk_warped_LPC_analysis_filter_FIX void silk_warped_LPC_analysis_filter_FIX( diff --git a/drivers/opus/silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h b/thirdparty/opus/silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h similarity index 99% rename from drivers/opus/silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h rename to thirdparty/opus/silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h index eba7711db79..e803ef0fceb 100644 --- a/drivers/opus/silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h +++ b/thirdparty/opus/silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h @@ -27,9 +27,12 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef __WARPED_AUTOCORRELATION_FIX_MIPSR1_H__ #define __WARPED_AUTOCORRELATION_FIX_MIPSR1_H__ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" #undef QC #define QC 10 diff --git a/drivers/opus/silk/fixed/noise_shape_analysis_FIX.c b/thirdparty/opus/silk/fixed/noise_shape_analysis_FIX.c similarity index 99% rename from drivers/opus/silk/fixed/noise_shape_analysis_FIX.c rename to thirdparty/opus/silk/fixed/noise_shape_analysis_FIX.c index 6f1dc3ddd51..22a89f75aec 100644 --- a/drivers/opus/silk/fixed/noise_shape_analysis_FIX.c +++ b/thirdparty/opus/silk/fixed/noise_shape_analysis_FIX.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" -#include "opus/celt/stack_alloc.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" +#include "stack_alloc.h" +#include "tuning_parameters.h" /* Compute gain to make warped filter coefficients have a zero mean log frequency response on a */ /* non-warped frequency scale. (So that it can be implemented with a minimum-phase monic filter.) */ @@ -136,7 +139,7 @@ static OPUS_INLINE void limit_warped_coefs( } #if defined(MIPSr1_ASM) -#include "opus/silk/fixed/mips/noise_shape_analysis_FIX_mipsr1.h" +#include "mips/noise_shape_analysis_FIX_mipsr1.h" #endif /**************************************************************/ diff --git a/drivers/opus/silk/fixed/pitch_analysis_core_FIX.c b/thirdparty/opus/silk/fixed/pitch_analysis_core_FIX.c similarity index 99% rename from drivers/opus/silk/fixed/pitch_analysis_core_FIX.c rename to thirdparty/opus/silk/fixed/pitch_analysis_core_FIX.c index cf421c96120..01bb9fc0a83 100644 --- a/drivers/opus/silk/fixed/pitch_analysis_core_FIX.c +++ b/thirdparty/opus/silk/fixed/pitch_analysis_core_FIX.c @@ -24,16 +24,19 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /*********************************************************** * Pitch analyser function ********************************************************** */ -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/pitch_est_defines.h" -#include "opus/celt/stack_alloc.h" -#include "opus/silk/debug.h" -#include "opus/celt/pitch.h" +#include "SigProc_FIX.h" +#include "pitch_est_defines.h" +#include "stack_alloc.h" +#include "debug.h" +#include "pitch.h" #define SCRATCH_SIZE 22 #define SF_LENGTH_4KHZ ( PE_SUBFR_LENGTH_MS * 4 ) diff --git a/drivers/opus/silk/fixed/prefilter_FIX.c b/thirdparty/opus/silk/fixed/prefilter_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/prefilter_FIX.c rename to thirdparty/opus/silk/fixed/prefilter_FIX.c index 344be2badd1..6a8e35152ef 100644 --- a/drivers/opus/silk/fixed/prefilter_FIX.c +++ b/thirdparty/opus/silk/fixed/prefilter_FIX.c @@ -24,14 +24,17 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" -#include "opus/celt/stack_alloc.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" +#include "stack_alloc.h" +#include "tuning_parameters.h" #if defined(MIPSr1_ASM) -#include "opus/silk/fixed/mips/prefilter_FIX_mipsr1.h" +#include "mips/prefilter_FIX_mipsr1.h" #endif diff --git a/drivers/opus/silk/fixed/process_gains_FIX.c b/thirdparty/opus/silk/fixed/process_gains_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/process_gains_FIX.c rename to thirdparty/opus/silk/fixed/process_gains_FIX.c index c0d591210b8..05aba317889 100644 --- a/drivers/opus/silk/fixed/process_gains_FIX.c +++ b/thirdparty/opus/silk/fixed/process_gains_FIX.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" +#include "tuning_parameters.h" /* Processing of gains */ void silk_process_gains_FIX( diff --git a/drivers/opus/silk/fixed/regularize_correlations_FIX.c b/thirdparty/opus/silk/fixed/regularize_correlations_FIX.c similarity index 97% rename from drivers/opus/silk/fixed/regularize_correlations_FIX.c rename to thirdparty/opus/silk/fixed/regularize_correlations_FIX.c index c38a5589b68..a2836b05f4f 100644 --- a/drivers/opus/silk/fixed/regularize_correlations_FIX.c +++ b/thirdparty/opus/silk/fixed/regularize_correlations_FIX.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" /* Add noise to matrix diagonal */ void silk_regularize_correlations_FIX( diff --git a/drivers/opus/silk/fixed/residual_energy16_FIX.c b/thirdparty/opus/silk/fixed/residual_energy16_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/residual_energy16_FIX.c rename to thirdparty/opus/silk/fixed/residual_energy16_FIX.c index 39bc96fd904..ebffb2a66f9 100644 --- a/drivers/opus/silk/fixed/residual_energy16_FIX.c +++ b/thirdparty/opus/silk/fixed/residual_energy16_FIX.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" /* Residual energy: nrg = wxx - 2 * wXx * c + c' * wXX * c */ opus_int32 silk_residual_energy16_covar_FIX( diff --git a/drivers/opus/silk/fixed/residual_energy_FIX.c b/thirdparty/opus/silk/fixed/residual_energy_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/residual_energy_FIX.c rename to thirdparty/opus/silk/fixed/residual_energy_FIX.c index 0e51f4baa15..41f74778e82 100644 --- a/drivers/opus/silk/fixed/residual_energy_FIX.c +++ b/thirdparty/opus/silk/fixed/residual_energy_FIX.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" +#include "stack_alloc.h" /* Calculates residual energies of input subframes where all subframes have LPC_order */ /* of preceding samples */ diff --git a/drivers/opus/silk/fixed/schur64_FIX.c b/thirdparty/opus/silk/fixed/schur64_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/schur64_FIX.c rename to thirdparty/opus/silk/fixed/schur64_FIX.c index 69ef76e0288..764a10ef3ea 100644 --- a/drivers/opus/silk/fixed/schur64_FIX.c +++ b/thirdparty/opus/silk/fixed/schur64_FIX.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Slower than schur(), but more accurate. */ /* Uses SMULL(), available on armv4 */ diff --git a/drivers/opus/silk/fixed/schur_FIX.c b/thirdparty/opus/silk/fixed/schur_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/schur_FIX.c rename to thirdparty/opus/silk/fixed/schur_FIX.c index 9effa59daff..c4c0ef23b47 100644 --- a/drivers/opus/silk/fixed/schur_FIX.c +++ b/thirdparty/opus/silk/fixed/schur_FIX.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Faster than schur64(), but much less accurate. */ /* uses SMLAWB(), requiring armv5E and higher. */ diff --git a/drivers/opus/silk/fixed/solve_LS_FIX.c b/thirdparty/opus/silk/fixed/solve_LS_FIX.c similarity index 98% rename from drivers/opus/silk/fixed/solve_LS_FIX.c rename to thirdparty/opus/silk/fixed/solve_LS_FIX.c index 4ff97497be4..51d7d49d02a 100644 --- a/drivers/opus/silk/fixed/solve_LS_FIX.c +++ b/thirdparty/opus/silk/fixed/solve_LS_FIX.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" -#include "opus/celt/stack_alloc.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" +#include "stack_alloc.h" +#include "tuning_parameters.h" /*****************************/ /* Internal function headers */ diff --git a/drivers/opus/silk/fixed/structs_FIX.h b/thirdparty/opus/silk/fixed/structs_FIX.h similarity index 98% rename from drivers/opus/silk/fixed/structs_FIX.h rename to thirdparty/opus/silk/fixed/structs_FIX.h index 36ddff0a9e4..3294b251281 100644 --- a/drivers/opus/silk/fixed/structs_FIX.h +++ b/thirdparty/opus/silk/fixed/structs_FIX.h @@ -28,9 +28,9 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_STRUCTS_FIX_H #define SILK_STRUCTS_FIX_H -#include "opus/silk/typedef.h" -#include "opus/silk/main.h" -#include "opus/silk/structs.h" +#include "typedef.h" +#include "main.h" +#include "structs.h" #ifdef __cplusplus extern "C" diff --git a/drivers/opus/silk/fixed/vector_ops_FIX.c b/thirdparty/opus/silk/fixed/vector_ops_FIX.c similarity index 97% rename from drivers/opus/silk/fixed/vector_ops_FIX.c rename to thirdparty/opus/silk/fixed/vector_ops_FIX.c index 1e8fdec0cb4..d94980014f6 100644 --- a/drivers/opus/silk/fixed/vector_ops_FIX.c +++ b/thirdparty/opus/silk/fixed/vector_ops_FIX.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/celt/pitch.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "pitch.h" /* Copy and multiply a vector by a constant */ void silk_scale_copy_vector16( @@ -72,7 +75,7 @@ opus_int32 silk_inner_prod_aligned( int arch /* I Run-time architecture */ ) { -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT return celt_inner_prod(inVec1, inVec2, len, arch); #else opus_int i; diff --git a/drivers/opus/silk/fixed/warped_autocorrelation_FIX.c b/thirdparty/opus/silk/fixed/warped_autocorrelation_FIX.c similarity index 97% rename from drivers/opus/silk/fixed/warped_autocorrelation_FIX.c rename to thirdparty/opus/silk/fixed/warped_autocorrelation_FIX.c index 3b8d52d5c65..6ca6c1184d8 100644 --- a/drivers/opus/silk/fixed/warped_autocorrelation_FIX.c +++ b/thirdparty/opus/silk/fixed/warped_autocorrelation_FIX.c @@ -24,15 +24,18 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/fixed/main_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FIX.h" #define QC 10 #define QS 14 #if defined(MIPSr1_ASM) -#include "opus/silk/fixed/mips/warped_autocorrelation_FIX_mipsr1.h" +#include "mips/warped_autocorrelation_FIX_mipsr1.h" #endif diff --git a/drivers/opus/silk/fixed/x86/burg_modified_FIX_sse.c b/thirdparty/opus/silk/fixed/x86/burg_modified_FIX_sse.c similarity index 99% rename from drivers/opus/silk/fixed/x86/burg_modified_FIX_sse.c rename to thirdparty/opus/silk/fixed/x86/burg_modified_FIX_sse.c index f7d46487df1..3756095fbe6 100644 --- a/drivers/opus/silk/fixed/x86/burg_modified_FIX_sse.c +++ b/thirdparty/opus/silk/fixed/x86/burg_modified_FIX_sse.c @@ -24,17 +24,20 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/define.h" -#include "opus/silk/tuning_parameters.h" -#include "opus/celt/pitch.h" -#include "opus/celt/x86/x86cpu.h" +#include "SigProc_FIX.h" +#include "define.h" +#include "tuning_parameters.h" +#include "pitch.h" +#include "celt/x86/x86cpu.h" #define MAX_FRAME_SIZE 384 /* subfr_length * nb_subfr = ( 0.005 * 16000 + 16 ) * 4 = 384 */ diff --git a/drivers/opus/silk/fixed/x86/prefilter_FIX_sse.c b/thirdparty/opus/silk/fixed/x86/prefilter_FIX_sse.c similarity index 98% rename from drivers/opus/silk/fixed/x86/prefilter_FIX_sse.c rename to thirdparty/opus/silk/fixed/x86/prefilter_FIX_sse.c index febb1056450..488a603f5dd 100644 --- a/drivers/opus/silk/fixed/x86/prefilter_FIX_sse.c +++ b/thirdparty/opus/silk/fixed/x86/prefilter_FIX_sse.c @@ -24,13 +24,16 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include -#include "opus/silk/main.h" -#include "opus/celt/x86/x86cpu.h" +#include "main.h" +#include "celt/x86/x86cpu.h" void silk_warped_LPC_analysis_filter_FIX_sse4_1( opus_int32 state[], /* I/O State [order + 1] */ diff --git a/drivers/opus/silk/fixed/x86/vector_ops_FIX_sse.c b/thirdparty/opus/silk/fixed/x86/vector_ops_FIX_sse.c similarity index 96% rename from drivers/opus/silk/fixed/x86/vector_ops_FIX_sse.c rename to thirdparty/opus/silk/fixed/x86/vector_ops_FIX_sse.c index 920d58cebcf..c1e90564d0e 100644 --- a/drivers/opus/silk/fixed/x86/vector_ops_FIX_sse.c +++ b/thirdparty/opus/silk/fixed/x86/vector_ops_FIX_sse.c @@ -24,15 +24,18 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include -#include "opus/silk/main.h" +#include "main.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/celt/pitch.h" +#include "SigProc_FIX.h" +#include "pitch.h" opus_int64 silk_inner_prod16_aligned_64_sse4_1( const opus_int16 *inVec1, /* I input vector 1 */ diff --git a/drivers/opus/silk/float/LPC_analysis_filter_FLP.c b/thirdparty/opus/silk/float/LPC_analysis_filter_FLP.c similarity index 99% rename from drivers/opus/silk/float/LPC_analysis_filter_FLP.c rename to thirdparty/opus/silk/float/LPC_analysis_filter_FLP.c index 344e52ade29..cae89a0a182 100644 --- a/drivers/opus/silk/float/LPC_analysis_filter_FLP.c +++ b/thirdparty/opus/silk/float/LPC_analysis_filter_FLP.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include -#include "opus/silk/float/main_FLP.h" +#include "main_FLP.h" /************************************************/ /* LPC analysis filter */ diff --git a/drivers/opus/silk/float/LPC_inv_pred_gain_FLP.c b/thirdparty/opus/silk/float/LPC_inv_pred_gain_FLP.c similarity index 96% rename from drivers/opus/silk/float/LPC_inv_pred_gain_FLP.c rename to thirdparty/opus/silk/float/LPC_inv_pred_gain_FLP.c index f99a4276231..25178bacdde 100644 --- a/drivers/opus/silk/float/LPC_inv_pred_gain_FLP.c +++ b/thirdparty/opus/silk/float/LPC_inv_pred_gain_FLP.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/float/SigProc_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "SigProc_FLP.h" #define RC_THRESHOLD 0.9999f diff --git a/drivers/opus/silk/float/LTP_analysis_filter_FLP.c b/thirdparty/opus/silk/float/LTP_analysis_filter_FLP.c similarity index 98% rename from drivers/opus/silk/float/LTP_analysis_filter_FLP.c rename to thirdparty/opus/silk/float/LTP_analysis_filter_FLP.c index 853040d1606..849b7c1c528 100644 --- a/drivers/opus/silk/float/LTP_analysis_filter_FLP.c +++ b/thirdparty/opus/silk/float/LTP_analysis_filter_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" void silk_LTP_analysis_filter_FLP( silk_float *LTP_res, /* O LTP res MAX_NB_SUBFR*(pre_lgth+subfr_lngth) */ diff --git a/drivers/opus/silk/float/LTP_scale_ctrl_FLP.c b/thirdparty/opus/silk/float/LTP_scale_ctrl_FLP.c similarity index 97% rename from drivers/opus/silk/float/LTP_scale_ctrl_FLP.c rename to thirdparty/opus/silk/float/LTP_scale_ctrl_FLP.c index 4219c14c5b1..8dbe29d0fa6 100644 --- a/drivers/opus/silk/float/LTP_scale_ctrl_FLP.c +++ b/thirdparty/opus/silk/float/LTP_scale_ctrl_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" void silk_LTP_scale_ctrl_FLP( silk_encoder_state_FLP *psEnc, /* I/O Encoder state FLP */ diff --git a/drivers/opus/silk/float/SigProc_FLP.h b/thirdparty/opus/silk/float/SigProc_FLP.h similarity index 99% rename from drivers/opus/silk/float/SigProc_FLP.h rename to thirdparty/opus/silk/float/SigProc_FLP.h index 9b14f24f21b..f0cb3733be6 100644 --- a/drivers/opus/silk/float/SigProc_FLP.h +++ b/thirdparty/opus/silk/float/SigProc_FLP.h @@ -28,8 +28,8 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_SIGPROC_FLP_H #define SILK_SIGPROC_FLP_H -#include "opus/silk/SigProc_FIX.h" -#include "opus/celt/float_cast.h" +#include "SigProc_FIX.h" +#include "float_cast.h" #include #ifdef __cplusplus diff --git a/drivers/opus/silk/float/apply_sine_window_FLP.c b/thirdparty/opus/silk/float/apply_sine_window_FLP.c similarity index 97% rename from drivers/opus/silk/float/apply_sine_window_FLP.c rename to thirdparty/opus/silk/float/apply_sine_window_FLP.c index 0d9c894cd86..6aae57c0ab9 100644 --- a/drivers/opus/silk/float/apply_sine_window_FLP.c +++ b/thirdparty/opus/silk/float/apply_sine_window_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" /* Apply sine window to signal vector */ /* Window types: */ diff --git a/drivers/opus/silk/float/autocorrelation_FLP.c b/thirdparty/opus/silk/float/autocorrelation_FLP.c similarity index 96% rename from drivers/opus/silk/float/autocorrelation_FLP.c rename to thirdparty/opus/silk/float/autocorrelation_FLP.c index 0b78b0230dd..8b8a9e659aa 100644 --- a/drivers/opus/silk/float/autocorrelation_FLP.c +++ b/thirdparty/opus/silk/float/autocorrelation_FLP.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/typedef.h" -#include "opus/silk/float/SigProc_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "typedef.h" +#include "SigProc_FLP.h" /* compute autocorrelation */ void silk_autocorrelation_FLP( diff --git a/drivers/opus/silk/float/burg_modified_FLP.c b/thirdparty/opus/silk/float/burg_modified_FLP.c similarity index 98% rename from drivers/opus/silk/float/burg_modified_FLP.c rename to thirdparty/opus/silk/float/burg_modified_FLP.c index 567990b850e..ea5dc25a93a 100644 --- a/drivers/opus/silk/float/burg_modified_FLP.c +++ b/thirdparty/opus/silk/float/burg_modified_FLP.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/SigProc_FLP.h" -#include "opus/silk/tuning_parameters.h" -#include "opus/silk/define.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FLP.h" +#include "tuning_parameters.h" +#include "define.h" #define MAX_FRAME_SIZE 384 /* subfr_length * nb_subfr = ( 0.005 * 16000 + 16 ) * 4 = 384*/ diff --git a/drivers/opus/silk/float/bwexpander_FLP.c b/thirdparty/opus/silk/float/bwexpander_FLP.c similarity index 96% rename from drivers/opus/silk/float/bwexpander_FLP.c rename to thirdparty/opus/silk/float/bwexpander_FLP.c index c47bfa94335..d55a4d79ab6 100644 --- a/drivers/opus/silk/float/bwexpander_FLP.c +++ b/thirdparty/opus/silk/float/bwexpander_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/SigProc_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FLP.h" /* Chirp (bw expand) LP AR filter */ void silk_bwexpander_FLP( diff --git a/drivers/opus/silk/float/corrMatrix_FLP.c b/thirdparty/opus/silk/float/corrMatrix_FLP.c similarity index 98% rename from drivers/opus/silk/float/corrMatrix_FLP.c rename to thirdparty/opus/silk/float/corrMatrix_FLP.c index e34b42b5419..eae6a1cfca2 100644 --- a/drivers/opus/silk/float/corrMatrix_FLP.c +++ b/thirdparty/opus/silk/float/corrMatrix_FLP.c @@ -24,13 +24,16 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /********************************************************************** * Correlation matrix computations for LS estimate. **********************************************************************/ -#include "opus/silk/float/main_FLP.h" +#include "main_FLP.h" /* Calculates correlation vector X'*t */ void silk_corrVector_FLP( diff --git a/drivers/opus/silk/float/encode_frame_FLP.c b/thirdparty/opus/silk/float/encode_frame_FLP.c similarity index 99% rename from drivers/opus/silk/float/encode_frame_FLP.c rename to thirdparty/opus/silk/float/encode_frame_FLP.c index 4e46a52ee84..2092a4d9e24 100644 --- a/drivers/opus/silk/float/encode_frame_FLP.c +++ b/thirdparty/opus/silk/float/encode_frame_FLP.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" +#include "tuning_parameters.h" /* Low Bitrate Redundancy (LBRR) encoding. Reuse all parameters but encode with lower bitrate */ static OPUS_INLINE void silk_LBRR_encode_FLP( diff --git a/drivers/opus/silk/float/energy_FLP.c b/thirdparty/opus/silk/float/energy_FLP.c similarity index 97% rename from drivers/opus/silk/float/energy_FLP.c rename to thirdparty/opus/silk/float/energy_FLP.c index 443f52bb16d..24b8179f9e3 100644 --- a/drivers/opus/silk/float/energy_FLP.c +++ b/thirdparty/opus/silk/float/energy_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/SigProc_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FLP.h" /* sum of squares of a silk_float array, with result as double */ double silk_energy_FLP( diff --git a/drivers/opus/silk/float/find_LPC_FLP.c b/thirdparty/opus/silk/float/find_LPC_FLP.c similarity index 97% rename from drivers/opus/silk/float/find_LPC_FLP.c rename to thirdparty/opus/silk/float/find_LPC_FLP.c index 162a490d1d3..fcfe1c3681e 100644 --- a/drivers/opus/silk/float/find_LPC_FLP.c +++ b/thirdparty/opus/silk/float/find_LPC_FLP.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/define.h" -#include "opus/silk/float/main_FLP.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "define.h" +#include "main_FLP.h" +#include "tuning_parameters.h" /* LPC analysis */ void silk_find_LPC_FLP( diff --git a/drivers/opus/silk/float/find_LTP_FLP.c b/thirdparty/opus/silk/float/find_LTP_FLP.c similarity index 98% rename from drivers/opus/silk/float/find_LTP_FLP.c rename to thirdparty/opus/silk/float/find_LTP_FLP.c index 9c03eeb6a72..72299960140 100644 --- a/drivers/opus/silk/float/find_LTP_FLP.c +++ b/thirdparty/opus/silk/float/find_LTP_FLP.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" +#include "tuning_parameters.h" void silk_find_LTP_FLP( silk_float b[ MAX_NB_SUBFR * LTP_ORDER ], /* O LTP coefs */ diff --git a/drivers/opus/silk/float/find_pitch_lags_FLP.c b/thirdparty/opus/silk/float/find_pitch_lags_FLP.c similarity index 98% rename from drivers/opus/silk/float/find_pitch_lags_FLP.c rename to thirdparty/opus/silk/float/find_pitch_lags_FLP.c index bb7ef8ec2e4..f3b22d25ce6 100644 --- a/drivers/opus/silk/float/find_pitch_lags_FLP.c +++ b/thirdparty/opus/silk/float/find_pitch_lags_FLP.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include -#include "opus/silk/float/main_FLP.h" -#include "opus/silk/tuning_parameters.h" +#include "main_FLP.h" +#include "tuning_parameters.h" void silk_find_pitch_lags_FLP( silk_encoder_state_FLP *psEnc, /* I/O Encoder state FLP */ diff --git a/drivers/opus/silk/float/find_pred_coefs_FLP.c b/thirdparty/opus/silk/float/find_pred_coefs_FLP.c similarity index 98% rename from drivers/opus/silk/float/find_pred_coefs_FLP.c rename to thirdparty/opus/silk/float/find_pred_coefs_FLP.c index c0496ff1b5c..1af4fe5f1b2 100644 --- a/drivers/opus/silk/float/find_pred_coefs_FLP.c +++ b/thirdparty/opus/silk/float/find_pred_coefs_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" /* Find LPC and LTP coefficients */ void silk_find_pred_coefs_FLP( diff --git a/drivers/opus/silk/float/inner_product_FLP.c b/thirdparty/opus/silk/float/inner_product_FLP.c similarity index 97% rename from drivers/opus/silk/float/inner_product_FLP.c rename to thirdparty/opus/silk/float/inner_product_FLP.c index 0586c4d7fb3..029c012911d 100644 --- a/drivers/opus/silk/float/inner_product_FLP.c +++ b/thirdparty/opus/silk/float/inner_product_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/SigProc_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FLP.h" /* inner product of two silk_float arrays, with result as double */ double silk_inner_product_FLP( diff --git a/drivers/opus/silk/float/k2a_FLP.c b/thirdparty/opus/silk/float/k2a_FLP.c similarity index 97% rename from drivers/opus/silk/float/k2a_FLP.c rename to thirdparty/opus/silk/float/k2a_FLP.c index 26ba94e6102..12af4e76697 100644 --- a/drivers/opus/silk/float/k2a_FLP.c +++ b/thirdparty/opus/silk/float/k2a_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/SigProc_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FLP.h" /* step up function, converts reflection coefficients to prediction coefficients */ void silk_k2a_FLP( diff --git a/drivers/opus/silk/float/levinsondurbin_FLP.c b/thirdparty/opus/silk/float/levinsondurbin_FLP.c similarity index 97% rename from drivers/opus/silk/float/levinsondurbin_FLP.c rename to thirdparty/opus/silk/float/levinsondurbin_FLP.c index 7e3c9d65319..f0ba6069812 100644 --- a/drivers/opus/silk/float/levinsondurbin_FLP.c +++ b/thirdparty/opus/silk/float/levinsondurbin_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/SigProc_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FLP.h" /* Solve the normal equations using the Levinson-Durbin recursion */ silk_float silk_levinsondurbin_FLP( /* O prediction error energy */ diff --git a/drivers/opus/silk/float/main_FLP.h b/thirdparty/opus/silk/float/main_FLP.h similarity index 98% rename from drivers/opus/silk/float/main_FLP.h rename to thirdparty/opus/silk/float/main_FLP.h index 8f351775495..e5a75972e5f 100644 --- a/drivers/opus/silk/float/main_FLP.h +++ b/thirdparty/opus/silk/float/main_FLP.h @@ -28,13 +28,13 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_MAIN_FLP_H #define SILK_MAIN_FLP_H -#include "opus/silk/float/SigProc_FLP.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/float/structs_FLP.h" -#include "opus/silk/main.h" -#include "opus/silk/define.h" -#include "opus/silk/debug.h" -#include "opus/celt/entenc.h" +#include "SigProc_FLP.h" +#include "SigProc_FIX.h" +#include "structs_FLP.h" +#include "main.h" +#include "define.h" +#include "debug.h" +#include "entenc.h" #ifdef __cplusplus extern "C" diff --git a/drivers/opus/silk/float/noise_shape_analysis_FLP.c b/thirdparty/opus/silk/float/noise_shape_analysis_FLP.c similarity index 99% rename from drivers/opus/silk/float/noise_shape_analysis_FLP.c rename to thirdparty/opus/silk/float/noise_shape_analysis_FLP.c index cbb8ba44706..65f6ea58705 100644 --- a/drivers/opus/silk/float/noise_shape_analysis_FLP.c +++ b/thirdparty/opus/silk/float/noise_shape_analysis_FLP.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" +#include "tuning_parameters.h" /* Compute gain to make warped filter coefficients have a zero mean log frequency response on a */ /* non-warped frequency scale. (So that it can be implemented with a minimum-phase monic filter.) */ diff --git a/drivers/opus/silk/float/pitch_analysis_core_FLP.c b/thirdparty/opus/silk/float/pitch_analysis_core_FLP.c similarity index 99% rename from drivers/opus/silk/float/pitch_analysis_core_FLP.c rename to thirdparty/opus/silk/float/pitch_analysis_core_FLP.c index 6a48ae498c2..d0e637a29dc 100644 --- a/drivers/opus/silk/float/pitch_analysis_core_FLP.c +++ b/thirdparty/opus/silk/float/pitch_analysis_core_FLP.c @@ -24,15 +24,18 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /***************************************************************************** * Pitch analyser function ******************************************************************************/ -#include "opus/silk/float/SigProc_FLP.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/pitch_est_defines.h" -#include "opus/celt/pitch.h" +#include "SigProc_FLP.h" +#include "SigProc_FIX.h" +#include "pitch_est_defines.h" +#include "pitch.h" #define SCRATCH_SIZE 22 diff --git a/drivers/opus/silk/float/prefilter_FLP.c b/thirdparty/opus/silk/float/prefilter_FLP.c similarity index 98% rename from drivers/opus/silk/float/prefilter_FLP.c rename to thirdparty/opus/silk/float/prefilter_FLP.c index 0857888b912..8bc32fb4104 100644 --- a/drivers/opus/silk/float/prefilter_FLP.c +++ b/thirdparty/opus/silk/float/prefilter_FLP.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" +#include "tuning_parameters.h" /* * Prefilter for finding Quantizer input signal diff --git a/drivers/opus/silk/float/process_gains_FLP.c b/thirdparty/opus/silk/float/process_gains_FLP.c similarity index 97% rename from drivers/opus/silk/float/process_gains_FLP.c rename to thirdparty/opus/silk/float/process_gains_FLP.c index 3a1e46f096b..c0da0dae44b 100644 --- a/drivers/opus/silk/float/process_gains_FLP.c +++ b/thirdparty/opus/silk/float/process_gains_FLP.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" +#include "tuning_parameters.h" /* Processing of gains */ void silk_process_gains_FLP( diff --git a/drivers/opus/silk/float/regularize_correlations_FLP.c b/thirdparty/opus/silk/float/regularize_correlations_FLP.c similarity index 97% rename from drivers/opus/silk/float/regularize_correlations_FLP.c rename to thirdparty/opus/silk/float/regularize_correlations_FLP.c index 20e9074a0b1..df4612604ca 100644 --- a/drivers/opus/silk/float/regularize_correlations_FLP.c +++ b/thirdparty/opus/silk/float/regularize_correlations_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" /* Add noise to matrix diagonal */ void silk_regularize_correlations_FLP( diff --git a/drivers/opus/silk/float/residual_energy_FLP.c b/thirdparty/opus/silk/float/residual_energy_FLP.c similarity index 98% rename from drivers/opus/silk/float/residual_energy_FLP.c rename to thirdparty/opus/silk/float/residual_energy_FLP.c index cc462a9e546..b2e03a86a49 100644 --- a/drivers/opus/silk/float/residual_energy_FLP.c +++ b/thirdparty/opus/silk/float/residual_energy_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" #define MAX_ITERATIONS_RESIDUAL_NRG 10 #define REGULARIZATION_FACTOR 1e-8f diff --git a/drivers/opus/silk/float/scale_copy_vector_FLP.c b/thirdparty/opus/silk/float/scale_copy_vector_FLP.c similarity index 96% rename from drivers/opus/silk/float/scale_copy_vector_FLP.c rename to thirdparty/opus/silk/float/scale_copy_vector_FLP.c index 2656963e88d..20db32b3b19 100644 --- a/drivers/opus/silk/float/scale_copy_vector_FLP.c +++ b/thirdparty/opus/silk/float/scale_copy_vector_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/SigProc_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FLP.h" /* copy and multiply a vector by a constant */ void silk_scale_copy_vector_FLP( diff --git a/drivers/opus/silk/float/scale_vector_FLP.c b/thirdparty/opus/silk/float/scale_vector_FLP.c similarity index 96% rename from drivers/opus/silk/float/scale_vector_FLP.c rename to thirdparty/opus/silk/float/scale_vector_FLP.c index ea2aa0e3309..108fdcbed54 100644 --- a/drivers/opus/silk/float/scale_vector_FLP.c +++ b/thirdparty/opus/silk/float/scale_vector_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/SigProc_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FLP.h" /* multiply a vector by a constant */ void silk_scale_vector_FLP( diff --git a/drivers/opus/silk/float/schur_FLP.c b/thirdparty/opus/silk/float/schur_FLP.c similarity index 97% rename from drivers/opus/silk/float/schur_FLP.c rename to thirdparty/opus/silk/float/schur_FLP.c index f2071db214b..ee436f8351c 100644 --- a/drivers/opus/silk/float/schur_FLP.c +++ b/thirdparty/opus/silk/float/schur_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/SigProc_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FLP.h" silk_float silk_schur_FLP( /* O returns residual energy */ silk_float refl_coef[], /* O reflection coefficients (length order) */ diff --git a/drivers/opus/silk/float/solve_LS_FLP.c b/thirdparty/opus/silk/float/solve_LS_FLP.c similarity index 98% rename from drivers/opus/silk/float/solve_LS_FLP.c rename to thirdparty/opus/silk/float/solve_LS_FLP.c index 9d625c695de..7c90d665a0f 100644 --- a/drivers/opus/silk/float/solve_LS_FLP.c +++ b/thirdparty/opus/silk/float/solve_LS_FLP.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" +#include "tuning_parameters.h" /********************************************************************** * LDL Factorisation. Finds the upper triangular matrix L and the diagonal diff --git a/drivers/opus/silk/float/sort_FLP.c b/thirdparty/opus/silk/float/sort_FLP.c similarity index 97% rename from drivers/opus/silk/float/sort_FLP.c rename to thirdparty/opus/silk/float/sort_FLP.c index ed212c63c9c..f08d7592c56 100644 --- a/drivers/opus/silk/float/sort_FLP.c +++ b/thirdparty/opus/silk/float/sort_FLP.c @@ -24,14 +24,17 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* Insertion sort (fast for already almost sorted arrays): */ /* Best case: O(n) for an already sorted array */ /* Worst case: O(n^2) for an inversely sorted array */ -#include "opus/silk/typedef.h" -#include "opus/silk/float/SigProc_FLP.h" +#include "typedef.h" +#include "SigProc_FLP.h" void silk_insertion_sort_decreasing_FLP( silk_float *a, /* I/O Unsorted / Sorted vector */ diff --git a/drivers/opus/silk/float/structs_FLP.h b/thirdparty/opus/silk/float/structs_FLP.h similarity index 98% rename from drivers/opus/silk/float/structs_FLP.h rename to thirdparty/opus/silk/float/structs_FLP.h index 9eb5eb05eb9..14d647ced27 100644 --- a/drivers/opus/silk/float/structs_FLP.h +++ b/thirdparty/opus/silk/float/structs_FLP.h @@ -28,9 +28,9 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_STRUCTS_FLP_H #define SILK_STRUCTS_FLP_H -#include "opus/silk/typedef.h" -#include "opus/silk/main.h" -#include "opus/silk/structs.h" +#include "typedef.h" +#include "main.h" +#include "structs.h" #ifdef __cplusplus extern "C" diff --git a/drivers/opus/silk/float/warped_autocorrelation_FLP.c b/thirdparty/opus/silk/float/warped_autocorrelation_FLP.c similarity index 97% rename from drivers/opus/silk/float/warped_autocorrelation_FLP.c rename to thirdparty/opus/silk/float/warped_autocorrelation_FLP.c index b814661b92b..542414f48ec 100644 --- a/drivers/opus/silk/float/warped_autocorrelation_FLP.c +++ b/thirdparty/opus/silk/float/warped_autocorrelation_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" /* Autocorrelations for a warped frequency axis */ void silk_warped_autocorrelation_FLP( diff --git a/drivers/opus/silk/float/wrappers_FLP.c b/thirdparty/opus/silk/float/wrappers_FLP.c similarity index 99% rename from drivers/opus/silk/float/wrappers_FLP.c rename to thirdparty/opus/silk/float/wrappers_FLP.c index c80c618a928..6666b8efaad 100644 --- a/drivers/opus/silk/float/wrappers_FLP.c +++ b/thirdparty/opus/silk/float/wrappers_FLP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/float/main_FLP.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main_FLP.h" /* Wrappers. Calls flp / fix code */ diff --git a/drivers/opus/silk/gain_quant.c b/thirdparty/opus/silk/gain_quant.c similarity index 99% rename from drivers/opus/silk/gain_quant.c rename to thirdparty/opus/silk/gain_quant.c index 7b7a65d674e..64ccd0611bf 100644 --- a/drivers/opus/silk/gain_quant.c +++ b/thirdparty/opus/silk/gain_quant.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" #define OFFSET ( ( MIN_QGAIN_DB * 128 ) / 6 + 16 * 128 ) #define SCALE_Q16 ( ( 65536 * ( N_LEVELS_QGAIN - 1 ) ) / ( ( ( MAX_QGAIN_DB - MIN_QGAIN_DB ) * 128 ) / 6 ) ) diff --git a/drivers/opus/silk/init_decoder.c b/thirdparty/opus/silk/init_decoder.c similarity index 97% rename from drivers/opus/silk/init_decoder.c rename to thirdparty/opus/silk/init_decoder.c index c8f694c9d7e..f887c67886f 100644 --- a/drivers/opus/silk/init_decoder.c +++ b/thirdparty/opus/silk/init_decoder.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /************************/ /* Init Decoder State */ diff --git a/drivers/opus/silk/init_encoder.c b/thirdparty/opus/silk/init_encoder.c similarity index 92% rename from drivers/opus/silk/init_encoder.c rename to thirdparty/opus/silk/init_encoder.c index 1c63edb4b82..65995c33fa4 100644 --- a/drivers/opus/silk/init_encoder.c +++ b/thirdparty/opus/silk/init_encoder.c @@ -24,14 +24,17 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#ifdef OPUS_FIXED_POINT -#include "opus/silk/fixed/main_FIX.h" -#else -#include "opus/silk/float/main_FLP.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" #endif -#include "opus/silk/tuning_parameters.h" -#include "opus/celt/cpu_support.h" +#ifdef FIXED_POINT +#include "main_FIX.h" +#else +#include "main_FLP.h" +#endif +#include "tuning_parameters.h" +#include "cpu_support.h" /*********************************/ /* Initialize Silk Encoder state */ diff --git a/drivers/opus/silk/inner_prod_aligned.c b/thirdparty/opus/silk/inner_prod_aligned.c similarity index 96% rename from drivers/opus/silk/inner_prod_aligned.c rename to thirdparty/opus/silk/inner_prod_aligned.c index 7bd7297c7d5..257ae9e04eb 100644 --- a/drivers/opus/silk/inner_prod_aligned.c +++ b/thirdparty/opus/silk/inner_prod_aligned.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" opus_int32 silk_inner_prod_aligned_scale( const opus_int16 *const inVec1, /* I input vector 1 */ diff --git a/drivers/opus/silk/interpolate.c b/thirdparty/opus/silk/interpolate.c similarity index 97% rename from drivers/opus/silk/interpolate.c rename to thirdparty/opus/silk/interpolate.c index 25091b4fa64..1bd8ca4d532 100644 --- a/drivers/opus/silk/interpolate.c +++ b/thirdparty/opus/silk/interpolate.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Interpolate two vectors */ void silk_interpolate( diff --git a/drivers/opus/silk/lin2log.c b/thirdparty/opus/silk/lin2log.c similarity index 96% rename from drivers/opus/silk/lin2log.c rename to thirdparty/opus/silk/lin2log.c index 694eb1e8766..d4fe515321f 100644 --- a/drivers/opus/silk/lin2log.c +++ b/thirdparty/opus/silk/lin2log.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Approximation of 128 * log2() (very close inverse of silk_log2lin()) */ /* Convert input to a log scale */ opus_int32 silk_lin2log( diff --git a/drivers/opus/silk/log2lin.c b/thirdparty/opus/silk/log2lin.c similarity index 97% rename from drivers/opus/silk/log2lin.c rename to thirdparty/opus/silk/log2lin.c index 8d14150a417..b7c48e47407 100644 --- a/drivers/opus/silk/log2lin.c +++ b/thirdparty/opus/silk/log2lin.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Approximation of 2^() (very close inverse of silk_lin2log()) */ /* Convert input to a linear scale */ diff --git a/drivers/opus/silk/macros.h b/thirdparty/opus/silk/macros.h similarity index 96% rename from drivers/opus/silk/macros.h rename to thirdparty/opus/silk/macros.h index 29efd11ace0..bc303034664 100644 --- a/drivers/opus/silk/macros.h +++ b/thirdparty/opus/silk/macros.h @@ -27,10 +27,13 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_MACROS_H #define SILK_MACROS_H -#include "opus/opus_config.h" -#include "opus/opus_types.h" -#include "opus/opus_defines.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "opus_types.h" +#include "opus_defines.h" #if OPUS_GNUC_PREREQ(3, 0) #define opus_likely(x) (__builtin_expect(!!(x), 1)) @@ -108,10 +111,10 @@ POSSIBILITY OF SUCH DAMAGE. ((((a)^0x80000000) & (b) & 0x80000000) ? silk_int32_MAX : (a)-(b)) ) #if defined(MIPSr1_ASM) -#include "opus/silk/mips/macros_mipsr1.h" +#include "mips/macros_mipsr1.h" #endif -#include "opus/celt/ecintrin.h" +#include "ecintrin.h" #ifndef OVERRIDE_silk_CLZ16 static OPUS_INLINE opus_int32 silk_CLZ16(opus_int16 in16) { @@ -139,11 +142,11 @@ static OPUS_INLINE opus_int32 silk_CLZ32(opus_int32 in32) #endif #ifdef OPUS_ARM_INLINE_ASM -#include "opus/silk/arm/macros_armv4.h" +#include "arm/macros_armv4.h" #endif #ifdef OPUS_ARM_INLINE_EDSP -#include "opus/silk/arm/macros_armv5e.h" +#include "arm/macros_armv5e.h" #endif #endif /* SILK_MACROS_H */ diff --git a/drivers/opus/silk/main.h b/thirdparty/opus/silk/main.h similarity index 99% rename from drivers/opus/silk/main.h rename to thirdparty/opus/silk/main.h index a6ec2d7e4cf..2f90d68f7da 100644 --- a/drivers/opus/silk/main.h +++ b/thirdparty/opus/silk/main.h @@ -28,18 +28,18 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_MAIN_H #define SILK_MAIN_H -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/define.h" -#include "opus/silk/structs.h" -#include "opus/silk/tables.h" -#include "opus/silk/PLC.h" -#include "opus/silk/control.h" -#include "opus/silk/debug.h" -#include "opus/celt/entenc.h" -#include "opus/celt/entdec.h" +#include "SigProc_FIX.h" +#include "define.h" +#include "structs.h" +#include "tables.h" +#include "PLC.h" +#include "control.h" +#include "debug.h" +#include "entenc.h" +#include "entdec.h" #if defined(OPUS_X86_MAY_HAVE_SSE4_1) -#include "opus/silk/x86/main_sse.h" +#include "x86/main_sse.h" #endif /* Convert Left/Right stereo signal to adaptive Mid/Side representation */ diff --git a/drivers/opus/silk/mips/NSQ_del_dec_mipsr1.h b/thirdparty/opus/silk/mips/NSQ_del_dec_mipsr1.h similarity index 99% rename from drivers/opus/silk/mips/NSQ_del_dec_mipsr1.h rename to thirdparty/opus/silk/mips/NSQ_del_dec_mipsr1.h index 5cecca28b7f..f6afd923e87 100644 --- a/drivers/opus/silk/mips/NSQ_del_dec_mipsr1.h +++ b/thirdparty/opus/silk/mips/NSQ_del_dec_mipsr1.h @@ -27,10 +27,13 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef __NSQ_DEL_DEC_MIPSR1_H__ #define __NSQ_DEL_DEC_MIPSR1_H__ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "stack_alloc.h" #define OVERRIDE_silk_noise_shape_quantizer_del_dec static inline void silk_noise_shape_quantizer_del_dec( diff --git a/drivers/opus/silk/mips/macros_mipsr1.h b/thirdparty/opus/silk/mips/macros_mipsr1.h similarity index 100% rename from drivers/opus/silk/mips/macros_mipsr1.h rename to thirdparty/opus/silk/mips/macros_mipsr1.h diff --git a/drivers/opus/silk/mips/sigproc_fix_mipsr1.h b/thirdparty/opus/silk/mips/sigproc_fix_mipsr1.h similarity index 100% rename from drivers/opus/silk/mips/sigproc_fix_mipsr1.h rename to thirdparty/opus/silk/mips/sigproc_fix_mipsr1.h diff --git a/drivers/opus/silk/pitch_est_defines.h b/thirdparty/opus/silk/pitch_est_defines.h similarity index 99% rename from drivers/opus/silk/pitch_est_defines.h rename to thirdparty/opus/silk/pitch_est_defines.h index e2d9e517c48..e1e4b5d7686 100644 --- a/drivers/opus/silk/pitch_est_defines.h +++ b/thirdparty/opus/silk/pitch_est_defines.h @@ -28,7 +28,7 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_PE_DEFINES_H #define SILK_PE_DEFINES_H -#include "opus/silk/SigProc_FIX.h" +#include "SigProc_FIX.h" /********************************************************/ /* Definitions for pitch estimator */ diff --git a/drivers/opus/silk/pitch_est_tables.c b/thirdparty/opus/silk/pitch_est_tables.c similarity index 97% rename from drivers/opus/silk/pitch_est_tables.c rename to thirdparty/opus/silk/pitch_est_tables.c index eb17bf0b269..81a8bacaca2 100644 --- a/drivers/opus/silk/pitch_est_tables.c +++ b/thirdparty/opus/silk/pitch_est_tables.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/typedef.h" -#include "opus/silk/pitch_est_defines.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "typedef.h" +#include "pitch_est_defines.h" const opus_int8 silk_CB_lags_stage2_10_ms[ PE_MAX_NB_SUBFR >> 1][ PE_NB_CBKS_STAGE2_10MS ] = { diff --git a/drivers/opus/silk/process_NLSFs.c b/thirdparty/opus/silk/process_NLSFs.c similarity index 98% rename from drivers/opus/silk/process_NLSFs.c rename to thirdparty/opus/silk/process_NLSFs.c index 9d8f96d7b7e..c27cf030469 100644 --- a/drivers/opus/silk/process_NLSFs.c +++ b/thirdparty/opus/silk/process_NLSFs.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Limit, stabilize, convert and quantize NLSFs */ void silk_process_NLSFs( diff --git a/drivers/opus/silk/quant_LTP_gains.c b/thirdparty/opus/silk/quant_LTP_gains.c similarity index 98% rename from drivers/opus/silk/quant_LTP_gains.c rename to thirdparty/opus/silk/quant_LTP_gains.c index ffc3cb24ab4..513a8c4468f 100644 --- a/drivers/opus/silk/quant_LTP_gains.c +++ b/thirdparty/opus/silk/quant_LTP_gains.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/silk/tuning_parameters.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "tuning_parameters.h" void silk_quant_LTP_gains( opus_int16 B_Q14[ MAX_NB_SUBFR * LTP_ORDER ], /* I/O (un)quantized LTP gains */ diff --git a/drivers/opus/silk/resampler.c b/thirdparty/opus/silk/resampler.c similarity index 99% rename from drivers/opus/silk/resampler.c rename to thirdparty/opus/silk/resampler.c index 12b2f920606..374fbb37225 100644 --- a/drivers/opus/silk/resampler.c +++ b/thirdparty/opus/silk/resampler.c @@ -24,7 +24,10 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* * Matrix of resampling methods used: @@ -44,7 +47,7 @@ POSSIBILITY OF SUCH DAMAGE. * AF -> AR2 filter followed by FIR interpolation */ -#include "opus/silk/resampler_private.h" +#include "resampler_private.h" /* Tables with delay compensation values to equalize total delay for different modes */ static const opus_int8 delay_matrix_enc[ 5 ][ 3 ] = { diff --git a/drivers/opus/silk/resampler_down2.c b/thirdparty/opus/silk/resampler_down2.c similarity index 97% rename from drivers/opus/silk/resampler_down2.c rename to thirdparty/opus/silk/resampler_down2.c index 20a42c98a6f..cec36346408 100644 --- a/drivers/opus/silk/resampler_down2.c +++ b/thirdparty/opus/silk/resampler_down2.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/resampler_rom.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "resampler_rom.h" /* Downsample by a factor 2 */ void silk_resampler_down2( diff --git a/drivers/opus/silk/resampler_down2_3.c b/thirdparty/opus/silk/resampler_down2_3.c similarity index 97% rename from drivers/opus/silk/resampler_down2_3.c rename to thirdparty/opus/silk/resampler_down2_3.c index e01dd2bc728..4342614dccc 100644 --- a/drivers/opus/silk/resampler_down2_3.c +++ b/thirdparty/opus/silk/resampler_down2_3.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/resampler_private.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "resampler_private.h" +#include "stack_alloc.h" #define ORDER_FIR 4 diff --git a/drivers/opus/silk/resampler_private.h b/thirdparty/opus/silk/resampler_private.h similarity index 97% rename from drivers/opus/silk/resampler_private.h rename to thirdparty/opus/silk/resampler_private.h index 5c0ee110fc3..422a7d9d953 100644 --- a/drivers/opus/silk/resampler_private.h +++ b/thirdparty/opus/silk/resampler_private.h @@ -32,9 +32,9 @@ POSSIBILITY OF SUCH DAMAGE. extern "C" { #endif -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/resampler_structs.h" -#include "opus/silk/resampler_rom.h" +#include "SigProc_FIX.h" +#include "resampler_structs.h" +#include "resampler_rom.h" /* Number of input samples to process in the inner loop */ #define RESAMPLER_MAX_BATCH_SIZE_MS 10 diff --git a/drivers/opus/silk/resampler_private_AR2.c b/thirdparty/opus/silk/resampler_private_AR2.c similarity index 96% rename from drivers/opus/silk/resampler_private_AR2.c rename to thirdparty/opus/silk/resampler_private_AR2.c index cc753ea7049..5fff23714f9 100644 --- a/drivers/opus/silk/resampler_private_AR2.c +++ b/thirdparty/opus/silk/resampler_private_AR2.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/resampler_private.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "resampler_private.h" /* Second order AR filter with single delay elements */ void silk_resampler_private_AR2( diff --git a/drivers/opus/silk/resampler_private_IIR_FIR.c b/thirdparty/opus/silk/resampler_private_IIR_FIR.c similarity index 97% rename from drivers/opus/silk/resampler_private_IIR_FIR.c rename to thirdparty/opus/silk/resampler_private_IIR_FIR.c index 9a8733fbbbd..6b2b3a2e183 100644 --- a/drivers/opus/silk/resampler_private_IIR_FIR.c +++ b/thirdparty/opus/silk/resampler_private_IIR_FIR.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/resampler_private.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "resampler_private.h" +#include "stack_alloc.h" static OPUS_INLINE opus_int16 *silk_resampler_private_IIR_FIR_INTERPOL( opus_int16 *out, diff --git a/drivers/opus/silk/resampler_private_down_FIR.c b/thirdparty/opus/silk/resampler_private_down_FIR.c similarity index 98% rename from drivers/opus/silk/resampler_private_down_FIR.c rename to thirdparty/opus/silk/resampler_private_down_FIR.c index fb9acc60a75..783e42b3561 100644 --- a/drivers/opus/silk/resampler_private_down_FIR.c +++ b/thirdparty/opus/silk/resampler_private_down_FIR.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/resampler_private.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "resampler_private.h" +#include "stack_alloc.h" static OPUS_INLINE opus_int16 *silk_resampler_private_down_FIR_INTERPOL( opus_int16 *out, diff --git a/drivers/opus/silk/resampler_private_up2_HQ.c b/thirdparty/opus/silk/resampler_private_up2_HQ.c similarity index 98% rename from drivers/opus/silk/resampler_private_up2_HQ.c rename to thirdparty/opus/silk/resampler_private_up2_HQ.c index 0b23c16dab6..c7ec8de3651 100644 --- a/drivers/opus/silk/resampler_private_up2_HQ.c +++ b/thirdparty/opus/silk/resampler_private_up2_HQ.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/resampler_private.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" +#include "resampler_private.h" /* Upsample by a factor 2, high quality */ /* Uses 2nd order allpass filters for the 2x upsampling, followed by a */ diff --git a/drivers/opus/silk/resampler_rom.c b/thirdparty/opus/silk/resampler_rom.c similarity index 98% rename from drivers/opus/silk/resampler_rom.c rename to thirdparty/opus/silk/resampler_rom.c index 7079efe1dc5..5e6b04476aa 100644 --- a/drivers/opus/silk/resampler_rom.c +++ b/thirdparty/opus/silk/resampler_rom.c @@ -24,12 +24,15 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* Filter coefficients for IIR/FIR polyphase resampling * * Total size: 179 Words (358 Bytes) */ -#include "opus/silk/resampler_private.h" +#include "resampler_private.h" /* Matlab code for the notch filter coefficients: */ /* B = [1, 0.147, 1]; A = [1, 0.107, 0.89]; G = 0.93; freqz(G * B, A, 2^14, 16e3); axis([0, 8000, -10, 1]) */ diff --git a/drivers/opus/silk/resampler_rom.h b/thirdparty/opus/silk/resampler_rom.h similarity index 97% rename from drivers/opus/silk/resampler_rom.h rename to thirdparty/opus/silk/resampler_rom.h index 2fa586ebf2b..490b3388dce 100644 --- a/drivers/opus/silk/resampler_rom.h +++ b/thirdparty/opus/silk/resampler_rom.h @@ -33,8 +33,8 @@ extern "C" { #endif -#include "opus/silk/typedef.h" -#include "opus/silk/resampler_structs.h" +#include "typedef.h" +#include "resampler_structs.h" #define RESAMPLER_DOWN_ORDER_FIR0 18 #define RESAMPLER_DOWN_ORDER_FIR1 24 diff --git a/drivers/opus/silk/resampler_structs.h b/thirdparty/opus/silk/resampler_structs.h similarity index 100% rename from drivers/opus/silk/resampler_structs.h rename to thirdparty/opus/silk/resampler_structs.h diff --git a/drivers/opus/silk/shell_coder.c b/thirdparty/opus/silk/shell_coder.c similarity index 99% rename from drivers/opus/silk/shell_coder.c rename to thirdparty/opus/silk/shell_coder.c index 67a54469276..4af341474bc 100644 --- a/drivers/opus/silk/shell_coder.c +++ b/thirdparty/opus/silk/shell_coder.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* shell coder; pulse-subframe length is hardcoded */ diff --git a/drivers/opus/silk/sigm_Q15.c b/thirdparty/opus/silk/sigm_Q15.c similarity index 97% rename from drivers/opus/silk/sigm_Q15.c rename to thirdparty/opus/silk/sigm_Q15.c index 3171d15f4af..3c507d255b1 100644 --- a/drivers/opus/silk/sigm_Q15.c +++ b/thirdparty/opus/silk/sigm_Q15.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* Approximate sigmoid function */ -#include "opus/silk/SigProc_FIX.h" +#include "SigProc_FIX.h" /* fprintf(1, '%d, ', round(1024 * ([1 ./ (1 + exp(-(1:5))), 1] - 1 ./ (1 + exp(-(0:5)))))); */ static const opus_int32 sigm_LUT_slope_Q10[ 6 ] = { diff --git a/drivers/opus/silk/sort.c b/thirdparty/opus/silk/sort.c similarity index 98% rename from drivers/opus/silk/sort.c rename to thirdparty/opus/silk/sort.c index dd2988e5b89..8670dbdd02c 100644 --- a/drivers/opus/silk/sort.c +++ b/thirdparty/opus/silk/sort.c @@ -24,7 +24,10 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* Insertion sort (fast for already almost sorted arrays): */ /* Best case: O(n) for an already sorted array */ @@ -32,7 +35,7 @@ POSSIBILITY OF SUCH DAMAGE. /* */ /* Shell short: http://en.wikipedia.org/wiki/Shell_sort */ -#include "opus/silk/SigProc_FIX.h" +#include "SigProc_FIX.h" void silk_insertion_sort_increasing( opus_int32 *a, /* I/O Unsorted / Sorted vector */ @@ -80,7 +83,7 @@ void silk_insertion_sort_increasing( } } -#ifdef OPUS_FIXED_POINT +#ifdef FIXED_POINT /* This function is only used by the fixed-point build */ void silk_insertion_sort_decreasing_int16( opus_int16 *a, /* I/O Unsorted / Sorted vector */ diff --git a/drivers/opus/silk/stereo_LR_to_MS.c b/thirdparty/opus/silk/stereo_LR_to_MS.c similarity index 99% rename from drivers/opus/silk/stereo_LR_to_MS.c rename to thirdparty/opus/silk/stereo_LR_to_MS.c index cf8affa90b1..42906e6f676 100644 --- a/drivers/opus/silk/stereo_LR_to_MS.c +++ b/thirdparty/opus/silk/stereo_LR_to_MS.c @@ -24,10 +24,13 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" +#include "stack_alloc.h" /* Convert Left/Right stereo signal to adaptive Mid/Side representation */ void silk_stereo_LR_to_MS( diff --git a/drivers/opus/silk/stereo_MS_to_LR.c b/thirdparty/opus/silk/stereo_MS_to_LR.c similarity index 98% rename from drivers/opus/silk/stereo_MS_to_LR.c rename to thirdparty/opus/silk/stereo_MS_to_LR.c index 4f553eb6940..62521a4f352 100644 --- a/drivers/opus/silk/stereo_MS_to_LR.c +++ b/thirdparty/opus/silk/stereo_MS_to_LR.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Convert adaptive Mid/Side representation to Left/Right stereo signal */ void silk_stereo_MS_to_LR( diff --git a/drivers/opus/silk/stereo_decode_pred.c b/thirdparty/opus/silk/stereo_decode_pred.c similarity index 98% rename from drivers/opus/silk/stereo_decode_pred.c rename to thirdparty/opus/silk/stereo_decode_pred.c index 9e8abf39d02..56ba3925e87 100644 --- a/drivers/opus/silk/stereo_decode_pred.c +++ b/thirdparty/opus/silk/stereo_decode_pred.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Decode mid/side predictors */ void silk_stereo_decode_pred( diff --git a/drivers/opus/silk/stereo_encode_pred.c b/thirdparty/opus/silk/stereo_encode_pred.c similarity index 97% rename from drivers/opus/silk/stereo_encode_pred.c rename to thirdparty/opus/silk/stereo_encode_pred.c index a864d404f68..e6dd1950664 100644 --- a/drivers/opus/silk/stereo_encode_pred.c +++ b/thirdparty/opus/silk/stereo_encode_pred.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Entropy code the mid/side quantization indices */ void silk_stereo_encode_pred( diff --git a/drivers/opus/silk/stereo_find_predictor.c b/thirdparty/opus/silk/stereo_find_predictor.c similarity index 98% rename from drivers/opus/silk/stereo_find_predictor.c rename to thirdparty/opus/silk/stereo_find_predictor.c index c7fa3ac5555..e30e90bddc2 100644 --- a/drivers/opus/silk/stereo_find_predictor.c +++ b/thirdparty/opus/silk/stereo_find_predictor.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Find least-squares prediction gain for one signal based on another and quantize it */ opus_int32 silk_stereo_find_predictor( /* O Returns predictor in Q13 */ diff --git a/drivers/opus/silk/stereo_quant_pred.c b/thirdparty/opus/silk/stereo_quant_pred.c similarity index 98% rename from drivers/opus/silk/stereo_quant_pred.c rename to thirdparty/opus/silk/stereo_quant_pred.c index ff2971e7c16..d4ced6c3e82 100644 --- a/drivers/opus/silk/stereo_quant_pred.c +++ b/thirdparty/opus/silk/stereo_quant_pred.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/main.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "main.h" /* Quantize mid/side predictors */ void silk_stereo_quant_pred( diff --git a/drivers/opus/silk/structs.h b/thirdparty/opus/silk/structs.h similarity index 99% rename from drivers/opus/silk/structs.h rename to thirdparty/opus/silk/structs.h index a2876b62a2a..827829dc6f3 100644 --- a/drivers/opus/silk/structs.h +++ b/thirdparty/opus/silk/structs.h @@ -28,11 +28,11 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_STRUCTS_H #define SILK_STRUCTS_H -#include "opus/silk/typedef.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/silk/define.h" -#include "opus/celt/entenc.h" -#include "opus/celt/entdec.h" +#include "typedef.h" +#include "SigProc_FIX.h" +#include "define.h" +#include "entenc.h" +#include "entdec.h" #ifdef __cplusplus extern "C" diff --git a/drivers/opus/silk/sum_sqr_shift.c b/thirdparty/opus/silk/sum_sqr_shift.c similarity index 97% rename from drivers/opus/silk/sum_sqr_shift.c rename to thirdparty/opus/silk/sum_sqr_shift.c index 1d1da449f48..129df191d8d 100644 --- a/drivers/opus/silk/sum_sqr_shift.c +++ b/thirdparty/opus/silk/sum_sqr_shift.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/SigProc_FIX.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "SigProc_FIX.h" /* Compute number of bits to right shift the sum of squares of a vector */ /* of int16s to make it fit in an int32 */ diff --git a/drivers/opus/silk/table_LSF_cos.c b/thirdparty/opus/silk/table_LSF_cos.c similarity index 98% rename from drivers/opus/silk/table_LSF_cos.c rename to thirdparty/opus/silk/table_LSF_cos.c index d350df9adda..ec9dc639279 100644 --- a/drivers/opus/silk/table_LSF_cos.c +++ b/thirdparty/opus/silk/table_LSF_cos.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/tables.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "tables.h" /* Cosine approximation table for LSF conversion */ /* Q12 values (even) */ diff --git a/drivers/opus/silk/tables.h b/thirdparty/opus/silk/tables.h similarity index 99% rename from drivers/opus/silk/tables.h rename to thirdparty/opus/silk/tables.h index 2ad69eec809..7fea6fda39d 100644 --- a/drivers/opus/silk/tables.h +++ b/thirdparty/opus/silk/tables.h @@ -28,8 +28,8 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_TABLES_H #define SILK_TABLES_H -#include "opus/silk/define.h" -#include "opus/silk/structs.h" +#include "define.h" +#include "structs.h" #ifdef __cplusplus extern "C" diff --git a/drivers/opus/silk/tables_LTP.c b/thirdparty/opus/silk/tables_LTP.c similarity index 99% rename from drivers/opus/silk/tables_LTP.c rename to thirdparty/opus/silk/tables_LTP.c index 9f500b25f2f..0e6a0254d5d 100644 --- a/drivers/opus/silk/tables_LTP.c +++ b/thirdparty/opus/silk/tables_LTP.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/tables.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "tables.h" const opus_uint8 silk_LTP_per_index_iCDF[3] = { 179, 99, 0 diff --git a/drivers/opus/silk/tables_NLSF_CB_NB_MB.c b/thirdparty/opus/silk/tables_NLSF_CB_NB_MB.c similarity index 99% rename from drivers/opus/silk/tables_NLSF_CB_NB_MB.c rename to thirdparty/opus/silk/tables_NLSF_CB_NB_MB.c index d1cf99356da..8c59d207aa0 100644 --- a/drivers/opus/silk/tables_NLSF_CB_NB_MB.c +++ b/thirdparty/opus/silk/tables_NLSF_CB_NB_MB.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/tables.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "tables.h" static const opus_uint8 silk_NLSF_CB1_NB_MB_Q8[ 320 ] = { 12, 35, 60, 83, 108, 132, 157, 180, diff --git a/drivers/opus/silk/tables_NLSF_CB_WB.c b/thirdparty/opus/silk/tables_NLSF_CB_WB.c similarity index 99% rename from drivers/opus/silk/tables_NLSF_CB_WB.c rename to thirdparty/opus/silk/tables_NLSF_CB_WB.c index 5ee6e880c46..50af87eb2e1 100644 --- a/drivers/opus/silk/tables_NLSF_CB_WB.c +++ b/thirdparty/opus/silk/tables_NLSF_CB_WB.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/tables.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "tables.h" static const opus_uint8 silk_NLSF_CB1_WB_Q8[ 512 ] = { 7, 23, 38, 54, 69, 85, 100, 116, diff --git a/drivers/opus/silk/tables_gain.c b/thirdparty/opus/silk/tables_gain.c similarity index 97% rename from drivers/opus/silk/tables_gain.c rename to thirdparty/opus/silk/tables_gain.c index e1e4319d7dc..37e41d890c3 100644 --- a/drivers/opus/silk/tables_gain.c +++ b/thirdparty/opus/silk/tables_gain.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/tables.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "tables.h" #ifdef __cplusplus extern "C" diff --git a/drivers/opus/silk/tables_other.c b/thirdparty/opus/silk/tables_other.c similarity index 97% rename from drivers/opus/silk/tables_other.c rename to thirdparty/opus/silk/tables_other.c index 3713ff82272..398686bf26b 100644 --- a/drivers/opus/silk/tables_other.c +++ b/thirdparty/opus/silk/tables_other.c @@ -24,11 +24,14 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/structs.h" -#include "opus/silk/define.h" -#include "opus/silk/tables.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "structs.h" +#include "define.h" +#include "tables.h" #ifdef __cplusplus extern "C" diff --git a/drivers/opus/silk/tables_pitch_lag.c b/thirdparty/opus/silk/tables_pitch_lag.c similarity index 97% rename from drivers/opus/silk/tables_pitch_lag.c rename to thirdparty/opus/silk/tables_pitch_lag.c index f435b7e0165..e80cc59a272 100644 --- a/drivers/opus/silk/tables_pitch_lag.c +++ b/thirdparty/opus/silk/tables_pitch_lag.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/tables.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "tables.h" const opus_uint8 silk_pitch_lag_iCDF[ 2 * ( PITCH_EST_MAX_LAG_MS - PITCH_EST_MIN_LAG_MS ) ] = { 253, 250, 244, 233, 212, 182, 150, 131, diff --git a/drivers/opus/silk/tables_pulses_per_block.c b/thirdparty/opus/silk/tables_pulses_per_block.c similarity index 99% rename from drivers/opus/silk/tables_pulses_per_block.c rename to thirdparty/opus/silk/tables_pulses_per_block.c index 21f430791a6..c7c01c8893f 100644 --- a/drivers/opus/silk/tables_pulses_per_block.c +++ b/thirdparty/opus/silk/tables_pulses_per_block.c @@ -24,9 +24,12 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ -#include "opus/opus_config.h" -#include "opus/silk/tables.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "tables.h" const opus_uint8 silk_max_pulses_table[ 4 ] = { 8, 10, 12, 16 diff --git a/drivers/opus/silk/tuning_parameters.h b/thirdparty/opus/silk/tuning_parameters.h similarity index 100% rename from drivers/opus/silk/tuning_parameters.h rename to thirdparty/opus/silk/tuning_parameters.h diff --git a/drivers/opus/silk/typedef.h b/thirdparty/opus/silk/typedef.h similarity index 97% rename from drivers/opus/silk/typedef.h rename to thirdparty/opus/silk/typedef.h index 3e193b4a450..97b7e709be5 100644 --- a/drivers/opus/silk/typedef.h +++ b/thirdparty/opus/silk/typedef.h @@ -28,10 +28,10 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SILK_TYPEDEF_H #define SILK_TYPEDEF_H -#include "opus/opus_types.h" -#include "opus/opus_defines.h" +#include "opus_types.h" +#include "opus_defines.h" -#ifndef OPUS_FIXED_POINT +#ifndef FIXED_POINT # include # define silk_float float # define silk_float_MAX FLT_MAX diff --git a/drivers/opus/silk/x86/NSQ_del_dec_sse.c b/thirdparty/opus/silk/x86/NSQ_del_dec_sse.c similarity index 99% rename from drivers/opus/silk/x86/NSQ_del_dec_sse.c rename to thirdparty/opus/silk/x86/NSQ_del_dec_sse.c index e9afbba01b0..21d4a8bc1e9 100644 --- a/drivers/opus/silk/x86/NSQ_del_dec_sse.c +++ b/thirdparty/opus/silk/x86/NSQ_del_dec_sse.c @@ -24,15 +24,18 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include -#include "opus/silk/main.h" -#include "opus/celt/x86/x86cpu.h" +#include "main.h" +#include "celt/x86/x86cpu.h" -#include "opus/celt/stack_alloc.h" +#include "stack_alloc.h" typedef struct { opus_int32 sLPC_Q14[ MAX_SUB_FRAME_LENGTH + NSQ_LPC_BUF_LENGTH ]; diff --git a/drivers/opus/silk/x86/NSQ_sse.c b/thirdparty/opus/silk/x86/NSQ_sse.c similarity index 99% rename from drivers/opus/silk/x86/NSQ_sse.c rename to thirdparty/opus/silk/x86/NSQ_sse.c index ac0fa1ab046..72f34fd6fc4 100644 --- a/drivers/opus/silk/x86/NSQ_sse.c +++ b/thirdparty/opus/silk/x86/NSQ_sse.c @@ -24,14 +24,17 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include -#include "opus/silk/main.h" -#include "opus/celt/x86/x86cpu.h" -#include "opus/celt/stack_alloc.h" +#include "main.h" +#include "celt/x86/x86cpu.h" +#include "stack_alloc.h" static OPUS_INLINE void silk_nsq_scale_states_sse4_1( const silk_encoder_state *psEncC, /* I Encoder State */ diff --git a/drivers/opus/silk/x86/SigProc_FIX_sse.h b/thirdparty/opus/silk/x86/SigProc_FIX_sse.h similarity index 99% rename from drivers/opus/silk/x86/SigProc_FIX_sse.h rename to thirdparty/opus/silk/x86/SigProc_FIX_sse.h index 67ab30fd786..61efa8da415 100644 --- a/drivers/opus/silk/x86/SigProc_FIX_sse.h +++ b/thirdparty/opus/silk/x86/SigProc_FIX_sse.h @@ -27,7 +27,10 @@ #ifndef SIGPROC_FIX_SSE_H #define SIGPROC_FIX_SSE_H -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #if defined(OPUS_X86_MAY_HAVE_SSE4_1) void silk_burg_modified_sse4_1( diff --git a/drivers/opus/silk/x86/VAD_sse.c b/thirdparty/opus/silk/x86/VAD_sse.c similarity index 99% rename from drivers/opus/silk/x86/VAD_sse.c rename to thirdparty/opus/silk/x86/VAD_sse.c index 5db2c86aa95..4e90f4410d8 100644 --- a/drivers/opus/silk/x86/VAD_sse.c +++ b/thirdparty/opus/silk/x86/VAD_sse.c @@ -24,14 +24,17 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include -#include "opus/silk/main.h" -#include "opus/celt/stack_alloc.h" +#include "main.h" +#include "stack_alloc.h" /* Weighting factors for tilt measure */ static const opus_int32 tiltWeights[ VAD_N_BANDS ] = { 30000, 6000, -12000, -12000 }; diff --git a/drivers/opus/silk/x86/VQ_WMat_EC_sse.c b/thirdparty/opus/silk/x86/VQ_WMat_EC_sse.c similarity index 98% rename from drivers/opus/silk/x86/VQ_WMat_EC_sse.c rename to thirdparty/opus/silk/x86/VQ_WMat_EC_sse.c index 3afa42a6e56..74d6c6d0ec6 100644 --- a/drivers/opus/silk/x86/VQ_WMat_EC_sse.c +++ b/thirdparty/opus/silk/x86/VQ_WMat_EC_sse.c @@ -24,13 +24,16 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include #include -#include "opus/silk/main.h" -#include "opus/celt/x86/x86cpu.h" +#include "main.h" +#include "celt/x86/x86cpu.h" /* Entropy constrained matrix-weighted VQ, hard-coded to 5-element vectors, for a single input data vector */ void silk_VQ_WMat_EC_sse4_1( diff --git a/drivers/opus/silk/x86/main_sse.h b/thirdparty/opus/silk/x86/main_sse.h similarity index 99% rename from drivers/opus/silk/x86/main_sse.h rename to thirdparty/opus/silk/x86/main_sse.h index 6fef1b358ba..afd5ec26e1e 100644 --- a/drivers/opus/silk/x86/main_sse.h +++ b/thirdparty/opus/silk/x86/main_sse.h @@ -27,7 +27,10 @@ #ifndef MAIN_SSE_H #define MAIN_SSE_H -#include "opus/opus_config.h" + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif # if defined(OPUS_X86_MAY_HAVE_SSE4_1) diff --git a/drivers/opus/silk/x86/x86_silk_map.c b/thirdparty/opus/silk/x86/x86_silk_map.c similarity index 97% rename from drivers/opus/silk/x86/x86_silk_map.c rename to thirdparty/opus/silk/x86/x86_silk_map.c index c3502114d1f..818841f2c19 100644 --- a/drivers/opus/silk/x86/x86_silk_map.c +++ b/thirdparty/opus/silk/x86/x86_silk_map.c @@ -24,19 +24,22 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "opus/opus_config.h" -#include "opus/celt/x86/x86cpu.h" -#include "opus/silk/structs.h" -#include "opus/silk/SigProc_FIX.h" -#include "opus/celt/pitch.h" -#include "opus/silk/main.h" +#if defined(HAVE_CONFIG_H) +#include "config.h" +#endif + +#include "celt/x86/x86cpu.h" +#include "structs.h" +#include "SigProc_FIX.h" +#include "pitch.h" +#include "main.h" #if !defined(OPUS_X86_PRESUME_SSE4_1) #if defined(FIXED_POINT) -#include "opus/silk/fixed/main_FIX.h" +#include "fixed/main_FIX.h" opus_int64 (*const SILK_INNER_PROD16_ALIGNED_64_IMPL[ OPUS_ARCHMASK + 1 ] )( const opus_int16 *inVec1, diff --git a/drivers/opus/stream.c b/thirdparty/opus/stream.c similarity index 99% rename from drivers/opus/stream.c rename to thirdparty/opus/stream.c index 2ac12642ddd..0238a6b31bd 100644 --- a/drivers/opus/stream.c +++ b/thirdparty/opus/stream.c @@ -14,9 +14,11 @@ last mod: $Id: vorbisfile.c 17573 2010-10-27 14:53:59Z xiphmont $ ********************************************************************/ -#include "opus/opus_config.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif -#include "opus/internal.h" +#include "internal.h" #include #include #include diff --git a/drivers/opus/tansig_table.h b/thirdparty/opus/tansig_table.h similarity index 100% rename from drivers/opus/tansig_table.h rename to thirdparty/opus/tansig_table.h diff --git a/drivers/opus/wincerts.c b/thirdparty/opus/wincerts.c similarity index 98% rename from drivers/opus/wincerts.c rename to thirdparty/opus/wincerts.c index 1a5b634063c..b0e35aa352f 100644 --- a/drivers/opus/wincerts.c +++ b/thirdparty/opus/wincerts.c @@ -15,9 +15,12 @@ action, so I'm giving up and re-implementing it locally. [1] */ -#include "opus/opus_config.h" -#include "opus/internal.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "internal.h" #if defined(OP_ENABLE_HTTP)&&defined(_WIN32) /*You must include windows.h before wincrypt.h and x509.h.*/ # define WIN32_LEAN_AND_MEAN diff --git a/drivers/opus/winerrno.h b/thirdparty/opus/winerrno.h similarity index 100% rename from drivers/opus/winerrno.h rename to thirdparty/opus/winerrno.h From 422196759f93df249db38619f136cabd5dcf42cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 12 Oct 2016 23:06:17 +0200 Subject: [PATCH 07/19] openssl: Move to a module and split thirdparty lib Same rationale as the previous commits. --- SConstruct | 7 +- drivers/SCsub | 10 - drivers/builtin_openssl2/SCsub | 663 ----------------- drivers/openssl/SCsub | 6 - drivers/register_driver_types.cpp | 14 - modules/openssl/SCsub | 685 ++++++++++++++++++ modules/openssl/config.py | 6 + {drivers => modules}/openssl/curl_hostcheck.c | 4 - {drivers => modules}/openssl/curl_hostcheck.h | 4 - .../openssl/register_types.cpp | 13 +- .../openssl/register_types.h | 15 +- .../openssl/stream_peer_openssl.cpp | 3 - .../openssl/stream_peer_openssl.h | 4 - platform/x11/detect.py | 4 +- thirdparty/README.md | 11 + thirdparty/openssl/LICENSE | 127 ++++ .../openssl}/buildinf.h | 0 .../openssl}/crypto/LPdir_nyi.c | 0 .../openssl}/crypto/LPdir_unix.c | 0 .../openssl}/crypto/LPdir_vms.c | 0 .../openssl}/crypto/LPdir_win.c | 0 .../openssl}/crypto/LPdir_win32.c | 0 .../openssl}/crypto/LPdir_wince.c | 0 .../openssl}/crypto/aes/README | 0 .../openssl}/crypto/aes/aes_cbc.c | 0 .../openssl}/crypto/aes/aes_cfb.c | 0 .../openssl}/crypto/aes/aes_core.c | 0 .../openssl}/crypto/aes/aes_ctr.c | 0 .../openssl}/crypto/aes/aes_ecb.c | 0 .../openssl}/crypto/aes/aes_ige.c | 0 .../openssl}/crypto/aes/aes_locl.h | 0 .../openssl}/crypto/aes/aes_misc.c | 0 .../openssl}/crypto/aes/aes_ofb.c | 0 .../openssl}/crypto/aes/aes_wrap.c | 0 .../openssl}/crypto/aes/aes_x86core.c | 0 .../openssl}/crypto/arm_arch.h | 0 .../openssl}/crypto/armcap.c | 0 .../openssl}/crypto/asn1/a_bitstr.c | 0 .../openssl}/crypto/asn1/a_bool.c | 0 .../openssl}/crypto/asn1/a_bytes.c | 0 .../openssl}/crypto/asn1/a_d2i_fp.c | 0 .../openssl}/crypto/asn1/a_digest.c | 0 .../openssl}/crypto/asn1/a_dup.c | 0 .../openssl}/crypto/asn1/a_enum.c | 0 .../openssl}/crypto/asn1/a_gentm.c | 0 .../openssl}/crypto/asn1/a_i2d_fp.c | 0 .../openssl}/crypto/asn1/a_int.c | 0 .../openssl}/crypto/asn1/a_mbstr.c | 0 .../openssl}/crypto/asn1/a_object.c | 0 .../openssl}/crypto/asn1/a_octet.c | 0 .../openssl}/crypto/asn1/a_print.c | 0 .../openssl}/crypto/asn1/a_set.c | 0 .../openssl}/crypto/asn1/a_sign.c | 0 .../openssl}/crypto/asn1/a_strex.c | 0 .../openssl}/crypto/asn1/a_strnid.c | 0 .../openssl}/crypto/asn1/a_time.c | 0 .../openssl}/crypto/asn1/a_type.c | 0 .../openssl}/crypto/asn1/a_utctm.c | 0 .../openssl}/crypto/asn1/a_utf8.c | 0 .../openssl}/crypto/asn1/a_verify.c | 0 .../openssl}/crypto/asn1/ameth_lib.c | 0 .../openssl}/crypto/asn1/asn1_err.c | 0 .../openssl}/crypto/asn1/asn1_gen.c | 0 .../openssl}/crypto/asn1/asn1_lib.c | 0 .../openssl}/crypto/asn1/asn1_locl.h | 0 .../openssl}/crypto/asn1/asn1_par.c | 0 .../openssl}/crypto/asn1/asn_mime.c | 0 .../openssl}/crypto/asn1/asn_moid.c | 0 .../openssl}/crypto/asn1/asn_pack.c | 0 .../openssl}/crypto/asn1/bio_asn1.c | 0 .../openssl}/crypto/asn1/bio_ndef.c | 0 .../openssl}/crypto/asn1/charmap.h | 0 .../openssl}/crypto/asn1/d2i_pr.c | 0 .../openssl}/crypto/asn1/d2i_pu.c | 0 .../openssl}/crypto/asn1/evp_asn1.c | 0 .../openssl}/crypto/asn1/f_enum.c | 0 .../openssl}/crypto/asn1/f_int.c | 0 .../openssl}/crypto/asn1/f_string.c | 0 .../openssl}/crypto/asn1/i2d_pr.c | 0 .../openssl}/crypto/asn1/i2d_pu.c | 0 .../openssl}/crypto/asn1/n_pkey.c | 0 .../openssl}/crypto/asn1/nsseq.c | 0 .../openssl}/crypto/asn1/p5_pbe.c | 0 .../openssl}/crypto/asn1/p5_pbev2.c | 0 .../openssl}/crypto/asn1/p8_pkey.c | 0 .../openssl}/crypto/asn1/t_bitst.c | 0 .../openssl}/crypto/asn1/t_crl.c | 0 .../openssl}/crypto/asn1/t_pkey.c | 0 .../openssl}/crypto/asn1/t_req.c | 0 .../openssl}/crypto/asn1/t_spki.c | 0 .../openssl}/crypto/asn1/t_x509.c | 0 .../openssl}/crypto/asn1/t_x509a.c | 0 .../openssl}/crypto/asn1/tasn_dec.c | 0 .../openssl}/crypto/asn1/tasn_enc.c | 0 .../openssl}/crypto/asn1/tasn_fre.c | 0 .../openssl}/crypto/asn1/tasn_new.c | 0 .../openssl}/crypto/asn1/tasn_prn.c | 0 .../openssl}/crypto/asn1/tasn_typ.c | 0 .../openssl}/crypto/asn1/tasn_utl.c | 0 .../openssl}/crypto/asn1/x_algor.c | 0 .../openssl}/crypto/asn1/x_attrib.c | 0 .../openssl}/crypto/asn1/x_bignum.c | 0 .../openssl}/crypto/asn1/x_crl.c | 0 .../openssl}/crypto/asn1/x_exten.c | 0 .../openssl}/crypto/asn1/x_info.c | 0 .../openssl}/crypto/asn1/x_long.c | 0 .../openssl}/crypto/asn1/x_name.c | 0 .../openssl}/crypto/asn1/x_nx509.c | 0 .../openssl}/crypto/asn1/x_pkey.c | 0 .../openssl}/crypto/asn1/x_pubkey.c | 0 .../openssl}/crypto/asn1/x_req.c | 0 .../openssl}/crypto/asn1/x_sig.c | 0 .../openssl}/crypto/asn1/x_spki.c | 0 .../openssl}/crypto/asn1/x_val.c | 0 .../openssl}/crypto/asn1/x_x509.c | 0 .../openssl}/crypto/asn1/x_x509a.c | 0 .../openssl}/crypto/bf/COPYRIGHT | 0 .../openssl}/crypto/bf/INSTALL | 0 .../openssl}/crypto/bf/README | 0 .../openssl}/crypto/bf/VERSION | 0 .../openssl}/crypto/bf/asm/readme | 0 .../openssl}/crypto/bf/bf_cbc.c | 0 .../openssl}/crypto/bf/bf_cfb64.c | 0 .../openssl}/crypto/bf/bf_ecb.c | 0 .../openssl}/crypto/bf/bf_enc.c | 0 .../openssl}/crypto/bf/bf_locl.h | 0 .../openssl}/crypto/bf/bf_ofb64.c | 0 .../openssl}/crypto/bf/bf_opts.c | 0 .../openssl}/crypto/bf/bf_pi.h | 0 .../openssl}/crypto/bf/bf_skey.c | 0 .../openssl}/crypto/bf/bfs.cpp | 0 .../openssl}/crypto/bf/bfspeed.c | 0 .../openssl}/crypto/bio/b_dump.c | 0 .../openssl}/crypto/bio/b_print.c | 0 .../openssl}/crypto/bio/b_sock.c | 0 .../openssl}/crypto/bio/bf_buff.c | 0 .../openssl}/crypto/bio/bf_lbuf.c | 0 .../openssl}/crypto/bio/bf_nbio.c | 0 .../openssl}/crypto/bio/bf_null.c | 0 .../openssl}/crypto/bio/bio_cb.c | 0 .../openssl}/crypto/bio/bio_err.c | 0 .../openssl}/crypto/bio/bio_lcl.h | 0 .../openssl}/crypto/bio/bio_lib.c | 0 .../openssl}/crypto/bio/bss_acpt.c | 0 .../openssl}/crypto/bio/bss_bio.c | 0 .../openssl}/crypto/bio/bss_conn.c | 0 .../openssl}/crypto/bio/bss_dgram.c | 0 .../openssl}/crypto/bio/bss_fd.c | 0 .../openssl}/crypto/bio/bss_file.c | 0 .../openssl}/crypto/bio/bss_log.c | 0 .../openssl}/crypto/bio/bss_mem.c | 0 .../openssl}/crypto/bio/bss_null.c | 0 .../openssl}/crypto/bio/bss_rtcp.c | 0 .../openssl}/crypto/bio/bss_sock.c | 0 .../openssl}/crypto/bn/asm/README | 0 .../openssl}/crypto/bn/asm/vms.mar | 0 .../openssl}/crypto/bn/asm/x86/f | 0 .../openssl}/crypto/bn/asm/x86_64-gcc.c | 0 .../openssl}/crypto/bn/bn.mul | 0 .../openssl}/crypto/bn/bn_add.c | 0 .../openssl}/crypto/bn/bn_asm.c | 0 .../openssl}/crypto/bn/bn_blind.c | 0 .../openssl}/crypto/bn/bn_const.c | 0 .../openssl}/crypto/bn/bn_ctx.c | 0 .../openssl}/crypto/bn/bn_depr.c | 0 .../openssl}/crypto/bn/bn_div.c | 0 .../openssl}/crypto/bn/bn_err.c | 0 .../openssl}/crypto/bn/bn_exp.c | 0 .../openssl}/crypto/bn/bn_exp2.c | 0 .../openssl}/crypto/bn/bn_gcd.c | 0 .../openssl}/crypto/bn/bn_gf2m.c | 0 .../openssl}/crypto/bn/bn_kron.c | 0 .../openssl}/crypto/bn/bn_lcl.h | 0 .../openssl}/crypto/bn/bn_lib.c | 0 .../openssl}/crypto/bn/bn_mod.c | 0 .../openssl}/crypto/bn/bn_mont.c | 0 .../openssl}/crypto/bn/bn_mpi.c | 0 .../openssl}/crypto/bn/bn_mul.c | 0 .../openssl}/crypto/bn/bn_nist.c | 0 .../openssl}/crypto/bn/bn_prime.c | 0 .../openssl}/crypto/bn/bn_prime.h | 0 .../openssl}/crypto/bn/bn_print.c | 0 .../openssl}/crypto/bn/bn_rand.c | 0 .../openssl}/crypto/bn/bn_recp.c | 0 .../openssl}/crypto/bn/bn_shift.c | 0 .../openssl}/crypto/bn/bn_sqr.c | 0 .../openssl}/crypto/bn/bn_sqrt.c | 0 .../openssl}/crypto/bn/bn_word.c | 0 .../openssl}/crypto/bn/bn_x931p.c | 0 .../openssl}/crypto/bn/bnspeed.c | 0 .../openssl}/crypto/bn/exp.c | 0 .../openssl}/crypto/bn/expspeed.c | 0 .../openssl}/crypto/bn/rsaz_exp.c | 0 .../openssl}/crypto/bn/rsaz_exp.h | 0 .../openssl}/crypto/bn/todo | 0 .../openssl}/crypto/bn/vms-helper.c | 0 .../openssl}/crypto/buffer/buf_err.c | 0 .../openssl}/crypto/buffer/buf_str.c | 0 .../openssl}/crypto/buffer/buffer.c | 0 .../openssl}/crypto/camellia/camellia.c | 0 .../openssl}/crypto/camellia/cmll_cbc.c | 0 .../openssl}/crypto/camellia/cmll_cfb.c | 0 .../openssl}/crypto/camellia/cmll_ctr.c | 0 .../openssl}/crypto/camellia/cmll_ecb.c | 0 .../openssl}/crypto/camellia/cmll_locl.h | 0 .../openssl}/crypto/camellia/cmll_misc.c | 0 .../openssl}/crypto/camellia/cmll_ofb.c | 0 .../openssl}/crypto/camellia/cmll_utl.c | 0 .../openssl}/crypto/cast/asm/readme | 0 .../openssl}/crypto/cast/c_cfb64.c | 0 .../openssl}/crypto/cast/c_ecb.c | 0 .../openssl}/crypto/cast/c_enc.c | 0 .../openssl}/crypto/cast/c_ofb64.c | 0 .../openssl}/crypto/cast/c_skey.c | 0 .../openssl}/crypto/cast/cast_lcl.h | 0 .../openssl}/crypto/cast/cast_s.h | 0 .../openssl}/crypto/cast/cast_spd.c | 0 .../openssl}/crypto/cast/castopts.c | 0 .../openssl}/crypto/cast/casts.cpp | 0 .../openssl}/crypto/cmac/cm_ameth.c | 0 .../openssl}/crypto/cmac/cm_pmeth.c | 0 .../openssl}/crypto/cmac/cmac.c | 0 .../openssl}/crypto/cms/cms_asn1.c | 0 .../openssl}/crypto/cms/cms_att.c | 0 .../openssl}/crypto/cms/cms_cd.c | 0 .../openssl}/crypto/cms/cms_dd.c | 0 .../openssl}/crypto/cms/cms_enc.c | 0 .../openssl}/crypto/cms/cms_env.c | 0 .../openssl}/crypto/cms/cms_err.c | 0 .../openssl}/crypto/cms/cms_ess.c | 0 .../openssl}/crypto/cms/cms_io.c | 0 .../openssl}/crypto/cms/cms_kari.c | 0 .../openssl}/crypto/cms/cms_lcl.h | 0 .../openssl}/crypto/cms/cms_lib.c | 0 .../openssl}/crypto/cms/cms_pwri.c | 0 .../openssl}/crypto/cms/cms_sd.c | 0 .../openssl}/crypto/cms/cms_smime.c | 0 .../openssl}/crypto/comp/c_rle.c | 0 .../openssl}/crypto/comp/c_zlib.c | 0 .../openssl}/crypto/comp/comp_err.c | 0 .../openssl}/crypto/comp/comp_lib.c | 0 .../openssl}/crypto/conf/README | 0 .../openssl}/crypto/conf/cnf_save.c | 0 .../openssl}/crypto/conf/conf_api.c | 0 .../openssl}/crypto/conf/conf_def.c | 0 .../openssl}/crypto/conf/conf_def.h | 0 .../openssl}/crypto/conf/conf_err.c | 0 .../openssl}/crypto/conf/conf_lib.c | 0 .../openssl}/crypto/conf/conf_mall.c | 0 .../openssl}/crypto/conf/conf_mod.c | 0 .../openssl}/crypto/conf/conf_sap.c | 0 .../openssl}/crypto/conf/ssleay.cnf | 0 .../openssl}/crypto/constant_time_locl.h | 0 .../openssl}/crypto/cpt_err.c | 0 .../openssl}/crypto/cryptlib.c | 0 .../openssl}/crypto/cryptlib.h | 0 .../openssl}/crypto/crypto-lib.com | 0 .../openssl}/crypto/cversion.c | 0 .../openssl}/crypto/des/COPYRIGHT | 0 .../openssl}/crypto/des/DES.pm | 0 .../openssl}/crypto/des/DES.xs | 0 .../openssl}/crypto/des/FILES0 | 0 .../openssl}/crypto/des/INSTALL | 0 .../openssl}/crypto/des/Imakefile | 0 .../openssl}/crypto/des/KERBEROS | 0 .../openssl}/crypto/des/README | 0 .../openssl}/crypto/des/VERSION | 0 .../openssl}/crypto/des/asm/des_enc.m4 | 0 .../openssl}/crypto/des/asm/readme | 0 .../openssl}/crypto/des/cbc3_enc.c | 0 .../openssl}/crypto/des/cbc_cksm.c | 0 .../openssl}/crypto/des/cbc_enc.c | 0 .../openssl}/crypto/des/cfb64ede.c | 0 .../openssl}/crypto/des/cfb64enc.c | 0 .../openssl}/crypto/des/cfb_enc.c | 0 .../openssl}/crypto/des/des-lib.com | 0 .../openssl}/crypto/des/des.c | 0 .../openssl}/crypto/des/des3s.cpp | 0 .../openssl}/crypto/des/des_enc.c | 0 .../openssl}/crypto/des/des_locl.h | 0 .../openssl}/crypto/des/des_old.c | 0 .../openssl}/crypto/des/des_old2.c | 0 .../openssl}/crypto/des/des_opts.c | 0 .../openssl}/crypto/des/des_ver.h | 0 .../openssl}/crypto/des/dess.cpp | 0 .../openssl}/crypto/des/ecb3_enc.c | 0 .../openssl}/crypto/des/ecb_enc.c | 0 .../openssl}/crypto/des/ede_cbcm_enc.c | 0 .../openssl}/crypto/des/enc_read.c | 0 .../openssl}/crypto/des/enc_writ.c | 0 .../openssl}/crypto/des/fcrypt.c | 0 .../openssl}/crypto/des/fcrypt_b.c | 0 .../openssl}/crypto/des/makefile.bc | 0 .../openssl}/crypto/des/ncbc_enc.c | 0 .../openssl}/crypto/des/ofb64ede.c | 0 .../openssl}/crypto/des/ofb64enc.c | 0 .../openssl}/crypto/des/ofb_enc.c | 0 .../openssl}/crypto/des/options.txt | 0 .../openssl}/crypto/des/pcbc_enc.c | 0 .../openssl}/crypto/des/qud_cksm.c | 0 .../openssl}/crypto/des/rand_key.c | 0 .../openssl}/crypto/des/read2pwd.c | 0 .../openssl}/crypto/des/read_pwd.c | 0 .../openssl}/crypto/des/rpc_des.h | 0 .../openssl}/crypto/des/rpc_enc.c | 0 .../openssl}/crypto/des/rpw.c | 0 .../openssl}/crypto/des/set_key.c | 0 .../openssl}/crypto/des/speed.c | 0 .../openssl}/crypto/des/spr.h | 0 .../openssl}/crypto/des/str2key.c | 0 .../openssl}/crypto/des/t/test | 0 .../openssl}/crypto/des/times/486-50.sol | 0 .../openssl}/crypto/des/times/586-100.lnx | 0 .../openssl}/crypto/des/times/686-200.fre | 0 .../openssl}/crypto/des/times/aix.cc | 0 .../openssl}/crypto/des/times/alpha.cc | 0 .../openssl}/crypto/des/times/hpux.cc | 0 .../openssl}/crypto/des/times/sparc.gcc | 0 .../openssl}/crypto/des/times/usparc.cc | 0 .../openssl}/crypto/des/typemap | 0 .../openssl}/crypto/des/xcbc_enc.c | 0 .../openssl}/crypto/dh/dh1024.pem | 0 .../openssl}/crypto/dh/dh192.pem | 0 .../openssl}/crypto/dh/dh2048.pem | 0 .../openssl}/crypto/dh/dh4096.pem | 0 .../openssl}/crypto/dh/dh512.pem | 0 .../openssl}/crypto/dh/dh_ameth.c | 0 .../openssl}/crypto/dh/dh_asn1.c | 0 .../openssl}/crypto/dh/dh_check.c | 0 .../openssl}/crypto/dh/dh_depr.c | 0 .../openssl}/crypto/dh/dh_err.c | 0 .../openssl}/crypto/dh/dh_gen.c | 0 .../openssl}/crypto/dh/dh_kdf.c | 0 .../openssl}/crypto/dh/dh_key.c | 0 .../openssl}/crypto/dh/dh_lib.c | 0 .../openssl}/crypto/dh/dh_pmeth.c | 0 .../openssl}/crypto/dh/dh_prn.c | 0 .../openssl}/crypto/dh/dh_rfc5114.c | 0 .../openssl}/crypto/dh/example | 0 .../openssl}/crypto/dh/generate | 0 .../openssl}/crypto/dh/p1024.c | 0 .../openssl}/crypto/dh/p192.c | 0 .../openssl}/crypto/dh/p512.c | 0 .../openssl}/crypto/dsa/README | 0 .../openssl}/crypto/dsa/dsa_ameth.c | 0 .../openssl}/crypto/dsa/dsa_asn1.c | 0 .../openssl}/crypto/dsa/dsa_depr.c | 0 .../openssl}/crypto/dsa/dsa_err.c | 0 .../openssl}/crypto/dsa/dsa_gen.c | 0 .../openssl}/crypto/dsa/dsa_key.c | 0 .../openssl}/crypto/dsa/dsa_lib.c | 0 .../openssl}/crypto/dsa/dsa_locl.h | 0 .../openssl}/crypto/dsa/dsa_ossl.c | 0 .../openssl}/crypto/dsa/dsa_pmeth.c | 0 .../openssl}/crypto/dsa/dsa_prn.c | 0 .../openssl}/crypto/dsa/dsa_sign.c | 0 .../openssl}/crypto/dsa/dsa_vrf.c | 0 .../openssl}/crypto/dsa/dsagen.c | 0 .../openssl}/crypto/dsa/fips186a.txt | 0 .../openssl}/crypto/dso/README | 0 .../openssl}/crypto/dso/dso_beos.c | 0 .../openssl}/crypto/dso/dso_dl.c | 0 .../openssl}/crypto/dso/dso_dlfcn.c | 0 .../openssl}/crypto/dso/dso_err.c | 0 .../openssl}/crypto/dso/dso_lib.c | 0 .../openssl}/crypto/dso/dso_null.c | 0 .../openssl}/crypto/dso/dso_openssl.c | 0 .../openssl}/crypto/dso/dso_vms.c | 0 .../openssl}/crypto/dso/dso_win32.c | 0 .../openssl}/crypto/ebcdic.c | 0 .../openssl}/crypto/ec/ec2_mult.c | 0 .../openssl}/crypto/ec/ec2_oct.c | 0 .../openssl}/crypto/ec/ec2_smpl.c | 0 .../openssl}/crypto/ec/ec_ameth.c | 0 .../openssl}/crypto/ec/ec_asn1.c | 0 .../openssl}/crypto/ec/ec_check.c | 0 .../openssl}/crypto/ec/ec_curve.c | 0 .../openssl}/crypto/ec/ec_cvt.c | 0 .../openssl}/crypto/ec/ec_err.c | 0 .../openssl}/crypto/ec/ec_key.c | 0 .../openssl}/crypto/ec/ec_lcl.h | 0 .../openssl}/crypto/ec/ec_lib.c | 0 .../openssl}/crypto/ec/ec_mult.c | 0 .../openssl}/crypto/ec/ec_oct.c | 0 .../openssl}/crypto/ec/ec_pmeth.c | 0 .../openssl}/crypto/ec/ec_print.c | 0 .../openssl}/crypto/ec/eck_prn.c | 0 .../openssl}/crypto/ec/ecp_mont.c | 0 .../openssl}/crypto/ec/ecp_nist.c | 0 .../openssl}/crypto/ec/ecp_nistp224.c | 0 .../openssl}/crypto/ec/ecp_nistp256.c | 0 .../openssl}/crypto/ec/ecp_nistp521.c | 0 .../openssl}/crypto/ec/ecp_nistputil.c | 0 .../openssl}/crypto/ec/ecp_nistz256.c | 0 .../openssl}/crypto/ec/ecp_nistz256_table.c | 0 .../openssl}/crypto/ec/ecp_oct.c | 0 .../openssl}/crypto/ec/ecp_smpl.c | 0 .../openssl}/crypto/ecdh/ech_err.c | 0 .../openssl}/crypto/ecdh/ech_kdf.c | 0 .../openssl}/crypto/ecdh/ech_key.c | 0 .../openssl}/crypto/ecdh/ech_lib.c | 0 .../openssl}/crypto/ecdh/ech_locl.h | 0 .../openssl}/crypto/ecdh/ech_ossl.c | 0 .../openssl}/crypto/ecdsa/ecs_asn1.c | 0 .../openssl}/crypto/ecdsa/ecs_err.c | 0 .../openssl}/crypto/ecdsa/ecs_lib.c | 0 .../openssl}/crypto/ecdsa/ecs_locl.h | 0 .../openssl}/crypto/ecdsa/ecs_ossl.c | 0 .../openssl}/crypto/ecdsa/ecs_sign.c | 0 .../openssl}/crypto/ecdsa/ecs_vrf.c | 0 .../openssl}/crypto/engine/README | 0 .../openssl}/crypto/engine/eng_all.c | 0 .../openssl}/crypto/engine/eng_cnf.c | 0 .../openssl}/crypto/engine/eng_cryptodev.c | 0 .../openssl}/crypto/engine/eng_ctrl.c | 0 .../openssl}/crypto/engine/eng_dyn.c | 0 .../openssl}/crypto/engine/eng_err.c | 0 .../openssl}/crypto/engine/eng_fat.c | 0 .../openssl}/crypto/engine/eng_init.c | 0 .../openssl}/crypto/engine/eng_int.h | 0 .../openssl}/crypto/engine/eng_lib.c | 0 .../openssl}/crypto/engine/eng_list.c | 0 .../openssl}/crypto/engine/eng_openssl.c | 0 .../openssl}/crypto/engine/eng_pkey.c | 0 .../openssl}/crypto/engine/eng_rdrand.c | 0 .../openssl}/crypto/engine/eng_table.c | 0 .../openssl}/crypto/engine/tb_asnmth.c | 0 .../openssl}/crypto/engine/tb_cipher.c | 0 .../openssl}/crypto/engine/tb_dh.c | 0 .../openssl}/crypto/engine/tb_digest.c | 0 .../openssl}/crypto/engine/tb_dsa.c | 0 .../openssl}/crypto/engine/tb_ecdh.c | 0 .../openssl}/crypto/engine/tb_ecdsa.c | 0 .../openssl}/crypto/engine/tb_pkmeth.c | 0 .../openssl}/crypto/engine/tb_rand.c | 0 .../openssl}/crypto/engine/tb_rsa.c | 0 .../openssl}/crypto/engine/tb_store.c | 0 .../openssl}/crypto/err/err.c | 0 .../openssl}/crypto/err/err_all.c | 0 .../openssl}/crypto/err/err_prn.c | 0 .../openssl}/crypto/err/openssl.ec | 0 .../openssl}/crypto/evp/bio_b64.c | 0 .../openssl}/crypto/evp/bio_enc.c | 0 .../openssl}/crypto/evp/bio_md.c | 0 .../openssl}/crypto/evp/bio_ok.c | 0 .../openssl}/crypto/evp/c_all.c | 0 .../openssl}/crypto/evp/c_allc.c | 0 .../openssl}/crypto/evp/c_alld.c | 0 .../openssl}/crypto/evp/digest.c | 0 .../openssl}/crypto/evp/e_aes.c | 0 .../openssl}/crypto/evp/e_aes_cbc_hmac_sha1.c | 0 .../crypto/evp/e_aes_cbc_hmac_sha256.c | 0 .../openssl}/crypto/evp/e_bf.c | 0 .../openssl}/crypto/evp/e_camellia.c | 0 .../openssl}/crypto/evp/e_cast.c | 0 .../openssl}/crypto/evp/e_des.c | 0 .../openssl}/crypto/evp/e_des3.c | 0 .../openssl}/crypto/evp/e_dsa.c | 0 .../openssl}/crypto/evp/e_idea.c | 0 .../openssl}/crypto/evp/e_null.c | 0 .../openssl}/crypto/evp/e_old.c | 0 .../openssl}/crypto/evp/e_rc2.c | 0 .../openssl}/crypto/evp/e_rc4.c | 0 .../openssl}/crypto/evp/e_rc4_hmac_md5.c | 0 .../openssl}/crypto/evp/e_rc5.c | 0 .../openssl}/crypto/evp/e_seed.c | 0 .../openssl}/crypto/evp/e_xcbc_d.c | 0 .../openssl}/crypto/evp/encode.c | 0 .../openssl}/crypto/evp/evp_acnf.c | 0 .../openssl}/crypto/evp/evp_cnf.c | 0 .../openssl}/crypto/evp/evp_enc.c | 0 .../openssl}/crypto/evp/evp_err.c | 0 .../openssl}/crypto/evp/evp_key.c | 0 .../openssl}/crypto/evp/evp_lib.c | 0 .../openssl}/crypto/evp/evp_locl.h | 0 .../openssl}/crypto/evp/evp_pbe.c | 0 .../openssl}/crypto/evp/evp_pkey.c | 0 .../openssl}/crypto/evp/evptests.txt | 0 .../openssl}/crypto/evp/m_dss.c | 0 .../openssl}/crypto/evp/m_dss1.c | 0 .../openssl}/crypto/evp/m_ecdsa.c | 0 .../openssl}/crypto/evp/m_md2.c | 0 .../openssl}/crypto/evp/m_md4.c | 0 .../openssl}/crypto/evp/m_md5.c | 0 .../openssl}/crypto/evp/m_mdc2.c | 0 .../openssl}/crypto/evp/m_null.c | 0 .../openssl}/crypto/evp/m_ripemd.c | 0 .../openssl}/crypto/evp/m_sha.c | 0 .../openssl}/crypto/evp/m_sha1.c | 0 .../openssl}/crypto/evp/m_sigver.c | 0 .../openssl}/crypto/evp/m_wp.c | 0 .../openssl}/crypto/evp/names.c | 0 .../openssl}/crypto/evp/openbsd_hw.c | 0 .../openssl}/crypto/evp/p5_crpt.c | 0 .../openssl}/crypto/evp/p5_crpt2.c | 0 .../openssl}/crypto/evp/p_dec.c | 0 .../openssl}/crypto/evp/p_enc.c | 0 .../openssl}/crypto/evp/p_lib.c | 0 .../openssl}/crypto/evp/p_open.c | 0 .../openssl}/crypto/evp/p_seal.c | 0 .../openssl}/crypto/evp/p_sign.c | 0 .../openssl}/crypto/evp/p_verify.c | 0 .../openssl}/crypto/evp/pmeth_fn.c | 0 .../openssl}/crypto/evp/pmeth_gn.c | 0 .../openssl}/crypto/evp/pmeth_lib.c | 0 .../openssl}/crypto/ex_data.c | 0 .../openssl}/crypto/fips_err.h | 0 .../openssl}/crypto/fips_ers.c | 0 .../openssl}/crypto/hmac/hm_ameth.c | 0 .../openssl}/crypto/hmac/hm_pmeth.c | 0 .../openssl}/crypto/hmac/hmac.c | 0 .../openssl}/crypto/idea/i_cbc.c | 0 .../openssl}/crypto/idea/i_cfb64.c | 0 .../openssl}/crypto/idea/i_ecb.c | 0 .../openssl}/crypto/idea/i_ofb64.c | 0 .../openssl}/crypto/idea/i_skey.c | 0 .../openssl}/crypto/idea/idea_lcl.h | 0 .../openssl}/crypto/idea/idea_spd.c | 0 .../openssl}/crypto/idea/version | 0 .../openssl}/crypto/install-crypto.com | 0 .../openssl}/crypto/jpake/jpake.c | 0 .../openssl}/crypto/jpake/jpake.h | 0 .../openssl}/crypto/jpake/jpake_err.c | 0 .../openssl}/crypto/krb5/krb5_asn.c | 0 .../openssl}/crypto/lhash/lh_stats.c | 0 .../openssl}/crypto/lhash/lhash.c | 0 .../openssl}/crypto/md2/md2.c | 0 .../openssl}/crypto/md2/md2.h | 0 .../openssl}/crypto/md2/md2_dgst.c | 0 .../openssl}/crypto/md2/md2_one.c | 0 .../openssl}/crypto/md32_common.h | 0 .../openssl}/crypto/md4/md4.c | 0 .../openssl}/crypto/md4/md4_dgst.c | 0 .../openssl}/crypto/md4/md4_locl.h | 0 .../openssl}/crypto/md4/md4_one.c | 0 .../openssl}/crypto/md4/md4s.cpp | 0 .../openssl}/crypto/md5/md5.c | 0 .../openssl}/crypto/md5/md5_dgst.c | 0 .../openssl}/crypto/md5/md5_locl.h | 0 .../openssl}/crypto/md5/md5_one.c | 0 .../openssl}/crypto/md5/md5s.cpp | 0 .../openssl}/crypto/mdc2/mdc2_one.c | 0 .../openssl}/crypto/mdc2/mdc2dgst.c | 0 .../openssl}/crypto/mem.c | 0 .../openssl}/crypto/mem_clr.c | 0 .../openssl}/crypto/mem_dbg.c | 0 .../openssl}/crypto/modes/cbc128.c | 0 .../openssl}/crypto/modes/ccm128.c | 0 .../openssl}/crypto/modes/cfb128.c | 0 .../openssl}/crypto/modes/ctr128.c | 0 .../openssl}/crypto/modes/cts128.c | 0 .../openssl}/crypto/modes/gcm128.c | 0 .../openssl}/crypto/modes/modes_lcl.h | 0 .../openssl}/crypto/modes/ofb128.c | 0 .../openssl}/crypto/modes/wrap128.c | 0 .../openssl}/crypto/modes/xts128.c | 0 .../openssl}/crypto/o_dir.c | 0 .../openssl}/crypto/o_dir.h | 0 .../openssl}/crypto/o_fips.c | 0 .../openssl}/crypto/o_init.c | 0 .../openssl}/crypto/o_str.c | 0 .../openssl}/crypto/o_str.h | 0 .../openssl}/crypto/o_time.c | 0 .../openssl}/crypto/o_time.h | 0 .../openssl}/crypto/objects/o_names.c | 0 .../openssl}/crypto/objects/obj_dat.c | 0 .../openssl}/crypto/objects/obj_dat.h | 0 .../openssl}/crypto/objects/obj_err.c | 0 .../openssl}/crypto/objects/obj_lib.c | 0 .../openssl}/crypto/objects/obj_mac.num | 0 .../openssl}/crypto/objects/obj_xref.c | 0 .../openssl}/crypto/objects/obj_xref.h | 0 .../openssl}/crypto/objects/obj_xref.txt | 0 .../openssl}/crypto/objects/objects.README | 0 .../openssl}/crypto/objects/objects.txt | 0 .../openssl}/crypto/ocsp/ocsp_asn.c | 0 .../openssl}/crypto/ocsp/ocsp_cl.c | 0 .../openssl}/crypto/ocsp/ocsp_err.c | 0 .../openssl}/crypto/ocsp/ocsp_ext.c | 0 .../openssl}/crypto/ocsp/ocsp_ht.c | 0 .../openssl}/crypto/ocsp/ocsp_lib.c | 0 .../openssl}/crypto/ocsp/ocsp_prn.c | 0 .../openssl}/crypto/ocsp/ocsp_srv.c | 0 .../openssl}/crypto/ocsp/ocsp_vfy.c | 0 .../openssl}/crypto/opensslconf.h.in | 0 .../openssl}/crypto/pem/message | 0 .../openssl}/crypto/pem/pem_all.c | 0 .../openssl}/crypto/pem/pem_err.c | 0 .../openssl}/crypto/pem/pem_info.c | 0 .../openssl}/crypto/pem/pem_lib.c | 0 .../openssl}/crypto/pem/pem_oth.c | 0 .../openssl}/crypto/pem/pem_pk8.c | 0 .../openssl}/crypto/pem/pem_pkey.c | 0 .../openssl}/crypto/pem/pem_seal.c | 0 .../openssl}/crypto/pem/pem_sign.c | 0 .../openssl}/crypto/pem/pem_x509.c | 0 .../openssl}/crypto/pem/pem_xaux.c | 0 .../openssl}/crypto/pem/pkcs7.lis | 0 .../openssl}/crypto/pem/pvkfmt.c | 0 .../openssl}/crypto/perlasm/readme | 0 .../openssl}/crypto/pkcs12/p12_add.c | 0 .../openssl}/crypto/pkcs12/p12_asn.c | 0 .../openssl}/crypto/pkcs12/p12_attr.c | 0 .../openssl}/crypto/pkcs12/p12_crpt.c | 0 .../openssl}/crypto/pkcs12/p12_crt.c | 0 .../openssl}/crypto/pkcs12/p12_decr.c | 0 .../openssl}/crypto/pkcs12/p12_init.c | 0 .../openssl}/crypto/pkcs12/p12_key.c | 0 .../openssl}/crypto/pkcs12/p12_kiss.c | 0 .../openssl}/crypto/pkcs12/p12_mutl.c | 0 .../openssl}/crypto/pkcs12/p12_npas.c | 0 .../openssl}/crypto/pkcs12/p12_p8d.c | 0 .../openssl}/crypto/pkcs12/p12_p8e.c | 0 .../openssl}/crypto/pkcs12/p12_utl.c | 0 .../openssl}/crypto/pkcs12/pk12err.c | 0 .../openssl}/crypto/pkcs7/bio_pk7.c | 0 .../openssl}/crypto/pkcs7/pk7_asn1.c | 0 .../openssl}/crypto/pkcs7/pk7_attr.c | 0 .../openssl}/crypto/pkcs7/pk7_dgst.c | 0 .../openssl}/crypto/pkcs7/pk7_doit.c | 0 .../openssl}/crypto/pkcs7/pk7_enc.c | 0 .../openssl}/crypto/pkcs7/pk7_lib.c | 0 .../openssl}/crypto/pkcs7/pk7_mime.c | 0 .../openssl}/crypto/pkcs7/pk7_smime.c | 0 .../openssl}/crypto/pkcs7/pkcs7err.c | 0 .../openssl}/crypto/ppc_arch.h | 0 .../openssl}/crypto/ppccap.c | 0 .../openssl}/crypto/pqueue/pqueue.c | 0 .../openssl}/crypto/rand/md_rand.c | 0 .../openssl}/crypto/rand/rand_egd.c | 0 .../openssl}/crypto/rand/rand_err.c | 0 .../openssl}/crypto/rand/rand_lcl.h | 0 .../openssl}/crypto/rand/rand_lib.c | 0 .../openssl}/crypto/rand/rand_nw.c | 0 .../openssl}/crypto/rand/rand_os2.c | 0 .../openssl}/crypto/rand/rand_unix.c | 0 .../openssl}/crypto/rand/rand_vms.c | 0 .../openssl}/crypto/rand/rand_win.c | 0 .../openssl}/crypto/rand/randfile.c | 0 .../openssl}/crypto/rc2/rc2_cbc.c | 0 .../openssl}/crypto/rc2/rc2_ecb.c | 0 .../openssl}/crypto/rc2/rc2_locl.h | 0 .../openssl}/crypto/rc2/rc2_skey.c | 0 .../openssl}/crypto/rc2/rc2cfb64.c | 0 .../openssl}/crypto/rc2/rc2ofb64.c | 0 .../openssl}/crypto/rc2/rc2speed.c | 0 .../openssl}/crypto/rc2/rrc2.doc | 0 .../openssl}/crypto/rc2/tab.c | 0 .../openssl}/crypto/rc2/version | 0 .../openssl}/crypto/rc4/rc4.c | 0 .../openssl}/crypto/rc4/rc4_enc.c | 0 .../openssl}/crypto/rc4/rc4_locl.h | 0 .../openssl}/crypto/rc4/rc4_skey.c | 0 .../openssl}/crypto/rc4/rc4_utl.c | 0 .../openssl}/crypto/rc4/rc4s.cpp | 0 .../openssl}/crypto/rc4/rc4speed.c | 0 .../openssl}/crypto/rc4/rrc4.doc | 0 .../openssl}/crypto/rc5/rc5.h | 0 .../openssl}/crypto/rc5/rc5_ecb.c | 0 .../openssl}/crypto/rc5/rc5_enc.c | 0 .../openssl}/crypto/rc5/rc5_locl.h | 0 .../openssl}/crypto/rc5/rc5_skey.c | 0 .../openssl}/crypto/rc5/rc5cfb64.c | 0 .../openssl}/crypto/rc5/rc5ofb64.c | 0 .../openssl}/crypto/rc5/rc5s.cpp | 0 .../openssl}/crypto/rc5/rc5speed.c | 0 .../openssl}/crypto/ripemd/README | 0 .../openssl}/crypto/ripemd/asm/rips.cpp | 0 .../openssl}/crypto/ripemd/rmd160.c | 0 .../openssl}/crypto/ripemd/rmd_dgst.c | 0 .../openssl}/crypto/ripemd/rmd_locl.h | 0 .../openssl}/crypto/ripemd/rmd_one.c | 0 .../openssl}/crypto/ripemd/rmdconst.h | 0 .../openssl}/crypto/rsa/rsa_ameth.c | 0 .../openssl}/crypto/rsa/rsa_asn1.c | 0 .../openssl}/crypto/rsa/rsa_chk.c | 0 .../openssl}/crypto/rsa/rsa_crpt.c | 0 .../openssl}/crypto/rsa/rsa_depr.c | 0 .../openssl}/crypto/rsa/rsa_eay.c | 0 .../openssl}/crypto/rsa/rsa_err.c | 0 .../openssl}/crypto/rsa/rsa_gen.c | 0 .../openssl}/crypto/rsa/rsa_lib.c | 0 .../openssl}/crypto/rsa/rsa_locl.h | 0 .../openssl}/crypto/rsa/rsa_none.c | 0 .../openssl}/crypto/rsa/rsa_null.c | 0 .../openssl}/crypto/rsa/rsa_oaep.c | 0 .../openssl}/crypto/rsa/rsa_pk1.c | 0 .../openssl}/crypto/rsa/rsa_pmeth.c | 0 .../openssl}/crypto/rsa/rsa_prn.c | 0 .../openssl}/crypto/rsa/rsa_pss.c | 0 .../openssl}/crypto/rsa/rsa_saos.c | 0 .../openssl}/crypto/rsa/rsa_sign.c | 0 .../openssl}/crypto/rsa/rsa_ssl.c | 0 .../openssl}/crypto/rsa/rsa_x931.c | 0 .../openssl}/crypto/s390xcap.c | 0 .../openssl}/crypto/seed/seed.c | 0 .../openssl}/crypto/seed/seed_cbc.c | 0 .../openssl}/crypto/seed/seed_cfb.c | 0 .../openssl}/crypto/seed/seed_ecb.c | 0 .../openssl}/crypto/seed/seed_locl.h | 0 .../openssl}/crypto/seed/seed_ofb.c | 0 .../openssl}/crypto/sha/asm/README | 0 .../openssl}/crypto/sha/sha.c | 0 .../openssl}/crypto/sha/sha1.c | 0 .../openssl}/crypto/sha/sha1_one.c | 0 .../openssl}/crypto/sha/sha1dgst.c | 0 .../openssl}/crypto/sha/sha256.c | 0 .../openssl}/crypto/sha/sha256t.c | 0 .../openssl}/crypto/sha/sha512.c | 0 .../openssl}/crypto/sha/sha512t.c | 0 .../openssl}/crypto/sha/sha_dgst.c | 0 .../openssl}/crypto/sha/sha_locl.h | 0 .../openssl}/crypto/sha/sha_one.c | 0 .../openssl}/crypto/sparc_arch.h | 0 .../openssl}/crypto/sparcv9cap.c | 0 .../openssl}/crypto/srp/srp_grps.h | 0 .../openssl}/crypto/srp/srp_lcl.h | 0 .../openssl}/crypto/srp/srp_lib.c | 0 .../openssl}/crypto/srp/srp_vfy.c | 0 .../openssl}/crypto/stack/stack.c | 0 .../openssl}/crypto/store/README | 0 .../openssl}/crypto/store/store.h | 0 .../openssl}/crypto/store/str_err.c | 0 .../openssl}/crypto/store/str_lib.c | 0 .../openssl}/crypto/store/str_locl.h | 0 .../openssl}/crypto/store/str_mem.c | 0 .../openssl}/crypto/store/str_meth.c | 0 .../openssl}/crypto/threads/README | 0 .../openssl}/crypto/threads/netware.bat | 0 .../openssl}/crypto/threads/profile.sh | 0 .../openssl}/crypto/threads/ptest.bat | 0 .../openssl}/crypto/threads/pthread.sh | 0 .../openssl}/crypto/threads/pthread2.sh | 0 .../openssl}/crypto/threads/pthreads-vms.com | 0 .../openssl}/crypto/threads/purify.sh | 0 .../openssl}/crypto/threads/solaris.sh | 0 .../openssl}/crypto/threads/th-lock.c | 0 .../openssl}/crypto/threads/win32.bat | 0 .../openssl}/crypto/ts/ts_asn1.c | 0 .../openssl}/crypto/ts/ts_conf.c | 0 .../openssl}/crypto/ts/ts_err.c | 0 .../openssl}/crypto/ts/ts_lib.c | 0 .../openssl}/crypto/ts/ts_req_print.c | 0 .../openssl}/crypto/ts/ts_req_utils.c | 0 .../openssl}/crypto/ts/ts_rsp_print.c | 0 .../openssl}/crypto/ts/ts_rsp_sign.c | 0 .../openssl}/crypto/ts/ts_rsp_utils.c | 0 .../openssl}/crypto/ts/ts_rsp_verify.c | 0 .../openssl}/crypto/ts/ts_verify_ctx.c | 0 .../openssl}/crypto/txt_db/txt_db.c | 0 .../openssl}/crypto/ui/ui_compat.c | 0 .../openssl}/crypto/ui/ui_err.c | 0 .../openssl}/crypto/ui/ui_lib.c | 0 .../openssl}/crypto/ui/ui_locl.h | 0 .../openssl}/crypto/ui/ui_openssl.c | 0 .../openssl}/crypto/ui/ui_util.c | 0 .../openssl}/crypto/uid.c | 0 .../openssl}/crypto/vms_rms.h | 0 .../openssl}/crypto/whrlpool/wp_block.c | 0 .../openssl}/crypto/whrlpool/wp_dgst.c | 0 .../openssl}/crypto/whrlpool/wp_locl.h | 0 .../openssl}/crypto/x509/by_dir.c | 0 .../openssl}/crypto/x509/by_file.c | 0 .../openssl}/crypto/x509/vpm_int.h | 0 .../openssl}/crypto/x509/x509_att.c | 0 .../openssl}/crypto/x509/x509_cmp.c | 0 .../openssl}/crypto/x509/x509_d2.c | 0 .../openssl}/crypto/x509/x509_def.c | 0 .../openssl}/crypto/x509/x509_err.c | 0 .../openssl}/crypto/x509/x509_ext.c | 0 .../openssl}/crypto/x509/x509_lu.c | 0 .../openssl}/crypto/x509/x509_obj.c | 0 .../openssl}/crypto/x509/x509_r2x.c | 0 .../openssl}/crypto/x509/x509_req.c | 0 .../openssl}/crypto/x509/x509_set.c | 0 .../openssl}/crypto/x509/x509_trs.c | 0 .../openssl}/crypto/x509/x509_txt.c | 0 .../openssl}/crypto/x509/x509_v3.c | 0 .../openssl}/crypto/x509/x509_vfy.c | 0 .../openssl}/crypto/x509/x509_vpm.c | 0 .../openssl}/crypto/x509/x509cset.c | 0 .../openssl}/crypto/x509/x509name.c | 0 .../openssl}/crypto/x509/x509rset.c | 0 .../openssl}/crypto/x509/x509spki.c | 0 .../openssl}/crypto/x509/x509type.c | 0 .../openssl}/crypto/x509/x_all.c | 0 .../openssl}/crypto/x509v3/ext_dat.h | 0 .../openssl}/crypto/x509v3/pcy_cache.c | 0 .../openssl}/crypto/x509v3/pcy_data.c | 0 .../openssl}/crypto/x509v3/pcy_int.h | 0 .../openssl}/crypto/x509v3/pcy_lib.c | 0 .../openssl}/crypto/x509v3/pcy_map.c | 0 .../openssl}/crypto/x509v3/pcy_node.c | 0 .../openssl}/crypto/x509v3/pcy_tree.c | 0 .../openssl}/crypto/x509v3/v3_addr.c | 0 .../openssl}/crypto/x509v3/v3_akey.c | 0 .../openssl}/crypto/x509v3/v3_akeya.c | 0 .../openssl}/crypto/x509v3/v3_alt.c | 0 .../openssl}/crypto/x509v3/v3_asid.c | 0 .../openssl}/crypto/x509v3/v3_bcons.c | 0 .../openssl}/crypto/x509v3/v3_bitst.c | 0 .../openssl}/crypto/x509v3/v3_conf.c | 0 .../openssl}/crypto/x509v3/v3_cpols.c | 0 .../openssl}/crypto/x509v3/v3_crld.c | 0 .../openssl}/crypto/x509v3/v3_enum.c | 0 .../openssl}/crypto/x509v3/v3_extku.c | 0 .../openssl}/crypto/x509v3/v3_genn.c | 0 .../openssl}/crypto/x509v3/v3_ia5.c | 0 .../openssl}/crypto/x509v3/v3_info.c | 0 .../openssl}/crypto/x509v3/v3_int.c | 0 .../openssl}/crypto/x509v3/v3_lib.c | 0 .../openssl}/crypto/x509v3/v3_ncons.c | 0 .../openssl}/crypto/x509v3/v3_ocsp.c | 0 .../openssl}/crypto/x509v3/v3_pci.c | 0 .../openssl}/crypto/x509v3/v3_pcia.c | 0 .../openssl}/crypto/x509v3/v3_pcons.c | 0 .../openssl}/crypto/x509v3/v3_pku.c | 0 .../openssl}/crypto/x509v3/v3_pmaps.c | 0 .../openssl}/crypto/x509v3/v3_prn.c | 0 .../openssl}/crypto/x509v3/v3_purp.c | 0 .../openssl}/crypto/x509v3/v3_scts.c | 0 .../openssl}/crypto/x509v3/v3_skey.c | 0 .../openssl}/crypto/x509v3/v3_sxnet.c | 0 .../openssl}/crypto/x509v3/v3_utl.c | 0 .../openssl}/crypto/x509v3/v3conf.c | 0 .../openssl}/crypto/x509v3/v3err.c | 0 .../openssl}/crypto/x509v3/v3prin.c | 0 .../openssl}/e_os.h | 0 .../openssl}/openssl/aes.h | 0 .../openssl}/openssl/asn1.h | 0 .../openssl}/openssl/asn1_mac.h | 0 .../openssl}/openssl/asn1t.h | 0 .../openssl}/openssl/bio.h | 0 .../openssl}/openssl/blowfish.h | 0 .../openssl}/openssl/bn.h | 0 .../openssl}/openssl/buffer.h | 0 .../openssl}/openssl/camellia.h | 0 .../openssl}/openssl/cast.h | 0 .../openssl}/openssl/cmac.h | 0 .../openssl}/openssl/cms.h | 0 .../openssl}/openssl/comp.h | 0 .../openssl}/openssl/conf.h | 0 .../openssl}/openssl/conf_api.h | 0 .../openssl}/openssl/crypto.h | 0 .../openssl}/openssl/des.h | 0 .../openssl}/openssl/des_old.h | 0 .../openssl}/openssl/dh.h | 0 .../openssl}/openssl/dsa.h | 0 .../openssl}/openssl/dso.h | 0 .../openssl}/openssl/dtls1.h | 0 .../openssl}/openssl/e_os2.h | 0 .../openssl}/openssl/ebcdic.h | 0 .../openssl}/openssl/ec.h | 0 .../openssl}/openssl/ecdh.h | 0 .../openssl}/openssl/ecdsa.h | 0 .../openssl}/openssl/engine.h | 0 .../openssl}/openssl/err.h | 0 .../openssl}/openssl/evp.h | 0 .../openssl}/openssl/hmac.h | 0 .../openssl}/openssl/idea.h | 0 .../openssl}/openssl/krb5_asn.h | 0 .../openssl}/openssl/kssl.h | 0 .../openssl}/openssl/lhash.h | 0 .../openssl}/openssl/md4.h | 0 .../openssl}/openssl/md5.h | 0 .../openssl}/openssl/mdc2.h | 0 .../openssl}/openssl/modes.h | 0 .../openssl}/openssl/obj_mac.h | 0 .../openssl}/openssl/objects.h | 0 .../openssl}/openssl/ocsp.h | 0 .../openssl}/openssl/opensslconf.h | 0 .../openssl}/openssl/opensslv.h | 0 .../openssl}/openssl/ossl_typ.h | 0 .../openssl}/openssl/pem.h | 0 .../openssl}/openssl/pem2.h | 0 .../openssl}/openssl/pkcs12.h | 0 .../openssl}/openssl/pkcs7.h | 0 .../openssl}/openssl/pqueue.h | 0 .../openssl}/openssl/rand.h | 0 .../openssl}/openssl/rc2.h | 0 .../openssl}/openssl/rc4.h | 0 .../openssl}/openssl/ripemd.h | 0 .../openssl}/openssl/rsa.h | 0 .../openssl}/openssl/safestack.h | 0 .../openssl}/openssl/seed.h | 0 .../openssl}/openssl/sha.h | 0 .../openssl}/openssl/srp.h | 0 .../openssl}/openssl/srtp.h | 0 .../openssl}/openssl/ssl.h | 0 .../openssl}/openssl/ssl2.h | 0 .../openssl}/openssl/ssl23.h | 0 .../openssl}/openssl/ssl3.h | 0 .../openssl}/openssl/stack.h | 0 .../openssl}/openssl/symhacks.h | 0 .../openssl}/openssl/tls1.h | 0 .../openssl}/openssl/ts.h | 0 .../openssl}/openssl/txt_db.h | 0 .../openssl}/openssl/ui.h | 0 .../openssl}/openssl/ui_compat.h | 0 .../openssl}/openssl/whrlpool.h | 0 .../openssl}/openssl/x509.h | 0 .../openssl}/openssl/x509_vfy.h | 0 .../openssl}/openssl/x509v3.h | 0 .../openssl}/ssl/bio_ssl.c | 0 .../openssl}/ssl/d1_both.c | 0 .../openssl}/ssl/d1_clnt.c | 0 .../openssl}/ssl/d1_lib.c | 0 .../openssl}/ssl/d1_meth.c | 0 .../openssl}/ssl/d1_pkt.c | 0 .../openssl}/ssl/d1_srtp.c | 0 .../openssl}/ssl/d1_srvr.c | 0 .../openssl}/ssl/install-ssl.com | 0 .../openssl}/ssl/kssl.c | 0 .../openssl}/ssl/kssl_lcl.h | 0 .../openssl}/ssl/s23_clnt.c | 0 .../openssl}/ssl/s23_lib.c | 0 .../openssl}/ssl/s23_meth.c | 0 .../openssl}/ssl/s23_pkt.c | 0 .../openssl}/ssl/s23_srvr.c | 0 .../openssl}/ssl/s2_clnt.c | 0 .../openssl}/ssl/s2_enc.c | 0 .../openssl}/ssl/s2_lib.c | 0 .../openssl}/ssl/s2_meth.c | 0 .../openssl}/ssl/s2_pkt.c | 0 .../openssl}/ssl/s2_srvr.c | 0 .../openssl}/ssl/s3_both.c | 0 .../openssl}/ssl/s3_cbc.c | 0 .../openssl}/ssl/s3_clnt.c | 0 .../openssl}/ssl/s3_enc.c | 0 .../openssl}/ssl/s3_lib.c | 0 .../openssl}/ssl/s3_meth.c | 0 .../openssl}/ssl/s3_pkt.c | 0 .../openssl}/ssl/s3_srvr.c | 0 .../openssl}/ssl/ssl-lib.com | 0 .../openssl}/ssl/ssl_algs.c | 0 .../openssl}/ssl/ssl_asn1.c | 0 .../openssl}/ssl/ssl_cert.c | 0 .../openssl}/ssl/ssl_ciph.c | 0 .../openssl}/ssl/ssl_conf.c | 0 .../openssl}/ssl/ssl_err.c | 0 .../openssl}/ssl/ssl_err2.c | 0 .../openssl}/ssl/ssl_lib.c | 0 .../openssl}/ssl/ssl_locl.h | 0 .../openssl}/ssl/ssl_rsa.c | 0 .../openssl}/ssl/ssl_sess.c | 0 .../openssl}/ssl/ssl_stat.c | 0 .../openssl}/ssl/ssl_task.c | 0 .../openssl}/ssl/ssl_txt.c | 0 .../openssl}/ssl/ssl_utst.c | 0 .../openssl}/ssl/t1_clnt.c | 0 .../openssl}/ssl/t1_enc.c | 0 .../openssl}/ssl/t1_ext.c | 0 .../openssl}/ssl/t1_lib.c | 0 .../openssl}/ssl/t1_meth.c | 0 .../openssl}/ssl/t1_reneg.c | 0 .../openssl}/ssl/t1_srvr.c | 0 .../openssl}/ssl/t1_trce.c | 0 .../openssl}/ssl/tls_srp.c | 0 .../openssl}/winrt.cpp | 0 .../openssl}/winrt_fix.patch | 0 960 files changed, 839 insertions(+), 737 deletions(-) delete mode 100644 drivers/builtin_openssl2/SCsub delete mode 100644 drivers/openssl/SCsub create mode 100644 modules/openssl/SCsub create mode 100644 modules/openssl/config.py rename {drivers => modules}/openssl/curl_hostcheck.c (99%) rename {drivers => modules}/openssl/curl_hostcheck.h (97%) rename drivers/openssl/register_openssl.cpp => modules/openssl/register_types.cpp (92%) rename drivers/openssl/register_openssl.h => modules/openssl/register_types.h (89%) rename {drivers => modules}/openssl/stream_peer_openssl.cpp (99%) rename {drivers => modules}/openssl/stream_peer_openssl.h (99%) create mode 100644 thirdparty/openssl/LICENSE rename {drivers/builtin_openssl2 => thirdparty/openssl}/buildinf.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/LPdir_nyi.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/LPdir_unix.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/LPdir_vms.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/LPdir_win.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/LPdir_win32.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/LPdir_wince.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/aes/README (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/aes/aes_cbc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/aes/aes_cfb.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/aes/aes_core.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/aes/aes_ctr.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/aes/aes_ecb.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/aes/aes_ige.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/aes/aes_locl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/aes/aes_misc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/aes/aes_ofb.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/aes/aes_wrap.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/aes/aes_x86core.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/arm_arch.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/armcap.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/a_bitstr.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/a_bool.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/a_bytes.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/a_d2i_fp.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/a_digest.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/a_dup.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/a_enum.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/a_gentm.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/a_i2d_fp.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/a_int.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/a_mbstr.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/a_object.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/a_octet.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/a_print.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/a_set.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/a_sign.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/a_strex.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/a_strnid.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/a_time.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/a_type.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/a_utctm.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/a_utf8.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/a_verify.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/ameth_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/asn1_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/asn1_gen.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/asn1_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/asn1_locl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/asn1_par.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/asn_mime.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/asn_moid.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/asn_pack.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/bio_asn1.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/bio_ndef.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/charmap.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/d2i_pr.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/d2i_pu.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/evp_asn1.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/f_enum.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/f_int.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/f_string.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/i2d_pr.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/i2d_pu.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/n_pkey.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/nsseq.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/p5_pbe.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/p5_pbev2.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/p8_pkey.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/t_bitst.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/t_crl.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/t_pkey.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/t_req.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/t_spki.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/t_x509.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/t_x509a.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/tasn_dec.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/tasn_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/tasn_fre.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/tasn_new.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/tasn_prn.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/tasn_typ.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/tasn_utl.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/x_algor.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/x_attrib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/x_bignum.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/x_crl.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/x_exten.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/x_info.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/x_long.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/x_name.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/x_nx509.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/x_pkey.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/x_pubkey.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/x_req.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/x_sig.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/x_spki.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/x_val.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/x_x509.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/asn1/x_x509a.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bf/COPYRIGHT (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bf/INSTALL (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bf/README (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bf/VERSION (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bf/asm/readme (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bf/bf_cbc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bf/bf_cfb64.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bf/bf_ecb.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bf/bf_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bf/bf_locl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bf/bf_ofb64.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bf/bf_opts.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bf/bf_pi.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bf/bf_skey.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bf/bfs.cpp (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bf/bfspeed.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bio/b_dump.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bio/b_print.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bio/b_sock.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bio/bf_buff.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bio/bf_lbuf.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bio/bf_nbio.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bio/bf_null.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bio/bio_cb.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bio/bio_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bio/bio_lcl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bio/bio_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bio/bss_acpt.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bio/bss_bio.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bio/bss_conn.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bio/bss_dgram.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bio/bss_fd.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bio/bss_file.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bio/bss_log.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bio/bss_mem.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bio/bss_null.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bio/bss_rtcp.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bio/bss_sock.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/asm/README (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/asm/vms.mar (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/asm/x86/f (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/asm/x86_64-gcc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn.mul (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_add.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_asm.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_blind.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_const.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_ctx.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_depr.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_div.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_exp.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_exp2.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_gcd.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_gf2m.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_kron.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_lcl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_mod.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_mont.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_mpi.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_mul.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_nist.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_prime.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_prime.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_print.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_rand.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_recp.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_shift.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_sqr.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_sqrt.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_word.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bn_x931p.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/bnspeed.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/exp.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/expspeed.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/rsaz_exp.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/rsaz_exp.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/todo (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/bn/vms-helper.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/buffer/buf_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/buffer/buf_str.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/buffer/buffer.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/camellia/camellia.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/camellia/cmll_cbc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/camellia/cmll_cfb.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/camellia/cmll_ctr.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/camellia/cmll_ecb.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/camellia/cmll_locl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/camellia/cmll_misc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/camellia/cmll_ofb.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/camellia/cmll_utl.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cast/asm/readme (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cast/c_cfb64.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cast/c_ecb.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cast/c_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cast/c_ofb64.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cast/c_skey.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cast/cast_lcl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cast/cast_s.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cast/cast_spd.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cast/castopts.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cast/casts.cpp (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cmac/cm_ameth.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cmac/cm_pmeth.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cmac/cmac.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cms/cms_asn1.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cms/cms_att.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cms/cms_cd.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cms/cms_dd.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cms/cms_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cms/cms_env.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cms/cms_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cms/cms_ess.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cms/cms_io.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cms/cms_kari.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cms/cms_lcl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cms/cms_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cms/cms_pwri.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cms/cms_sd.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cms/cms_smime.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/comp/c_rle.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/comp/c_zlib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/comp/comp_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/comp/comp_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/conf/README (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/conf/cnf_save.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/conf/conf_api.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/conf/conf_def.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/conf/conf_def.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/conf/conf_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/conf/conf_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/conf/conf_mall.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/conf/conf_mod.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/conf/conf_sap.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/conf/ssleay.cnf (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/constant_time_locl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cpt_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cryptlib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cryptlib.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/crypto-lib.com (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/cversion.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/COPYRIGHT (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/DES.pm (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/DES.xs (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/FILES0 (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/INSTALL (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/Imakefile (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/KERBEROS (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/README (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/VERSION (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/asm/des_enc.m4 (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/asm/readme (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/cbc3_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/cbc_cksm.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/cbc_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/cfb64ede.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/cfb64enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/cfb_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/des-lib.com (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/des.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/des3s.cpp (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/des_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/des_locl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/des_old.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/des_old2.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/des_opts.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/des_ver.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/dess.cpp (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/ecb3_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/ecb_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/ede_cbcm_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/enc_read.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/enc_writ.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/fcrypt.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/fcrypt_b.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/makefile.bc (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/ncbc_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/ofb64ede.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/ofb64enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/ofb_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/options.txt (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/pcbc_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/qud_cksm.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/rand_key.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/read2pwd.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/read_pwd.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/rpc_des.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/rpc_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/rpw.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/set_key.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/speed.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/spr.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/str2key.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/t/test (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/times/486-50.sol (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/times/586-100.lnx (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/times/686-200.fre (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/times/aix.cc (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/times/alpha.cc (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/times/hpux.cc (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/times/sparc.gcc (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/times/usparc.cc (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/typemap (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/des/xcbc_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dh/dh1024.pem (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dh/dh192.pem (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dh/dh2048.pem (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dh/dh4096.pem (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dh/dh512.pem (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dh/dh_ameth.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dh/dh_asn1.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dh/dh_check.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dh/dh_depr.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dh/dh_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dh/dh_gen.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dh/dh_kdf.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dh/dh_key.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dh/dh_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dh/dh_pmeth.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dh/dh_prn.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dh/dh_rfc5114.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dh/example (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dh/generate (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dh/p1024.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dh/p192.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dh/p512.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dsa/README (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dsa/dsa_ameth.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dsa/dsa_asn1.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dsa/dsa_depr.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dsa/dsa_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dsa/dsa_gen.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dsa/dsa_key.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dsa/dsa_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dsa/dsa_locl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dsa/dsa_ossl.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dsa/dsa_pmeth.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dsa/dsa_prn.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dsa/dsa_sign.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dsa/dsa_vrf.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dsa/dsagen.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dsa/fips186a.txt (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dso/README (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dso/dso_beos.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dso/dso_dl.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dso/dso_dlfcn.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dso/dso_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dso/dso_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dso/dso_null.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dso/dso_openssl.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dso/dso_vms.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/dso/dso_win32.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ebcdic.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ec2_mult.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ec2_oct.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ec2_smpl.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ec_ameth.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ec_asn1.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ec_check.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ec_curve.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ec_cvt.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ec_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ec_key.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ec_lcl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ec_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ec_mult.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ec_oct.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ec_pmeth.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ec_print.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/eck_prn.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ecp_mont.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ecp_nist.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ecp_nistp224.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ecp_nistp256.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ecp_nistp521.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ecp_nistputil.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ecp_nistz256.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ecp_nistz256_table.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ecp_oct.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ec/ecp_smpl.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ecdh/ech_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ecdh/ech_kdf.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ecdh/ech_key.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ecdh/ech_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ecdh/ech_locl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ecdh/ech_ossl.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ecdsa/ecs_asn1.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ecdsa/ecs_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ecdsa/ecs_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ecdsa/ecs_locl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ecdsa/ecs_ossl.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ecdsa/ecs_sign.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ecdsa/ecs_vrf.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/README (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/eng_all.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/eng_cnf.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/eng_cryptodev.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/eng_ctrl.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/eng_dyn.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/eng_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/eng_fat.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/eng_init.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/eng_int.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/eng_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/eng_list.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/eng_openssl.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/eng_pkey.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/eng_rdrand.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/eng_table.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/tb_asnmth.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/tb_cipher.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/tb_dh.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/tb_digest.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/tb_dsa.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/tb_ecdh.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/tb_ecdsa.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/tb_pkmeth.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/tb_rand.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/tb_rsa.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/engine/tb_store.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/err/err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/err/err_all.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/err/err_prn.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/err/openssl.ec (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/bio_b64.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/bio_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/bio_md.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/bio_ok.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/c_all.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/c_allc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/c_alld.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/digest.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/e_aes.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/e_aes_cbc_hmac_sha1.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/e_aes_cbc_hmac_sha256.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/e_bf.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/e_camellia.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/e_cast.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/e_des.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/e_des3.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/e_dsa.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/e_idea.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/e_null.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/e_old.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/e_rc2.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/e_rc4.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/e_rc4_hmac_md5.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/e_rc5.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/e_seed.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/e_xcbc_d.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/encode.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/evp_acnf.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/evp_cnf.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/evp_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/evp_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/evp_key.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/evp_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/evp_locl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/evp_pbe.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/evp_pkey.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/evptests.txt (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/m_dss.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/m_dss1.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/m_ecdsa.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/m_md2.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/m_md4.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/m_md5.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/m_mdc2.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/m_null.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/m_ripemd.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/m_sha.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/m_sha1.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/m_sigver.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/m_wp.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/names.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/openbsd_hw.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/p5_crpt.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/p5_crpt2.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/p_dec.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/p_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/p_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/p_open.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/p_seal.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/p_sign.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/p_verify.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/pmeth_fn.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/pmeth_gn.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/evp/pmeth_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ex_data.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/fips_err.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/fips_ers.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/hmac/hm_ameth.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/hmac/hm_pmeth.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/hmac/hmac.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/idea/i_cbc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/idea/i_cfb64.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/idea/i_ecb.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/idea/i_ofb64.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/idea/i_skey.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/idea/idea_lcl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/idea/idea_spd.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/idea/version (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/install-crypto.com (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/jpake/jpake.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/jpake/jpake.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/jpake/jpake_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/krb5/krb5_asn.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/lhash/lh_stats.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/lhash/lhash.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/md2/md2.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/md2/md2.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/md2/md2_dgst.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/md2/md2_one.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/md32_common.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/md4/md4.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/md4/md4_dgst.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/md4/md4_locl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/md4/md4_one.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/md4/md4s.cpp (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/md5/md5.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/md5/md5_dgst.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/md5/md5_locl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/md5/md5_one.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/md5/md5s.cpp (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/mdc2/mdc2_one.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/mdc2/mdc2dgst.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/mem.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/mem_clr.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/mem_dbg.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/modes/cbc128.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/modes/ccm128.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/modes/cfb128.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/modes/ctr128.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/modes/cts128.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/modes/gcm128.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/modes/modes_lcl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/modes/ofb128.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/modes/wrap128.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/modes/xts128.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/o_dir.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/o_dir.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/o_fips.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/o_init.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/o_str.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/o_str.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/o_time.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/o_time.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/objects/o_names.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/objects/obj_dat.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/objects/obj_dat.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/objects/obj_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/objects/obj_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/objects/obj_mac.num (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/objects/obj_xref.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/objects/obj_xref.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/objects/obj_xref.txt (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/objects/objects.README (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/objects/objects.txt (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ocsp/ocsp_asn.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ocsp/ocsp_cl.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ocsp/ocsp_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ocsp/ocsp_ext.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ocsp/ocsp_ht.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ocsp/ocsp_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ocsp/ocsp_prn.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ocsp/ocsp_srv.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ocsp/ocsp_vfy.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/opensslconf.h.in (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pem/message (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pem/pem_all.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pem/pem_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pem/pem_info.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pem/pem_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pem/pem_oth.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pem/pem_pk8.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pem/pem_pkey.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pem/pem_seal.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pem/pem_sign.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pem/pem_x509.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pem/pem_xaux.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pem/pkcs7.lis (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pem/pvkfmt.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/perlasm/readme (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs12/p12_add.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs12/p12_asn.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs12/p12_attr.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs12/p12_crpt.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs12/p12_crt.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs12/p12_decr.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs12/p12_init.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs12/p12_key.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs12/p12_kiss.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs12/p12_mutl.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs12/p12_npas.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs12/p12_p8d.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs12/p12_p8e.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs12/p12_utl.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs12/pk12err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs7/bio_pk7.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs7/pk7_asn1.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs7/pk7_attr.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs7/pk7_dgst.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs7/pk7_doit.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs7/pk7_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs7/pk7_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs7/pk7_mime.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs7/pk7_smime.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pkcs7/pkcs7err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ppc_arch.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ppccap.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/pqueue/pqueue.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rand/md_rand.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rand/rand_egd.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rand/rand_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rand/rand_lcl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rand/rand_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rand/rand_nw.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rand/rand_os2.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rand/rand_unix.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rand/rand_vms.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rand/rand_win.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rand/randfile.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc2/rc2_cbc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc2/rc2_ecb.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc2/rc2_locl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc2/rc2_skey.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc2/rc2cfb64.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc2/rc2ofb64.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc2/rc2speed.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc2/rrc2.doc (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc2/tab.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc2/version (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc4/rc4.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc4/rc4_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc4/rc4_locl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc4/rc4_skey.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc4/rc4_utl.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc4/rc4s.cpp (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc4/rc4speed.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc4/rrc4.doc (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc5/rc5.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc5/rc5_ecb.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc5/rc5_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc5/rc5_locl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc5/rc5_skey.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc5/rc5cfb64.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc5/rc5ofb64.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc5/rc5s.cpp (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rc5/rc5speed.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ripemd/README (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ripemd/asm/rips.cpp (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ripemd/rmd160.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ripemd/rmd_dgst.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ripemd/rmd_locl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ripemd/rmd_one.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ripemd/rmdconst.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rsa/rsa_ameth.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rsa/rsa_asn1.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rsa/rsa_chk.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rsa/rsa_crpt.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rsa/rsa_depr.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rsa/rsa_eay.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rsa/rsa_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rsa/rsa_gen.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rsa/rsa_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rsa/rsa_locl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rsa/rsa_none.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rsa/rsa_null.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rsa/rsa_oaep.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rsa/rsa_pk1.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rsa/rsa_pmeth.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rsa/rsa_prn.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rsa/rsa_pss.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rsa/rsa_saos.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rsa/rsa_sign.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rsa/rsa_ssl.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/rsa/rsa_x931.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/s390xcap.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/seed/seed.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/seed/seed_cbc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/seed/seed_cfb.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/seed/seed_ecb.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/seed/seed_locl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/seed/seed_ofb.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/sha/asm/README (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/sha/sha.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/sha/sha1.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/sha/sha1_one.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/sha/sha1dgst.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/sha/sha256.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/sha/sha256t.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/sha/sha512.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/sha/sha512t.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/sha/sha_dgst.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/sha/sha_locl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/sha/sha_one.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/sparc_arch.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/sparcv9cap.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/srp/srp_grps.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/srp/srp_lcl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/srp/srp_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/srp/srp_vfy.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/stack/stack.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/store/README (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/store/store.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/store/str_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/store/str_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/store/str_locl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/store/str_mem.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/store/str_meth.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/threads/README (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/threads/netware.bat (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/threads/profile.sh (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/threads/ptest.bat (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/threads/pthread.sh (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/threads/pthread2.sh (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/threads/pthreads-vms.com (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/threads/purify.sh (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/threads/solaris.sh (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/threads/th-lock.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/threads/win32.bat (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ts/ts_asn1.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ts/ts_conf.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ts/ts_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ts/ts_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ts/ts_req_print.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ts/ts_req_utils.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ts/ts_rsp_print.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ts/ts_rsp_sign.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ts/ts_rsp_utils.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ts/ts_rsp_verify.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ts/ts_verify_ctx.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/txt_db/txt_db.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ui/ui_compat.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ui/ui_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ui/ui_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ui/ui_locl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ui/ui_openssl.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/ui/ui_util.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/uid.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/vms_rms.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/whrlpool/wp_block.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/whrlpool/wp_dgst.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/whrlpool/wp_locl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/by_dir.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/by_file.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/vpm_int.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/x509_att.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/x509_cmp.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/x509_d2.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/x509_def.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/x509_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/x509_ext.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/x509_lu.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/x509_obj.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/x509_r2x.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/x509_req.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/x509_set.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/x509_trs.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/x509_txt.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/x509_v3.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/x509_vfy.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/x509_vpm.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/x509cset.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/x509name.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/x509rset.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/x509spki.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/x509type.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509/x_all.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/ext_dat.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/pcy_cache.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/pcy_data.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/pcy_int.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/pcy_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/pcy_map.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/pcy_node.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/pcy_tree.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_addr.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_akey.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_akeya.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_alt.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_asid.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_bcons.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_bitst.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_conf.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_cpols.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_crld.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_enum.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_extku.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_genn.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_ia5.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_info.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_int.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_ncons.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_ocsp.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_pci.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_pcia.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_pcons.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_pku.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_pmaps.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_prn.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_purp.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_scts.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_skey.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_sxnet.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3_utl.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3conf.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/crypto/x509v3/v3prin.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/e_os.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/aes.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/asn1.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/asn1_mac.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/asn1t.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/bio.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/blowfish.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/bn.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/buffer.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/camellia.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/cast.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/cmac.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/cms.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/comp.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/conf.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/conf_api.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/crypto.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/des.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/des_old.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/dh.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/dsa.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/dso.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/dtls1.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/e_os2.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/ebcdic.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/ec.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/ecdh.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/ecdsa.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/engine.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/err.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/evp.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/hmac.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/idea.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/krb5_asn.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/kssl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/lhash.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/md4.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/md5.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/mdc2.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/modes.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/obj_mac.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/objects.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/ocsp.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/opensslconf.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/opensslv.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/ossl_typ.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/pem.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/pem2.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/pkcs12.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/pkcs7.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/pqueue.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/rand.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/rc2.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/rc4.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/ripemd.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/rsa.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/safestack.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/seed.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/sha.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/srp.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/srtp.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/ssl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/ssl2.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/ssl23.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/ssl3.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/stack.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/symhacks.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/tls1.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/ts.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/txt_db.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/ui.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/ui_compat.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/whrlpool.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/x509.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/x509_vfy.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/openssl/x509v3.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/bio_ssl.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/d1_both.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/d1_clnt.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/d1_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/d1_meth.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/d1_pkt.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/d1_srtp.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/d1_srvr.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/install-ssl.com (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/kssl.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/kssl_lcl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/s23_clnt.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/s23_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/s23_meth.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/s23_pkt.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/s23_srvr.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/s2_clnt.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/s2_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/s2_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/s2_meth.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/s2_pkt.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/s2_srvr.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/s3_both.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/s3_cbc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/s3_clnt.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/s3_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/s3_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/s3_meth.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/s3_pkt.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/s3_srvr.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/ssl-lib.com (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/ssl_algs.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/ssl_asn1.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/ssl_cert.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/ssl_ciph.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/ssl_conf.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/ssl_err.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/ssl_err2.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/ssl_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/ssl_locl.h (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/ssl_rsa.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/ssl_sess.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/ssl_stat.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/ssl_task.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/ssl_txt.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/ssl_utst.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/t1_clnt.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/t1_enc.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/t1_ext.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/t1_lib.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/t1_meth.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/t1_reneg.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/t1_srvr.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/t1_trce.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/ssl/tls_srp.c (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/winrt.cpp (100%) rename {drivers/builtin_openssl2 => thirdparty/openssl}/winrt_fix.patch (100%) diff --git a/SConstruct b/SConstruct index 2c92078ae7e..e52e224de70 100644 --- a/SConstruct +++ b/SConstruct @@ -131,7 +131,7 @@ opts.Add('xml','XML Save/Load support (yes/no)','yes') opts.Add('libpng','libpng library for image loader support (system/builtin)','builtin') opts.Add('libwebp','libwebp library for webp module (system/builtin)','builtin') opts.Add('builtin_zlib','Use built-in zlib (yes/no)','yes') -opts.Add('openssl','Use OpenSSL (yes/no/builtin)','no') +opts.Add('openssl','OpenSSL library for openssl module (system/builtin)','builtin') opts.Add('musepack','Musepack Audio (yes/no)','yes') opts.Add('enet','ENet library (system/builtin)','builtin') opts.Add("CXX", "C++ Compiler") @@ -322,11 +322,6 @@ if selected_platform in platform_list: if (env['musepack']=='yes'): env.Append(CPPFLAGS=['-DMUSEPACK_ENABLED']); - #if (env['openssl']!='no'): - # env.Append(CPPFLAGS=['-DOPENSSL_ENABLED']); - # if (env['openssl']=="builtin"): - # env.Append(CPPPATH=['#drivers/builtin_openssl2']) - if (env["builtin_zlib"]=='yes'): env.Append(CPPPATH=['#drivers/builtin_zlib/zlib']) diff --git a/drivers/SCsub b/drivers/SCsub index 26da90bfd1a..4ce95c79700 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -14,16 +14,6 @@ SConscript('windows/SCsub'); SConscript('gles2/SCsub'); SConscript('gl_context/SCsub'); -if (env['openssl']!='no'): - env.Append(CPPFLAGS=['-DOPENSSL_ENABLED']); - env_drivers.Append(CPPFLAGS=['-DOPENSSL_ENABLED']); - if (env['openssl']=="builtin"): - env_drivers.Append(CPPPATH=['#drivers/builtin_openssl2']) - SConscript("builtin_openssl2/SCsub"); - - SConscript('openssl/SCsub') - - SConscript("png/SCsub"); if (env["builtin_zlib"]=="yes"): SConscript("builtin_zlib/SCsub"); diff --git a/drivers/builtin_openssl2/SCsub b/drivers/builtin_openssl2/SCsub deleted file mode 100644 index 0c035cc4a55..00000000000 --- a/drivers/builtin_openssl2/SCsub +++ /dev/null @@ -1,663 +0,0 @@ -Import('env') -Import('env_drivers') - -openssl_sources = [ -"ssl/t1_lib.c", -"ssl/t1_ext.c", -"ssl/s3_srvr.c", -"ssl/t1_enc.c", -"ssl/t1_meth.c", -"ssl/s23_clnt.c", -"ssl/ssl_asn1.c", -"ssl/tls_srp.c", -"ssl/kssl.c", -"ssl/d1_both.c", -"ssl/t1_clnt.c", -"ssl/bio_ssl.c", -"ssl/d1_srtp.c", -"ssl/t1_reneg.c", -"ssl/ssl_cert.c", -"ssl/s3_lib.c", -"ssl/d1_srvr.c", -"ssl/s23_meth.c", -"ssl/ssl_stat.c", -"ssl/ssl_err.c", -"ssl/ssl_algs.c", -"ssl/s3_cbc.c", -"ssl/d1_clnt.c", -"ssl/s3_pkt.c", -"ssl/d1_meth.c", -"ssl/s3_both.c", -"ssl/s2_enc.c", -"ssl/s3_meth.c", -"ssl/s3_enc.c", -"ssl/s23_pkt.c", -"ssl/s2_pkt.c", -"ssl/d1_pkt.c", -"ssl/ssl_rsa.c", -"ssl/s23_srvr.c", -"ssl/s2_meth.c", -"ssl/s3_clnt.c", -"ssl/s23_lib.c", -"ssl/t1_srvr.c", -"ssl/ssl_lib.c", -"ssl/ssl_txt.c", -"ssl/s2_srvr.c", -"ssl/ssl_sess.c", -"ssl/s2_clnt.c", -"ssl/d1_lib.c", -"ssl/s2_lib.c", -"ssl/ssl_err2.c", -"ssl/ssl_ciph.c", -"crypto/dsa/dsa_lib.c", -"crypto/dsa/dsa_pmeth.c", -"crypto/dsa/dsa_ossl.c", -"crypto/dsa/dsa_gen.c", -"crypto/dsa/dsa_asn1.c", -"crypto/dsa/dsa_prn.c", -"crypto/dsa/dsa_sign.c", -"crypto/dsa/dsa_key.c", -"crypto/dsa/dsa_vrf.c", -"crypto/dsa/dsa_err.c", -"crypto/dsa/dsa_ameth.c", -"crypto/dsa/dsa_depr.c", -"crypto/x509/x509_lu.c", -"crypto/x509/x509cset.c", -"crypto/x509/x509_set.c", -"crypto/x509/x509_d2.c", -"crypto/x509/x509_txt.c", -"crypto/x509/x509rset.c", -"crypto/x509/by_dir.c", -"crypto/x509/x509_vpm.c", -"crypto/x509/x509_vfy.c", -"crypto/x509/x509_trs.c", -"crypto/x509/by_file.c", -"crypto/x509/x509_obj.c", -"crypto/x509/x509spki.c", -"crypto/x509/x509_v3.c", -"crypto/x509/x509_req.c", -"crypto/x509/x509_att.c", -"crypto/x509/x_all.c", -"crypto/x509/x509_ext.c", -"crypto/x509/x509type.c", -"crypto/x509/x509_def.c", -"crypto/x509/x509_err.c", -"crypto/x509/x509name.c", -"crypto/x509/x509_r2x.c", -"crypto/x509/x509_cmp.c", -"crypto/asn1/x_pkey.c", -"crypto/asn1/a_gentm.c", -"crypto/asn1/x_sig.c", -"crypto/asn1/t_req.c", -"crypto/asn1/t_pkey.c", -"crypto/asn1/p8_pkey.c", -"crypto/asn1/a_i2d_fp.c", -"crypto/asn1/x_val.c", -"crypto/asn1/f_string.c", -"crypto/asn1/p5_pbe.c", -"crypto/asn1/bio_ndef.c", -"crypto/asn1/a_bool.c", -"crypto/asn1/asn1_gen.c", -"crypto/asn1/x_algor.c", -"crypto/asn1/bio_asn1.c", -"crypto/asn1/asn_mime.c", -"crypto/asn1/t_x509.c", -"crypto/asn1/a_strex.c", -"crypto/asn1/x_nx509.c", -"crypto/asn1/asn1_err.c", -"crypto/asn1/x_crl.c", -"crypto/asn1/a_print.c", -"crypto/asn1/a_type.c", -"crypto/asn1/tasn_new.c", -"crypto/asn1/n_pkey.c", -"crypto/asn1/x_bignum.c", -"crypto/asn1/asn_pack.c", -"crypto/asn1/evp_asn1.c", -"crypto/asn1/t_bitst.c", -"crypto/asn1/x_req.c", -"crypto/asn1/a_time.c", -"crypto/asn1/x_name.c", -"crypto/asn1/x_pubkey.c", -"crypto/asn1/tasn_typ.c", -"crypto/asn1/asn_moid.c", -"crypto/asn1/a_utctm.c", -"crypto/asn1/asn1_lib.c", -"crypto/asn1/x_x509a.c", -"crypto/asn1/a_set.c", -"crypto/asn1/t_crl.c", -"crypto/asn1/p5_pbev2.c", -"crypto/asn1/tasn_enc.c", -"crypto/asn1/a_mbstr.c", -"crypto/asn1/tasn_dec.c", -"crypto/asn1/x_x509.c", -"crypto/asn1/a_octet.c", -"crypto/asn1/x_long.c", -"crypto/asn1/a_bytes.c", -"crypto/asn1/t_x509a.c", -"crypto/asn1/a_enum.c", -"crypto/asn1/a_int.c", -"crypto/asn1/tasn_prn.c", -"crypto/asn1/i2d_pr.c", -"crypto/asn1/a_utf8.c", -"crypto/asn1/t_spki.c", -"crypto/asn1/a_digest.c", -"crypto/asn1/a_dup.c", -"crypto/asn1/i2d_pu.c", -"crypto/asn1/a_verify.c", -"crypto/asn1/f_enum.c", -"crypto/asn1/a_sign.c", -"crypto/asn1/d2i_pr.c", -"crypto/asn1/asn1_par.c", -"crypto/asn1/x_spki.c", -"crypto/asn1/a_d2i_fp.c", -"crypto/asn1/f_int.c", -"crypto/asn1/x_exten.c", -"crypto/asn1/tasn_utl.c", -"crypto/asn1/nsseq.c", -"crypto/asn1/a_bitstr.c", -"crypto/asn1/x_info.c", -"crypto/asn1/a_strnid.c", -"crypto/asn1/a_object.c", -"crypto/asn1/tasn_fre.c", -"crypto/asn1/d2i_pu.c", -"crypto/asn1/ameth_lib.c", -"crypto/asn1/x_attrib.c", -"crypto/evp/m_sha.c", -"crypto/evp/e_camellia.c", -"crypto/evp/e_aes.c", -"crypto/evp/bio_b64.c", -"crypto/evp/m_sigver.c", -"crypto/evp/m_wp.c", -"crypto/evp/m_sha1.c", -"crypto/evp/p_seal.c", -"crypto/evp/c_alld.c", -"crypto/evp/p5_crpt.c", -"crypto/evp/e_rc4.c", -"crypto/evp/m_ecdsa.c", -"crypto/evp/bio_enc.c", -"crypto/evp/e_des3.c", -"crypto/evp/m_null.c", -"crypto/evp/bio_ok.c", -"crypto/evp/pmeth_gn.c", -"crypto/evp/e_rc5.c", -"crypto/evp/e_rc2.c", -"crypto/evp/p_dec.c", -"crypto/evp/p_verify.c", -"crypto/evp/e_rc4_hmac_md5.c", -"crypto/evp/pmeth_lib.c", -"crypto/evp/m_ripemd.c", -"crypto/evp/m_md5.c", -"crypto/evp/e_bf.c", -"crypto/evp/p_enc.c", -"crypto/evp/m_dss.c", -"crypto/evp/bio_md.c", -"crypto/evp/evp_pbe.c", -"crypto/evp/e_seed.c", -"crypto/evp/e_cast.c", -"crypto/evp/p_open.c", -"crypto/evp/p5_crpt2.c", -"crypto/evp/m_dss1.c", -"crypto/evp/names.c", -"crypto/evp/evp_acnf.c", -"crypto/evp/e_des.c", -"crypto/evp/evp_cnf.c", -"crypto/evp/evp_lib.c", -"crypto/evp/digest.c", -"crypto/evp/evp_err.c", -"crypto/evp/evp_enc.c", -"crypto/evp/e_old.c", -"crypto/evp/c_all.c", -"crypto/evp/m_md2.c", -"crypto/evp/e_xcbc_d.c", -"crypto/evp/pmeth_fn.c", -"crypto/evp/p_lib.c", -"crypto/evp/evp_key.c", -"crypto/evp/encode.c", -"crypto/evp/e_aes_cbc_hmac_sha1.c", -"crypto/evp/e_aes_cbc_hmac_sha256.c", -"crypto/evp/m_mdc2.c", -"crypto/evp/e_null.c", -"crypto/evp/p_sign.c", -"crypto/evp/e_idea.c", -"crypto/evp/c_allc.c", -"crypto/evp/evp_pkey.c", -"crypto/evp/m_md4.c", -"crypto/ex_data.c", -"crypto/pkcs12/p12_p8e.c", -"crypto/pkcs12/p12_crt.c", -"crypto/pkcs12/p12_utl.c", -"crypto/pkcs12/p12_attr.c", -"crypto/pkcs12/p12_npas.c", -"crypto/pkcs12/p12_decr.c", -"crypto/pkcs12/p12_init.c", -"crypto/pkcs12/p12_kiss.c", -"crypto/pkcs12/p12_add.c", -"crypto/pkcs12/p12_p8d.c", -"crypto/pkcs12/p12_mutl.c", -"crypto/pkcs12/p12_crpt.c", -"crypto/pkcs12/pk12err.c", -"crypto/pkcs12/p12_asn.c", -"crypto/pkcs12/p12_key.c", -"crypto/ecdh/ech_key.c", -"crypto/ecdh/ech_ossl.c", -"crypto/ecdh/ech_lib.c", -"crypto/ecdh/ech_err.c", -"crypto/ecdh/ech_kdf.c", -"crypto/o_str.c", -"crypto/conf/conf_api.c", -"crypto/conf/conf_err.c", -"crypto/conf/conf_def.c", -"crypto/conf/conf_lib.c", -"crypto/conf/conf_mall.c", -"crypto/conf/conf_sap.c", -"crypto/conf/conf_mod.c", -"crypto/ebcdic.c", -"crypto/ecdsa/ecs_lib.c", -"crypto/ecdsa/ecs_asn1.c", -"crypto/ecdsa/ecs_ossl.c", -"crypto/ecdsa/ecs_vrf.c", -"crypto/ecdsa/ecs_sign.c", -"crypto/ecdsa/ecs_err.c", -"crypto/dso/dso_win32.c", -"crypto/dso/dso_lib.c", -"crypto/dso/dso_dlfcn.c", -"crypto/dso/dso_dl.c", -"crypto/dso/dso_beos.c", -"crypto/dso/dso_null.c", -"crypto/dso/dso_vms.c", -"crypto/dso/dso_err.c", -"crypto/dso/dso_openssl.c", -"crypto/cryptlib.c", -"crypto/md5/md5_one.c", -"crypto/md5/md5_dgst.c", -"crypto/pkcs7/pkcs7err.c", -"crypto/pkcs7/pk7_smime.c", -"crypto/pkcs7/bio_pk7.c", -"crypto/pkcs7/pk7_mime.c", -"crypto/pkcs7/pk7_lib.c", -"crypto/pkcs7/pk7_asn1.c", -"crypto/pkcs7/pk7_doit.c", -"crypto/pkcs7/pk7_attr.c", -"crypto/md4/md4_one.c", -"crypto/md4/md4_dgst.c", -"crypto/o_dir.c", -"crypto/buffer/buf_err.c", -"crypto/buffer/buf_str.c", -"crypto/buffer/buffer.c", -"crypto/cms/cms_lib.c", -"crypto/cms/cms_io.c", -"crypto/cms/cms_err.c", -"crypto/cms/cms_dd.c", -"crypto/cms/cms_smime.c", -"crypto/cms/cms_att.c", -"crypto/cms/cms_pwri.c", -"crypto/cms/cms_cd.c", -"crypto/cms/cms_sd.c", -"crypto/cms/cms_asn1.c", -"crypto/cms/cms_env.c", -"crypto/cms/cms_enc.c", -"crypto/cms/cms_ess.c", -"crypto/cms/cms_kari.c", -"crypto/mem_dbg.c", -"crypto/uid.c", -"crypto/stack/stack.c", -"crypto/ec/ec_ameth.c", -"crypto/ec/ec_err.c", -"crypto/ec/ec_lib.c", -"crypto/ec/ec_curve.c", -"crypto/ec/ec_oct.c", -"crypto/ec/ec_asn1.c", -"crypto/ec/ecp_oct.c", -"crypto/ec/ec_print.c", -"crypto/ec/ec2_smpl.c", -"crypto/ec/ecp_nistp224.c", -"crypto/ec/ec2_oct.c", -"crypto/ec/eck_prn.c", -"crypto/ec/ec_key.c", -"crypto/ec/ecp_nist.c", -"crypto/ec/ec_check.c", -"crypto/ec/ecp_smpl.c", -"crypto/ec/ec2_mult.c", -"crypto/ec/ecp_mont.c", -"crypto/ec/ecp_nistp521.c", -"crypto/ec/ec_mult.c", -"crypto/ec/ecp_nistputil.c", -"crypto/ec/ec_pmeth.c", -"crypto/ec/ec_cvt.c", -"crypto/ec/ecp_nistp256.c", -"crypto/krb5/krb5_asn.c", -"crypto/hmac/hmac.c", -"crypto/hmac/hm_ameth.c", -"crypto/hmac/hm_pmeth.c", -"crypto/comp/c_rle.c", -"crypto/comp/c_zlib.c", -"crypto/comp/comp_lib.c", -"crypto/comp/comp_err.c", -"crypto/des/fcrypt.c", -"crypto/des/str2key.c", -"crypto/des/cbc_cksm.c", -"crypto/des/des_enc.c", -"crypto/des/ofb_enc.c", -"crypto/des/read2pwd.c", -"crypto/des/ecb3_enc.c", -"crypto/des/rand_key.c", -"crypto/des/cfb64ede.c", -"crypto/des/rpc_enc.c", -"crypto/des/ofb64ede.c", -"crypto/des/qud_cksm.c", -"crypto/des/enc_writ.c", -"crypto/des/set_key.c", -"crypto/des/xcbc_enc.c", -"crypto/des/fcrypt_b.c", -"crypto/des/ede_cbcm_enc.c", -"crypto/des/des_old2.c", -"crypto/des/cfb_enc.c", -"crypto/des/ecb_enc.c", -"crypto/des/enc_read.c", -"crypto/des/des_old.c", -"crypto/des/ofb64enc.c", -"crypto/des/pcbc_enc.c", -"crypto/des/cbc_enc.c", -"crypto/des/cfb64enc.c", -"crypto/lhash/lh_stats.c", -"crypto/lhash/lhash.c", -"crypto/x509v3/v3_genn.c", -"crypto/x509v3/pcy_cache.c", -"crypto/x509v3/v3_sxnet.c", -"crypto/x509v3/v3_scts.c", -"crypto/x509v3/v3err.c", -"crypto/x509v3/v3_conf.c", -"crypto/x509v3/v3_utl.c", -"crypto/x509v3/v3_akeya.c", -"crypto/x509v3/v3_lib.c", -"crypto/x509v3/pcy_lib.c", -"crypto/x509v3/v3_cpols.c", -"crypto/x509v3/v3_ia5.c", -"crypto/x509v3/v3_bitst.c", -"crypto/x509v3/v3_skey.c", -"crypto/x509v3/v3_info.c", -"crypto/x509v3/v3_asid.c", -"crypto/x509v3/pcy_tree.c", -"crypto/x509v3/v3_pcons.c", -"crypto/x509v3/v3_bcons.c", -"crypto/x509v3/v3_pku.c", -"crypto/x509v3/v3_ocsp.c", -"crypto/x509v3/pcy_map.c", -"crypto/x509v3/v3_ncons.c", -"crypto/x509v3/v3_purp.c", -"crypto/x509v3/v3_enum.c", -"crypto/x509v3/v3_pmaps.c", -"crypto/x509v3/pcy_node.c", -"crypto/x509v3/v3_pcia.c", -"crypto/x509v3/v3_crld.c", -"crypto/x509v3/v3_pci.c", -"crypto/x509v3/v3_akey.c", -"crypto/x509v3/v3_addr.c", -"crypto/x509v3/v3_int.c", -"crypto/x509v3/v3_alt.c", -"crypto/x509v3/v3_extku.c", -"crypto/x509v3/v3_prn.c", -"crypto/x509v3/pcy_data.c", -"crypto/aes/aes_ofb.c", -"crypto/aes/aes_ctr.c", -"crypto/aes/aes_ecb.c", -"crypto/aes/aes_cfb.c", -"crypto/aes/aes_wrap.c", -"crypto/aes/aes_ige.c", -"crypto/aes/aes_misc.c", -"crypto/pqueue/pqueue.c", -"crypto/sha/sha_one.c", -"crypto/sha/sha_dgst.c", -"crypto/sha/sha512.c", -"crypto/sha/sha1_one.c", -"crypto/sha/sha1dgst.c", -"crypto/sha/sha256.c", -"crypto/whrlpool/wp_dgst.c", -"crypto/objects/obj_xref.c", -"crypto/objects/o_names.c", -"crypto/objects/obj_err.c", -"crypto/objects/obj_dat.c", -"crypto/objects/obj_lib.c", -"crypto/mem.c", -"crypto/fips_ers.c", -"crypto/o_fips.c", -"crypto/engine/eng_rdrand.c", -"crypto/engine/eng_err.c", -"crypto/engine/tb_ecdsa.c", -"crypto/engine/tb_rsa.c", -"crypto/engine/tb_cipher.c", -"crypto/engine/tb_dsa.c", -"crypto/engine/eng_lib.c", -"crypto/engine/tb_asnmth.c", -"crypto/engine/tb_ecdh.c", -"crypto/engine/tb_dh.c", -"crypto/engine/tb_store.c", -"crypto/engine/eng_init.c", -"crypto/engine/eng_cnf.c", -"crypto/engine/eng_all.c", -"crypto/engine/tb_digest.c", -"crypto/engine/tb_pkmeth.c", -"crypto/engine/eng_table.c", -"crypto/engine/eng_ctrl.c", -"crypto/engine/eng_list.c", -"crypto/engine/eng_cryptodev.c", -"crypto/engine/eng_pkey.c", -"crypto/engine/tb_rand.c", -"crypto/engine/eng_openssl.c", -"crypto/engine/eng_fat.c", -"crypto/engine/eng_dyn.c", -"crypto/ts/ts_rsp_verify.c", -"crypto/ts/ts_req_print.c", -"crypto/ts/ts_verify_ctx.c", -"crypto/ts/ts_req_utils.c", -"crypto/ts/ts_err.c", -"crypto/ts/ts_rsp_print.c", -"crypto/ts/ts_rsp_utils.c", -"crypto/ts/ts_lib.c", -"crypto/ts/ts_conf.c", -"crypto/ts/ts_asn1.c", -"crypto/ts/ts_rsp_sign.c", -"crypto/ocsp/ocsp_ext.c", -"crypto/ocsp/ocsp_cl.c", -"crypto/ocsp/ocsp_ht.c", -"crypto/ocsp/ocsp_lib.c", -"crypto/ocsp/ocsp_srv.c", -"crypto/ocsp/ocsp_vfy.c", -"crypto/ocsp/ocsp_err.c", -"crypto/ocsp/ocsp_prn.c", -"crypto/ocsp/ocsp_asn.c", -"crypto/bf/bf_cfb64.c", -"crypto/bf/bf_ecb.c", -"crypto/bf/bf_enc.c", -"crypto/bf/bf_skey.c", -"crypto/bf/bf_ofb64.c", -"crypto/idea/i_skey.c", -"crypto/idea/i_ofb64.c", -"crypto/idea/i_cbc.c", -"crypto/idea/i_ecb.c", -"crypto/idea/i_cfb64.c", -"crypto/cmac/cm_ameth.c", -"crypto/cmac/cmac.c", -"crypto/cmac/cm_pmeth.c", -"crypto/dh/dh_lib.c", -"crypto/dh/dh_key.c", -"crypto/dh/dh_asn1.c", -"crypto/dh/dh_depr.c", -"crypto/dh/dh_pmeth.c", -"crypto/dh/dh_prn.c", -"crypto/dh/dh_gen.c", -"crypto/dh/dh_ameth.c", -"crypto/dh/dh_check.c", -"crypto/dh/dh_err.c", -"crypto/dh/dh_kdf.c", -"crypto/dh/dh_rfc5114.c", -"crypto/modes/ccm128.c", -"crypto/modes/ofb128.c", -"crypto/modes/cts128.c", -"crypto/modes/ctr128.c", -"crypto/modes/gcm128.c", -"crypto/modes/cbc128.c", -"crypto/modes/cfb128.c", -"crypto/modes/xts128.c", -"crypto/modes/wrap128.c", -"crypto/camellia/cmll_cfb.c", -"crypto/camellia/cmll_ecb.c", -"crypto/camellia/cmll_utl.c", -"crypto/camellia/cmll_misc.c", -"crypto/camellia/cmll_ofb.c", -"crypto/camellia/cmll_ctr.c", -"crypto/seed/seed_ecb.c", -"crypto/seed/seed_cbc.c", -"crypto/seed/seed.c", -"crypto/seed/seed_ofb.c", -"crypto/seed/seed_cfb.c", -"crypto/txt_db/txt_db.c", -"crypto/cpt_err.c", -"crypto/pem/pem_pk8.c", -"crypto/pem/pem_lib.c", -"crypto/pem/pem_sign.c", -"crypto/pem/pem_all.c", -"crypto/pem/pem_info.c", -"crypto/pem/pem_pkey.c", -"crypto/pem/pem_seal.c", -"crypto/pem/pem_err.c", -"crypto/pem/pem_xaux.c", -"crypto/pem/pvkfmt.c", -"crypto/pem/pem_x509.c", -"crypto/pem/pem_oth.c", -"crypto/rand/rand_lib.c", -"crypto/rand/randfile.c", -"crypto/rand/rand_os2.c", -"crypto/rand/rand_unix.c", -"crypto/rand/rand_nw.c", -"crypto/rand/md_rand.c", -"crypto/rand/rand_err.c", -"crypto/rand/rand_win.c", -"crypto/rand/rand_egd.c", -"crypto/cversion.c", -"crypto/cast/c_ecb.c", -"crypto/cast/c_skey.c", -"crypto/cast/c_ofb64.c", -"crypto/cast/c_enc.c", -"crypto/cast/c_cfb64.c", -"crypto/o_time.c", -"crypto/mdc2/mdc2dgst.c", -"crypto/mdc2/mdc2_one.c", -"crypto/rc4/rc4_utl.c", -"crypto/ui/ui_compat.c", -"crypto/ui/ui_util.c", -"crypto/ui/ui_lib.c", -"crypto/ui/ui_err.c", -"crypto/ui/ui_openssl.c", -"crypto/bio/bf_buff.c", -"crypto/bio/bss_null.c", -"crypto/bio/bss_acpt.c", -"crypto/bio/bss_conn.c", -"crypto/bio/bss_fd.c", -"crypto/bio/bf_null.c", -"crypto/bio/bio_err.c", -"crypto/bio/bss_sock.c", -"crypto/bio/bss_mem.c", -"crypto/bio/b_dump.c", -"crypto/bio/b_print.c", -"crypto/bio/b_sock.c", -"crypto/bio/bss_dgram.c", -"crypto/bio/bf_nbio.c", -"crypto/bio/bio_lib.c", -"crypto/bio/bss_file.c", -"crypto/bio/bss_bio.c", -"crypto/bio/bss_log.c", -"crypto/bio/bio_cb.c", -"crypto/o_init.c", -"crypto/rc2/rc2_skey.c", -"crypto/rc2/rc2_cbc.c", -"crypto/rc2/rc2cfb64.c", -"crypto/rc2/rc2_ecb.c", -"crypto/rc2/rc2ofb64.c", -"crypto/bn/bn_x931p.c", -"crypto/bn/bn_blind.c", -"crypto/bn/bn_gf2m.c", -"crypto/bn/bn_const.c", -"crypto/bn/bn_sqr.c", -"crypto/bn/bn_nist.c", -"crypto/bn/bn_rand.c", -"crypto/bn/bn_err.c", -"crypto/bn/bn_div.c", -"crypto/bn/bn_kron.c", -"crypto/bn/bn_ctx.c", -"crypto/bn/bn_shift.c", -"crypto/bn/bn_mod.c", -"crypto/bn/bn_exp2.c", -"crypto/bn/bn_word.c", -"crypto/bn/bn_add.c", -"crypto/bn/bn_exp.c", -"crypto/bn/bn_mont.c", -"crypto/bn/bn_print.c", -"crypto/bn/bn_mul.c", -"crypto/bn/bn_prime.c", -"crypto/bn/bn_depr.c", -"crypto/bn/bn_gcd.c", -"crypto/bn/bn_mpi.c", -"crypto/bn/bn_sqrt.c", -"crypto/bn/bn_recp.c", -"crypto/bn/bn_lib.c", -"crypto/ripemd/rmd_dgst.c", -"crypto/ripemd/rmd_one.c", -"crypto/rsa/rsa_x931.c", -"crypto/rsa/rsa_depr.c", -"crypto/rsa/rsa_saos.c", -"crypto/rsa/rsa_crpt.c", -"crypto/rsa/rsa_pss.c", -"crypto/rsa/rsa_oaep.c", -"crypto/rsa/rsa_null.c", -"crypto/rsa/rsa_gen.c", -"crypto/rsa/rsa_prn.c", -"crypto/rsa/rsa_pmeth.c", -"crypto/rsa/rsa_asn1.c", -"crypto/rsa/rsa_ssl.c", -"crypto/rsa/rsa_ameth.c", -"crypto/rsa/rsa_pk1.c", -"crypto/rsa/rsa_err.c", -"crypto/rsa/rsa_lib.c", -"crypto/rsa/rsa_none.c", -"crypto/rsa/rsa_chk.c", -"crypto/rsa/rsa_eay.c", -"crypto/rsa/rsa_sign.c", -"crypto/srp/srp_lib.c", -"crypto/srp/srp_vfy.c", -"crypto/err/err.c", -"crypto/err/err_prn.c", -"crypto/err/err_all.c", -"crypto/mem_clr.c", -"crypto/rc4/rc4_skey.c", -"crypto/rc4/rc4_enc.c", -"crypto/camellia/camellia.c", -"crypto/camellia/cmll_cbc.c", -#"crypto/aes/aes_x86core.c", -"crypto/aes/aes_core.c", -"crypto/aes/aes_cbc.c", -"crypto/whrlpool/wp_block.c", -"crypto/bn/bn_asm.c", -] - -#env.drivers_sources+=openssl_sources - -env.Append(CPPPATH=["#drivers/builtin_openssl2"]) -env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/crypto"]) -env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/openssl"]) -env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/evp"]) -env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/asn1"]) -env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/modes"]) -#env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/store"]) -env_drivers.Append(CPPFLAGS=["-DOPENSSL_NO_ASM","-DOPENSSL_THREADS","-DL_ENDIAN"]) - -if "platform" in env and env["platform"] == "winrt": - openssl_sources += ['winrt.cpp'] - -# Workaround for compilation error with GCC/Clang when -Werror is too greedy (GH-4517) -import os -import methods -if not (os.name=="nt" and methods.msvc_is_detected() ): # not Windows and not MSVC - env_drivers.Append(CFLAGS=["-Wno-error=implicit-function-declaration"]) - -env_drivers.add_source_files(env.drivers_sources,openssl_sources) diff --git a/drivers/openssl/SCsub b/drivers/openssl/SCsub deleted file mode 100644 index 40e3d0c0f06..00000000000 --- a/drivers/openssl/SCsub +++ /dev/null @@ -1,6 +0,0 @@ -Import('env_drivers') -Import('env') - -env_drivers.add_source_files(env.drivers_sources,"*.cpp") -env_drivers.add_source_files(env.drivers_sources,"*.c") - diff --git a/drivers/register_driver_types.cpp b/drivers/register_driver_types.cpp index 14af9ac1a6d..8aead0e2fc2 100644 --- a/drivers/register_driver_types.cpp +++ b/drivers/register_driver_types.cpp @@ -67,10 +67,6 @@ static ResourceFormatLoaderVideoStreamTheora* theora_stream_loader = NULL; static ResourceFormatLoaderAudioStreamMPC * mpc_stream_loader=NULL; #endif -#ifdef OPENSSL_ENABLED -#include "openssl/register_openssl.h" -#endif - void register_core_driver_types() { @@ -107,11 +103,6 @@ void register_driver_types() { #endif -#ifdef OPENSSL_ENABLED - - register_openssl(); -#endif - #ifdef THEORA_ENABLED theora_stream_loader = memnew( ResourceFormatLoaderVideoStreamTheora ); ResourceLoader::add_resource_format_loader(theora_stream_loader); @@ -142,10 +133,5 @@ void unregister_driver_types() { memdelete (mpc_stream_loader); #endif -#ifdef OPENSSL_ENABLED - - unregister_openssl(); -#endif - finalize_chibi(); } diff --git a/modules/openssl/SCsub b/modules/openssl/SCsub new file mode 100644 index 00000000000..46080550367 --- /dev/null +++ b/modules/openssl/SCsub @@ -0,0 +1,685 @@ +Import('env') +Import('env_modules') + + +# Thirdparty source files +if (env["openssl"] != "system"): # builtin + thirdparty_dir = "#thirdparty/openssl/" + + thirdparty_openssl_sources = [ + "ssl/t1_lib.c", + "ssl/t1_ext.c", + "ssl/s3_srvr.c", + "ssl/t1_enc.c", + "ssl/t1_meth.c", + "ssl/s23_clnt.c", + "ssl/ssl_asn1.c", + "ssl/tls_srp.c", + "ssl/kssl.c", + "ssl/d1_both.c", + "ssl/t1_clnt.c", + "ssl/bio_ssl.c", + "ssl/d1_srtp.c", + "ssl/t1_reneg.c", + "ssl/ssl_cert.c", + "ssl/s3_lib.c", + "ssl/d1_srvr.c", + "ssl/s23_meth.c", + "ssl/ssl_stat.c", + "ssl/ssl_err.c", + "ssl/ssl_algs.c", + "ssl/s3_cbc.c", + "ssl/d1_clnt.c", + "ssl/s3_pkt.c", + "ssl/d1_meth.c", + "ssl/s3_both.c", + "ssl/s2_enc.c", + "ssl/s3_meth.c", + "ssl/s3_enc.c", + "ssl/s23_pkt.c", + "ssl/s2_pkt.c", + "ssl/d1_pkt.c", + "ssl/ssl_rsa.c", + "ssl/s23_srvr.c", + "ssl/s2_meth.c", + "ssl/s3_clnt.c", + "ssl/s23_lib.c", + "ssl/t1_srvr.c", + "ssl/ssl_lib.c", + "ssl/ssl_txt.c", + "ssl/s2_srvr.c", + "ssl/ssl_sess.c", + "ssl/s2_clnt.c", + "ssl/d1_lib.c", + "ssl/s2_lib.c", + "ssl/ssl_err2.c", + "ssl/ssl_ciph.c", + "crypto/dsa/dsa_lib.c", + "crypto/dsa/dsa_pmeth.c", + "crypto/dsa/dsa_ossl.c", + "crypto/dsa/dsa_gen.c", + "crypto/dsa/dsa_asn1.c", + "crypto/dsa/dsa_prn.c", + "crypto/dsa/dsa_sign.c", + "crypto/dsa/dsa_key.c", + "crypto/dsa/dsa_vrf.c", + "crypto/dsa/dsa_err.c", + "crypto/dsa/dsa_ameth.c", + "crypto/dsa/dsa_depr.c", + "crypto/x509/x509_lu.c", + "crypto/x509/x509cset.c", + "crypto/x509/x509_set.c", + "crypto/x509/x509_d2.c", + "crypto/x509/x509_txt.c", + "crypto/x509/x509rset.c", + "crypto/x509/by_dir.c", + "crypto/x509/x509_vpm.c", + "crypto/x509/x509_vfy.c", + "crypto/x509/x509_trs.c", + "crypto/x509/by_file.c", + "crypto/x509/x509_obj.c", + "crypto/x509/x509spki.c", + "crypto/x509/x509_v3.c", + "crypto/x509/x509_req.c", + "crypto/x509/x509_att.c", + "crypto/x509/x_all.c", + "crypto/x509/x509_ext.c", + "crypto/x509/x509type.c", + "crypto/x509/x509_def.c", + "crypto/x509/x509_err.c", + "crypto/x509/x509name.c", + "crypto/x509/x509_r2x.c", + "crypto/x509/x509_cmp.c", + "crypto/asn1/x_pkey.c", + "crypto/asn1/a_gentm.c", + "crypto/asn1/x_sig.c", + "crypto/asn1/t_req.c", + "crypto/asn1/t_pkey.c", + "crypto/asn1/p8_pkey.c", + "crypto/asn1/a_i2d_fp.c", + "crypto/asn1/x_val.c", + "crypto/asn1/f_string.c", + "crypto/asn1/p5_pbe.c", + "crypto/asn1/bio_ndef.c", + "crypto/asn1/a_bool.c", + "crypto/asn1/asn1_gen.c", + "crypto/asn1/x_algor.c", + "crypto/asn1/bio_asn1.c", + "crypto/asn1/asn_mime.c", + "crypto/asn1/t_x509.c", + "crypto/asn1/a_strex.c", + "crypto/asn1/x_nx509.c", + "crypto/asn1/asn1_err.c", + "crypto/asn1/x_crl.c", + "crypto/asn1/a_print.c", + "crypto/asn1/a_type.c", + "crypto/asn1/tasn_new.c", + "crypto/asn1/n_pkey.c", + "crypto/asn1/x_bignum.c", + "crypto/asn1/asn_pack.c", + "crypto/asn1/evp_asn1.c", + "crypto/asn1/t_bitst.c", + "crypto/asn1/x_req.c", + "crypto/asn1/a_time.c", + "crypto/asn1/x_name.c", + "crypto/asn1/x_pubkey.c", + "crypto/asn1/tasn_typ.c", + "crypto/asn1/asn_moid.c", + "crypto/asn1/a_utctm.c", + "crypto/asn1/asn1_lib.c", + "crypto/asn1/x_x509a.c", + "crypto/asn1/a_set.c", + "crypto/asn1/t_crl.c", + "crypto/asn1/p5_pbev2.c", + "crypto/asn1/tasn_enc.c", + "crypto/asn1/a_mbstr.c", + "crypto/asn1/tasn_dec.c", + "crypto/asn1/x_x509.c", + "crypto/asn1/a_octet.c", + "crypto/asn1/x_long.c", + "crypto/asn1/a_bytes.c", + "crypto/asn1/t_x509a.c", + "crypto/asn1/a_enum.c", + "crypto/asn1/a_int.c", + "crypto/asn1/tasn_prn.c", + "crypto/asn1/i2d_pr.c", + "crypto/asn1/a_utf8.c", + "crypto/asn1/t_spki.c", + "crypto/asn1/a_digest.c", + "crypto/asn1/a_dup.c", + "crypto/asn1/i2d_pu.c", + "crypto/asn1/a_verify.c", + "crypto/asn1/f_enum.c", + "crypto/asn1/a_sign.c", + "crypto/asn1/d2i_pr.c", + "crypto/asn1/asn1_par.c", + "crypto/asn1/x_spki.c", + "crypto/asn1/a_d2i_fp.c", + "crypto/asn1/f_int.c", + "crypto/asn1/x_exten.c", + "crypto/asn1/tasn_utl.c", + "crypto/asn1/nsseq.c", + "crypto/asn1/a_bitstr.c", + "crypto/asn1/x_info.c", + "crypto/asn1/a_strnid.c", + "crypto/asn1/a_object.c", + "crypto/asn1/tasn_fre.c", + "crypto/asn1/d2i_pu.c", + "crypto/asn1/ameth_lib.c", + "crypto/asn1/x_attrib.c", + "crypto/evp/m_sha.c", + "crypto/evp/e_camellia.c", + "crypto/evp/e_aes.c", + "crypto/evp/bio_b64.c", + "crypto/evp/m_sigver.c", + "crypto/evp/m_wp.c", + "crypto/evp/m_sha1.c", + "crypto/evp/p_seal.c", + "crypto/evp/c_alld.c", + "crypto/evp/p5_crpt.c", + "crypto/evp/e_rc4.c", + "crypto/evp/m_ecdsa.c", + "crypto/evp/bio_enc.c", + "crypto/evp/e_des3.c", + "crypto/evp/m_null.c", + "crypto/evp/bio_ok.c", + "crypto/evp/pmeth_gn.c", + "crypto/evp/e_rc5.c", + "crypto/evp/e_rc2.c", + "crypto/evp/p_dec.c", + "crypto/evp/p_verify.c", + "crypto/evp/e_rc4_hmac_md5.c", + "crypto/evp/pmeth_lib.c", + "crypto/evp/m_ripemd.c", + "crypto/evp/m_md5.c", + "crypto/evp/e_bf.c", + "crypto/evp/p_enc.c", + "crypto/evp/m_dss.c", + "crypto/evp/bio_md.c", + "crypto/evp/evp_pbe.c", + "crypto/evp/e_seed.c", + "crypto/evp/e_cast.c", + "crypto/evp/p_open.c", + "crypto/evp/p5_crpt2.c", + "crypto/evp/m_dss1.c", + "crypto/evp/names.c", + "crypto/evp/evp_acnf.c", + "crypto/evp/e_des.c", + "crypto/evp/evp_cnf.c", + "crypto/evp/evp_lib.c", + "crypto/evp/digest.c", + "crypto/evp/evp_err.c", + "crypto/evp/evp_enc.c", + "crypto/evp/e_old.c", + "crypto/evp/c_all.c", + "crypto/evp/m_md2.c", + "crypto/evp/e_xcbc_d.c", + "crypto/evp/pmeth_fn.c", + "crypto/evp/p_lib.c", + "crypto/evp/evp_key.c", + "crypto/evp/encode.c", + "crypto/evp/e_aes_cbc_hmac_sha1.c", + "crypto/evp/e_aes_cbc_hmac_sha256.c", + "crypto/evp/m_mdc2.c", + "crypto/evp/e_null.c", + "crypto/evp/p_sign.c", + "crypto/evp/e_idea.c", + "crypto/evp/c_allc.c", + "crypto/evp/evp_pkey.c", + "crypto/evp/m_md4.c", + "crypto/ex_data.c", + "crypto/pkcs12/p12_p8e.c", + "crypto/pkcs12/p12_crt.c", + "crypto/pkcs12/p12_utl.c", + "crypto/pkcs12/p12_attr.c", + "crypto/pkcs12/p12_npas.c", + "crypto/pkcs12/p12_decr.c", + "crypto/pkcs12/p12_init.c", + "crypto/pkcs12/p12_kiss.c", + "crypto/pkcs12/p12_add.c", + "crypto/pkcs12/p12_p8d.c", + "crypto/pkcs12/p12_mutl.c", + "crypto/pkcs12/p12_crpt.c", + "crypto/pkcs12/pk12err.c", + "crypto/pkcs12/p12_asn.c", + "crypto/pkcs12/p12_key.c", + "crypto/ecdh/ech_key.c", + "crypto/ecdh/ech_ossl.c", + "crypto/ecdh/ech_lib.c", + "crypto/ecdh/ech_err.c", + "crypto/ecdh/ech_kdf.c", + "crypto/o_str.c", + "crypto/conf/conf_api.c", + "crypto/conf/conf_err.c", + "crypto/conf/conf_def.c", + "crypto/conf/conf_lib.c", + "crypto/conf/conf_mall.c", + "crypto/conf/conf_sap.c", + "crypto/conf/conf_mod.c", + "crypto/ebcdic.c", + "crypto/ecdsa/ecs_lib.c", + "crypto/ecdsa/ecs_asn1.c", + "crypto/ecdsa/ecs_ossl.c", + "crypto/ecdsa/ecs_vrf.c", + "crypto/ecdsa/ecs_sign.c", + "crypto/ecdsa/ecs_err.c", + "crypto/dso/dso_win32.c", + "crypto/dso/dso_lib.c", + "crypto/dso/dso_dlfcn.c", + "crypto/dso/dso_dl.c", + "crypto/dso/dso_beos.c", + "crypto/dso/dso_null.c", + "crypto/dso/dso_vms.c", + "crypto/dso/dso_err.c", + "crypto/dso/dso_openssl.c", + "crypto/cryptlib.c", + "crypto/md5/md5_one.c", + "crypto/md5/md5_dgst.c", + "crypto/pkcs7/pkcs7err.c", + "crypto/pkcs7/pk7_smime.c", + "crypto/pkcs7/bio_pk7.c", + "crypto/pkcs7/pk7_mime.c", + "crypto/pkcs7/pk7_lib.c", + "crypto/pkcs7/pk7_asn1.c", + "crypto/pkcs7/pk7_doit.c", + "crypto/pkcs7/pk7_attr.c", + "crypto/md4/md4_one.c", + "crypto/md4/md4_dgst.c", + "crypto/o_dir.c", + "crypto/buffer/buf_err.c", + "crypto/buffer/buf_str.c", + "crypto/buffer/buffer.c", + "crypto/cms/cms_lib.c", + "crypto/cms/cms_io.c", + "crypto/cms/cms_err.c", + "crypto/cms/cms_dd.c", + "crypto/cms/cms_smime.c", + "crypto/cms/cms_att.c", + "crypto/cms/cms_pwri.c", + "crypto/cms/cms_cd.c", + "crypto/cms/cms_sd.c", + "crypto/cms/cms_asn1.c", + "crypto/cms/cms_env.c", + "crypto/cms/cms_enc.c", + "crypto/cms/cms_ess.c", + "crypto/cms/cms_kari.c", + "crypto/mem_dbg.c", + "crypto/uid.c", + "crypto/stack/stack.c", + "crypto/ec/ec_ameth.c", + "crypto/ec/ec_err.c", + "crypto/ec/ec_lib.c", + "crypto/ec/ec_curve.c", + "crypto/ec/ec_oct.c", + "crypto/ec/ec_asn1.c", + "crypto/ec/ecp_oct.c", + "crypto/ec/ec_print.c", + "crypto/ec/ec2_smpl.c", + "crypto/ec/ecp_nistp224.c", + "crypto/ec/ec2_oct.c", + "crypto/ec/eck_prn.c", + "crypto/ec/ec_key.c", + "crypto/ec/ecp_nist.c", + "crypto/ec/ec_check.c", + "crypto/ec/ecp_smpl.c", + "crypto/ec/ec2_mult.c", + "crypto/ec/ecp_mont.c", + "crypto/ec/ecp_nistp521.c", + "crypto/ec/ec_mult.c", + "crypto/ec/ecp_nistputil.c", + "crypto/ec/ec_pmeth.c", + "crypto/ec/ec_cvt.c", + "crypto/ec/ecp_nistp256.c", + "crypto/krb5/krb5_asn.c", + "crypto/hmac/hmac.c", + "crypto/hmac/hm_ameth.c", + "crypto/hmac/hm_pmeth.c", + "crypto/comp/c_rle.c", + "crypto/comp/c_zlib.c", + "crypto/comp/comp_lib.c", + "crypto/comp/comp_err.c", + "crypto/des/fcrypt.c", + "crypto/des/str2key.c", + "crypto/des/cbc_cksm.c", + "crypto/des/des_enc.c", + "crypto/des/ofb_enc.c", + "crypto/des/read2pwd.c", + "crypto/des/ecb3_enc.c", + "crypto/des/rand_key.c", + "crypto/des/cfb64ede.c", + "crypto/des/rpc_enc.c", + "crypto/des/ofb64ede.c", + "crypto/des/qud_cksm.c", + "crypto/des/enc_writ.c", + "crypto/des/set_key.c", + "crypto/des/xcbc_enc.c", + "crypto/des/fcrypt_b.c", + "crypto/des/ede_cbcm_enc.c", + "crypto/des/des_old2.c", + "crypto/des/cfb_enc.c", + "crypto/des/ecb_enc.c", + "crypto/des/enc_read.c", + "crypto/des/des_old.c", + "crypto/des/ofb64enc.c", + "crypto/des/pcbc_enc.c", + "crypto/des/cbc_enc.c", + "crypto/des/cfb64enc.c", + "crypto/lhash/lh_stats.c", + "crypto/lhash/lhash.c", + "crypto/x509v3/v3_genn.c", + "crypto/x509v3/pcy_cache.c", + "crypto/x509v3/v3_sxnet.c", + "crypto/x509v3/v3_scts.c", + "crypto/x509v3/v3err.c", + "crypto/x509v3/v3_conf.c", + "crypto/x509v3/v3_utl.c", + "crypto/x509v3/v3_akeya.c", + "crypto/x509v3/v3_lib.c", + "crypto/x509v3/pcy_lib.c", + "crypto/x509v3/v3_cpols.c", + "crypto/x509v3/v3_ia5.c", + "crypto/x509v3/v3_bitst.c", + "crypto/x509v3/v3_skey.c", + "crypto/x509v3/v3_info.c", + "crypto/x509v3/v3_asid.c", + "crypto/x509v3/pcy_tree.c", + "crypto/x509v3/v3_pcons.c", + "crypto/x509v3/v3_bcons.c", + "crypto/x509v3/v3_pku.c", + "crypto/x509v3/v3_ocsp.c", + "crypto/x509v3/pcy_map.c", + "crypto/x509v3/v3_ncons.c", + "crypto/x509v3/v3_purp.c", + "crypto/x509v3/v3_enum.c", + "crypto/x509v3/v3_pmaps.c", + "crypto/x509v3/pcy_node.c", + "crypto/x509v3/v3_pcia.c", + "crypto/x509v3/v3_crld.c", + "crypto/x509v3/v3_pci.c", + "crypto/x509v3/v3_akey.c", + "crypto/x509v3/v3_addr.c", + "crypto/x509v3/v3_int.c", + "crypto/x509v3/v3_alt.c", + "crypto/x509v3/v3_extku.c", + "crypto/x509v3/v3_prn.c", + "crypto/x509v3/pcy_data.c", + "crypto/aes/aes_ofb.c", + "crypto/aes/aes_ctr.c", + "crypto/aes/aes_ecb.c", + "crypto/aes/aes_cfb.c", + "crypto/aes/aes_wrap.c", + "crypto/aes/aes_ige.c", + "crypto/aes/aes_misc.c", + "crypto/pqueue/pqueue.c", + "crypto/sha/sha_one.c", + "crypto/sha/sha_dgst.c", + "crypto/sha/sha512.c", + "crypto/sha/sha1_one.c", + "crypto/sha/sha1dgst.c", + "crypto/sha/sha256.c", + "crypto/whrlpool/wp_dgst.c", + "crypto/objects/obj_xref.c", + "crypto/objects/o_names.c", + "crypto/objects/obj_err.c", + "crypto/objects/obj_dat.c", + "crypto/objects/obj_lib.c", + "crypto/mem.c", + "crypto/fips_ers.c", + "crypto/o_fips.c", + "crypto/engine/eng_rdrand.c", + "crypto/engine/eng_err.c", + "crypto/engine/tb_ecdsa.c", + "crypto/engine/tb_rsa.c", + "crypto/engine/tb_cipher.c", + "crypto/engine/tb_dsa.c", + "crypto/engine/eng_lib.c", + "crypto/engine/tb_asnmth.c", + "crypto/engine/tb_ecdh.c", + "crypto/engine/tb_dh.c", + "crypto/engine/tb_store.c", + "crypto/engine/eng_init.c", + "crypto/engine/eng_cnf.c", + "crypto/engine/eng_all.c", + "crypto/engine/tb_digest.c", + "crypto/engine/tb_pkmeth.c", + "crypto/engine/eng_table.c", + "crypto/engine/eng_ctrl.c", + "crypto/engine/eng_list.c", + "crypto/engine/eng_cryptodev.c", + "crypto/engine/eng_pkey.c", + "crypto/engine/tb_rand.c", + "crypto/engine/eng_openssl.c", + "crypto/engine/eng_fat.c", + "crypto/engine/eng_dyn.c", + "crypto/ts/ts_rsp_verify.c", + "crypto/ts/ts_req_print.c", + "crypto/ts/ts_verify_ctx.c", + "crypto/ts/ts_req_utils.c", + "crypto/ts/ts_err.c", + "crypto/ts/ts_rsp_print.c", + "crypto/ts/ts_rsp_utils.c", + "crypto/ts/ts_lib.c", + "crypto/ts/ts_conf.c", + "crypto/ts/ts_asn1.c", + "crypto/ts/ts_rsp_sign.c", + "crypto/ocsp/ocsp_ext.c", + "crypto/ocsp/ocsp_cl.c", + "crypto/ocsp/ocsp_ht.c", + "crypto/ocsp/ocsp_lib.c", + "crypto/ocsp/ocsp_srv.c", + "crypto/ocsp/ocsp_vfy.c", + "crypto/ocsp/ocsp_err.c", + "crypto/ocsp/ocsp_prn.c", + "crypto/ocsp/ocsp_asn.c", + "crypto/bf/bf_cfb64.c", + "crypto/bf/bf_ecb.c", + "crypto/bf/bf_enc.c", + "crypto/bf/bf_skey.c", + "crypto/bf/bf_ofb64.c", + "crypto/idea/i_skey.c", + "crypto/idea/i_ofb64.c", + "crypto/idea/i_cbc.c", + "crypto/idea/i_ecb.c", + "crypto/idea/i_cfb64.c", + "crypto/cmac/cm_ameth.c", + "crypto/cmac/cmac.c", + "crypto/cmac/cm_pmeth.c", + "crypto/dh/dh_lib.c", + "crypto/dh/dh_key.c", + "crypto/dh/dh_asn1.c", + "crypto/dh/dh_depr.c", + "crypto/dh/dh_pmeth.c", + "crypto/dh/dh_prn.c", + "crypto/dh/dh_gen.c", + "crypto/dh/dh_ameth.c", + "crypto/dh/dh_check.c", + "crypto/dh/dh_err.c", + "crypto/dh/dh_kdf.c", + "crypto/dh/dh_rfc5114.c", + "crypto/modes/ccm128.c", + "crypto/modes/ofb128.c", + "crypto/modes/cts128.c", + "crypto/modes/ctr128.c", + "crypto/modes/gcm128.c", + "crypto/modes/cbc128.c", + "crypto/modes/cfb128.c", + "crypto/modes/xts128.c", + "crypto/modes/wrap128.c", + "crypto/camellia/cmll_cfb.c", + "crypto/camellia/cmll_ecb.c", + "crypto/camellia/cmll_utl.c", + "crypto/camellia/cmll_misc.c", + "crypto/camellia/cmll_ofb.c", + "crypto/camellia/cmll_ctr.c", + "crypto/seed/seed_ecb.c", + "crypto/seed/seed_cbc.c", + "crypto/seed/seed.c", + "crypto/seed/seed_ofb.c", + "crypto/seed/seed_cfb.c", + "crypto/txt_db/txt_db.c", + "crypto/cpt_err.c", + "crypto/pem/pem_pk8.c", + "crypto/pem/pem_lib.c", + "crypto/pem/pem_sign.c", + "crypto/pem/pem_all.c", + "crypto/pem/pem_info.c", + "crypto/pem/pem_pkey.c", + "crypto/pem/pem_seal.c", + "crypto/pem/pem_err.c", + "crypto/pem/pem_xaux.c", + "crypto/pem/pvkfmt.c", + "crypto/pem/pem_x509.c", + "crypto/pem/pem_oth.c", + "crypto/rand/rand_lib.c", + "crypto/rand/randfile.c", + "crypto/rand/rand_os2.c", + "crypto/rand/rand_unix.c", + "crypto/rand/rand_nw.c", + "crypto/rand/md_rand.c", + "crypto/rand/rand_err.c", + "crypto/rand/rand_win.c", + "crypto/rand/rand_egd.c", + "crypto/cversion.c", + "crypto/cast/c_ecb.c", + "crypto/cast/c_skey.c", + "crypto/cast/c_ofb64.c", + "crypto/cast/c_enc.c", + "crypto/cast/c_cfb64.c", + "crypto/o_time.c", + "crypto/mdc2/mdc2dgst.c", + "crypto/mdc2/mdc2_one.c", + "crypto/rc4/rc4_utl.c", + "crypto/ui/ui_compat.c", + "crypto/ui/ui_util.c", + "crypto/ui/ui_lib.c", + "crypto/ui/ui_err.c", + "crypto/ui/ui_openssl.c", + "crypto/bio/bf_buff.c", + "crypto/bio/bss_null.c", + "crypto/bio/bss_acpt.c", + "crypto/bio/bss_conn.c", + "crypto/bio/bss_fd.c", + "crypto/bio/bf_null.c", + "crypto/bio/bio_err.c", + "crypto/bio/bss_sock.c", + "crypto/bio/bss_mem.c", + "crypto/bio/b_dump.c", + "crypto/bio/b_print.c", + "crypto/bio/b_sock.c", + "crypto/bio/bss_dgram.c", + "crypto/bio/bf_nbio.c", + "crypto/bio/bio_lib.c", + "crypto/bio/bss_file.c", + "crypto/bio/bss_bio.c", + "crypto/bio/bss_log.c", + "crypto/bio/bio_cb.c", + "crypto/o_init.c", + "crypto/rc2/rc2_skey.c", + "crypto/rc2/rc2_cbc.c", + "crypto/rc2/rc2cfb64.c", + "crypto/rc2/rc2_ecb.c", + "crypto/rc2/rc2ofb64.c", + "crypto/bn/bn_x931p.c", + "crypto/bn/bn_blind.c", + "crypto/bn/bn_gf2m.c", + "crypto/bn/bn_const.c", + "crypto/bn/bn_sqr.c", + "crypto/bn/bn_nist.c", + "crypto/bn/bn_rand.c", + "crypto/bn/bn_err.c", + "crypto/bn/bn_div.c", + "crypto/bn/bn_kron.c", + "crypto/bn/bn_ctx.c", + "crypto/bn/bn_shift.c", + "crypto/bn/bn_mod.c", + "crypto/bn/bn_exp2.c", + "crypto/bn/bn_word.c", + "crypto/bn/bn_add.c", + "crypto/bn/bn_exp.c", + "crypto/bn/bn_mont.c", + "crypto/bn/bn_print.c", + "crypto/bn/bn_mul.c", + "crypto/bn/bn_prime.c", + "crypto/bn/bn_depr.c", + "crypto/bn/bn_gcd.c", + "crypto/bn/bn_mpi.c", + "crypto/bn/bn_sqrt.c", + "crypto/bn/bn_recp.c", + "crypto/bn/bn_lib.c", + "crypto/ripemd/rmd_dgst.c", + "crypto/ripemd/rmd_one.c", + "crypto/rsa/rsa_x931.c", + "crypto/rsa/rsa_depr.c", + "crypto/rsa/rsa_saos.c", + "crypto/rsa/rsa_crpt.c", + "crypto/rsa/rsa_pss.c", + "crypto/rsa/rsa_oaep.c", + "crypto/rsa/rsa_null.c", + "crypto/rsa/rsa_gen.c", + "crypto/rsa/rsa_prn.c", + "crypto/rsa/rsa_pmeth.c", + "crypto/rsa/rsa_asn1.c", + "crypto/rsa/rsa_ssl.c", + "crypto/rsa/rsa_ameth.c", + "crypto/rsa/rsa_pk1.c", + "crypto/rsa/rsa_err.c", + "crypto/rsa/rsa_lib.c", + "crypto/rsa/rsa_none.c", + "crypto/rsa/rsa_chk.c", + "crypto/rsa/rsa_eay.c", + "crypto/rsa/rsa_sign.c", + "crypto/srp/srp_lib.c", + "crypto/srp/srp_vfy.c", + "crypto/err/err.c", + "crypto/err/err_prn.c", + "crypto/err/err_all.c", + "crypto/mem_clr.c", + "crypto/rc4/rc4_skey.c", + "crypto/rc4/rc4_enc.c", + "crypto/camellia/camellia.c", + "crypto/camellia/cmll_cbc.c", + #"crypto/aes/aes_x86core.c", + "crypto/aes/aes_core.c", + "crypto/aes/aes_cbc.c", + "crypto/whrlpool/wp_block.c", + "crypto/bn/bn_asm.c", + ] + + if "platform" in env and env["platform"] == "winrt": + thirdparty_openssl_sources += ['winrt.cpp'] + + thirdparty_openssl_sources = [thirdparty_dir + file for file in thirdparty_openssl_sources] + + env_modules.add_source_files(env.modules_sources, thirdparty_openssl_sources) + + # FIXME: Clone the environment to make a env_openssl and not pollute the modules env + thirdparty_include_paths = [ + "", + "crypto", + "crypto/asn1", + "crypto/evp", + "crypto/modes", + "openssl", + ] + env_modules.Append(CPPPATH = [thirdparty_dir + "/" + dir for dir in thirdparty_include_paths]) + + env_modules.Append(CPPFLAGS = ["-DOPENSSL_NO_ASM", "-DOPENSSL_THREADS", "-DL_ENDIAN"]) + + # Workaround for compilation error with GCC/Clang when -Werror is too greedy (GH-4517) + import os + import methods + if not (os.name=="nt" and methods.msvc_is_detected()): # not Windows and not MSVC + env_modules.Append(CFLAGS = ["-Wno-error=implicit-function-declaration"]) + + +# Module sources +env_modules.add_source_files(env.modules_sources, "*.cpp") +env_modules.add_source_files(env.modules_sources, "*.c") + +# platform/winrt need to know openssl is available, pass to main env +if "platform" in env and env["platform"] == "winrt": + env.Append(CPPPATH = [thirdparty_dir]) + env.Append(CPPFLAGS = ['-DOPENSSL_ENABLED']); + +Export('env_modules') +Export('env') diff --git a/modules/openssl/config.py b/modules/openssl/config.py new file mode 100644 index 00000000000..368e97e152c --- /dev/null +++ b/modules/openssl/config.py @@ -0,0 +1,6 @@ + +def can_build(platform): + return True + +def configure(env): + pass diff --git a/drivers/openssl/curl_hostcheck.c b/modules/openssl/curl_hostcheck.c similarity index 99% rename from drivers/openssl/curl_hostcheck.c rename to modules/openssl/curl_hostcheck.c index f5d44bfaf15..feef232619c 100644 --- a/drivers/openssl/curl_hostcheck.c +++ b/modules/openssl/curl_hostcheck.c @@ -46,8 +46,6 @@ be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder. */ -#ifdef OPENSSL_ENABLED - #include "curl_hostcheck.h" #include @@ -217,5 +215,3 @@ int Tool_Curl_cert_hostcheck(const char *match_pattern, const char *hostname) return 1; return 0; } - -#endif diff --git a/drivers/openssl/curl_hostcheck.h b/modules/openssl/curl_hostcheck.h similarity index 97% rename from drivers/openssl/curl_hostcheck.h rename to modules/openssl/curl_hostcheck.h index 7611c6e4438..1b7fbe81e37 100644 --- a/drivers/openssl/curl_hostcheck.h +++ b/modules/openssl/curl_hostcheck.h @@ -1,8 +1,6 @@ #ifndef HEADER_TOOL_CURL_HOSTCHECK_H #define HEADER_TOOL_CURL_HOSTCHECK_H -#ifdef OPENSSL_ENABLED - #ifdef __cplusplus extern "C" { #endif @@ -37,7 +35,5 @@ int Tool_Curl_cert_hostcheck(const char *match_pattern, const char *hostname); } #endif -#endif - #endif /* HEADER_CURL_HOSTCHECK_H */ diff --git a/drivers/openssl/register_openssl.cpp b/modules/openssl/register_types.cpp similarity index 92% rename from drivers/openssl/register_openssl.cpp rename to modules/openssl/register_types.cpp index 0d2f9fd537b..4aba9f530e1 100644 --- a/drivers/openssl/register_openssl.cpp +++ b/modules/openssl/register_types.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* register_openssl.cpp */ +/* register_types.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -26,22 +26,17 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#include "register_openssl.h" +#include "register_types.h" #include "stream_peer_openssl.h" -#ifdef OPENSSL_ENABLED -void register_openssl() { +void register_openssl_types() { ObjectTypeDB::register_type(); StreamPeerOpenSSL::initialize_ssl(); - } -void unregister_openssl() { +void unregister_openssl_types() { StreamPeerOpenSSL::finalize_ssl(); - } -#endif - diff --git a/drivers/openssl/register_openssl.h b/modules/openssl/register_types.h similarity index 89% rename from drivers/openssl/register_openssl.h rename to modules/openssl/register_types.h index a66ca1e9c0f..2db140cc809 100644 --- a/drivers/openssl/register_openssl.h +++ b/modules/openssl/register_types.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* register_openssl.h */ +/* register_types.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -26,14 +26,5 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef REGISTER_OPENSSL_H -#define REGISTER_OPENSSL_H - -#ifdef OPENSSL_ENABLED - -void register_openssl(); -void unregister_openssl(); - -#endif - -#endif // REGISTER_OPENSSL_H +void register_openssl_types(); +void unregister_openssl_types(); diff --git a/drivers/openssl/stream_peer_openssl.cpp b/modules/openssl/stream_peer_openssl.cpp similarity index 99% rename from drivers/openssl/stream_peer_openssl.cpp rename to modules/openssl/stream_peer_openssl.cpp index aa3d8a8f7f9..b9bec4ca0b5 100644 --- a/drivers/openssl/stream_peer_openssl.cpp +++ b/modules/openssl/stream_peer_openssl.cpp @@ -26,7 +26,6 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifdef OPENSSL_ENABLED #include "stream_peer_openssl.h" //hostname matching code from curl @@ -645,5 +644,3 @@ void StreamPeerOpenSSL::finalize_ssl(){ } certs.clear(); } - -#endif diff --git a/drivers/openssl/stream_peer_openssl.h b/modules/openssl/stream_peer_openssl.h similarity index 99% rename from drivers/openssl/stream_peer_openssl.h rename to modules/openssl/stream_peer_openssl.h index f1f25f4fc54..853ede20367 100644 --- a/drivers/openssl/stream_peer_openssl.h +++ b/modules/openssl/stream_peer_openssl.h @@ -29,9 +29,6 @@ #ifndef STREAM_PEER_OPEN_SSL_H #define STREAM_PEER_OPEN_SSL_H -#ifdef OPENSSL_ENABLED - - #include // If you don't know what this is for stop reading now. #include "io/stream_peer_ssl.h" #include "globals.h" @@ -109,5 +106,4 @@ public: ~StreamPeerOpenSSL(); }; -#endif #endif // STREAM_PEER_SSL_H diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 8a156a6bce2..98c2d1e8fde 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -70,7 +70,7 @@ def get_flags(): return [ ('builtin_zlib', 'no'), ('glew', 'yes'), - ("openssl", "yes"), + ("openssl", "system"), ('freetype','yes'), # use system freetype ('libpng', 'system'), #("theora","no"), @@ -140,7 +140,7 @@ def configure(env): env.ParseConfig('pkg-config xcursor --cflags --libs') env.ParseConfig('pkg-config xrandr --cflags --libs') - if (env["openssl"]=="yes"): + if (env["openssl"] == "system"): env.ParseConfig('pkg-config openssl --cflags --libs') if (env["libpng"] == "system"): diff --git a/thirdparty/README.md b/thirdparty/README.md index be4d717bfef..a8c2c7df953 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -86,6 +86,17 @@ changes to ensure they build for Javascript/HTML5. Those changes are marked with `// -- GODOT --` comments. +## openssl + +- Upstream: https://www.openssl.org +- Version: 1.2.0h +- License: OpenSSL license / BSD-like + +Files extracted from the upstream source: + +TODO. + + ## opus - Upstream: https://opus-codec.org diff --git a/thirdparty/openssl/LICENSE b/thirdparty/openssl/LICENSE new file mode 100644 index 00000000000..fb03713dd11 --- /dev/null +++ b/thirdparty/openssl/LICENSE @@ -0,0 +1,127 @@ + + LICENSE ISSUES + ============== + + The OpenSSL toolkit stays under a dual license, i.e. both the conditions of + the OpenSSL License and the original SSLeay license apply to the toolkit. + See below for the actual license texts. Actually both licenses are BSD-style + Open Source licenses. In case of any license issues related to OpenSSL + please contact openssl-core@openssl.org. + + OpenSSL License + --------------- + +/* ==================================================================== + * Copyright (c) 1998-2016 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + * + * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called "OpenSSL" + * nor may "OpenSSL" appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * "This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/)" + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This product includes cryptographic software written by Eric Young + * (eay@cryptsoft.com). This product includes software written by Tim + * Hudson (tjh@cryptsoft.com). + * + */ + + Original SSLeay License + ----------------------- + +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * "This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com)" + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] + */ + diff --git a/drivers/builtin_openssl2/buildinf.h b/thirdparty/openssl/buildinf.h similarity index 100% rename from drivers/builtin_openssl2/buildinf.h rename to thirdparty/openssl/buildinf.h diff --git a/drivers/builtin_openssl2/crypto/LPdir_nyi.c b/thirdparty/openssl/crypto/LPdir_nyi.c similarity index 100% rename from drivers/builtin_openssl2/crypto/LPdir_nyi.c rename to thirdparty/openssl/crypto/LPdir_nyi.c diff --git a/drivers/builtin_openssl2/crypto/LPdir_unix.c b/thirdparty/openssl/crypto/LPdir_unix.c similarity index 100% rename from drivers/builtin_openssl2/crypto/LPdir_unix.c rename to thirdparty/openssl/crypto/LPdir_unix.c diff --git a/drivers/builtin_openssl2/crypto/LPdir_vms.c b/thirdparty/openssl/crypto/LPdir_vms.c similarity index 100% rename from drivers/builtin_openssl2/crypto/LPdir_vms.c rename to thirdparty/openssl/crypto/LPdir_vms.c diff --git a/drivers/builtin_openssl2/crypto/LPdir_win.c b/thirdparty/openssl/crypto/LPdir_win.c similarity index 100% rename from drivers/builtin_openssl2/crypto/LPdir_win.c rename to thirdparty/openssl/crypto/LPdir_win.c diff --git a/drivers/builtin_openssl2/crypto/LPdir_win32.c b/thirdparty/openssl/crypto/LPdir_win32.c similarity index 100% rename from drivers/builtin_openssl2/crypto/LPdir_win32.c rename to thirdparty/openssl/crypto/LPdir_win32.c diff --git a/drivers/builtin_openssl2/crypto/LPdir_wince.c b/thirdparty/openssl/crypto/LPdir_wince.c similarity index 100% rename from drivers/builtin_openssl2/crypto/LPdir_wince.c rename to thirdparty/openssl/crypto/LPdir_wince.c diff --git a/drivers/builtin_openssl2/crypto/aes/README b/thirdparty/openssl/crypto/aes/README similarity index 100% rename from drivers/builtin_openssl2/crypto/aes/README rename to thirdparty/openssl/crypto/aes/README diff --git a/drivers/builtin_openssl2/crypto/aes/aes_cbc.c b/thirdparty/openssl/crypto/aes/aes_cbc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/aes/aes_cbc.c rename to thirdparty/openssl/crypto/aes/aes_cbc.c diff --git a/drivers/builtin_openssl2/crypto/aes/aes_cfb.c b/thirdparty/openssl/crypto/aes/aes_cfb.c similarity index 100% rename from drivers/builtin_openssl2/crypto/aes/aes_cfb.c rename to thirdparty/openssl/crypto/aes/aes_cfb.c diff --git a/drivers/builtin_openssl2/crypto/aes/aes_core.c b/thirdparty/openssl/crypto/aes/aes_core.c similarity index 100% rename from drivers/builtin_openssl2/crypto/aes/aes_core.c rename to thirdparty/openssl/crypto/aes/aes_core.c diff --git a/drivers/builtin_openssl2/crypto/aes/aes_ctr.c b/thirdparty/openssl/crypto/aes/aes_ctr.c similarity index 100% rename from drivers/builtin_openssl2/crypto/aes/aes_ctr.c rename to thirdparty/openssl/crypto/aes/aes_ctr.c diff --git a/drivers/builtin_openssl2/crypto/aes/aes_ecb.c b/thirdparty/openssl/crypto/aes/aes_ecb.c similarity index 100% rename from drivers/builtin_openssl2/crypto/aes/aes_ecb.c rename to thirdparty/openssl/crypto/aes/aes_ecb.c diff --git a/drivers/builtin_openssl2/crypto/aes/aes_ige.c b/thirdparty/openssl/crypto/aes/aes_ige.c similarity index 100% rename from drivers/builtin_openssl2/crypto/aes/aes_ige.c rename to thirdparty/openssl/crypto/aes/aes_ige.c diff --git a/drivers/builtin_openssl2/crypto/aes/aes_locl.h b/thirdparty/openssl/crypto/aes/aes_locl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/aes/aes_locl.h rename to thirdparty/openssl/crypto/aes/aes_locl.h diff --git a/drivers/builtin_openssl2/crypto/aes/aes_misc.c b/thirdparty/openssl/crypto/aes/aes_misc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/aes/aes_misc.c rename to thirdparty/openssl/crypto/aes/aes_misc.c diff --git a/drivers/builtin_openssl2/crypto/aes/aes_ofb.c b/thirdparty/openssl/crypto/aes/aes_ofb.c similarity index 100% rename from drivers/builtin_openssl2/crypto/aes/aes_ofb.c rename to thirdparty/openssl/crypto/aes/aes_ofb.c diff --git a/drivers/builtin_openssl2/crypto/aes/aes_wrap.c b/thirdparty/openssl/crypto/aes/aes_wrap.c similarity index 100% rename from drivers/builtin_openssl2/crypto/aes/aes_wrap.c rename to thirdparty/openssl/crypto/aes/aes_wrap.c diff --git a/drivers/builtin_openssl2/crypto/aes/aes_x86core.c b/thirdparty/openssl/crypto/aes/aes_x86core.c similarity index 100% rename from drivers/builtin_openssl2/crypto/aes/aes_x86core.c rename to thirdparty/openssl/crypto/aes/aes_x86core.c diff --git a/drivers/builtin_openssl2/crypto/arm_arch.h b/thirdparty/openssl/crypto/arm_arch.h similarity index 100% rename from drivers/builtin_openssl2/crypto/arm_arch.h rename to thirdparty/openssl/crypto/arm_arch.h diff --git a/drivers/builtin_openssl2/crypto/armcap.c b/thirdparty/openssl/crypto/armcap.c similarity index 100% rename from drivers/builtin_openssl2/crypto/armcap.c rename to thirdparty/openssl/crypto/armcap.c diff --git a/drivers/builtin_openssl2/crypto/asn1/a_bitstr.c b/thirdparty/openssl/crypto/asn1/a_bitstr.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/a_bitstr.c rename to thirdparty/openssl/crypto/asn1/a_bitstr.c diff --git a/drivers/builtin_openssl2/crypto/asn1/a_bool.c b/thirdparty/openssl/crypto/asn1/a_bool.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/a_bool.c rename to thirdparty/openssl/crypto/asn1/a_bool.c diff --git a/drivers/builtin_openssl2/crypto/asn1/a_bytes.c b/thirdparty/openssl/crypto/asn1/a_bytes.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/a_bytes.c rename to thirdparty/openssl/crypto/asn1/a_bytes.c diff --git a/drivers/builtin_openssl2/crypto/asn1/a_d2i_fp.c b/thirdparty/openssl/crypto/asn1/a_d2i_fp.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/a_d2i_fp.c rename to thirdparty/openssl/crypto/asn1/a_d2i_fp.c diff --git a/drivers/builtin_openssl2/crypto/asn1/a_digest.c b/thirdparty/openssl/crypto/asn1/a_digest.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/a_digest.c rename to thirdparty/openssl/crypto/asn1/a_digest.c diff --git a/drivers/builtin_openssl2/crypto/asn1/a_dup.c b/thirdparty/openssl/crypto/asn1/a_dup.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/a_dup.c rename to thirdparty/openssl/crypto/asn1/a_dup.c diff --git a/drivers/builtin_openssl2/crypto/asn1/a_enum.c b/thirdparty/openssl/crypto/asn1/a_enum.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/a_enum.c rename to thirdparty/openssl/crypto/asn1/a_enum.c diff --git a/drivers/builtin_openssl2/crypto/asn1/a_gentm.c b/thirdparty/openssl/crypto/asn1/a_gentm.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/a_gentm.c rename to thirdparty/openssl/crypto/asn1/a_gentm.c diff --git a/drivers/builtin_openssl2/crypto/asn1/a_i2d_fp.c b/thirdparty/openssl/crypto/asn1/a_i2d_fp.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/a_i2d_fp.c rename to thirdparty/openssl/crypto/asn1/a_i2d_fp.c diff --git a/drivers/builtin_openssl2/crypto/asn1/a_int.c b/thirdparty/openssl/crypto/asn1/a_int.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/a_int.c rename to thirdparty/openssl/crypto/asn1/a_int.c diff --git a/drivers/builtin_openssl2/crypto/asn1/a_mbstr.c b/thirdparty/openssl/crypto/asn1/a_mbstr.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/a_mbstr.c rename to thirdparty/openssl/crypto/asn1/a_mbstr.c diff --git a/drivers/builtin_openssl2/crypto/asn1/a_object.c b/thirdparty/openssl/crypto/asn1/a_object.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/a_object.c rename to thirdparty/openssl/crypto/asn1/a_object.c diff --git a/drivers/builtin_openssl2/crypto/asn1/a_octet.c b/thirdparty/openssl/crypto/asn1/a_octet.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/a_octet.c rename to thirdparty/openssl/crypto/asn1/a_octet.c diff --git a/drivers/builtin_openssl2/crypto/asn1/a_print.c b/thirdparty/openssl/crypto/asn1/a_print.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/a_print.c rename to thirdparty/openssl/crypto/asn1/a_print.c diff --git a/drivers/builtin_openssl2/crypto/asn1/a_set.c b/thirdparty/openssl/crypto/asn1/a_set.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/a_set.c rename to thirdparty/openssl/crypto/asn1/a_set.c diff --git a/drivers/builtin_openssl2/crypto/asn1/a_sign.c b/thirdparty/openssl/crypto/asn1/a_sign.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/a_sign.c rename to thirdparty/openssl/crypto/asn1/a_sign.c diff --git a/drivers/builtin_openssl2/crypto/asn1/a_strex.c b/thirdparty/openssl/crypto/asn1/a_strex.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/a_strex.c rename to thirdparty/openssl/crypto/asn1/a_strex.c diff --git a/drivers/builtin_openssl2/crypto/asn1/a_strnid.c b/thirdparty/openssl/crypto/asn1/a_strnid.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/a_strnid.c rename to thirdparty/openssl/crypto/asn1/a_strnid.c diff --git a/drivers/builtin_openssl2/crypto/asn1/a_time.c b/thirdparty/openssl/crypto/asn1/a_time.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/a_time.c rename to thirdparty/openssl/crypto/asn1/a_time.c diff --git a/drivers/builtin_openssl2/crypto/asn1/a_type.c b/thirdparty/openssl/crypto/asn1/a_type.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/a_type.c rename to thirdparty/openssl/crypto/asn1/a_type.c diff --git a/drivers/builtin_openssl2/crypto/asn1/a_utctm.c b/thirdparty/openssl/crypto/asn1/a_utctm.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/a_utctm.c rename to thirdparty/openssl/crypto/asn1/a_utctm.c diff --git a/drivers/builtin_openssl2/crypto/asn1/a_utf8.c b/thirdparty/openssl/crypto/asn1/a_utf8.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/a_utf8.c rename to thirdparty/openssl/crypto/asn1/a_utf8.c diff --git a/drivers/builtin_openssl2/crypto/asn1/a_verify.c b/thirdparty/openssl/crypto/asn1/a_verify.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/a_verify.c rename to thirdparty/openssl/crypto/asn1/a_verify.c diff --git a/drivers/builtin_openssl2/crypto/asn1/ameth_lib.c b/thirdparty/openssl/crypto/asn1/ameth_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/ameth_lib.c rename to thirdparty/openssl/crypto/asn1/ameth_lib.c diff --git a/drivers/builtin_openssl2/crypto/asn1/asn1_err.c b/thirdparty/openssl/crypto/asn1/asn1_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/asn1_err.c rename to thirdparty/openssl/crypto/asn1/asn1_err.c diff --git a/drivers/builtin_openssl2/crypto/asn1/asn1_gen.c b/thirdparty/openssl/crypto/asn1/asn1_gen.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/asn1_gen.c rename to thirdparty/openssl/crypto/asn1/asn1_gen.c diff --git a/drivers/builtin_openssl2/crypto/asn1/asn1_lib.c b/thirdparty/openssl/crypto/asn1/asn1_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/asn1_lib.c rename to thirdparty/openssl/crypto/asn1/asn1_lib.c diff --git a/drivers/builtin_openssl2/crypto/asn1/asn1_locl.h b/thirdparty/openssl/crypto/asn1/asn1_locl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/asn1_locl.h rename to thirdparty/openssl/crypto/asn1/asn1_locl.h diff --git a/drivers/builtin_openssl2/crypto/asn1/asn1_par.c b/thirdparty/openssl/crypto/asn1/asn1_par.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/asn1_par.c rename to thirdparty/openssl/crypto/asn1/asn1_par.c diff --git a/drivers/builtin_openssl2/crypto/asn1/asn_mime.c b/thirdparty/openssl/crypto/asn1/asn_mime.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/asn_mime.c rename to thirdparty/openssl/crypto/asn1/asn_mime.c diff --git a/drivers/builtin_openssl2/crypto/asn1/asn_moid.c b/thirdparty/openssl/crypto/asn1/asn_moid.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/asn_moid.c rename to thirdparty/openssl/crypto/asn1/asn_moid.c diff --git a/drivers/builtin_openssl2/crypto/asn1/asn_pack.c b/thirdparty/openssl/crypto/asn1/asn_pack.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/asn_pack.c rename to thirdparty/openssl/crypto/asn1/asn_pack.c diff --git a/drivers/builtin_openssl2/crypto/asn1/bio_asn1.c b/thirdparty/openssl/crypto/asn1/bio_asn1.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/bio_asn1.c rename to thirdparty/openssl/crypto/asn1/bio_asn1.c diff --git a/drivers/builtin_openssl2/crypto/asn1/bio_ndef.c b/thirdparty/openssl/crypto/asn1/bio_ndef.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/bio_ndef.c rename to thirdparty/openssl/crypto/asn1/bio_ndef.c diff --git a/drivers/builtin_openssl2/crypto/asn1/charmap.h b/thirdparty/openssl/crypto/asn1/charmap.h similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/charmap.h rename to thirdparty/openssl/crypto/asn1/charmap.h diff --git a/drivers/builtin_openssl2/crypto/asn1/d2i_pr.c b/thirdparty/openssl/crypto/asn1/d2i_pr.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/d2i_pr.c rename to thirdparty/openssl/crypto/asn1/d2i_pr.c diff --git a/drivers/builtin_openssl2/crypto/asn1/d2i_pu.c b/thirdparty/openssl/crypto/asn1/d2i_pu.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/d2i_pu.c rename to thirdparty/openssl/crypto/asn1/d2i_pu.c diff --git a/drivers/builtin_openssl2/crypto/asn1/evp_asn1.c b/thirdparty/openssl/crypto/asn1/evp_asn1.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/evp_asn1.c rename to thirdparty/openssl/crypto/asn1/evp_asn1.c diff --git a/drivers/builtin_openssl2/crypto/asn1/f_enum.c b/thirdparty/openssl/crypto/asn1/f_enum.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/f_enum.c rename to thirdparty/openssl/crypto/asn1/f_enum.c diff --git a/drivers/builtin_openssl2/crypto/asn1/f_int.c b/thirdparty/openssl/crypto/asn1/f_int.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/f_int.c rename to thirdparty/openssl/crypto/asn1/f_int.c diff --git a/drivers/builtin_openssl2/crypto/asn1/f_string.c b/thirdparty/openssl/crypto/asn1/f_string.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/f_string.c rename to thirdparty/openssl/crypto/asn1/f_string.c diff --git a/drivers/builtin_openssl2/crypto/asn1/i2d_pr.c b/thirdparty/openssl/crypto/asn1/i2d_pr.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/i2d_pr.c rename to thirdparty/openssl/crypto/asn1/i2d_pr.c diff --git a/drivers/builtin_openssl2/crypto/asn1/i2d_pu.c b/thirdparty/openssl/crypto/asn1/i2d_pu.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/i2d_pu.c rename to thirdparty/openssl/crypto/asn1/i2d_pu.c diff --git a/drivers/builtin_openssl2/crypto/asn1/n_pkey.c b/thirdparty/openssl/crypto/asn1/n_pkey.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/n_pkey.c rename to thirdparty/openssl/crypto/asn1/n_pkey.c diff --git a/drivers/builtin_openssl2/crypto/asn1/nsseq.c b/thirdparty/openssl/crypto/asn1/nsseq.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/nsseq.c rename to thirdparty/openssl/crypto/asn1/nsseq.c diff --git a/drivers/builtin_openssl2/crypto/asn1/p5_pbe.c b/thirdparty/openssl/crypto/asn1/p5_pbe.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/p5_pbe.c rename to thirdparty/openssl/crypto/asn1/p5_pbe.c diff --git a/drivers/builtin_openssl2/crypto/asn1/p5_pbev2.c b/thirdparty/openssl/crypto/asn1/p5_pbev2.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/p5_pbev2.c rename to thirdparty/openssl/crypto/asn1/p5_pbev2.c diff --git a/drivers/builtin_openssl2/crypto/asn1/p8_pkey.c b/thirdparty/openssl/crypto/asn1/p8_pkey.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/p8_pkey.c rename to thirdparty/openssl/crypto/asn1/p8_pkey.c diff --git a/drivers/builtin_openssl2/crypto/asn1/t_bitst.c b/thirdparty/openssl/crypto/asn1/t_bitst.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/t_bitst.c rename to thirdparty/openssl/crypto/asn1/t_bitst.c diff --git a/drivers/builtin_openssl2/crypto/asn1/t_crl.c b/thirdparty/openssl/crypto/asn1/t_crl.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/t_crl.c rename to thirdparty/openssl/crypto/asn1/t_crl.c diff --git a/drivers/builtin_openssl2/crypto/asn1/t_pkey.c b/thirdparty/openssl/crypto/asn1/t_pkey.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/t_pkey.c rename to thirdparty/openssl/crypto/asn1/t_pkey.c diff --git a/drivers/builtin_openssl2/crypto/asn1/t_req.c b/thirdparty/openssl/crypto/asn1/t_req.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/t_req.c rename to thirdparty/openssl/crypto/asn1/t_req.c diff --git a/drivers/builtin_openssl2/crypto/asn1/t_spki.c b/thirdparty/openssl/crypto/asn1/t_spki.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/t_spki.c rename to thirdparty/openssl/crypto/asn1/t_spki.c diff --git a/drivers/builtin_openssl2/crypto/asn1/t_x509.c b/thirdparty/openssl/crypto/asn1/t_x509.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/t_x509.c rename to thirdparty/openssl/crypto/asn1/t_x509.c diff --git a/drivers/builtin_openssl2/crypto/asn1/t_x509a.c b/thirdparty/openssl/crypto/asn1/t_x509a.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/t_x509a.c rename to thirdparty/openssl/crypto/asn1/t_x509a.c diff --git a/drivers/builtin_openssl2/crypto/asn1/tasn_dec.c b/thirdparty/openssl/crypto/asn1/tasn_dec.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/tasn_dec.c rename to thirdparty/openssl/crypto/asn1/tasn_dec.c diff --git a/drivers/builtin_openssl2/crypto/asn1/tasn_enc.c b/thirdparty/openssl/crypto/asn1/tasn_enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/tasn_enc.c rename to thirdparty/openssl/crypto/asn1/tasn_enc.c diff --git a/drivers/builtin_openssl2/crypto/asn1/tasn_fre.c b/thirdparty/openssl/crypto/asn1/tasn_fre.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/tasn_fre.c rename to thirdparty/openssl/crypto/asn1/tasn_fre.c diff --git a/drivers/builtin_openssl2/crypto/asn1/tasn_new.c b/thirdparty/openssl/crypto/asn1/tasn_new.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/tasn_new.c rename to thirdparty/openssl/crypto/asn1/tasn_new.c diff --git a/drivers/builtin_openssl2/crypto/asn1/tasn_prn.c b/thirdparty/openssl/crypto/asn1/tasn_prn.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/tasn_prn.c rename to thirdparty/openssl/crypto/asn1/tasn_prn.c diff --git a/drivers/builtin_openssl2/crypto/asn1/tasn_typ.c b/thirdparty/openssl/crypto/asn1/tasn_typ.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/tasn_typ.c rename to thirdparty/openssl/crypto/asn1/tasn_typ.c diff --git a/drivers/builtin_openssl2/crypto/asn1/tasn_utl.c b/thirdparty/openssl/crypto/asn1/tasn_utl.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/tasn_utl.c rename to thirdparty/openssl/crypto/asn1/tasn_utl.c diff --git a/drivers/builtin_openssl2/crypto/asn1/x_algor.c b/thirdparty/openssl/crypto/asn1/x_algor.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/x_algor.c rename to thirdparty/openssl/crypto/asn1/x_algor.c diff --git a/drivers/builtin_openssl2/crypto/asn1/x_attrib.c b/thirdparty/openssl/crypto/asn1/x_attrib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/x_attrib.c rename to thirdparty/openssl/crypto/asn1/x_attrib.c diff --git a/drivers/builtin_openssl2/crypto/asn1/x_bignum.c b/thirdparty/openssl/crypto/asn1/x_bignum.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/x_bignum.c rename to thirdparty/openssl/crypto/asn1/x_bignum.c diff --git a/drivers/builtin_openssl2/crypto/asn1/x_crl.c b/thirdparty/openssl/crypto/asn1/x_crl.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/x_crl.c rename to thirdparty/openssl/crypto/asn1/x_crl.c diff --git a/drivers/builtin_openssl2/crypto/asn1/x_exten.c b/thirdparty/openssl/crypto/asn1/x_exten.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/x_exten.c rename to thirdparty/openssl/crypto/asn1/x_exten.c diff --git a/drivers/builtin_openssl2/crypto/asn1/x_info.c b/thirdparty/openssl/crypto/asn1/x_info.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/x_info.c rename to thirdparty/openssl/crypto/asn1/x_info.c diff --git a/drivers/builtin_openssl2/crypto/asn1/x_long.c b/thirdparty/openssl/crypto/asn1/x_long.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/x_long.c rename to thirdparty/openssl/crypto/asn1/x_long.c diff --git a/drivers/builtin_openssl2/crypto/asn1/x_name.c b/thirdparty/openssl/crypto/asn1/x_name.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/x_name.c rename to thirdparty/openssl/crypto/asn1/x_name.c diff --git a/drivers/builtin_openssl2/crypto/asn1/x_nx509.c b/thirdparty/openssl/crypto/asn1/x_nx509.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/x_nx509.c rename to thirdparty/openssl/crypto/asn1/x_nx509.c diff --git a/drivers/builtin_openssl2/crypto/asn1/x_pkey.c b/thirdparty/openssl/crypto/asn1/x_pkey.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/x_pkey.c rename to thirdparty/openssl/crypto/asn1/x_pkey.c diff --git a/drivers/builtin_openssl2/crypto/asn1/x_pubkey.c b/thirdparty/openssl/crypto/asn1/x_pubkey.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/x_pubkey.c rename to thirdparty/openssl/crypto/asn1/x_pubkey.c diff --git a/drivers/builtin_openssl2/crypto/asn1/x_req.c b/thirdparty/openssl/crypto/asn1/x_req.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/x_req.c rename to thirdparty/openssl/crypto/asn1/x_req.c diff --git a/drivers/builtin_openssl2/crypto/asn1/x_sig.c b/thirdparty/openssl/crypto/asn1/x_sig.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/x_sig.c rename to thirdparty/openssl/crypto/asn1/x_sig.c diff --git a/drivers/builtin_openssl2/crypto/asn1/x_spki.c b/thirdparty/openssl/crypto/asn1/x_spki.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/x_spki.c rename to thirdparty/openssl/crypto/asn1/x_spki.c diff --git a/drivers/builtin_openssl2/crypto/asn1/x_val.c b/thirdparty/openssl/crypto/asn1/x_val.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/x_val.c rename to thirdparty/openssl/crypto/asn1/x_val.c diff --git a/drivers/builtin_openssl2/crypto/asn1/x_x509.c b/thirdparty/openssl/crypto/asn1/x_x509.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/x_x509.c rename to thirdparty/openssl/crypto/asn1/x_x509.c diff --git a/drivers/builtin_openssl2/crypto/asn1/x_x509a.c b/thirdparty/openssl/crypto/asn1/x_x509a.c similarity index 100% rename from drivers/builtin_openssl2/crypto/asn1/x_x509a.c rename to thirdparty/openssl/crypto/asn1/x_x509a.c diff --git a/drivers/builtin_openssl2/crypto/bf/COPYRIGHT b/thirdparty/openssl/crypto/bf/COPYRIGHT similarity index 100% rename from drivers/builtin_openssl2/crypto/bf/COPYRIGHT rename to thirdparty/openssl/crypto/bf/COPYRIGHT diff --git a/drivers/builtin_openssl2/crypto/bf/INSTALL b/thirdparty/openssl/crypto/bf/INSTALL similarity index 100% rename from drivers/builtin_openssl2/crypto/bf/INSTALL rename to thirdparty/openssl/crypto/bf/INSTALL diff --git a/drivers/builtin_openssl2/crypto/bf/README b/thirdparty/openssl/crypto/bf/README similarity index 100% rename from drivers/builtin_openssl2/crypto/bf/README rename to thirdparty/openssl/crypto/bf/README diff --git a/drivers/builtin_openssl2/crypto/bf/VERSION b/thirdparty/openssl/crypto/bf/VERSION similarity index 100% rename from drivers/builtin_openssl2/crypto/bf/VERSION rename to thirdparty/openssl/crypto/bf/VERSION diff --git a/drivers/builtin_openssl2/crypto/bf/asm/readme b/thirdparty/openssl/crypto/bf/asm/readme similarity index 100% rename from drivers/builtin_openssl2/crypto/bf/asm/readme rename to thirdparty/openssl/crypto/bf/asm/readme diff --git a/drivers/builtin_openssl2/crypto/bf/bf_cbc.c b/thirdparty/openssl/crypto/bf/bf_cbc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bf/bf_cbc.c rename to thirdparty/openssl/crypto/bf/bf_cbc.c diff --git a/drivers/builtin_openssl2/crypto/bf/bf_cfb64.c b/thirdparty/openssl/crypto/bf/bf_cfb64.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bf/bf_cfb64.c rename to thirdparty/openssl/crypto/bf/bf_cfb64.c diff --git a/drivers/builtin_openssl2/crypto/bf/bf_ecb.c b/thirdparty/openssl/crypto/bf/bf_ecb.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bf/bf_ecb.c rename to thirdparty/openssl/crypto/bf/bf_ecb.c diff --git a/drivers/builtin_openssl2/crypto/bf/bf_enc.c b/thirdparty/openssl/crypto/bf/bf_enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bf/bf_enc.c rename to thirdparty/openssl/crypto/bf/bf_enc.c diff --git a/drivers/builtin_openssl2/crypto/bf/bf_locl.h b/thirdparty/openssl/crypto/bf/bf_locl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/bf/bf_locl.h rename to thirdparty/openssl/crypto/bf/bf_locl.h diff --git a/drivers/builtin_openssl2/crypto/bf/bf_ofb64.c b/thirdparty/openssl/crypto/bf/bf_ofb64.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bf/bf_ofb64.c rename to thirdparty/openssl/crypto/bf/bf_ofb64.c diff --git a/drivers/builtin_openssl2/crypto/bf/bf_opts.c b/thirdparty/openssl/crypto/bf/bf_opts.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bf/bf_opts.c rename to thirdparty/openssl/crypto/bf/bf_opts.c diff --git a/drivers/builtin_openssl2/crypto/bf/bf_pi.h b/thirdparty/openssl/crypto/bf/bf_pi.h similarity index 100% rename from drivers/builtin_openssl2/crypto/bf/bf_pi.h rename to thirdparty/openssl/crypto/bf/bf_pi.h diff --git a/drivers/builtin_openssl2/crypto/bf/bf_skey.c b/thirdparty/openssl/crypto/bf/bf_skey.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bf/bf_skey.c rename to thirdparty/openssl/crypto/bf/bf_skey.c diff --git a/drivers/builtin_openssl2/crypto/bf/bfs.cpp b/thirdparty/openssl/crypto/bf/bfs.cpp similarity index 100% rename from drivers/builtin_openssl2/crypto/bf/bfs.cpp rename to thirdparty/openssl/crypto/bf/bfs.cpp diff --git a/drivers/builtin_openssl2/crypto/bf/bfspeed.c b/thirdparty/openssl/crypto/bf/bfspeed.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bf/bfspeed.c rename to thirdparty/openssl/crypto/bf/bfspeed.c diff --git a/drivers/builtin_openssl2/crypto/bio/b_dump.c b/thirdparty/openssl/crypto/bio/b_dump.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bio/b_dump.c rename to thirdparty/openssl/crypto/bio/b_dump.c diff --git a/drivers/builtin_openssl2/crypto/bio/b_print.c b/thirdparty/openssl/crypto/bio/b_print.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bio/b_print.c rename to thirdparty/openssl/crypto/bio/b_print.c diff --git a/drivers/builtin_openssl2/crypto/bio/b_sock.c b/thirdparty/openssl/crypto/bio/b_sock.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bio/b_sock.c rename to thirdparty/openssl/crypto/bio/b_sock.c diff --git a/drivers/builtin_openssl2/crypto/bio/bf_buff.c b/thirdparty/openssl/crypto/bio/bf_buff.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bio/bf_buff.c rename to thirdparty/openssl/crypto/bio/bf_buff.c diff --git a/drivers/builtin_openssl2/crypto/bio/bf_lbuf.c b/thirdparty/openssl/crypto/bio/bf_lbuf.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bio/bf_lbuf.c rename to thirdparty/openssl/crypto/bio/bf_lbuf.c diff --git a/drivers/builtin_openssl2/crypto/bio/bf_nbio.c b/thirdparty/openssl/crypto/bio/bf_nbio.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bio/bf_nbio.c rename to thirdparty/openssl/crypto/bio/bf_nbio.c diff --git a/drivers/builtin_openssl2/crypto/bio/bf_null.c b/thirdparty/openssl/crypto/bio/bf_null.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bio/bf_null.c rename to thirdparty/openssl/crypto/bio/bf_null.c diff --git a/drivers/builtin_openssl2/crypto/bio/bio_cb.c b/thirdparty/openssl/crypto/bio/bio_cb.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bio/bio_cb.c rename to thirdparty/openssl/crypto/bio/bio_cb.c diff --git a/drivers/builtin_openssl2/crypto/bio/bio_err.c b/thirdparty/openssl/crypto/bio/bio_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bio/bio_err.c rename to thirdparty/openssl/crypto/bio/bio_err.c diff --git a/drivers/builtin_openssl2/crypto/bio/bio_lcl.h b/thirdparty/openssl/crypto/bio/bio_lcl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/bio/bio_lcl.h rename to thirdparty/openssl/crypto/bio/bio_lcl.h diff --git a/drivers/builtin_openssl2/crypto/bio/bio_lib.c b/thirdparty/openssl/crypto/bio/bio_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bio/bio_lib.c rename to thirdparty/openssl/crypto/bio/bio_lib.c diff --git a/drivers/builtin_openssl2/crypto/bio/bss_acpt.c b/thirdparty/openssl/crypto/bio/bss_acpt.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bio/bss_acpt.c rename to thirdparty/openssl/crypto/bio/bss_acpt.c diff --git a/drivers/builtin_openssl2/crypto/bio/bss_bio.c b/thirdparty/openssl/crypto/bio/bss_bio.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bio/bss_bio.c rename to thirdparty/openssl/crypto/bio/bss_bio.c diff --git a/drivers/builtin_openssl2/crypto/bio/bss_conn.c b/thirdparty/openssl/crypto/bio/bss_conn.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bio/bss_conn.c rename to thirdparty/openssl/crypto/bio/bss_conn.c diff --git a/drivers/builtin_openssl2/crypto/bio/bss_dgram.c b/thirdparty/openssl/crypto/bio/bss_dgram.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bio/bss_dgram.c rename to thirdparty/openssl/crypto/bio/bss_dgram.c diff --git a/drivers/builtin_openssl2/crypto/bio/bss_fd.c b/thirdparty/openssl/crypto/bio/bss_fd.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bio/bss_fd.c rename to thirdparty/openssl/crypto/bio/bss_fd.c diff --git a/drivers/builtin_openssl2/crypto/bio/bss_file.c b/thirdparty/openssl/crypto/bio/bss_file.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bio/bss_file.c rename to thirdparty/openssl/crypto/bio/bss_file.c diff --git a/drivers/builtin_openssl2/crypto/bio/bss_log.c b/thirdparty/openssl/crypto/bio/bss_log.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bio/bss_log.c rename to thirdparty/openssl/crypto/bio/bss_log.c diff --git a/drivers/builtin_openssl2/crypto/bio/bss_mem.c b/thirdparty/openssl/crypto/bio/bss_mem.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bio/bss_mem.c rename to thirdparty/openssl/crypto/bio/bss_mem.c diff --git a/drivers/builtin_openssl2/crypto/bio/bss_null.c b/thirdparty/openssl/crypto/bio/bss_null.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bio/bss_null.c rename to thirdparty/openssl/crypto/bio/bss_null.c diff --git a/drivers/builtin_openssl2/crypto/bio/bss_rtcp.c b/thirdparty/openssl/crypto/bio/bss_rtcp.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bio/bss_rtcp.c rename to thirdparty/openssl/crypto/bio/bss_rtcp.c diff --git a/drivers/builtin_openssl2/crypto/bio/bss_sock.c b/thirdparty/openssl/crypto/bio/bss_sock.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bio/bss_sock.c rename to thirdparty/openssl/crypto/bio/bss_sock.c diff --git a/drivers/builtin_openssl2/crypto/bn/asm/README b/thirdparty/openssl/crypto/bn/asm/README similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/asm/README rename to thirdparty/openssl/crypto/bn/asm/README diff --git a/drivers/builtin_openssl2/crypto/bn/asm/vms.mar b/thirdparty/openssl/crypto/bn/asm/vms.mar similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/asm/vms.mar rename to thirdparty/openssl/crypto/bn/asm/vms.mar diff --git a/drivers/builtin_openssl2/crypto/bn/asm/x86/f b/thirdparty/openssl/crypto/bn/asm/x86/f similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/asm/x86/f rename to thirdparty/openssl/crypto/bn/asm/x86/f diff --git a/drivers/builtin_openssl2/crypto/bn/asm/x86_64-gcc.c b/thirdparty/openssl/crypto/bn/asm/x86_64-gcc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/asm/x86_64-gcc.c rename to thirdparty/openssl/crypto/bn/asm/x86_64-gcc.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn.mul b/thirdparty/openssl/crypto/bn/bn.mul similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn.mul rename to thirdparty/openssl/crypto/bn/bn.mul diff --git a/drivers/builtin_openssl2/crypto/bn/bn_add.c b/thirdparty/openssl/crypto/bn/bn_add.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_add.c rename to thirdparty/openssl/crypto/bn/bn_add.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_asm.c b/thirdparty/openssl/crypto/bn/bn_asm.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_asm.c rename to thirdparty/openssl/crypto/bn/bn_asm.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_blind.c b/thirdparty/openssl/crypto/bn/bn_blind.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_blind.c rename to thirdparty/openssl/crypto/bn/bn_blind.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_const.c b/thirdparty/openssl/crypto/bn/bn_const.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_const.c rename to thirdparty/openssl/crypto/bn/bn_const.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_ctx.c b/thirdparty/openssl/crypto/bn/bn_ctx.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_ctx.c rename to thirdparty/openssl/crypto/bn/bn_ctx.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_depr.c b/thirdparty/openssl/crypto/bn/bn_depr.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_depr.c rename to thirdparty/openssl/crypto/bn/bn_depr.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_div.c b/thirdparty/openssl/crypto/bn/bn_div.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_div.c rename to thirdparty/openssl/crypto/bn/bn_div.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_err.c b/thirdparty/openssl/crypto/bn/bn_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_err.c rename to thirdparty/openssl/crypto/bn/bn_err.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_exp.c b/thirdparty/openssl/crypto/bn/bn_exp.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_exp.c rename to thirdparty/openssl/crypto/bn/bn_exp.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_exp2.c b/thirdparty/openssl/crypto/bn/bn_exp2.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_exp2.c rename to thirdparty/openssl/crypto/bn/bn_exp2.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_gcd.c b/thirdparty/openssl/crypto/bn/bn_gcd.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_gcd.c rename to thirdparty/openssl/crypto/bn/bn_gcd.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_gf2m.c b/thirdparty/openssl/crypto/bn/bn_gf2m.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_gf2m.c rename to thirdparty/openssl/crypto/bn/bn_gf2m.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_kron.c b/thirdparty/openssl/crypto/bn/bn_kron.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_kron.c rename to thirdparty/openssl/crypto/bn/bn_kron.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_lcl.h b/thirdparty/openssl/crypto/bn/bn_lcl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_lcl.h rename to thirdparty/openssl/crypto/bn/bn_lcl.h diff --git a/drivers/builtin_openssl2/crypto/bn/bn_lib.c b/thirdparty/openssl/crypto/bn/bn_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_lib.c rename to thirdparty/openssl/crypto/bn/bn_lib.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_mod.c b/thirdparty/openssl/crypto/bn/bn_mod.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_mod.c rename to thirdparty/openssl/crypto/bn/bn_mod.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_mont.c b/thirdparty/openssl/crypto/bn/bn_mont.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_mont.c rename to thirdparty/openssl/crypto/bn/bn_mont.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_mpi.c b/thirdparty/openssl/crypto/bn/bn_mpi.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_mpi.c rename to thirdparty/openssl/crypto/bn/bn_mpi.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_mul.c b/thirdparty/openssl/crypto/bn/bn_mul.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_mul.c rename to thirdparty/openssl/crypto/bn/bn_mul.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_nist.c b/thirdparty/openssl/crypto/bn/bn_nist.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_nist.c rename to thirdparty/openssl/crypto/bn/bn_nist.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_prime.c b/thirdparty/openssl/crypto/bn/bn_prime.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_prime.c rename to thirdparty/openssl/crypto/bn/bn_prime.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_prime.h b/thirdparty/openssl/crypto/bn/bn_prime.h similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_prime.h rename to thirdparty/openssl/crypto/bn/bn_prime.h diff --git a/drivers/builtin_openssl2/crypto/bn/bn_print.c b/thirdparty/openssl/crypto/bn/bn_print.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_print.c rename to thirdparty/openssl/crypto/bn/bn_print.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_rand.c b/thirdparty/openssl/crypto/bn/bn_rand.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_rand.c rename to thirdparty/openssl/crypto/bn/bn_rand.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_recp.c b/thirdparty/openssl/crypto/bn/bn_recp.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_recp.c rename to thirdparty/openssl/crypto/bn/bn_recp.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_shift.c b/thirdparty/openssl/crypto/bn/bn_shift.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_shift.c rename to thirdparty/openssl/crypto/bn/bn_shift.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_sqr.c b/thirdparty/openssl/crypto/bn/bn_sqr.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_sqr.c rename to thirdparty/openssl/crypto/bn/bn_sqr.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_sqrt.c b/thirdparty/openssl/crypto/bn/bn_sqrt.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_sqrt.c rename to thirdparty/openssl/crypto/bn/bn_sqrt.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_word.c b/thirdparty/openssl/crypto/bn/bn_word.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_word.c rename to thirdparty/openssl/crypto/bn/bn_word.c diff --git a/drivers/builtin_openssl2/crypto/bn/bn_x931p.c b/thirdparty/openssl/crypto/bn/bn_x931p.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bn_x931p.c rename to thirdparty/openssl/crypto/bn/bn_x931p.c diff --git a/drivers/builtin_openssl2/crypto/bn/bnspeed.c b/thirdparty/openssl/crypto/bn/bnspeed.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/bnspeed.c rename to thirdparty/openssl/crypto/bn/bnspeed.c diff --git a/drivers/builtin_openssl2/crypto/bn/exp.c b/thirdparty/openssl/crypto/bn/exp.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/exp.c rename to thirdparty/openssl/crypto/bn/exp.c diff --git a/drivers/builtin_openssl2/crypto/bn/expspeed.c b/thirdparty/openssl/crypto/bn/expspeed.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/expspeed.c rename to thirdparty/openssl/crypto/bn/expspeed.c diff --git a/drivers/builtin_openssl2/crypto/bn/rsaz_exp.c b/thirdparty/openssl/crypto/bn/rsaz_exp.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/rsaz_exp.c rename to thirdparty/openssl/crypto/bn/rsaz_exp.c diff --git a/drivers/builtin_openssl2/crypto/bn/rsaz_exp.h b/thirdparty/openssl/crypto/bn/rsaz_exp.h similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/rsaz_exp.h rename to thirdparty/openssl/crypto/bn/rsaz_exp.h diff --git a/drivers/builtin_openssl2/crypto/bn/todo b/thirdparty/openssl/crypto/bn/todo similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/todo rename to thirdparty/openssl/crypto/bn/todo diff --git a/drivers/builtin_openssl2/crypto/bn/vms-helper.c b/thirdparty/openssl/crypto/bn/vms-helper.c similarity index 100% rename from drivers/builtin_openssl2/crypto/bn/vms-helper.c rename to thirdparty/openssl/crypto/bn/vms-helper.c diff --git a/drivers/builtin_openssl2/crypto/buffer/buf_err.c b/thirdparty/openssl/crypto/buffer/buf_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/buffer/buf_err.c rename to thirdparty/openssl/crypto/buffer/buf_err.c diff --git a/drivers/builtin_openssl2/crypto/buffer/buf_str.c b/thirdparty/openssl/crypto/buffer/buf_str.c similarity index 100% rename from drivers/builtin_openssl2/crypto/buffer/buf_str.c rename to thirdparty/openssl/crypto/buffer/buf_str.c diff --git a/drivers/builtin_openssl2/crypto/buffer/buffer.c b/thirdparty/openssl/crypto/buffer/buffer.c similarity index 100% rename from drivers/builtin_openssl2/crypto/buffer/buffer.c rename to thirdparty/openssl/crypto/buffer/buffer.c diff --git a/drivers/builtin_openssl2/crypto/camellia/camellia.c b/thirdparty/openssl/crypto/camellia/camellia.c similarity index 100% rename from drivers/builtin_openssl2/crypto/camellia/camellia.c rename to thirdparty/openssl/crypto/camellia/camellia.c diff --git a/drivers/builtin_openssl2/crypto/camellia/cmll_cbc.c b/thirdparty/openssl/crypto/camellia/cmll_cbc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/camellia/cmll_cbc.c rename to thirdparty/openssl/crypto/camellia/cmll_cbc.c diff --git a/drivers/builtin_openssl2/crypto/camellia/cmll_cfb.c b/thirdparty/openssl/crypto/camellia/cmll_cfb.c similarity index 100% rename from drivers/builtin_openssl2/crypto/camellia/cmll_cfb.c rename to thirdparty/openssl/crypto/camellia/cmll_cfb.c diff --git a/drivers/builtin_openssl2/crypto/camellia/cmll_ctr.c b/thirdparty/openssl/crypto/camellia/cmll_ctr.c similarity index 100% rename from drivers/builtin_openssl2/crypto/camellia/cmll_ctr.c rename to thirdparty/openssl/crypto/camellia/cmll_ctr.c diff --git a/drivers/builtin_openssl2/crypto/camellia/cmll_ecb.c b/thirdparty/openssl/crypto/camellia/cmll_ecb.c similarity index 100% rename from drivers/builtin_openssl2/crypto/camellia/cmll_ecb.c rename to thirdparty/openssl/crypto/camellia/cmll_ecb.c diff --git a/drivers/builtin_openssl2/crypto/camellia/cmll_locl.h b/thirdparty/openssl/crypto/camellia/cmll_locl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/camellia/cmll_locl.h rename to thirdparty/openssl/crypto/camellia/cmll_locl.h diff --git a/drivers/builtin_openssl2/crypto/camellia/cmll_misc.c b/thirdparty/openssl/crypto/camellia/cmll_misc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/camellia/cmll_misc.c rename to thirdparty/openssl/crypto/camellia/cmll_misc.c diff --git a/drivers/builtin_openssl2/crypto/camellia/cmll_ofb.c b/thirdparty/openssl/crypto/camellia/cmll_ofb.c similarity index 100% rename from drivers/builtin_openssl2/crypto/camellia/cmll_ofb.c rename to thirdparty/openssl/crypto/camellia/cmll_ofb.c diff --git a/drivers/builtin_openssl2/crypto/camellia/cmll_utl.c b/thirdparty/openssl/crypto/camellia/cmll_utl.c similarity index 100% rename from drivers/builtin_openssl2/crypto/camellia/cmll_utl.c rename to thirdparty/openssl/crypto/camellia/cmll_utl.c diff --git a/drivers/builtin_openssl2/crypto/cast/asm/readme b/thirdparty/openssl/crypto/cast/asm/readme similarity index 100% rename from drivers/builtin_openssl2/crypto/cast/asm/readme rename to thirdparty/openssl/crypto/cast/asm/readme diff --git a/drivers/builtin_openssl2/crypto/cast/c_cfb64.c b/thirdparty/openssl/crypto/cast/c_cfb64.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cast/c_cfb64.c rename to thirdparty/openssl/crypto/cast/c_cfb64.c diff --git a/drivers/builtin_openssl2/crypto/cast/c_ecb.c b/thirdparty/openssl/crypto/cast/c_ecb.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cast/c_ecb.c rename to thirdparty/openssl/crypto/cast/c_ecb.c diff --git a/drivers/builtin_openssl2/crypto/cast/c_enc.c b/thirdparty/openssl/crypto/cast/c_enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cast/c_enc.c rename to thirdparty/openssl/crypto/cast/c_enc.c diff --git a/drivers/builtin_openssl2/crypto/cast/c_ofb64.c b/thirdparty/openssl/crypto/cast/c_ofb64.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cast/c_ofb64.c rename to thirdparty/openssl/crypto/cast/c_ofb64.c diff --git a/drivers/builtin_openssl2/crypto/cast/c_skey.c b/thirdparty/openssl/crypto/cast/c_skey.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cast/c_skey.c rename to thirdparty/openssl/crypto/cast/c_skey.c diff --git a/drivers/builtin_openssl2/crypto/cast/cast_lcl.h b/thirdparty/openssl/crypto/cast/cast_lcl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/cast/cast_lcl.h rename to thirdparty/openssl/crypto/cast/cast_lcl.h diff --git a/drivers/builtin_openssl2/crypto/cast/cast_s.h b/thirdparty/openssl/crypto/cast/cast_s.h similarity index 100% rename from drivers/builtin_openssl2/crypto/cast/cast_s.h rename to thirdparty/openssl/crypto/cast/cast_s.h diff --git a/drivers/builtin_openssl2/crypto/cast/cast_spd.c b/thirdparty/openssl/crypto/cast/cast_spd.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cast/cast_spd.c rename to thirdparty/openssl/crypto/cast/cast_spd.c diff --git a/drivers/builtin_openssl2/crypto/cast/castopts.c b/thirdparty/openssl/crypto/cast/castopts.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cast/castopts.c rename to thirdparty/openssl/crypto/cast/castopts.c diff --git a/drivers/builtin_openssl2/crypto/cast/casts.cpp b/thirdparty/openssl/crypto/cast/casts.cpp similarity index 100% rename from drivers/builtin_openssl2/crypto/cast/casts.cpp rename to thirdparty/openssl/crypto/cast/casts.cpp diff --git a/drivers/builtin_openssl2/crypto/cmac/cm_ameth.c b/thirdparty/openssl/crypto/cmac/cm_ameth.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cmac/cm_ameth.c rename to thirdparty/openssl/crypto/cmac/cm_ameth.c diff --git a/drivers/builtin_openssl2/crypto/cmac/cm_pmeth.c b/thirdparty/openssl/crypto/cmac/cm_pmeth.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cmac/cm_pmeth.c rename to thirdparty/openssl/crypto/cmac/cm_pmeth.c diff --git a/drivers/builtin_openssl2/crypto/cmac/cmac.c b/thirdparty/openssl/crypto/cmac/cmac.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cmac/cmac.c rename to thirdparty/openssl/crypto/cmac/cmac.c diff --git a/drivers/builtin_openssl2/crypto/cms/cms_asn1.c b/thirdparty/openssl/crypto/cms/cms_asn1.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cms/cms_asn1.c rename to thirdparty/openssl/crypto/cms/cms_asn1.c diff --git a/drivers/builtin_openssl2/crypto/cms/cms_att.c b/thirdparty/openssl/crypto/cms/cms_att.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cms/cms_att.c rename to thirdparty/openssl/crypto/cms/cms_att.c diff --git a/drivers/builtin_openssl2/crypto/cms/cms_cd.c b/thirdparty/openssl/crypto/cms/cms_cd.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cms/cms_cd.c rename to thirdparty/openssl/crypto/cms/cms_cd.c diff --git a/drivers/builtin_openssl2/crypto/cms/cms_dd.c b/thirdparty/openssl/crypto/cms/cms_dd.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cms/cms_dd.c rename to thirdparty/openssl/crypto/cms/cms_dd.c diff --git a/drivers/builtin_openssl2/crypto/cms/cms_enc.c b/thirdparty/openssl/crypto/cms/cms_enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cms/cms_enc.c rename to thirdparty/openssl/crypto/cms/cms_enc.c diff --git a/drivers/builtin_openssl2/crypto/cms/cms_env.c b/thirdparty/openssl/crypto/cms/cms_env.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cms/cms_env.c rename to thirdparty/openssl/crypto/cms/cms_env.c diff --git a/drivers/builtin_openssl2/crypto/cms/cms_err.c b/thirdparty/openssl/crypto/cms/cms_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cms/cms_err.c rename to thirdparty/openssl/crypto/cms/cms_err.c diff --git a/drivers/builtin_openssl2/crypto/cms/cms_ess.c b/thirdparty/openssl/crypto/cms/cms_ess.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cms/cms_ess.c rename to thirdparty/openssl/crypto/cms/cms_ess.c diff --git a/drivers/builtin_openssl2/crypto/cms/cms_io.c b/thirdparty/openssl/crypto/cms/cms_io.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cms/cms_io.c rename to thirdparty/openssl/crypto/cms/cms_io.c diff --git a/drivers/builtin_openssl2/crypto/cms/cms_kari.c b/thirdparty/openssl/crypto/cms/cms_kari.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cms/cms_kari.c rename to thirdparty/openssl/crypto/cms/cms_kari.c diff --git a/drivers/builtin_openssl2/crypto/cms/cms_lcl.h b/thirdparty/openssl/crypto/cms/cms_lcl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/cms/cms_lcl.h rename to thirdparty/openssl/crypto/cms/cms_lcl.h diff --git a/drivers/builtin_openssl2/crypto/cms/cms_lib.c b/thirdparty/openssl/crypto/cms/cms_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cms/cms_lib.c rename to thirdparty/openssl/crypto/cms/cms_lib.c diff --git a/drivers/builtin_openssl2/crypto/cms/cms_pwri.c b/thirdparty/openssl/crypto/cms/cms_pwri.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cms/cms_pwri.c rename to thirdparty/openssl/crypto/cms/cms_pwri.c diff --git a/drivers/builtin_openssl2/crypto/cms/cms_sd.c b/thirdparty/openssl/crypto/cms/cms_sd.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cms/cms_sd.c rename to thirdparty/openssl/crypto/cms/cms_sd.c diff --git a/drivers/builtin_openssl2/crypto/cms/cms_smime.c b/thirdparty/openssl/crypto/cms/cms_smime.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cms/cms_smime.c rename to thirdparty/openssl/crypto/cms/cms_smime.c diff --git a/drivers/builtin_openssl2/crypto/comp/c_rle.c b/thirdparty/openssl/crypto/comp/c_rle.c similarity index 100% rename from drivers/builtin_openssl2/crypto/comp/c_rle.c rename to thirdparty/openssl/crypto/comp/c_rle.c diff --git a/drivers/builtin_openssl2/crypto/comp/c_zlib.c b/thirdparty/openssl/crypto/comp/c_zlib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/comp/c_zlib.c rename to thirdparty/openssl/crypto/comp/c_zlib.c diff --git a/drivers/builtin_openssl2/crypto/comp/comp_err.c b/thirdparty/openssl/crypto/comp/comp_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/comp/comp_err.c rename to thirdparty/openssl/crypto/comp/comp_err.c diff --git a/drivers/builtin_openssl2/crypto/comp/comp_lib.c b/thirdparty/openssl/crypto/comp/comp_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/comp/comp_lib.c rename to thirdparty/openssl/crypto/comp/comp_lib.c diff --git a/drivers/builtin_openssl2/crypto/conf/README b/thirdparty/openssl/crypto/conf/README similarity index 100% rename from drivers/builtin_openssl2/crypto/conf/README rename to thirdparty/openssl/crypto/conf/README diff --git a/drivers/builtin_openssl2/crypto/conf/cnf_save.c b/thirdparty/openssl/crypto/conf/cnf_save.c similarity index 100% rename from drivers/builtin_openssl2/crypto/conf/cnf_save.c rename to thirdparty/openssl/crypto/conf/cnf_save.c diff --git a/drivers/builtin_openssl2/crypto/conf/conf_api.c b/thirdparty/openssl/crypto/conf/conf_api.c similarity index 100% rename from drivers/builtin_openssl2/crypto/conf/conf_api.c rename to thirdparty/openssl/crypto/conf/conf_api.c diff --git a/drivers/builtin_openssl2/crypto/conf/conf_def.c b/thirdparty/openssl/crypto/conf/conf_def.c similarity index 100% rename from drivers/builtin_openssl2/crypto/conf/conf_def.c rename to thirdparty/openssl/crypto/conf/conf_def.c diff --git a/drivers/builtin_openssl2/crypto/conf/conf_def.h b/thirdparty/openssl/crypto/conf/conf_def.h similarity index 100% rename from drivers/builtin_openssl2/crypto/conf/conf_def.h rename to thirdparty/openssl/crypto/conf/conf_def.h diff --git a/drivers/builtin_openssl2/crypto/conf/conf_err.c b/thirdparty/openssl/crypto/conf/conf_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/conf/conf_err.c rename to thirdparty/openssl/crypto/conf/conf_err.c diff --git a/drivers/builtin_openssl2/crypto/conf/conf_lib.c b/thirdparty/openssl/crypto/conf/conf_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/conf/conf_lib.c rename to thirdparty/openssl/crypto/conf/conf_lib.c diff --git a/drivers/builtin_openssl2/crypto/conf/conf_mall.c b/thirdparty/openssl/crypto/conf/conf_mall.c similarity index 100% rename from drivers/builtin_openssl2/crypto/conf/conf_mall.c rename to thirdparty/openssl/crypto/conf/conf_mall.c diff --git a/drivers/builtin_openssl2/crypto/conf/conf_mod.c b/thirdparty/openssl/crypto/conf/conf_mod.c similarity index 100% rename from drivers/builtin_openssl2/crypto/conf/conf_mod.c rename to thirdparty/openssl/crypto/conf/conf_mod.c diff --git a/drivers/builtin_openssl2/crypto/conf/conf_sap.c b/thirdparty/openssl/crypto/conf/conf_sap.c similarity index 100% rename from drivers/builtin_openssl2/crypto/conf/conf_sap.c rename to thirdparty/openssl/crypto/conf/conf_sap.c diff --git a/drivers/builtin_openssl2/crypto/conf/ssleay.cnf b/thirdparty/openssl/crypto/conf/ssleay.cnf similarity index 100% rename from drivers/builtin_openssl2/crypto/conf/ssleay.cnf rename to thirdparty/openssl/crypto/conf/ssleay.cnf diff --git a/drivers/builtin_openssl2/crypto/constant_time_locl.h b/thirdparty/openssl/crypto/constant_time_locl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/constant_time_locl.h rename to thirdparty/openssl/crypto/constant_time_locl.h diff --git a/drivers/builtin_openssl2/crypto/cpt_err.c b/thirdparty/openssl/crypto/cpt_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cpt_err.c rename to thirdparty/openssl/crypto/cpt_err.c diff --git a/drivers/builtin_openssl2/crypto/cryptlib.c b/thirdparty/openssl/crypto/cryptlib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cryptlib.c rename to thirdparty/openssl/crypto/cryptlib.c diff --git a/drivers/builtin_openssl2/crypto/cryptlib.h b/thirdparty/openssl/crypto/cryptlib.h similarity index 100% rename from drivers/builtin_openssl2/crypto/cryptlib.h rename to thirdparty/openssl/crypto/cryptlib.h diff --git a/drivers/builtin_openssl2/crypto/crypto-lib.com b/thirdparty/openssl/crypto/crypto-lib.com similarity index 100% rename from drivers/builtin_openssl2/crypto/crypto-lib.com rename to thirdparty/openssl/crypto/crypto-lib.com diff --git a/drivers/builtin_openssl2/crypto/cversion.c b/thirdparty/openssl/crypto/cversion.c similarity index 100% rename from drivers/builtin_openssl2/crypto/cversion.c rename to thirdparty/openssl/crypto/cversion.c diff --git a/drivers/builtin_openssl2/crypto/des/COPYRIGHT b/thirdparty/openssl/crypto/des/COPYRIGHT similarity index 100% rename from drivers/builtin_openssl2/crypto/des/COPYRIGHT rename to thirdparty/openssl/crypto/des/COPYRIGHT diff --git a/drivers/builtin_openssl2/crypto/des/DES.pm b/thirdparty/openssl/crypto/des/DES.pm similarity index 100% rename from drivers/builtin_openssl2/crypto/des/DES.pm rename to thirdparty/openssl/crypto/des/DES.pm diff --git a/drivers/builtin_openssl2/crypto/des/DES.xs b/thirdparty/openssl/crypto/des/DES.xs similarity index 100% rename from drivers/builtin_openssl2/crypto/des/DES.xs rename to thirdparty/openssl/crypto/des/DES.xs diff --git a/drivers/builtin_openssl2/crypto/des/FILES0 b/thirdparty/openssl/crypto/des/FILES0 similarity index 100% rename from drivers/builtin_openssl2/crypto/des/FILES0 rename to thirdparty/openssl/crypto/des/FILES0 diff --git a/drivers/builtin_openssl2/crypto/des/INSTALL b/thirdparty/openssl/crypto/des/INSTALL similarity index 100% rename from drivers/builtin_openssl2/crypto/des/INSTALL rename to thirdparty/openssl/crypto/des/INSTALL diff --git a/drivers/builtin_openssl2/crypto/des/Imakefile b/thirdparty/openssl/crypto/des/Imakefile similarity index 100% rename from drivers/builtin_openssl2/crypto/des/Imakefile rename to thirdparty/openssl/crypto/des/Imakefile diff --git a/drivers/builtin_openssl2/crypto/des/KERBEROS b/thirdparty/openssl/crypto/des/KERBEROS similarity index 100% rename from drivers/builtin_openssl2/crypto/des/KERBEROS rename to thirdparty/openssl/crypto/des/KERBEROS diff --git a/drivers/builtin_openssl2/crypto/des/README b/thirdparty/openssl/crypto/des/README similarity index 100% rename from drivers/builtin_openssl2/crypto/des/README rename to thirdparty/openssl/crypto/des/README diff --git a/drivers/builtin_openssl2/crypto/des/VERSION b/thirdparty/openssl/crypto/des/VERSION similarity index 100% rename from drivers/builtin_openssl2/crypto/des/VERSION rename to thirdparty/openssl/crypto/des/VERSION diff --git a/drivers/builtin_openssl2/crypto/des/asm/des_enc.m4 b/thirdparty/openssl/crypto/des/asm/des_enc.m4 similarity index 100% rename from drivers/builtin_openssl2/crypto/des/asm/des_enc.m4 rename to thirdparty/openssl/crypto/des/asm/des_enc.m4 diff --git a/drivers/builtin_openssl2/crypto/des/asm/readme b/thirdparty/openssl/crypto/des/asm/readme similarity index 100% rename from drivers/builtin_openssl2/crypto/des/asm/readme rename to thirdparty/openssl/crypto/des/asm/readme diff --git a/drivers/builtin_openssl2/crypto/des/cbc3_enc.c b/thirdparty/openssl/crypto/des/cbc3_enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/cbc3_enc.c rename to thirdparty/openssl/crypto/des/cbc3_enc.c diff --git a/drivers/builtin_openssl2/crypto/des/cbc_cksm.c b/thirdparty/openssl/crypto/des/cbc_cksm.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/cbc_cksm.c rename to thirdparty/openssl/crypto/des/cbc_cksm.c diff --git a/drivers/builtin_openssl2/crypto/des/cbc_enc.c b/thirdparty/openssl/crypto/des/cbc_enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/cbc_enc.c rename to thirdparty/openssl/crypto/des/cbc_enc.c diff --git a/drivers/builtin_openssl2/crypto/des/cfb64ede.c b/thirdparty/openssl/crypto/des/cfb64ede.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/cfb64ede.c rename to thirdparty/openssl/crypto/des/cfb64ede.c diff --git a/drivers/builtin_openssl2/crypto/des/cfb64enc.c b/thirdparty/openssl/crypto/des/cfb64enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/cfb64enc.c rename to thirdparty/openssl/crypto/des/cfb64enc.c diff --git a/drivers/builtin_openssl2/crypto/des/cfb_enc.c b/thirdparty/openssl/crypto/des/cfb_enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/cfb_enc.c rename to thirdparty/openssl/crypto/des/cfb_enc.c diff --git a/drivers/builtin_openssl2/crypto/des/des-lib.com b/thirdparty/openssl/crypto/des/des-lib.com similarity index 100% rename from drivers/builtin_openssl2/crypto/des/des-lib.com rename to thirdparty/openssl/crypto/des/des-lib.com diff --git a/drivers/builtin_openssl2/crypto/des/des.c b/thirdparty/openssl/crypto/des/des.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/des.c rename to thirdparty/openssl/crypto/des/des.c diff --git a/drivers/builtin_openssl2/crypto/des/des3s.cpp b/thirdparty/openssl/crypto/des/des3s.cpp similarity index 100% rename from drivers/builtin_openssl2/crypto/des/des3s.cpp rename to thirdparty/openssl/crypto/des/des3s.cpp diff --git a/drivers/builtin_openssl2/crypto/des/des_enc.c b/thirdparty/openssl/crypto/des/des_enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/des_enc.c rename to thirdparty/openssl/crypto/des/des_enc.c diff --git a/drivers/builtin_openssl2/crypto/des/des_locl.h b/thirdparty/openssl/crypto/des/des_locl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/des/des_locl.h rename to thirdparty/openssl/crypto/des/des_locl.h diff --git a/drivers/builtin_openssl2/crypto/des/des_old.c b/thirdparty/openssl/crypto/des/des_old.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/des_old.c rename to thirdparty/openssl/crypto/des/des_old.c diff --git a/drivers/builtin_openssl2/crypto/des/des_old2.c b/thirdparty/openssl/crypto/des/des_old2.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/des_old2.c rename to thirdparty/openssl/crypto/des/des_old2.c diff --git a/drivers/builtin_openssl2/crypto/des/des_opts.c b/thirdparty/openssl/crypto/des/des_opts.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/des_opts.c rename to thirdparty/openssl/crypto/des/des_opts.c diff --git a/drivers/builtin_openssl2/crypto/des/des_ver.h b/thirdparty/openssl/crypto/des/des_ver.h similarity index 100% rename from drivers/builtin_openssl2/crypto/des/des_ver.h rename to thirdparty/openssl/crypto/des/des_ver.h diff --git a/drivers/builtin_openssl2/crypto/des/dess.cpp b/thirdparty/openssl/crypto/des/dess.cpp similarity index 100% rename from drivers/builtin_openssl2/crypto/des/dess.cpp rename to thirdparty/openssl/crypto/des/dess.cpp diff --git a/drivers/builtin_openssl2/crypto/des/ecb3_enc.c b/thirdparty/openssl/crypto/des/ecb3_enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/ecb3_enc.c rename to thirdparty/openssl/crypto/des/ecb3_enc.c diff --git a/drivers/builtin_openssl2/crypto/des/ecb_enc.c b/thirdparty/openssl/crypto/des/ecb_enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/ecb_enc.c rename to thirdparty/openssl/crypto/des/ecb_enc.c diff --git a/drivers/builtin_openssl2/crypto/des/ede_cbcm_enc.c b/thirdparty/openssl/crypto/des/ede_cbcm_enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/ede_cbcm_enc.c rename to thirdparty/openssl/crypto/des/ede_cbcm_enc.c diff --git a/drivers/builtin_openssl2/crypto/des/enc_read.c b/thirdparty/openssl/crypto/des/enc_read.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/enc_read.c rename to thirdparty/openssl/crypto/des/enc_read.c diff --git a/drivers/builtin_openssl2/crypto/des/enc_writ.c b/thirdparty/openssl/crypto/des/enc_writ.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/enc_writ.c rename to thirdparty/openssl/crypto/des/enc_writ.c diff --git a/drivers/builtin_openssl2/crypto/des/fcrypt.c b/thirdparty/openssl/crypto/des/fcrypt.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/fcrypt.c rename to thirdparty/openssl/crypto/des/fcrypt.c diff --git a/drivers/builtin_openssl2/crypto/des/fcrypt_b.c b/thirdparty/openssl/crypto/des/fcrypt_b.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/fcrypt_b.c rename to thirdparty/openssl/crypto/des/fcrypt_b.c diff --git a/drivers/builtin_openssl2/crypto/des/makefile.bc b/thirdparty/openssl/crypto/des/makefile.bc similarity index 100% rename from drivers/builtin_openssl2/crypto/des/makefile.bc rename to thirdparty/openssl/crypto/des/makefile.bc diff --git a/drivers/builtin_openssl2/crypto/des/ncbc_enc.c b/thirdparty/openssl/crypto/des/ncbc_enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/ncbc_enc.c rename to thirdparty/openssl/crypto/des/ncbc_enc.c diff --git a/drivers/builtin_openssl2/crypto/des/ofb64ede.c b/thirdparty/openssl/crypto/des/ofb64ede.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/ofb64ede.c rename to thirdparty/openssl/crypto/des/ofb64ede.c diff --git a/drivers/builtin_openssl2/crypto/des/ofb64enc.c b/thirdparty/openssl/crypto/des/ofb64enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/ofb64enc.c rename to thirdparty/openssl/crypto/des/ofb64enc.c diff --git a/drivers/builtin_openssl2/crypto/des/ofb_enc.c b/thirdparty/openssl/crypto/des/ofb_enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/ofb_enc.c rename to thirdparty/openssl/crypto/des/ofb_enc.c diff --git a/drivers/builtin_openssl2/crypto/des/options.txt b/thirdparty/openssl/crypto/des/options.txt similarity index 100% rename from drivers/builtin_openssl2/crypto/des/options.txt rename to thirdparty/openssl/crypto/des/options.txt diff --git a/drivers/builtin_openssl2/crypto/des/pcbc_enc.c b/thirdparty/openssl/crypto/des/pcbc_enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/pcbc_enc.c rename to thirdparty/openssl/crypto/des/pcbc_enc.c diff --git a/drivers/builtin_openssl2/crypto/des/qud_cksm.c b/thirdparty/openssl/crypto/des/qud_cksm.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/qud_cksm.c rename to thirdparty/openssl/crypto/des/qud_cksm.c diff --git a/drivers/builtin_openssl2/crypto/des/rand_key.c b/thirdparty/openssl/crypto/des/rand_key.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/rand_key.c rename to thirdparty/openssl/crypto/des/rand_key.c diff --git a/drivers/builtin_openssl2/crypto/des/read2pwd.c b/thirdparty/openssl/crypto/des/read2pwd.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/read2pwd.c rename to thirdparty/openssl/crypto/des/read2pwd.c diff --git a/drivers/builtin_openssl2/crypto/des/read_pwd.c b/thirdparty/openssl/crypto/des/read_pwd.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/read_pwd.c rename to thirdparty/openssl/crypto/des/read_pwd.c diff --git a/drivers/builtin_openssl2/crypto/des/rpc_des.h b/thirdparty/openssl/crypto/des/rpc_des.h similarity index 100% rename from drivers/builtin_openssl2/crypto/des/rpc_des.h rename to thirdparty/openssl/crypto/des/rpc_des.h diff --git a/drivers/builtin_openssl2/crypto/des/rpc_enc.c b/thirdparty/openssl/crypto/des/rpc_enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/rpc_enc.c rename to thirdparty/openssl/crypto/des/rpc_enc.c diff --git a/drivers/builtin_openssl2/crypto/des/rpw.c b/thirdparty/openssl/crypto/des/rpw.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/rpw.c rename to thirdparty/openssl/crypto/des/rpw.c diff --git a/drivers/builtin_openssl2/crypto/des/set_key.c b/thirdparty/openssl/crypto/des/set_key.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/set_key.c rename to thirdparty/openssl/crypto/des/set_key.c diff --git a/drivers/builtin_openssl2/crypto/des/speed.c b/thirdparty/openssl/crypto/des/speed.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/speed.c rename to thirdparty/openssl/crypto/des/speed.c diff --git a/drivers/builtin_openssl2/crypto/des/spr.h b/thirdparty/openssl/crypto/des/spr.h similarity index 100% rename from drivers/builtin_openssl2/crypto/des/spr.h rename to thirdparty/openssl/crypto/des/spr.h diff --git a/drivers/builtin_openssl2/crypto/des/str2key.c b/thirdparty/openssl/crypto/des/str2key.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/str2key.c rename to thirdparty/openssl/crypto/des/str2key.c diff --git a/drivers/builtin_openssl2/crypto/des/t/test b/thirdparty/openssl/crypto/des/t/test similarity index 100% rename from drivers/builtin_openssl2/crypto/des/t/test rename to thirdparty/openssl/crypto/des/t/test diff --git a/drivers/builtin_openssl2/crypto/des/times/486-50.sol b/thirdparty/openssl/crypto/des/times/486-50.sol similarity index 100% rename from drivers/builtin_openssl2/crypto/des/times/486-50.sol rename to thirdparty/openssl/crypto/des/times/486-50.sol diff --git a/drivers/builtin_openssl2/crypto/des/times/586-100.lnx b/thirdparty/openssl/crypto/des/times/586-100.lnx similarity index 100% rename from drivers/builtin_openssl2/crypto/des/times/586-100.lnx rename to thirdparty/openssl/crypto/des/times/586-100.lnx diff --git a/drivers/builtin_openssl2/crypto/des/times/686-200.fre b/thirdparty/openssl/crypto/des/times/686-200.fre similarity index 100% rename from drivers/builtin_openssl2/crypto/des/times/686-200.fre rename to thirdparty/openssl/crypto/des/times/686-200.fre diff --git a/drivers/builtin_openssl2/crypto/des/times/aix.cc b/thirdparty/openssl/crypto/des/times/aix.cc similarity index 100% rename from drivers/builtin_openssl2/crypto/des/times/aix.cc rename to thirdparty/openssl/crypto/des/times/aix.cc diff --git a/drivers/builtin_openssl2/crypto/des/times/alpha.cc b/thirdparty/openssl/crypto/des/times/alpha.cc similarity index 100% rename from drivers/builtin_openssl2/crypto/des/times/alpha.cc rename to thirdparty/openssl/crypto/des/times/alpha.cc diff --git a/drivers/builtin_openssl2/crypto/des/times/hpux.cc b/thirdparty/openssl/crypto/des/times/hpux.cc similarity index 100% rename from drivers/builtin_openssl2/crypto/des/times/hpux.cc rename to thirdparty/openssl/crypto/des/times/hpux.cc diff --git a/drivers/builtin_openssl2/crypto/des/times/sparc.gcc b/thirdparty/openssl/crypto/des/times/sparc.gcc similarity index 100% rename from drivers/builtin_openssl2/crypto/des/times/sparc.gcc rename to thirdparty/openssl/crypto/des/times/sparc.gcc diff --git a/drivers/builtin_openssl2/crypto/des/times/usparc.cc b/thirdparty/openssl/crypto/des/times/usparc.cc similarity index 100% rename from drivers/builtin_openssl2/crypto/des/times/usparc.cc rename to thirdparty/openssl/crypto/des/times/usparc.cc diff --git a/drivers/builtin_openssl2/crypto/des/typemap b/thirdparty/openssl/crypto/des/typemap similarity index 100% rename from drivers/builtin_openssl2/crypto/des/typemap rename to thirdparty/openssl/crypto/des/typemap diff --git a/drivers/builtin_openssl2/crypto/des/xcbc_enc.c b/thirdparty/openssl/crypto/des/xcbc_enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/des/xcbc_enc.c rename to thirdparty/openssl/crypto/des/xcbc_enc.c diff --git a/drivers/builtin_openssl2/crypto/dh/dh1024.pem b/thirdparty/openssl/crypto/dh/dh1024.pem similarity index 100% rename from drivers/builtin_openssl2/crypto/dh/dh1024.pem rename to thirdparty/openssl/crypto/dh/dh1024.pem diff --git a/drivers/builtin_openssl2/crypto/dh/dh192.pem b/thirdparty/openssl/crypto/dh/dh192.pem similarity index 100% rename from drivers/builtin_openssl2/crypto/dh/dh192.pem rename to thirdparty/openssl/crypto/dh/dh192.pem diff --git a/drivers/builtin_openssl2/crypto/dh/dh2048.pem b/thirdparty/openssl/crypto/dh/dh2048.pem similarity index 100% rename from drivers/builtin_openssl2/crypto/dh/dh2048.pem rename to thirdparty/openssl/crypto/dh/dh2048.pem diff --git a/drivers/builtin_openssl2/crypto/dh/dh4096.pem b/thirdparty/openssl/crypto/dh/dh4096.pem similarity index 100% rename from drivers/builtin_openssl2/crypto/dh/dh4096.pem rename to thirdparty/openssl/crypto/dh/dh4096.pem diff --git a/drivers/builtin_openssl2/crypto/dh/dh512.pem b/thirdparty/openssl/crypto/dh/dh512.pem similarity index 100% rename from drivers/builtin_openssl2/crypto/dh/dh512.pem rename to thirdparty/openssl/crypto/dh/dh512.pem diff --git a/drivers/builtin_openssl2/crypto/dh/dh_ameth.c b/thirdparty/openssl/crypto/dh/dh_ameth.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dh/dh_ameth.c rename to thirdparty/openssl/crypto/dh/dh_ameth.c diff --git a/drivers/builtin_openssl2/crypto/dh/dh_asn1.c b/thirdparty/openssl/crypto/dh/dh_asn1.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dh/dh_asn1.c rename to thirdparty/openssl/crypto/dh/dh_asn1.c diff --git a/drivers/builtin_openssl2/crypto/dh/dh_check.c b/thirdparty/openssl/crypto/dh/dh_check.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dh/dh_check.c rename to thirdparty/openssl/crypto/dh/dh_check.c diff --git a/drivers/builtin_openssl2/crypto/dh/dh_depr.c b/thirdparty/openssl/crypto/dh/dh_depr.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dh/dh_depr.c rename to thirdparty/openssl/crypto/dh/dh_depr.c diff --git a/drivers/builtin_openssl2/crypto/dh/dh_err.c b/thirdparty/openssl/crypto/dh/dh_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dh/dh_err.c rename to thirdparty/openssl/crypto/dh/dh_err.c diff --git a/drivers/builtin_openssl2/crypto/dh/dh_gen.c b/thirdparty/openssl/crypto/dh/dh_gen.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dh/dh_gen.c rename to thirdparty/openssl/crypto/dh/dh_gen.c diff --git a/drivers/builtin_openssl2/crypto/dh/dh_kdf.c b/thirdparty/openssl/crypto/dh/dh_kdf.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dh/dh_kdf.c rename to thirdparty/openssl/crypto/dh/dh_kdf.c diff --git a/drivers/builtin_openssl2/crypto/dh/dh_key.c b/thirdparty/openssl/crypto/dh/dh_key.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dh/dh_key.c rename to thirdparty/openssl/crypto/dh/dh_key.c diff --git a/drivers/builtin_openssl2/crypto/dh/dh_lib.c b/thirdparty/openssl/crypto/dh/dh_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dh/dh_lib.c rename to thirdparty/openssl/crypto/dh/dh_lib.c diff --git a/drivers/builtin_openssl2/crypto/dh/dh_pmeth.c b/thirdparty/openssl/crypto/dh/dh_pmeth.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dh/dh_pmeth.c rename to thirdparty/openssl/crypto/dh/dh_pmeth.c diff --git a/drivers/builtin_openssl2/crypto/dh/dh_prn.c b/thirdparty/openssl/crypto/dh/dh_prn.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dh/dh_prn.c rename to thirdparty/openssl/crypto/dh/dh_prn.c diff --git a/drivers/builtin_openssl2/crypto/dh/dh_rfc5114.c b/thirdparty/openssl/crypto/dh/dh_rfc5114.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dh/dh_rfc5114.c rename to thirdparty/openssl/crypto/dh/dh_rfc5114.c diff --git a/drivers/builtin_openssl2/crypto/dh/example b/thirdparty/openssl/crypto/dh/example similarity index 100% rename from drivers/builtin_openssl2/crypto/dh/example rename to thirdparty/openssl/crypto/dh/example diff --git a/drivers/builtin_openssl2/crypto/dh/generate b/thirdparty/openssl/crypto/dh/generate similarity index 100% rename from drivers/builtin_openssl2/crypto/dh/generate rename to thirdparty/openssl/crypto/dh/generate diff --git a/drivers/builtin_openssl2/crypto/dh/p1024.c b/thirdparty/openssl/crypto/dh/p1024.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dh/p1024.c rename to thirdparty/openssl/crypto/dh/p1024.c diff --git a/drivers/builtin_openssl2/crypto/dh/p192.c b/thirdparty/openssl/crypto/dh/p192.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dh/p192.c rename to thirdparty/openssl/crypto/dh/p192.c diff --git a/drivers/builtin_openssl2/crypto/dh/p512.c b/thirdparty/openssl/crypto/dh/p512.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dh/p512.c rename to thirdparty/openssl/crypto/dh/p512.c diff --git a/drivers/builtin_openssl2/crypto/dsa/README b/thirdparty/openssl/crypto/dsa/README similarity index 100% rename from drivers/builtin_openssl2/crypto/dsa/README rename to thirdparty/openssl/crypto/dsa/README diff --git a/drivers/builtin_openssl2/crypto/dsa/dsa_ameth.c b/thirdparty/openssl/crypto/dsa/dsa_ameth.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dsa/dsa_ameth.c rename to thirdparty/openssl/crypto/dsa/dsa_ameth.c diff --git a/drivers/builtin_openssl2/crypto/dsa/dsa_asn1.c b/thirdparty/openssl/crypto/dsa/dsa_asn1.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dsa/dsa_asn1.c rename to thirdparty/openssl/crypto/dsa/dsa_asn1.c diff --git a/drivers/builtin_openssl2/crypto/dsa/dsa_depr.c b/thirdparty/openssl/crypto/dsa/dsa_depr.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dsa/dsa_depr.c rename to thirdparty/openssl/crypto/dsa/dsa_depr.c diff --git a/drivers/builtin_openssl2/crypto/dsa/dsa_err.c b/thirdparty/openssl/crypto/dsa/dsa_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dsa/dsa_err.c rename to thirdparty/openssl/crypto/dsa/dsa_err.c diff --git a/drivers/builtin_openssl2/crypto/dsa/dsa_gen.c b/thirdparty/openssl/crypto/dsa/dsa_gen.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dsa/dsa_gen.c rename to thirdparty/openssl/crypto/dsa/dsa_gen.c diff --git a/drivers/builtin_openssl2/crypto/dsa/dsa_key.c b/thirdparty/openssl/crypto/dsa/dsa_key.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dsa/dsa_key.c rename to thirdparty/openssl/crypto/dsa/dsa_key.c diff --git a/drivers/builtin_openssl2/crypto/dsa/dsa_lib.c b/thirdparty/openssl/crypto/dsa/dsa_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dsa/dsa_lib.c rename to thirdparty/openssl/crypto/dsa/dsa_lib.c diff --git a/drivers/builtin_openssl2/crypto/dsa/dsa_locl.h b/thirdparty/openssl/crypto/dsa/dsa_locl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/dsa/dsa_locl.h rename to thirdparty/openssl/crypto/dsa/dsa_locl.h diff --git a/drivers/builtin_openssl2/crypto/dsa/dsa_ossl.c b/thirdparty/openssl/crypto/dsa/dsa_ossl.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dsa/dsa_ossl.c rename to thirdparty/openssl/crypto/dsa/dsa_ossl.c diff --git a/drivers/builtin_openssl2/crypto/dsa/dsa_pmeth.c b/thirdparty/openssl/crypto/dsa/dsa_pmeth.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dsa/dsa_pmeth.c rename to thirdparty/openssl/crypto/dsa/dsa_pmeth.c diff --git a/drivers/builtin_openssl2/crypto/dsa/dsa_prn.c b/thirdparty/openssl/crypto/dsa/dsa_prn.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dsa/dsa_prn.c rename to thirdparty/openssl/crypto/dsa/dsa_prn.c diff --git a/drivers/builtin_openssl2/crypto/dsa/dsa_sign.c b/thirdparty/openssl/crypto/dsa/dsa_sign.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dsa/dsa_sign.c rename to thirdparty/openssl/crypto/dsa/dsa_sign.c diff --git a/drivers/builtin_openssl2/crypto/dsa/dsa_vrf.c b/thirdparty/openssl/crypto/dsa/dsa_vrf.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dsa/dsa_vrf.c rename to thirdparty/openssl/crypto/dsa/dsa_vrf.c diff --git a/drivers/builtin_openssl2/crypto/dsa/dsagen.c b/thirdparty/openssl/crypto/dsa/dsagen.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dsa/dsagen.c rename to thirdparty/openssl/crypto/dsa/dsagen.c diff --git a/drivers/builtin_openssl2/crypto/dsa/fips186a.txt b/thirdparty/openssl/crypto/dsa/fips186a.txt similarity index 100% rename from drivers/builtin_openssl2/crypto/dsa/fips186a.txt rename to thirdparty/openssl/crypto/dsa/fips186a.txt diff --git a/drivers/builtin_openssl2/crypto/dso/README b/thirdparty/openssl/crypto/dso/README similarity index 100% rename from drivers/builtin_openssl2/crypto/dso/README rename to thirdparty/openssl/crypto/dso/README diff --git a/drivers/builtin_openssl2/crypto/dso/dso_beos.c b/thirdparty/openssl/crypto/dso/dso_beos.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dso/dso_beos.c rename to thirdparty/openssl/crypto/dso/dso_beos.c diff --git a/drivers/builtin_openssl2/crypto/dso/dso_dl.c b/thirdparty/openssl/crypto/dso/dso_dl.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dso/dso_dl.c rename to thirdparty/openssl/crypto/dso/dso_dl.c diff --git a/drivers/builtin_openssl2/crypto/dso/dso_dlfcn.c b/thirdparty/openssl/crypto/dso/dso_dlfcn.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dso/dso_dlfcn.c rename to thirdparty/openssl/crypto/dso/dso_dlfcn.c diff --git a/drivers/builtin_openssl2/crypto/dso/dso_err.c b/thirdparty/openssl/crypto/dso/dso_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dso/dso_err.c rename to thirdparty/openssl/crypto/dso/dso_err.c diff --git a/drivers/builtin_openssl2/crypto/dso/dso_lib.c b/thirdparty/openssl/crypto/dso/dso_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dso/dso_lib.c rename to thirdparty/openssl/crypto/dso/dso_lib.c diff --git a/drivers/builtin_openssl2/crypto/dso/dso_null.c b/thirdparty/openssl/crypto/dso/dso_null.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dso/dso_null.c rename to thirdparty/openssl/crypto/dso/dso_null.c diff --git a/drivers/builtin_openssl2/crypto/dso/dso_openssl.c b/thirdparty/openssl/crypto/dso/dso_openssl.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dso/dso_openssl.c rename to thirdparty/openssl/crypto/dso/dso_openssl.c diff --git a/drivers/builtin_openssl2/crypto/dso/dso_vms.c b/thirdparty/openssl/crypto/dso/dso_vms.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dso/dso_vms.c rename to thirdparty/openssl/crypto/dso/dso_vms.c diff --git a/drivers/builtin_openssl2/crypto/dso/dso_win32.c b/thirdparty/openssl/crypto/dso/dso_win32.c similarity index 100% rename from drivers/builtin_openssl2/crypto/dso/dso_win32.c rename to thirdparty/openssl/crypto/dso/dso_win32.c diff --git a/drivers/builtin_openssl2/crypto/ebcdic.c b/thirdparty/openssl/crypto/ebcdic.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ebcdic.c rename to thirdparty/openssl/crypto/ebcdic.c diff --git a/drivers/builtin_openssl2/crypto/ec/ec2_mult.c b/thirdparty/openssl/crypto/ec/ec2_mult.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ec2_mult.c rename to thirdparty/openssl/crypto/ec/ec2_mult.c diff --git a/drivers/builtin_openssl2/crypto/ec/ec2_oct.c b/thirdparty/openssl/crypto/ec/ec2_oct.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ec2_oct.c rename to thirdparty/openssl/crypto/ec/ec2_oct.c diff --git a/drivers/builtin_openssl2/crypto/ec/ec2_smpl.c b/thirdparty/openssl/crypto/ec/ec2_smpl.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ec2_smpl.c rename to thirdparty/openssl/crypto/ec/ec2_smpl.c diff --git a/drivers/builtin_openssl2/crypto/ec/ec_ameth.c b/thirdparty/openssl/crypto/ec/ec_ameth.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ec_ameth.c rename to thirdparty/openssl/crypto/ec/ec_ameth.c diff --git a/drivers/builtin_openssl2/crypto/ec/ec_asn1.c b/thirdparty/openssl/crypto/ec/ec_asn1.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ec_asn1.c rename to thirdparty/openssl/crypto/ec/ec_asn1.c diff --git a/drivers/builtin_openssl2/crypto/ec/ec_check.c b/thirdparty/openssl/crypto/ec/ec_check.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ec_check.c rename to thirdparty/openssl/crypto/ec/ec_check.c diff --git a/drivers/builtin_openssl2/crypto/ec/ec_curve.c b/thirdparty/openssl/crypto/ec/ec_curve.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ec_curve.c rename to thirdparty/openssl/crypto/ec/ec_curve.c diff --git a/drivers/builtin_openssl2/crypto/ec/ec_cvt.c b/thirdparty/openssl/crypto/ec/ec_cvt.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ec_cvt.c rename to thirdparty/openssl/crypto/ec/ec_cvt.c diff --git a/drivers/builtin_openssl2/crypto/ec/ec_err.c b/thirdparty/openssl/crypto/ec/ec_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ec_err.c rename to thirdparty/openssl/crypto/ec/ec_err.c diff --git a/drivers/builtin_openssl2/crypto/ec/ec_key.c b/thirdparty/openssl/crypto/ec/ec_key.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ec_key.c rename to thirdparty/openssl/crypto/ec/ec_key.c diff --git a/drivers/builtin_openssl2/crypto/ec/ec_lcl.h b/thirdparty/openssl/crypto/ec/ec_lcl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ec_lcl.h rename to thirdparty/openssl/crypto/ec/ec_lcl.h diff --git a/drivers/builtin_openssl2/crypto/ec/ec_lib.c b/thirdparty/openssl/crypto/ec/ec_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ec_lib.c rename to thirdparty/openssl/crypto/ec/ec_lib.c diff --git a/drivers/builtin_openssl2/crypto/ec/ec_mult.c b/thirdparty/openssl/crypto/ec/ec_mult.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ec_mult.c rename to thirdparty/openssl/crypto/ec/ec_mult.c diff --git a/drivers/builtin_openssl2/crypto/ec/ec_oct.c b/thirdparty/openssl/crypto/ec/ec_oct.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ec_oct.c rename to thirdparty/openssl/crypto/ec/ec_oct.c diff --git a/drivers/builtin_openssl2/crypto/ec/ec_pmeth.c b/thirdparty/openssl/crypto/ec/ec_pmeth.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ec_pmeth.c rename to thirdparty/openssl/crypto/ec/ec_pmeth.c diff --git a/drivers/builtin_openssl2/crypto/ec/ec_print.c b/thirdparty/openssl/crypto/ec/ec_print.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ec_print.c rename to thirdparty/openssl/crypto/ec/ec_print.c diff --git a/drivers/builtin_openssl2/crypto/ec/eck_prn.c b/thirdparty/openssl/crypto/ec/eck_prn.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/eck_prn.c rename to thirdparty/openssl/crypto/ec/eck_prn.c diff --git a/drivers/builtin_openssl2/crypto/ec/ecp_mont.c b/thirdparty/openssl/crypto/ec/ecp_mont.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ecp_mont.c rename to thirdparty/openssl/crypto/ec/ecp_mont.c diff --git a/drivers/builtin_openssl2/crypto/ec/ecp_nist.c b/thirdparty/openssl/crypto/ec/ecp_nist.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ecp_nist.c rename to thirdparty/openssl/crypto/ec/ecp_nist.c diff --git a/drivers/builtin_openssl2/crypto/ec/ecp_nistp224.c b/thirdparty/openssl/crypto/ec/ecp_nistp224.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ecp_nistp224.c rename to thirdparty/openssl/crypto/ec/ecp_nistp224.c diff --git a/drivers/builtin_openssl2/crypto/ec/ecp_nistp256.c b/thirdparty/openssl/crypto/ec/ecp_nistp256.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ecp_nistp256.c rename to thirdparty/openssl/crypto/ec/ecp_nistp256.c diff --git a/drivers/builtin_openssl2/crypto/ec/ecp_nistp521.c b/thirdparty/openssl/crypto/ec/ecp_nistp521.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ecp_nistp521.c rename to thirdparty/openssl/crypto/ec/ecp_nistp521.c diff --git a/drivers/builtin_openssl2/crypto/ec/ecp_nistputil.c b/thirdparty/openssl/crypto/ec/ecp_nistputil.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ecp_nistputil.c rename to thirdparty/openssl/crypto/ec/ecp_nistputil.c diff --git a/drivers/builtin_openssl2/crypto/ec/ecp_nistz256.c b/thirdparty/openssl/crypto/ec/ecp_nistz256.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ecp_nistz256.c rename to thirdparty/openssl/crypto/ec/ecp_nistz256.c diff --git a/drivers/builtin_openssl2/crypto/ec/ecp_nistz256_table.c b/thirdparty/openssl/crypto/ec/ecp_nistz256_table.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ecp_nistz256_table.c rename to thirdparty/openssl/crypto/ec/ecp_nistz256_table.c diff --git a/drivers/builtin_openssl2/crypto/ec/ecp_oct.c b/thirdparty/openssl/crypto/ec/ecp_oct.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ecp_oct.c rename to thirdparty/openssl/crypto/ec/ecp_oct.c diff --git a/drivers/builtin_openssl2/crypto/ec/ecp_smpl.c b/thirdparty/openssl/crypto/ec/ecp_smpl.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ec/ecp_smpl.c rename to thirdparty/openssl/crypto/ec/ecp_smpl.c diff --git a/drivers/builtin_openssl2/crypto/ecdh/ech_err.c b/thirdparty/openssl/crypto/ecdh/ech_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ecdh/ech_err.c rename to thirdparty/openssl/crypto/ecdh/ech_err.c diff --git a/drivers/builtin_openssl2/crypto/ecdh/ech_kdf.c b/thirdparty/openssl/crypto/ecdh/ech_kdf.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ecdh/ech_kdf.c rename to thirdparty/openssl/crypto/ecdh/ech_kdf.c diff --git a/drivers/builtin_openssl2/crypto/ecdh/ech_key.c b/thirdparty/openssl/crypto/ecdh/ech_key.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ecdh/ech_key.c rename to thirdparty/openssl/crypto/ecdh/ech_key.c diff --git a/drivers/builtin_openssl2/crypto/ecdh/ech_lib.c b/thirdparty/openssl/crypto/ecdh/ech_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ecdh/ech_lib.c rename to thirdparty/openssl/crypto/ecdh/ech_lib.c diff --git a/drivers/builtin_openssl2/crypto/ecdh/ech_locl.h b/thirdparty/openssl/crypto/ecdh/ech_locl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/ecdh/ech_locl.h rename to thirdparty/openssl/crypto/ecdh/ech_locl.h diff --git a/drivers/builtin_openssl2/crypto/ecdh/ech_ossl.c b/thirdparty/openssl/crypto/ecdh/ech_ossl.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ecdh/ech_ossl.c rename to thirdparty/openssl/crypto/ecdh/ech_ossl.c diff --git a/drivers/builtin_openssl2/crypto/ecdsa/ecs_asn1.c b/thirdparty/openssl/crypto/ecdsa/ecs_asn1.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ecdsa/ecs_asn1.c rename to thirdparty/openssl/crypto/ecdsa/ecs_asn1.c diff --git a/drivers/builtin_openssl2/crypto/ecdsa/ecs_err.c b/thirdparty/openssl/crypto/ecdsa/ecs_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ecdsa/ecs_err.c rename to thirdparty/openssl/crypto/ecdsa/ecs_err.c diff --git a/drivers/builtin_openssl2/crypto/ecdsa/ecs_lib.c b/thirdparty/openssl/crypto/ecdsa/ecs_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ecdsa/ecs_lib.c rename to thirdparty/openssl/crypto/ecdsa/ecs_lib.c diff --git a/drivers/builtin_openssl2/crypto/ecdsa/ecs_locl.h b/thirdparty/openssl/crypto/ecdsa/ecs_locl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/ecdsa/ecs_locl.h rename to thirdparty/openssl/crypto/ecdsa/ecs_locl.h diff --git a/drivers/builtin_openssl2/crypto/ecdsa/ecs_ossl.c b/thirdparty/openssl/crypto/ecdsa/ecs_ossl.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ecdsa/ecs_ossl.c rename to thirdparty/openssl/crypto/ecdsa/ecs_ossl.c diff --git a/drivers/builtin_openssl2/crypto/ecdsa/ecs_sign.c b/thirdparty/openssl/crypto/ecdsa/ecs_sign.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ecdsa/ecs_sign.c rename to thirdparty/openssl/crypto/ecdsa/ecs_sign.c diff --git a/drivers/builtin_openssl2/crypto/ecdsa/ecs_vrf.c b/thirdparty/openssl/crypto/ecdsa/ecs_vrf.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ecdsa/ecs_vrf.c rename to thirdparty/openssl/crypto/ecdsa/ecs_vrf.c diff --git a/drivers/builtin_openssl2/crypto/engine/README b/thirdparty/openssl/crypto/engine/README similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/README rename to thirdparty/openssl/crypto/engine/README diff --git a/drivers/builtin_openssl2/crypto/engine/eng_all.c b/thirdparty/openssl/crypto/engine/eng_all.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/eng_all.c rename to thirdparty/openssl/crypto/engine/eng_all.c diff --git a/drivers/builtin_openssl2/crypto/engine/eng_cnf.c b/thirdparty/openssl/crypto/engine/eng_cnf.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/eng_cnf.c rename to thirdparty/openssl/crypto/engine/eng_cnf.c diff --git a/drivers/builtin_openssl2/crypto/engine/eng_cryptodev.c b/thirdparty/openssl/crypto/engine/eng_cryptodev.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/eng_cryptodev.c rename to thirdparty/openssl/crypto/engine/eng_cryptodev.c diff --git a/drivers/builtin_openssl2/crypto/engine/eng_ctrl.c b/thirdparty/openssl/crypto/engine/eng_ctrl.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/eng_ctrl.c rename to thirdparty/openssl/crypto/engine/eng_ctrl.c diff --git a/drivers/builtin_openssl2/crypto/engine/eng_dyn.c b/thirdparty/openssl/crypto/engine/eng_dyn.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/eng_dyn.c rename to thirdparty/openssl/crypto/engine/eng_dyn.c diff --git a/drivers/builtin_openssl2/crypto/engine/eng_err.c b/thirdparty/openssl/crypto/engine/eng_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/eng_err.c rename to thirdparty/openssl/crypto/engine/eng_err.c diff --git a/drivers/builtin_openssl2/crypto/engine/eng_fat.c b/thirdparty/openssl/crypto/engine/eng_fat.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/eng_fat.c rename to thirdparty/openssl/crypto/engine/eng_fat.c diff --git a/drivers/builtin_openssl2/crypto/engine/eng_init.c b/thirdparty/openssl/crypto/engine/eng_init.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/eng_init.c rename to thirdparty/openssl/crypto/engine/eng_init.c diff --git a/drivers/builtin_openssl2/crypto/engine/eng_int.h b/thirdparty/openssl/crypto/engine/eng_int.h similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/eng_int.h rename to thirdparty/openssl/crypto/engine/eng_int.h diff --git a/drivers/builtin_openssl2/crypto/engine/eng_lib.c b/thirdparty/openssl/crypto/engine/eng_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/eng_lib.c rename to thirdparty/openssl/crypto/engine/eng_lib.c diff --git a/drivers/builtin_openssl2/crypto/engine/eng_list.c b/thirdparty/openssl/crypto/engine/eng_list.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/eng_list.c rename to thirdparty/openssl/crypto/engine/eng_list.c diff --git a/drivers/builtin_openssl2/crypto/engine/eng_openssl.c b/thirdparty/openssl/crypto/engine/eng_openssl.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/eng_openssl.c rename to thirdparty/openssl/crypto/engine/eng_openssl.c diff --git a/drivers/builtin_openssl2/crypto/engine/eng_pkey.c b/thirdparty/openssl/crypto/engine/eng_pkey.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/eng_pkey.c rename to thirdparty/openssl/crypto/engine/eng_pkey.c diff --git a/drivers/builtin_openssl2/crypto/engine/eng_rdrand.c b/thirdparty/openssl/crypto/engine/eng_rdrand.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/eng_rdrand.c rename to thirdparty/openssl/crypto/engine/eng_rdrand.c diff --git a/drivers/builtin_openssl2/crypto/engine/eng_table.c b/thirdparty/openssl/crypto/engine/eng_table.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/eng_table.c rename to thirdparty/openssl/crypto/engine/eng_table.c diff --git a/drivers/builtin_openssl2/crypto/engine/tb_asnmth.c b/thirdparty/openssl/crypto/engine/tb_asnmth.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/tb_asnmth.c rename to thirdparty/openssl/crypto/engine/tb_asnmth.c diff --git a/drivers/builtin_openssl2/crypto/engine/tb_cipher.c b/thirdparty/openssl/crypto/engine/tb_cipher.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/tb_cipher.c rename to thirdparty/openssl/crypto/engine/tb_cipher.c diff --git a/drivers/builtin_openssl2/crypto/engine/tb_dh.c b/thirdparty/openssl/crypto/engine/tb_dh.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/tb_dh.c rename to thirdparty/openssl/crypto/engine/tb_dh.c diff --git a/drivers/builtin_openssl2/crypto/engine/tb_digest.c b/thirdparty/openssl/crypto/engine/tb_digest.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/tb_digest.c rename to thirdparty/openssl/crypto/engine/tb_digest.c diff --git a/drivers/builtin_openssl2/crypto/engine/tb_dsa.c b/thirdparty/openssl/crypto/engine/tb_dsa.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/tb_dsa.c rename to thirdparty/openssl/crypto/engine/tb_dsa.c diff --git a/drivers/builtin_openssl2/crypto/engine/tb_ecdh.c b/thirdparty/openssl/crypto/engine/tb_ecdh.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/tb_ecdh.c rename to thirdparty/openssl/crypto/engine/tb_ecdh.c diff --git a/drivers/builtin_openssl2/crypto/engine/tb_ecdsa.c b/thirdparty/openssl/crypto/engine/tb_ecdsa.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/tb_ecdsa.c rename to thirdparty/openssl/crypto/engine/tb_ecdsa.c diff --git a/drivers/builtin_openssl2/crypto/engine/tb_pkmeth.c b/thirdparty/openssl/crypto/engine/tb_pkmeth.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/tb_pkmeth.c rename to thirdparty/openssl/crypto/engine/tb_pkmeth.c diff --git a/drivers/builtin_openssl2/crypto/engine/tb_rand.c b/thirdparty/openssl/crypto/engine/tb_rand.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/tb_rand.c rename to thirdparty/openssl/crypto/engine/tb_rand.c diff --git a/drivers/builtin_openssl2/crypto/engine/tb_rsa.c b/thirdparty/openssl/crypto/engine/tb_rsa.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/tb_rsa.c rename to thirdparty/openssl/crypto/engine/tb_rsa.c diff --git a/drivers/builtin_openssl2/crypto/engine/tb_store.c b/thirdparty/openssl/crypto/engine/tb_store.c similarity index 100% rename from drivers/builtin_openssl2/crypto/engine/tb_store.c rename to thirdparty/openssl/crypto/engine/tb_store.c diff --git a/drivers/builtin_openssl2/crypto/err/err.c b/thirdparty/openssl/crypto/err/err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/err/err.c rename to thirdparty/openssl/crypto/err/err.c diff --git a/drivers/builtin_openssl2/crypto/err/err_all.c b/thirdparty/openssl/crypto/err/err_all.c similarity index 100% rename from drivers/builtin_openssl2/crypto/err/err_all.c rename to thirdparty/openssl/crypto/err/err_all.c diff --git a/drivers/builtin_openssl2/crypto/err/err_prn.c b/thirdparty/openssl/crypto/err/err_prn.c similarity index 100% rename from drivers/builtin_openssl2/crypto/err/err_prn.c rename to thirdparty/openssl/crypto/err/err_prn.c diff --git a/drivers/builtin_openssl2/crypto/err/openssl.ec b/thirdparty/openssl/crypto/err/openssl.ec similarity index 100% rename from drivers/builtin_openssl2/crypto/err/openssl.ec rename to thirdparty/openssl/crypto/err/openssl.ec diff --git a/drivers/builtin_openssl2/crypto/evp/bio_b64.c b/thirdparty/openssl/crypto/evp/bio_b64.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/bio_b64.c rename to thirdparty/openssl/crypto/evp/bio_b64.c diff --git a/drivers/builtin_openssl2/crypto/evp/bio_enc.c b/thirdparty/openssl/crypto/evp/bio_enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/bio_enc.c rename to thirdparty/openssl/crypto/evp/bio_enc.c diff --git a/drivers/builtin_openssl2/crypto/evp/bio_md.c b/thirdparty/openssl/crypto/evp/bio_md.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/bio_md.c rename to thirdparty/openssl/crypto/evp/bio_md.c diff --git a/drivers/builtin_openssl2/crypto/evp/bio_ok.c b/thirdparty/openssl/crypto/evp/bio_ok.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/bio_ok.c rename to thirdparty/openssl/crypto/evp/bio_ok.c diff --git a/drivers/builtin_openssl2/crypto/evp/c_all.c b/thirdparty/openssl/crypto/evp/c_all.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/c_all.c rename to thirdparty/openssl/crypto/evp/c_all.c diff --git a/drivers/builtin_openssl2/crypto/evp/c_allc.c b/thirdparty/openssl/crypto/evp/c_allc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/c_allc.c rename to thirdparty/openssl/crypto/evp/c_allc.c diff --git a/drivers/builtin_openssl2/crypto/evp/c_alld.c b/thirdparty/openssl/crypto/evp/c_alld.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/c_alld.c rename to thirdparty/openssl/crypto/evp/c_alld.c diff --git a/drivers/builtin_openssl2/crypto/evp/digest.c b/thirdparty/openssl/crypto/evp/digest.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/digest.c rename to thirdparty/openssl/crypto/evp/digest.c diff --git a/drivers/builtin_openssl2/crypto/evp/e_aes.c b/thirdparty/openssl/crypto/evp/e_aes.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/e_aes.c rename to thirdparty/openssl/crypto/evp/e_aes.c diff --git a/drivers/builtin_openssl2/crypto/evp/e_aes_cbc_hmac_sha1.c b/thirdparty/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/e_aes_cbc_hmac_sha1.c rename to thirdparty/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c diff --git a/drivers/builtin_openssl2/crypto/evp/e_aes_cbc_hmac_sha256.c b/thirdparty/openssl/crypto/evp/e_aes_cbc_hmac_sha256.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/e_aes_cbc_hmac_sha256.c rename to thirdparty/openssl/crypto/evp/e_aes_cbc_hmac_sha256.c diff --git a/drivers/builtin_openssl2/crypto/evp/e_bf.c b/thirdparty/openssl/crypto/evp/e_bf.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/e_bf.c rename to thirdparty/openssl/crypto/evp/e_bf.c diff --git a/drivers/builtin_openssl2/crypto/evp/e_camellia.c b/thirdparty/openssl/crypto/evp/e_camellia.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/e_camellia.c rename to thirdparty/openssl/crypto/evp/e_camellia.c diff --git a/drivers/builtin_openssl2/crypto/evp/e_cast.c b/thirdparty/openssl/crypto/evp/e_cast.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/e_cast.c rename to thirdparty/openssl/crypto/evp/e_cast.c diff --git a/drivers/builtin_openssl2/crypto/evp/e_des.c b/thirdparty/openssl/crypto/evp/e_des.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/e_des.c rename to thirdparty/openssl/crypto/evp/e_des.c diff --git a/drivers/builtin_openssl2/crypto/evp/e_des3.c b/thirdparty/openssl/crypto/evp/e_des3.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/e_des3.c rename to thirdparty/openssl/crypto/evp/e_des3.c diff --git a/drivers/builtin_openssl2/crypto/evp/e_dsa.c b/thirdparty/openssl/crypto/evp/e_dsa.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/e_dsa.c rename to thirdparty/openssl/crypto/evp/e_dsa.c diff --git a/drivers/builtin_openssl2/crypto/evp/e_idea.c b/thirdparty/openssl/crypto/evp/e_idea.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/e_idea.c rename to thirdparty/openssl/crypto/evp/e_idea.c diff --git a/drivers/builtin_openssl2/crypto/evp/e_null.c b/thirdparty/openssl/crypto/evp/e_null.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/e_null.c rename to thirdparty/openssl/crypto/evp/e_null.c diff --git a/drivers/builtin_openssl2/crypto/evp/e_old.c b/thirdparty/openssl/crypto/evp/e_old.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/e_old.c rename to thirdparty/openssl/crypto/evp/e_old.c diff --git a/drivers/builtin_openssl2/crypto/evp/e_rc2.c b/thirdparty/openssl/crypto/evp/e_rc2.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/e_rc2.c rename to thirdparty/openssl/crypto/evp/e_rc2.c diff --git a/drivers/builtin_openssl2/crypto/evp/e_rc4.c b/thirdparty/openssl/crypto/evp/e_rc4.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/e_rc4.c rename to thirdparty/openssl/crypto/evp/e_rc4.c diff --git a/drivers/builtin_openssl2/crypto/evp/e_rc4_hmac_md5.c b/thirdparty/openssl/crypto/evp/e_rc4_hmac_md5.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/e_rc4_hmac_md5.c rename to thirdparty/openssl/crypto/evp/e_rc4_hmac_md5.c diff --git a/drivers/builtin_openssl2/crypto/evp/e_rc5.c b/thirdparty/openssl/crypto/evp/e_rc5.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/e_rc5.c rename to thirdparty/openssl/crypto/evp/e_rc5.c diff --git a/drivers/builtin_openssl2/crypto/evp/e_seed.c b/thirdparty/openssl/crypto/evp/e_seed.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/e_seed.c rename to thirdparty/openssl/crypto/evp/e_seed.c diff --git a/drivers/builtin_openssl2/crypto/evp/e_xcbc_d.c b/thirdparty/openssl/crypto/evp/e_xcbc_d.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/e_xcbc_d.c rename to thirdparty/openssl/crypto/evp/e_xcbc_d.c diff --git a/drivers/builtin_openssl2/crypto/evp/encode.c b/thirdparty/openssl/crypto/evp/encode.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/encode.c rename to thirdparty/openssl/crypto/evp/encode.c diff --git a/drivers/builtin_openssl2/crypto/evp/evp_acnf.c b/thirdparty/openssl/crypto/evp/evp_acnf.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/evp_acnf.c rename to thirdparty/openssl/crypto/evp/evp_acnf.c diff --git a/drivers/builtin_openssl2/crypto/evp/evp_cnf.c b/thirdparty/openssl/crypto/evp/evp_cnf.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/evp_cnf.c rename to thirdparty/openssl/crypto/evp/evp_cnf.c diff --git a/drivers/builtin_openssl2/crypto/evp/evp_enc.c b/thirdparty/openssl/crypto/evp/evp_enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/evp_enc.c rename to thirdparty/openssl/crypto/evp/evp_enc.c diff --git a/drivers/builtin_openssl2/crypto/evp/evp_err.c b/thirdparty/openssl/crypto/evp/evp_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/evp_err.c rename to thirdparty/openssl/crypto/evp/evp_err.c diff --git a/drivers/builtin_openssl2/crypto/evp/evp_key.c b/thirdparty/openssl/crypto/evp/evp_key.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/evp_key.c rename to thirdparty/openssl/crypto/evp/evp_key.c diff --git a/drivers/builtin_openssl2/crypto/evp/evp_lib.c b/thirdparty/openssl/crypto/evp/evp_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/evp_lib.c rename to thirdparty/openssl/crypto/evp/evp_lib.c diff --git a/drivers/builtin_openssl2/crypto/evp/evp_locl.h b/thirdparty/openssl/crypto/evp/evp_locl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/evp_locl.h rename to thirdparty/openssl/crypto/evp/evp_locl.h diff --git a/drivers/builtin_openssl2/crypto/evp/evp_pbe.c b/thirdparty/openssl/crypto/evp/evp_pbe.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/evp_pbe.c rename to thirdparty/openssl/crypto/evp/evp_pbe.c diff --git a/drivers/builtin_openssl2/crypto/evp/evp_pkey.c b/thirdparty/openssl/crypto/evp/evp_pkey.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/evp_pkey.c rename to thirdparty/openssl/crypto/evp/evp_pkey.c diff --git a/drivers/builtin_openssl2/crypto/evp/evptests.txt b/thirdparty/openssl/crypto/evp/evptests.txt similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/evptests.txt rename to thirdparty/openssl/crypto/evp/evptests.txt diff --git a/drivers/builtin_openssl2/crypto/evp/m_dss.c b/thirdparty/openssl/crypto/evp/m_dss.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/m_dss.c rename to thirdparty/openssl/crypto/evp/m_dss.c diff --git a/drivers/builtin_openssl2/crypto/evp/m_dss1.c b/thirdparty/openssl/crypto/evp/m_dss1.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/m_dss1.c rename to thirdparty/openssl/crypto/evp/m_dss1.c diff --git a/drivers/builtin_openssl2/crypto/evp/m_ecdsa.c b/thirdparty/openssl/crypto/evp/m_ecdsa.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/m_ecdsa.c rename to thirdparty/openssl/crypto/evp/m_ecdsa.c diff --git a/drivers/builtin_openssl2/crypto/evp/m_md2.c b/thirdparty/openssl/crypto/evp/m_md2.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/m_md2.c rename to thirdparty/openssl/crypto/evp/m_md2.c diff --git a/drivers/builtin_openssl2/crypto/evp/m_md4.c b/thirdparty/openssl/crypto/evp/m_md4.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/m_md4.c rename to thirdparty/openssl/crypto/evp/m_md4.c diff --git a/drivers/builtin_openssl2/crypto/evp/m_md5.c b/thirdparty/openssl/crypto/evp/m_md5.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/m_md5.c rename to thirdparty/openssl/crypto/evp/m_md5.c diff --git a/drivers/builtin_openssl2/crypto/evp/m_mdc2.c b/thirdparty/openssl/crypto/evp/m_mdc2.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/m_mdc2.c rename to thirdparty/openssl/crypto/evp/m_mdc2.c diff --git a/drivers/builtin_openssl2/crypto/evp/m_null.c b/thirdparty/openssl/crypto/evp/m_null.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/m_null.c rename to thirdparty/openssl/crypto/evp/m_null.c diff --git a/drivers/builtin_openssl2/crypto/evp/m_ripemd.c b/thirdparty/openssl/crypto/evp/m_ripemd.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/m_ripemd.c rename to thirdparty/openssl/crypto/evp/m_ripemd.c diff --git a/drivers/builtin_openssl2/crypto/evp/m_sha.c b/thirdparty/openssl/crypto/evp/m_sha.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/m_sha.c rename to thirdparty/openssl/crypto/evp/m_sha.c diff --git a/drivers/builtin_openssl2/crypto/evp/m_sha1.c b/thirdparty/openssl/crypto/evp/m_sha1.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/m_sha1.c rename to thirdparty/openssl/crypto/evp/m_sha1.c diff --git a/drivers/builtin_openssl2/crypto/evp/m_sigver.c b/thirdparty/openssl/crypto/evp/m_sigver.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/m_sigver.c rename to thirdparty/openssl/crypto/evp/m_sigver.c diff --git a/drivers/builtin_openssl2/crypto/evp/m_wp.c b/thirdparty/openssl/crypto/evp/m_wp.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/m_wp.c rename to thirdparty/openssl/crypto/evp/m_wp.c diff --git a/drivers/builtin_openssl2/crypto/evp/names.c b/thirdparty/openssl/crypto/evp/names.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/names.c rename to thirdparty/openssl/crypto/evp/names.c diff --git a/drivers/builtin_openssl2/crypto/evp/openbsd_hw.c b/thirdparty/openssl/crypto/evp/openbsd_hw.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/openbsd_hw.c rename to thirdparty/openssl/crypto/evp/openbsd_hw.c diff --git a/drivers/builtin_openssl2/crypto/evp/p5_crpt.c b/thirdparty/openssl/crypto/evp/p5_crpt.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/p5_crpt.c rename to thirdparty/openssl/crypto/evp/p5_crpt.c diff --git a/drivers/builtin_openssl2/crypto/evp/p5_crpt2.c b/thirdparty/openssl/crypto/evp/p5_crpt2.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/p5_crpt2.c rename to thirdparty/openssl/crypto/evp/p5_crpt2.c diff --git a/drivers/builtin_openssl2/crypto/evp/p_dec.c b/thirdparty/openssl/crypto/evp/p_dec.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/p_dec.c rename to thirdparty/openssl/crypto/evp/p_dec.c diff --git a/drivers/builtin_openssl2/crypto/evp/p_enc.c b/thirdparty/openssl/crypto/evp/p_enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/p_enc.c rename to thirdparty/openssl/crypto/evp/p_enc.c diff --git a/drivers/builtin_openssl2/crypto/evp/p_lib.c b/thirdparty/openssl/crypto/evp/p_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/p_lib.c rename to thirdparty/openssl/crypto/evp/p_lib.c diff --git a/drivers/builtin_openssl2/crypto/evp/p_open.c b/thirdparty/openssl/crypto/evp/p_open.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/p_open.c rename to thirdparty/openssl/crypto/evp/p_open.c diff --git a/drivers/builtin_openssl2/crypto/evp/p_seal.c b/thirdparty/openssl/crypto/evp/p_seal.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/p_seal.c rename to thirdparty/openssl/crypto/evp/p_seal.c diff --git a/drivers/builtin_openssl2/crypto/evp/p_sign.c b/thirdparty/openssl/crypto/evp/p_sign.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/p_sign.c rename to thirdparty/openssl/crypto/evp/p_sign.c diff --git a/drivers/builtin_openssl2/crypto/evp/p_verify.c b/thirdparty/openssl/crypto/evp/p_verify.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/p_verify.c rename to thirdparty/openssl/crypto/evp/p_verify.c diff --git a/drivers/builtin_openssl2/crypto/evp/pmeth_fn.c b/thirdparty/openssl/crypto/evp/pmeth_fn.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/pmeth_fn.c rename to thirdparty/openssl/crypto/evp/pmeth_fn.c diff --git a/drivers/builtin_openssl2/crypto/evp/pmeth_gn.c b/thirdparty/openssl/crypto/evp/pmeth_gn.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/pmeth_gn.c rename to thirdparty/openssl/crypto/evp/pmeth_gn.c diff --git a/drivers/builtin_openssl2/crypto/evp/pmeth_lib.c b/thirdparty/openssl/crypto/evp/pmeth_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/evp/pmeth_lib.c rename to thirdparty/openssl/crypto/evp/pmeth_lib.c diff --git a/drivers/builtin_openssl2/crypto/ex_data.c b/thirdparty/openssl/crypto/ex_data.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ex_data.c rename to thirdparty/openssl/crypto/ex_data.c diff --git a/drivers/builtin_openssl2/crypto/fips_err.h b/thirdparty/openssl/crypto/fips_err.h similarity index 100% rename from drivers/builtin_openssl2/crypto/fips_err.h rename to thirdparty/openssl/crypto/fips_err.h diff --git a/drivers/builtin_openssl2/crypto/fips_ers.c b/thirdparty/openssl/crypto/fips_ers.c similarity index 100% rename from drivers/builtin_openssl2/crypto/fips_ers.c rename to thirdparty/openssl/crypto/fips_ers.c diff --git a/drivers/builtin_openssl2/crypto/hmac/hm_ameth.c b/thirdparty/openssl/crypto/hmac/hm_ameth.c similarity index 100% rename from drivers/builtin_openssl2/crypto/hmac/hm_ameth.c rename to thirdparty/openssl/crypto/hmac/hm_ameth.c diff --git a/drivers/builtin_openssl2/crypto/hmac/hm_pmeth.c b/thirdparty/openssl/crypto/hmac/hm_pmeth.c similarity index 100% rename from drivers/builtin_openssl2/crypto/hmac/hm_pmeth.c rename to thirdparty/openssl/crypto/hmac/hm_pmeth.c diff --git a/drivers/builtin_openssl2/crypto/hmac/hmac.c b/thirdparty/openssl/crypto/hmac/hmac.c similarity index 100% rename from drivers/builtin_openssl2/crypto/hmac/hmac.c rename to thirdparty/openssl/crypto/hmac/hmac.c diff --git a/drivers/builtin_openssl2/crypto/idea/i_cbc.c b/thirdparty/openssl/crypto/idea/i_cbc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/idea/i_cbc.c rename to thirdparty/openssl/crypto/idea/i_cbc.c diff --git a/drivers/builtin_openssl2/crypto/idea/i_cfb64.c b/thirdparty/openssl/crypto/idea/i_cfb64.c similarity index 100% rename from drivers/builtin_openssl2/crypto/idea/i_cfb64.c rename to thirdparty/openssl/crypto/idea/i_cfb64.c diff --git a/drivers/builtin_openssl2/crypto/idea/i_ecb.c b/thirdparty/openssl/crypto/idea/i_ecb.c similarity index 100% rename from drivers/builtin_openssl2/crypto/idea/i_ecb.c rename to thirdparty/openssl/crypto/idea/i_ecb.c diff --git a/drivers/builtin_openssl2/crypto/idea/i_ofb64.c b/thirdparty/openssl/crypto/idea/i_ofb64.c similarity index 100% rename from drivers/builtin_openssl2/crypto/idea/i_ofb64.c rename to thirdparty/openssl/crypto/idea/i_ofb64.c diff --git a/drivers/builtin_openssl2/crypto/idea/i_skey.c b/thirdparty/openssl/crypto/idea/i_skey.c similarity index 100% rename from drivers/builtin_openssl2/crypto/idea/i_skey.c rename to thirdparty/openssl/crypto/idea/i_skey.c diff --git a/drivers/builtin_openssl2/crypto/idea/idea_lcl.h b/thirdparty/openssl/crypto/idea/idea_lcl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/idea/idea_lcl.h rename to thirdparty/openssl/crypto/idea/idea_lcl.h diff --git a/drivers/builtin_openssl2/crypto/idea/idea_spd.c b/thirdparty/openssl/crypto/idea/idea_spd.c similarity index 100% rename from drivers/builtin_openssl2/crypto/idea/idea_spd.c rename to thirdparty/openssl/crypto/idea/idea_spd.c diff --git a/drivers/builtin_openssl2/crypto/idea/version b/thirdparty/openssl/crypto/idea/version similarity index 100% rename from drivers/builtin_openssl2/crypto/idea/version rename to thirdparty/openssl/crypto/idea/version diff --git a/drivers/builtin_openssl2/crypto/install-crypto.com b/thirdparty/openssl/crypto/install-crypto.com similarity index 100% rename from drivers/builtin_openssl2/crypto/install-crypto.com rename to thirdparty/openssl/crypto/install-crypto.com diff --git a/drivers/builtin_openssl2/crypto/jpake/jpake.c b/thirdparty/openssl/crypto/jpake/jpake.c similarity index 100% rename from drivers/builtin_openssl2/crypto/jpake/jpake.c rename to thirdparty/openssl/crypto/jpake/jpake.c diff --git a/drivers/builtin_openssl2/crypto/jpake/jpake.h b/thirdparty/openssl/crypto/jpake/jpake.h similarity index 100% rename from drivers/builtin_openssl2/crypto/jpake/jpake.h rename to thirdparty/openssl/crypto/jpake/jpake.h diff --git a/drivers/builtin_openssl2/crypto/jpake/jpake_err.c b/thirdparty/openssl/crypto/jpake/jpake_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/jpake/jpake_err.c rename to thirdparty/openssl/crypto/jpake/jpake_err.c diff --git a/drivers/builtin_openssl2/crypto/krb5/krb5_asn.c b/thirdparty/openssl/crypto/krb5/krb5_asn.c similarity index 100% rename from drivers/builtin_openssl2/crypto/krb5/krb5_asn.c rename to thirdparty/openssl/crypto/krb5/krb5_asn.c diff --git a/drivers/builtin_openssl2/crypto/lhash/lh_stats.c b/thirdparty/openssl/crypto/lhash/lh_stats.c similarity index 100% rename from drivers/builtin_openssl2/crypto/lhash/lh_stats.c rename to thirdparty/openssl/crypto/lhash/lh_stats.c diff --git a/drivers/builtin_openssl2/crypto/lhash/lhash.c b/thirdparty/openssl/crypto/lhash/lhash.c similarity index 100% rename from drivers/builtin_openssl2/crypto/lhash/lhash.c rename to thirdparty/openssl/crypto/lhash/lhash.c diff --git a/drivers/builtin_openssl2/crypto/md2/md2.c b/thirdparty/openssl/crypto/md2/md2.c similarity index 100% rename from drivers/builtin_openssl2/crypto/md2/md2.c rename to thirdparty/openssl/crypto/md2/md2.c diff --git a/drivers/builtin_openssl2/crypto/md2/md2.h b/thirdparty/openssl/crypto/md2/md2.h similarity index 100% rename from drivers/builtin_openssl2/crypto/md2/md2.h rename to thirdparty/openssl/crypto/md2/md2.h diff --git a/drivers/builtin_openssl2/crypto/md2/md2_dgst.c b/thirdparty/openssl/crypto/md2/md2_dgst.c similarity index 100% rename from drivers/builtin_openssl2/crypto/md2/md2_dgst.c rename to thirdparty/openssl/crypto/md2/md2_dgst.c diff --git a/drivers/builtin_openssl2/crypto/md2/md2_one.c b/thirdparty/openssl/crypto/md2/md2_one.c similarity index 100% rename from drivers/builtin_openssl2/crypto/md2/md2_one.c rename to thirdparty/openssl/crypto/md2/md2_one.c diff --git a/drivers/builtin_openssl2/crypto/md32_common.h b/thirdparty/openssl/crypto/md32_common.h similarity index 100% rename from drivers/builtin_openssl2/crypto/md32_common.h rename to thirdparty/openssl/crypto/md32_common.h diff --git a/drivers/builtin_openssl2/crypto/md4/md4.c b/thirdparty/openssl/crypto/md4/md4.c similarity index 100% rename from drivers/builtin_openssl2/crypto/md4/md4.c rename to thirdparty/openssl/crypto/md4/md4.c diff --git a/drivers/builtin_openssl2/crypto/md4/md4_dgst.c b/thirdparty/openssl/crypto/md4/md4_dgst.c similarity index 100% rename from drivers/builtin_openssl2/crypto/md4/md4_dgst.c rename to thirdparty/openssl/crypto/md4/md4_dgst.c diff --git a/drivers/builtin_openssl2/crypto/md4/md4_locl.h b/thirdparty/openssl/crypto/md4/md4_locl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/md4/md4_locl.h rename to thirdparty/openssl/crypto/md4/md4_locl.h diff --git a/drivers/builtin_openssl2/crypto/md4/md4_one.c b/thirdparty/openssl/crypto/md4/md4_one.c similarity index 100% rename from drivers/builtin_openssl2/crypto/md4/md4_one.c rename to thirdparty/openssl/crypto/md4/md4_one.c diff --git a/drivers/builtin_openssl2/crypto/md4/md4s.cpp b/thirdparty/openssl/crypto/md4/md4s.cpp similarity index 100% rename from drivers/builtin_openssl2/crypto/md4/md4s.cpp rename to thirdparty/openssl/crypto/md4/md4s.cpp diff --git a/drivers/builtin_openssl2/crypto/md5/md5.c b/thirdparty/openssl/crypto/md5/md5.c similarity index 100% rename from drivers/builtin_openssl2/crypto/md5/md5.c rename to thirdparty/openssl/crypto/md5/md5.c diff --git a/drivers/builtin_openssl2/crypto/md5/md5_dgst.c b/thirdparty/openssl/crypto/md5/md5_dgst.c similarity index 100% rename from drivers/builtin_openssl2/crypto/md5/md5_dgst.c rename to thirdparty/openssl/crypto/md5/md5_dgst.c diff --git a/drivers/builtin_openssl2/crypto/md5/md5_locl.h b/thirdparty/openssl/crypto/md5/md5_locl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/md5/md5_locl.h rename to thirdparty/openssl/crypto/md5/md5_locl.h diff --git a/drivers/builtin_openssl2/crypto/md5/md5_one.c b/thirdparty/openssl/crypto/md5/md5_one.c similarity index 100% rename from drivers/builtin_openssl2/crypto/md5/md5_one.c rename to thirdparty/openssl/crypto/md5/md5_one.c diff --git a/drivers/builtin_openssl2/crypto/md5/md5s.cpp b/thirdparty/openssl/crypto/md5/md5s.cpp similarity index 100% rename from drivers/builtin_openssl2/crypto/md5/md5s.cpp rename to thirdparty/openssl/crypto/md5/md5s.cpp diff --git a/drivers/builtin_openssl2/crypto/mdc2/mdc2_one.c b/thirdparty/openssl/crypto/mdc2/mdc2_one.c similarity index 100% rename from drivers/builtin_openssl2/crypto/mdc2/mdc2_one.c rename to thirdparty/openssl/crypto/mdc2/mdc2_one.c diff --git a/drivers/builtin_openssl2/crypto/mdc2/mdc2dgst.c b/thirdparty/openssl/crypto/mdc2/mdc2dgst.c similarity index 100% rename from drivers/builtin_openssl2/crypto/mdc2/mdc2dgst.c rename to thirdparty/openssl/crypto/mdc2/mdc2dgst.c diff --git a/drivers/builtin_openssl2/crypto/mem.c b/thirdparty/openssl/crypto/mem.c similarity index 100% rename from drivers/builtin_openssl2/crypto/mem.c rename to thirdparty/openssl/crypto/mem.c diff --git a/drivers/builtin_openssl2/crypto/mem_clr.c b/thirdparty/openssl/crypto/mem_clr.c similarity index 100% rename from drivers/builtin_openssl2/crypto/mem_clr.c rename to thirdparty/openssl/crypto/mem_clr.c diff --git a/drivers/builtin_openssl2/crypto/mem_dbg.c b/thirdparty/openssl/crypto/mem_dbg.c similarity index 100% rename from drivers/builtin_openssl2/crypto/mem_dbg.c rename to thirdparty/openssl/crypto/mem_dbg.c diff --git a/drivers/builtin_openssl2/crypto/modes/cbc128.c b/thirdparty/openssl/crypto/modes/cbc128.c similarity index 100% rename from drivers/builtin_openssl2/crypto/modes/cbc128.c rename to thirdparty/openssl/crypto/modes/cbc128.c diff --git a/drivers/builtin_openssl2/crypto/modes/ccm128.c b/thirdparty/openssl/crypto/modes/ccm128.c similarity index 100% rename from drivers/builtin_openssl2/crypto/modes/ccm128.c rename to thirdparty/openssl/crypto/modes/ccm128.c diff --git a/drivers/builtin_openssl2/crypto/modes/cfb128.c b/thirdparty/openssl/crypto/modes/cfb128.c similarity index 100% rename from drivers/builtin_openssl2/crypto/modes/cfb128.c rename to thirdparty/openssl/crypto/modes/cfb128.c diff --git a/drivers/builtin_openssl2/crypto/modes/ctr128.c b/thirdparty/openssl/crypto/modes/ctr128.c similarity index 100% rename from drivers/builtin_openssl2/crypto/modes/ctr128.c rename to thirdparty/openssl/crypto/modes/ctr128.c diff --git a/drivers/builtin_openssl2/crypto/modes/cts128.c b/thirdparty/openssl/crypto/modes/cts128.c similarity index 100% rename from drivers/builtin_openssl2/crypto/modes/cts128.c rename to thirdparty/openssl/crypto/modes/cts128.c diff --git a/drivers/builtin_openssl2/crypto/modes/gcm128.c b/thirdparty/openssl/crypto/modes/gcm128.c similarity index 100% rename from drivers/builtin_openssl2/crypto/modes/gcm128.c rename to thirdparty/openssl/crypto/modes/gcm128.c diff --git a/drivers/builtin_openssl2/crypto/modes/modes_lcl.h b/thirdparty/openssl/crypto/modes/modes_lcl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/modes/modes_lcl.h rename to thirdparty/openssl/crypto/modes/modes_lcl.h diff --git a/drivers/builtin_openssl2/crypto/modes/ofb128.c b/thirdparty/openssl/crypto/modes/ofb128.c similarity index 100% rename from drivers/builtin_openssl2/crypto/modes/ofb128.c rename to thirdparty/openssl/crypto/modes/ofb128.c diff --git a/drivers/builtin_openssl2/crypto/modes/wrap128.c b/thirdparty/openssl/crypto/modes/wrap128.c similarity index 100% rename from drivers/builtin_openssl2/crypto/modes/wrap128.c rename to thirdparty/openssl/crypto/modes/wrap128.c diff --git a/drivers/builtin_openssl2/crypto/modes/xts128.c b/thirdparty/openssl/crypto/modes/xts128.c similarity index 100% rename from drivers/builtin_openssl2/crypto/modes/xts128.c rename to thirdparty/openssl/crypto/modes/xts128.c diff --git a/drivers/builtin_openssl2/crypto/o_dir.c b/thirdparty/openssl/crypto/o_dir.c similarity index 100% rename from drivers/builtin_openssl2/crypto/o_dir.c rename to thirdparty/openssl/crypto/o_dir.c diff --git a/drivers/builtin_openssl2/crypto/o_dir.h b/thirdparty/openssl/crypto/o_dir.h similarity index 100% rename from drivers/builtin_openssl2/crypto/o_dir.h rename to thirdparty/openssl/crypto/o_dir.h diff --git a/drivers/builtin_openssl2/crypto/o_fips.c b/thirdparty/openssl/crypto/o_fips.c similarity index 100% rename from drivers/builtin_openssl2/crypto/o_fips.c rename to thirdparty/openssl/crypto/o_fips.c diff --git a/drivers/builtin_openssl2/crypto/o_init.c b/thirdparty/openssl/crypto/o_init.c similarity index 100% rename from drivers/builtin_openssl2/crypto/o_init.c rename to thirdparty/openssl/crypto/o_init.c diff --git a/drivers/builtin_openssl2/crypto/o_str.c b/thirdparty/openssl/crypto/o_str.c similarity index 100% rename from drivers/builtin_openssl2/crypto/o_str.c rename to thirdparty/openssl/crypto/o_str.c diff --git a/drivers/builtin_openssl2/crypto/o_str.h b/thirdparty/openssl/crypto/o_str.h similarity index 100% rename from drivers/builtin_openssl2/crypto/o_str.h rename to thirdparty/openssl/crypto/o_str.h diff --git a/drivers/builtin_openssl2/crypto/o_time.c b/thirdparty/openssl/crypto/o_time.c similarity index 100% rename from drivers/builtin_openssl2/crypto/o_time.c rename to thirdparty/openssl/crypto/o_time.c diff --git a/drivers/builtin_openssl2/crypto/o_time.h b/thirdparty/openssl/crypto/o_time.h similarity index 100% rename from drivers/builtin_openssl2/crypto/o_time.h rename to thirdparty/openssl/crypto/o_time.h diff --git a/drivers/builtin_openssl2/crypto/objects/o_names.c b/thirdparty/openssl/crypto/objects/o_names.c similarity index 100% rename from drivers/builtin_openssl2/crypto/objects/o_names.c rename to thirdparty/openssl/crypto/objects/o_names.c diff --git a/drivers/builtin_openssl2/crypto/objects/obj_dat.c b/thirdparty/openssl/crypto/objects/obj_dat.c similarity index 100% rename from drivers/builtin_openssl2/crypto/objects/obj_dat.c rename to thirdparty/openssl/crypto/objects/obj_dat.c diff --git a/drivers/builtin_openssl2/crypto/objects/obj_dat.h b/thirdparty/openssl/crypto/objects/obj_dat.h similarity index 100% rename from drivers/builtin_openssl2/crypto/objects/obj_dat.h rename to thirdparty/openssl/crypto/objects/obj_dat.h diff --git a/drivers/builtin_openssl2/crypto/objects/obj_err.c b/thirdparty/openssl/crypto/objects/obj_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/objects/obj_err.c rename to thirdparty/openssl/crypto/objects/obj_err.c diff --git a/drivers/builtin_openssl2/crypto/objects/obj_lib.c b/thirdparty/openssl/crypto/objects/obj_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/objects/obj_lib.c rename to thirdparty/openssl/crypto/objects/obj_lib.c diff --git a/drivers/builtin_openssl2/crypto/objects/obj_mac.num b/thirdparty/openssl/crypto/objects/obj_mac.num similarity index 100% rename from drivers/builtin_openssl2/crypto/objects/obj_mac.num rename to thirdparty/openssl/crypto/objects/obj_mac.num diff --git a/drivers/builtin_openssl2/crypto/objects/obj_xref.c b/thirdparty/openssl/crypto/objects/obj_xref.c similarity index 100% rename from drivers/builtin_openssl2/crypto/objects/obj_xref.c rename to thirdparty/openssl/crypto/objects/obj_xref.c diff --git a/drivers/builtin_openssl2/crypto/objects/obj_xref.h b/thirdparty/openssl/crypto/objects/obj_xref.h similarity index 100% rename from drivers/builtin_openssl2/crypto/objects/obj_xref.h rename to thirdparty/openssl/crypto/objects/obj_xref.h diff --git a/drivers/builtin_openssl2/crypto/objects/obj_xref.txt b/thirdparty/openssl/crypto/objects/obj_xref.txt similarity index 100% rename from drivers/builtin_openssl2/crypto/objects/obj_xref.txt rename to thirdparty/openssl/crypto/objects/obj_xref.txt diff --git a/drivers/builtin_openssl2/crypto/objects/objects.README b/thirdparty/openssl/crypto/objects/objects.README similarity index 100% rename from drivers/builtin_openssl2/crypto/objects/objects.README rename to thirdparty/openssl/crypto/objects/objects.README diff --git a/drivers/builtin_openssl2/crypto/objects/objects.txt b/thirdparty/openssl/crypto/objects/objects.txt similarity index 100% rename from drivers/builtin_openssl2/crypto/objects/objects.txt rename to thirdparty/openssl/crypto/objects/objects.txt diff --git a/drivers/builtin_openssl2/crypto/ocsp/ocsp_asn.c b/thirdparty/openssl/crypto/ocsp/ocsp_asn.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ocsp/ocsp_asn.c rename to thirdparty/openssl/crypto/ocsp/ocsp_asn.c diff --git a/drivers/builtin_openssl2/crypto/ocsp/ocsp_cl.c b/thirdparty/openssl/crypto/ocsp/ocsp_cl.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ocsp/ocsp_cl.c rename to thirdparty/openssl/crypto/ocsp/ocsp_cl.c diff --git a/drivers/builtin_openssl2/crypto/ocsp/ocsp_err.c b/thirdparty/openssl/crypto/ocsp/ocsp_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ocsp/ocsp_err.c rename to thirdparty/openssl/crypto/ocsp/ocsp_err.c diff --git a/drivers/builtin_openssl2/crypto/ocsp/ocsp_ext.c b/thirdparty/openssl/crypto/ocsp/ocsp_ext.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ocsp/ocsp_ext.c rename to thirdparty/openssl/crypto/ocsp/ocsp_ext.c diff --git a/drivers/builtin_openssl2/crypto/ocsp/ocsp_ht.c b/thirdparty/openssl/crypto/ocsp/ocsp_ht.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ocsp/ocsp_ht.c rename to thirdparty/openssl/crypto/ocsp/ocsp_ht.c diff --git a/drivers/builtin_openssl2/crypto/ocsp/ocsp_lib.c b/thirdparty/openssl/crypto/ocsp/ocsp_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ocsp/ocsp_lib.c rename to thirdparty/openssl/crypto/ocsp/ocsp_lib.c diff --git a/drivers/builtin_openssl2/crypto/ocsp/ocsp_prn.c b/thirdparty/openssl/crypto/ocsp/ocsp_prn.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ocsp/ocsp_prn.c rename to thirdparty/openssl/crypto/ocsp/ocsp_prn.c diff --git a/drivers/builtin_openssl2/crypto/ocsp/ocsp_srv.c b/thirdparty/openssl/crypto/ocsp/ocsp_srv.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ocsp/ocsp_srv.c rename to thirdparty/openssl/crypto/ocsp/ocsp_srv.c diff --git a/drivers/builtin_openssl2/crypto/ocsp/ocsp_vfy.c b/thirdparty/openssl/crypto/ocsp/ocsp_vfy.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ocsp/ocsp_vfy.c rename to thirdparty/openssl/crypto/ocsp/ocsp_vfy.c diff --git a/drivers/builtin_openssl2/crypto/opensslconf.h.in b/thirdparty/openssl/crypto/opensslconf.h.in similarity index 100% rename from drivers/builtin_openssl2/crypto/opensslconf.h.in rename to thirdparty/openssl/crypto/opensslconf.h.in diff --git a/drivers/builtin_openssl2/crypto/pem/message b/thirdparty/openssl/crypto/pem/message similarity index 100% rename from drivers/builtin_openssl2/crypto/pem/message rename to thirdparty/openssl/crypto/pem/message diff --git a/drivers/builtin_openssl2/crypto/pem/pem_all.c b/thirdparty/openssl/crypto/pem/pem_all.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pem/pem_all.c rename to thirdparty/openssl/crypto/pem/pem_all.c diff --git a/drivers/builtin_openssl2/crypto/pem/pem_err.c b/thirdparty/openssl/crypto/pem/pem_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pem/pem_err.c rename to thirdparty/openssl/crypto/pem/pem_err.c diff --git a/drivers/builtin_openssl2/crypto/pem/pem_info.c b/thirdparty/openssl/crypto/pem/pem_info.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pem/pem_info.c rename to thirdparty/openssl/crypto/pem/pem_info.c diff --git a/drivers/builtin_openssl2/crypto/pem/pem_lib.c b/thirdparty/openssl/crypto/pem/pem_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pem/pem_lib.c rename to thirdparty/openssl/crypto/pem/pem_lib.c diff --git a/drivers/builtin_openssl2/crypto/pem/pem_oth.c b/thirdparty/openssl/crypto/pem/pem_oth.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pem/pem_oth.c rename to thirdparty/openssl/crypto/pem/pem_oth.c diff --git a/drivers/builtin_openssl2/crypto/pem/pem_pk8.c b/thirdparty/openssl/crypto/pem/pem_pk8.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pem/pem_pk8.c rename to thirdparty/openssl/crypto/pem/pem_pk8.c diff --git a/drivers/builtin_openssl2/crypto/pem/pem_pkey.c b/thirdparty/openssl/crypto/pem/pem_pkey.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pem/pem_pkey.c rename to thirdparty/openssl/crypto/pem/pem_pkey.c diff --git a/drivers/builtin_openssl2/crypto/pem/pem_seal.c b/thirdparty/openssl/crypto/pem/pem_seal.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pem/pem_seal.c rename to thirdparty/openssl/crypto/pem/pem_seal.c diff --git a/drivers/builtin_openssl2/crypto/pem/pem_sign.c b/thirdparty/openssl/crypto/pem/pem_sign.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pem/pem_sign.c rename to thirdparty/openssl/crypto/pem/pem_sign.c diff --git a/drivers/builtin_openssl2/crypto/pem/pem_x509.c b/thirdparty/openssl/crypto/pem/pem_x509.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pem/pem_x509.c rename to thirdparty/openssl/crypto/pem/pem_x509.c diff --git a/drivers/builtin_openssl2/crypto/pem/pem_xaux.c b/thirdparty/openssl/crypto/pem/pem_xaux.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pem/pem_xaux.c rename to thirdparty/openssl/crypto/pem/pem_xaux.c diff --git a/drivers/builtin_openssl2/crypto/pem/pkcs7.lis b/thirdparty/openssl/crypto/pem/pkcs7.lis similarity index 100% rename from drivers/builtin_openssl2/crypto/pem/pkcs7.lis rename to thirdparty/openssl/crypto/pem/pkcs7.lis diff --git a/drivers/builtin_openssl2/crypto/pem/pvkfmt.c b/thirdparty/openssl/crypto/pem/pvkfmt.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pem/pvkfmt.c rename to thirdparty/openssl/crypto/pem/pvkfmt.c diff --git a/drivers/builtin_openssl2/crypto/perlasm/readme b/thirdparty/openssl/crypto/perlasm/readme similarity index 100% rename from drivers/builtin_openssl2/crypto/perlasm/readme rename to thirdparty/openssl/crypto/perlasm/readme diff --git a/drivers/builtin_openssl2/crypto/pkcs12/p12_add.c b/thirdparty/openssl/crypto/pkcs12/p12_add.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs12/p12_add.c rename to thirdparty/openssl/crypto/pkcs12/p12_add.c diff --git a/drivers/builtin_openssl2/crypto/pkcs12/p12_asn.c b/thirdparty/openssl/crypto/pkcs12/p12_asn.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs12/p12_asn.c rename to thirdparty/openssl/crypto/pkcs12/p12_asn.c diff --git a/drivers/builtin_openssl2/crypto/pkcs12/p12_attr.c b/thirdparty/openssl/crypto/pkcs12/p12_attr.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs12/p12_attr.c rename to thirdparty/openssl/crypto/pkcs12/p12_attr.c diff --git a/drivers/builtin_openssl2/crypto/pkcs12/p12_crpt.c b/thirdparty/openssl/crypto/pkcs12/p12_crpt.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs12/p12_crpt.c rename to thirdparty/openssl/crypto/pkcs12/p12_crpt.c diff --git a/drivers/builtin_openssl2/crypto/pkcs12/p12_crt.c b/thirdparty/openssl/crypto/pkcs12/p12_crt.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs12/p12_crt.c rename to thirdparty/openssl/crypto/pkcs12/p12_crt.c diff --git a/drivers/builtin_openssl2/crypto/pkcs12/p12_decr.c b/thirdparty/openssl/crypto/pkcs12/p12_decr.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs12/p12_decr.c rename to thirdparty/openssl/crypto/pkcs12/p12_decr.c diff --git a/drivers/builtin_openssl2/crypto/pkcs12/p12_init.c b/thirdparty/openssl/crypto/pkcs12/p12_init.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs12/p12_init.c rename to thirdparty/openssl/crypto/pkcs12/p12_init.c diff --git a/drivers/builtin_openssl2/crypto/pkcs12/p12_key.c b/thirdparty/openssl/crypto/pkcs12/p12_key.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs12/p12_key.c rename to thirdparty/openssl/crypto/pkcs12/p12_key.c diff --git a/drivers/builtin_openssl2/crypto/pkcs12/p12_kiss.c b/thirdparty/openssl/crypto/pkcs12/p12_kiss.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs12/p12_kiss.c rename to thirdparty/openssl/crypto/pkcs12/p12_kiss.c diff --git a/drivers/builtin_openssl2/crypto/pkcs12/p12_mutl.c b/thirdparty/openssl/crypto/pkcs12/p12_mutl.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs12/p12_mutl.c rename to thirdparty/openssl/crypto/pkcs12/p12_mutl.c diff --git a/drivers/builtin_openssl2/crypto/pkcs12/p12_npas.c b/thirdparty/openssl/crypto/pkcs12/p12_npas.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs12/p12_npas.c rename to thirdparty/openssl/crypto/pkcs12/p12_npas.c diff --git a/drivers/builtin_openssl2/crypto/pkcs12/p12_p8d.c b/thirdparty/openssl/crypto/pkcs12/p12_p8d.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs12/p12_p8d.c rename to thirdparty/openssl/crypto/pkcs12/p12_p8d.c diff --git a/drivers/builtin_openssl2/crypto/pkcs12/p12_p8e.c b/thirdparty/openssl/crypto/pkcs12/p12_p8e.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs12/p12_p8e.c rename to thirdparty/openssl/crypto/pkcs12/p12_p8e.c diff --git a/drivers/builtin_openssl2/crypto/pkcs12/p12_utl.c b/thirdparty/openssl/crypto/pkcs12/p12_utl.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs12/p12_utl.c rename to thirdparty/openssl/crypto/pkcs12/p12_utl.c diff --git a/drivers/builtin_openssl2/crypto/pkcs12/pk12err.c b/thirdparty/openssl/crypto/pkcs12/pk12err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs12/pk12err.c rename to thirdparty/openssl/crypto/pkcs12/pk12err.c diff --git a/drivers/builtin_openssl2/crypto/pkcs7/bio_pk7.c b/thirdparty/openssl/crypto/pkcs7/bio_pk7.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs7/bio_pk7.c rename to thirdparty/openssl/crypto/pkcs7/bio_pk7.c diff --git a/drivers/builtin_openssl2/crypto/pkcs7/pk7_asn1.c b/thirdparty/openssl/crypto/pkcs7/pk7_asn1.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs7/pk7_asn1.c rename to thirdparty/openssl/crypto/pkcs7/pk7_asn1.c diff --git a/drivers/builtin_openssl2/crypto/pkcs7/pk7_attr.c b/thirdparty/openssl/crypto/pkcs7/pk7_attr.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs7/pk7_attr.c rename to thirdparty/openssl/crypto/pkcs7/pk7_attr.c diff --git a/drivers/builtin_openssl2/crypto/pkcs7/pk7_dgst.c b/thirdparty/openssl/crypto/pkcs7/pk7_dgst.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs7/pk7_dgst.c rename to thirdparty/openssl/crypto/pkcs7/pk7_dgst.c diff --git a/drivers/builtin_openssl2/crypto/pkcs7/pk7_doit.c b/thirdparty/openssl/crypto/pkcs7/pk7_doit.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs7/pk7_doit.c rename to thirdparty/openssl/crypto/pkcs7/pk7_doit.c diff --git a/drivers/builtin_openssl2/crypto/pkcs7/pk7_enc.c b/thirdparty/openssl/crypto/pkcs7/pk7_enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs7/pk7_enc.c rename to thirdparty/openssl/crypto/pkcs7/pk7_enc.c diff --git a/drivers/builtin_openssl2/crypto/pkcs7/pk7_lib.c b/thirdparty/openssl/crypto/pkcs7/pk7_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs7/pk7_lib.c rename to thirdparty/openssl/crypto/pkcs7/pk7_lib.c diff --git a/drivers/builtin_openssl2/crypto/pkcs7/pk7_mime.c b/thirdparty/openssl/crypto/pkcs7/pk7_mime.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs7/pk7_mime.c rename to thirdparty/openssl/crypto/pkcs7/pk7_mime.c diff --git a/drivers/builtin_openssl2/crypto/pkcs7/pk7_smime.c b/thirdparty/openssl/crypto/pkcs7/pk7_smime.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs7/pk7_smime.c rename to thirdparty/openssl/crypto/pkcs7/pk7_smime.c diff --git a/drivers/builtin_openssl2/crypto/pkcs7/pkcs7err.c b/thirdparty/openssl/crypto/pkcs7/pkcs7err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pkcs7/pkcs7err.c rename to thirdparty/openssl/crypto/pkcs7/pkcs7err.c diff --git a/drivers/builtin_openssl2/crypto/ppc_arch.h b/thirdparty/openssl/crypto/ppc_arch.h similarity index 100% rename from drivers/builtin_openssl2/crypto/ppc_arch.h rename to thirdparty/openssl/crypto/ppc_arch.h diff --git a/drivers/builtin_openssl2/crypto/ppccap.c b/thirdparty/openssl/crypto/ppccap.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ppccap.c rename to thirdparty/openssl/crypto/ppccap.c diff --git a/drivers/builtin_openssl2/crypto/pqueue/pqueue.c b/thirdparty/openssl/crypto/pqueue/pqueue.c similarity index 100% rename from drivers/builtin_openssl2/crypto/pqueue/pqueue.c rename to thirdparty/openssl/crypto/pqueue/pqueue.c diff --git a/drivers/builtin_openssl2/crypto/rand/md_rand.c b/thirdparty/openssl/crypto/rand/md_rand.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rand/md_rand.c rename to thirdparty/openssl/crypto/rand/md_rand.c diff --git a/drivers/builtin_openssl2/crypto/rand/rand_egd.c b/thirdparty/openssl/crypto/rand/rand_egd.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rand/rand_egd.c rename to thirdparty/openssl/crypto/rand/rand_egd.c diff --git a/drivers/builtin_openssl2/crypto/rand/rand_err.c b/thirdparty/openssl/crypto/rand/rand_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rand/rand_err.c rename to thirdparty/openssl/crypto/rand/rand_err.c diff --git a/drivers/builtin_openssl2/crypto/rand/rand_lcl.h b/thirdparty/openssl/crypto/rand/rand_lcl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/rand/rand_lcl.h rename to thirdparty/openssl/crypto/rand/rand_lcl.h diff --git a/drivers/builtin_openssl2/crypto/rand/rand_lib.c b/thirdparty/openssl/crypto/rand/rand_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rand/rand_lib.c rename to thirdparty/openssl/crypto/rand/rand_lib.c diff --git a/drivers/builtin_openssl2/crypto/rand/rand_nw.c b/thirdparty/openssl/crypto/rand/rand_nw.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rand/rand_nw.c rename to thirdparty/openssl/crypto/rand/rand_nw.c diff --git a/drivers/builtin_openssl2/crypto/rand/rand_os2.c b/thirdparty/openssl/crypto/rand/rand_os2.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rand/rand_os2.c rename to thirdparty/openssl/crypto/rand/rand_os2.c diff --git a/drivers/builtin_openssl2/crypto/rand/rand_unix.c b/thirdparty/openssl/crypto/rand/rand_unix.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rand/rand_unix.c rename to thirdparty/openssl/crypto/rand/rand_unix.c diff --git a/drivers/builtin_openssl2/crypto/rand/rand_vms.c b/thirdparty/openssl/crypto/rand/rand_vms.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rand/rand_vms.c rename to thirdparty/openssl/crypto/rand/rand_vms.c diff --git a/drivers/builtin_openssl2/crypto/rand/rand_win.c b/thirdparty/openssl/crypto/rand/rand_win.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rand/rand_win.c rename to thirdparty/openssl/crypto/rand/rand_win.c diff --git a/drivers/builtin_openssl2/crypto/rand/randfile.c b/thirdparty/openssl/crypto/rand/randfile.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rand/randfile.c rename to thirdparty/openssl/crypto/rand/randfile.c diff --git a/drivers/builtin_openssl2/crypto/rc2/rc2_cbc.c b/thirdparty/openssl/crypto/rc2/rc2_cbc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rc2/rc2_cbc.c rename to thirdparty/openssl/crypto/rc2/rc2_cbc.c diff --git a/drivers/builtin_openssl2/crypto/rc2/rc2_ecb.c b/thirdparty/openssl/crypto/rc2/rc2_ecb.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rc2/rc2_ecb.c rename to thirdparty/openssl/crypto/rc2/rc2_ecb.c diff --git a/drivers/builtin_openssl2/crypto/rc2/rc2_locl.h b/thirdparty/openssl/crypto/rc2/rc2_locl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/rc2/rc2_locl.h rename to thirdparty/openssl/crypto/rc2/rc2_locl.h diff --git a/drivers/builtin_openssl2/crypto/rc2/rc2_skey.c b/thirdparty/openssl/crypto/rc2/rc2_skey.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rc2/rc2_skey.c rename to thirdparty/openssl/crypto/rc2/rc2_skey.c diff --git a/drivers/builtin_openssl2/crypto/rc2/rc2cfb64.c b/thirdparty/openssl/crypto/rc2/rc2cfb64.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rc2/rc2cfb64.c rename to thirdparty/openssl/crypto/rc2/rc2cfb64.c diff --git a/drivers/builtin_openssl2/crypto/rc2/rc2ofb64.c b/thirdparty/openssl/crypto/rc2/rc2ofb64.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rc2/rc2ofb64.c rename to thirdparty/openssl/crypto/rc2/rc2ofb64.c diff --git a/drivers/builtin_openssl2/crypto/rc2/rc2speed.c b/thirdparty/openssl/crypto/rc2/rc2speed.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rc2/rc2speed.c rename to thirdparty/openssl/crypto/rc2/rc2speed.c diff --git a/drivers/builtin_openssl2/crypto/rc2/rrc2.doc b/thirdparty/openssl/crypto/rc2/rrc2.doc similarity index 100% rename from drivers/builtin_openssl2/crypto/rc2/rrc2.doc rename to thirdparty/openssl/crypto/rc2/rrc2.doc diff --git a/drivers/builtin_openssl2/crypto/rc2/tab.c b/thirdparty/openssl/crypto/rc2/tab.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rc2/tab.c rename to thirdparty/openssl/crypto/rc2/tab.c diff --git a/drivers/builtin_openssl2/crypto/rc2/version b/thirdparty/openssl/crypto/rc2/version similarity index 100% rename from drivers/builtin_openssl2/crypto/rc2/version rename to thirdparty/openssl/crypto/rc2/version diff --git a/drivers/builtin_openssl2/crypto/rc4/rc4.c b/thirdparty/openssl/crypto/rc4/rc4.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rc4/rc4.c rename to thirdparty/openssl/crypto/rc4/rc4.c diff --git a/drivers/builtin_openssl2/crypto/rc4/rc4_enc.c b/thirdparty/openssl/crypto/rc4/rc4_enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rc4/rc4_enc.c rename to thirdparty/openssl/crypto/rc4/rc4_enc.c diff --git a/drivers/builtin_openssl2/crypto/rc4/rc4_locl.h b/thirdparty/openssl/crypto/rc4/rc4_locl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/rc4/rc4_locl.h rename to thirdparty/openssl/crypto/rc4/rc4_locl.h diff --git a/drivers/builtin_openssl2/crypto/rc4/rc4_skey.c b/thirdparty/openssl/crypto/rc4/rc4_skey.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rc4/rc4_skey.c rename to thirdparty/openssl/crypto/rc4/rc4_skey.c diff --git a/drivers/builtin_openssl2/crypto/rc4/rc4_utl.c b/thirdparty/openssl/crypto/rc4/rc4_utl.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rc4/rc4_utl.c rename to thirdparty/openssl/crypto/rc4/rc4_utl.c diff --git a/drivers/builtin_openssl2/crypto/rc4/rc4s.cpp b/thirdparty/openssl/crypto/rc4/rc4s.cpp similarity index 100% rename from drivers/builtin_openssl2/crypto/rc4/rc4s.cpp rename to thirdparty/openssl/crypto/rc4/rc4s.cpp diff --git a/drivers/builtin_openssl2/crypto/rc4/rc4speed.c b/thirdparty/openssl/crypto/rc4/rc4speed.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rc4/rc4speed.c rename to thirdparty/openssl/crypto/rc4/rc4speed.c diff --git a/drivers/builtin_openssl2/crypto/rc4/rrc4.doc b/thirdparty/openssl/crypto/rc4/rrc4.doc similarity index 100% rename from drivers/builtin_openssl2/crypto/rc4/rrc4.doc rename to thirdparty/openssl/crypto/rc4/rrc4.doc diff --git a/drivers/builtin_openssl2/crypto/rc5/rc5.h b/thirdparty/openssl/crypto/rc5/rc5.h similarity index 100% rename from drivers/builtin_openssl2/crypto/rc5/rc5.h rename to thirdparty/openssl/crypto/rc5/rc5.h diff --git a/drivers/builtin_openssl2/crypto/rc5/rc5_ecb.c b/thirdparty/openssl/crypto/rc5/rc5_ecb.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rc5/rc5_ecb.c rename to thirdparty/openssl/crypto/rc5/rc5_ecb.c diff --git a/drivers/builtin_openssl2/crypto/rc5/rc5_enc.c b/thirdparty/openssl/crypto/rc5/rc5_enc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rc5/rc5_enc.c rename to thirdparty/openssl/crypto/rc5/rc5_enc.c diff --git a/drivers/builtin_openssl2/crypto/rc5/rc5_locl.h b/thirdparty/openssl/crypto/rc5/rc5_locl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/rc5/rc5_locl.h rename to thirdparty/openssl/crypto/rc5/rc5_locl.h diff --git a/drivers/builtin_openssl2/crypto/rc5/rc5_skey.c b/thirdparty/openssl/crypto/rc5/rc5_skey.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rc5/rc5_skey.c rename to thirdparty/openssl/crypto/rc5/rc5_skey.c diff --git a/drivers/builtin_openssl2/crypto/rc5/rc5cfb64.c b/thirdparty/openssl/crypto/rc5/rc5cfb64.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rc5/rc5cfb64.c rename to thirdparty/openssl/crypto/rc5/rc5cfb64.c diff --git a/drivers/builtin_openssl2/crypto/rc5/rc5ofb64.c b/thirdparty/openssl/crypto/rc5/rc5ofb64.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rc5/rc5ofb64.c rename to thirdparty/openssl/crypto/rc5/rc5ofb64.c diff --git a/drivers/builtin_openssl2/crypto/rc5/rc5s.cpp b/thirdparty/openssl/crypto/rc5/rc5s.cpp similarity index 100% rename from drivers/builtin_openssl2/crypto/rc5/rc5s.cpp rename to thirdparty/openssl/crypto/rc5/rc5s.cpp diff --git a/drivers/builtin_openssl2/crypto/rc5/rc5speed.c b/thirdparty/openssl/crypto/rc5/rc5speed.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rc5/rc5speed.c rename to thirdparty/openssl/crypto/rc5/rc5speed.c diff --git a/drivers/builtin_openssl2/crypto/ripemd/README b/thirdparty/openssl/crypto/ripemd/README similarity index 100% rename from drivers/builtin_openssl2/crypto/ripemd/README rename to thirdparty/openssl/crypto/ripemd/README diff --git a/drivers/builtin_openssl2/crypto/ripemd/asm/rips.cpp b/thirdparty/openssl/crypto/ripemd/asm/rips.cpp similarity index 100% rename from drivers/builtin_openssl2/crypto/ripemd/asm/rips.cpp rename to thirdparty/openssl/crypto/ripemd/asm/rips.cpp diff --git a/drivers/builtin_openssl2/crypto/ripemd/rmd160.c b/thirdparty/openssl/crypto/ripemd/rmd160.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ripemd/rmd160.c rename to thirdparty/openssl/crypto/ripemd/rmd160.c diff --git a/drivers/builtin_openssl2/crypto/ripemd/rmd_dgst.c b/thirdparty/openssl/crypto/ripemd/rmd_dgst.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ripemd/rmd_dgst.c rename to thirdparty/openssl/crypto/ripemd/rmd_dgst.c diff --git a/drivers/builtin_openssl2/crypto/ripemd/rmd_locl.h b/thirdparty/openssl/crypto/ripemd/rmd_locl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/ripemd/rmd_locl.h rename to thirdparty/openssl/crypto/ripemd/rmd_locl.h diff --git a/drivers/builtin_openssl2/crypto/ripemd/rmd_one.c b/thirdparty/openssl/crypto/ripemd/rmd_one.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ripemd/rmd_one.c rename to thirdparty/openssl/crypto/ripemd/rmd_one.c diff --git a/drivers/builtin_openssl2/crypto/ripemd/rmdconst.h b/thirdparty/openssl/crypto/ripemd/rmdconst.h similarity index 100% rename from drivers/builtin_openssl2/crypto/ripemd/rmdconst.h rename to thirdparty/openssl/crypto/ripemd/rmdconst.h diff --git a/drivers/builtin_openssl2/crypto/rsa/rsa_ameth.c b/thirdparty/openssl/crypto/rsa/rsa_ameth.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rsa/rsa_ameth.c rename to thirdparty/openssl/crypto/rsa/rsa_ameth.c diff --git a/drivers/builtin_openssl2/crypto/rsa/rsa_asn1.c b/thirdparty/openssl/crypto/rsa/rsa_asn1.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rsa/rsa_asn1.c rename to thirdparty/openssl/crypto/rsa/rsa_asn1.c diff --git a/drivers/builtin_openssl2/crypto/rsa/rsa_chk.c b/thirdparty/openssl/crypto/rsa/rsa_chk.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rsa/rsa_chk.c rename to thirdparty/openssl/crypto/rsa/rsa_chk.c diff --git a/drivers/builtin_openssl2/crypto/rsa/rsa_crpt.c b/thirdparty/openssl/crypto/rsa/rsa_crpt.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rsa/rsa_crpt.c rename to thirdparty/openssl/crypto/rsa/rsa_crpt.c diff --git a/drivers/builtin_openssl2/crypto/rsa/rsa_depr.c b/thirdparty/openssl/crypto/rsa/rsa_depr.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rsa/rsa_depr.c rename to thirdparty/openssl/crypto/rsa/rsa_depr.c diff --git a/drivers/builtin_openssl2/crypto/rsa/rsa_eay.c b/thirdparty/openssl/crypto/rsa/rsa_eay.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rsa/rsa_eay.c rename to thirdparty/openssl/crypto/rsa/rsa_eay.c diff --git a/drivers/builtin_openssl2/crypto/rsa/rsa_err.c b/thirdparty/openssl/crypto/rsa/rsa_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rsa/rsa_err.c rename to thirdparty/openssl/crypto/rsa/rsa_err.c diff --git a/drivers/builtin_openssl2/crypto/rsa/rsa_gen.c b/thirdparty/openssl/crypto/rsa/rsa_gen.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rsa/rsa_gen.c rename to thirdparty/openssl/crypto/rsa/rsa_gen.c diff --git a/drivers/builtin_openssl2/crypto/rsa/rsa_lib.c b/thirdparty/openssl/crypto/rsa/rsa_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rsa/rsa_lib.c rename to thirdparty/openssl/crypto/rsa/rsa_lib.c diff --git a/drivers/builtin_openssl2/crypto/rsa/rsa_locl.h b/thirdparty/openssl/crypto/rsa/rsa_locl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/rsa/rsa_locl.h rename to thirdparty/openssl/crypto/rsa/rsa_locl.h diff --git a/drivers/builtin_openssl2/crypto/rsa/rsa_none.c b/thirdparty/openssl/crypto/rsa/rsa_none.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rsa/rsa_none.c rename to thirdparty/openssl/crypto/rsa/rsa_none.c diff --git a/drivers/builtin_openssl2/crypto/rsa/rsa_null.c b/thirdparty/openssl/crypto/rsa/rsa_null.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rsa/rsa_null.c rename to thirdparty/openssl/crypto/rsa/rsa_null.c diff --git a/drivers/builtin_openssl2/crypto/rsa/rsa_oaep.c b/thirdparty/openssl/crypto/rsa/rsa_oaep.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rsa/rsa_oaep.c rename to thirdparty/openssl/crypto/rsa/rsa_oaep.c diff --git a/drivers/builtin_openssl2/crypto/rsa/rsa_pk1.c b/thirdparty/openssl/crypto/rsa/rsa_pk1.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rsa/rsa_pk1.c rename to thirdparty/openssl/crypto/rsa/rsa_pk1.c diff --git a/drivers/builtin_openssl2/crypto/rsa/rsa_pmeth.c b/thirdparty/openssl/crypto/rsa/rsa_pmeth.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rsa/rsa_pmeth.c rename to thirdparty/openssl/crypto/rsa/rsa_pmeth.c diff --git a/drivers/builtin_openssl2/crypto/rsa/rsa_prn.c b/thirdparty/openssl/crypto/rsa/rsa_prn.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rsa/rsa_prn.c rename to thirdparty/openssl/crypto/rsa/rsa_prn.c diff --git a/drivers/builtin_openssl2/crypto/rsa/rsa_pss.c b/thirdparty/openssl/crypto/rsa/rsa_pss.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rsa/rsa_pss.c rename to thirdparty/openssl/crypto/rsa/rsa_pss.c diff --git a/drivers/builtin_openssl2/crypto/rsa/rsa_saos.c b/thirdparty/openssl/crypto/rsa/rsa_saos.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rsa/rsa_saos.c rename to thirdparty/openssl/crypto/rsa/rsa_saos.c diff --git a/drivers/builtin_openssl2/crypto/rsa/rsa_sign.c b/thirdparty/openssl/crypto/rsa/rsa_sign.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rsa/rsa_sign.c rename to thirdparty/openssl/crypto/rsa/rsa_sign.c diff --git a/drivers/builtin_openssl2/crypto/rsa/rsa_ssl.c b/thirdparty/openssl/crypto/rsa/rsa_ssl.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rsa/rsa_ssl.c rename to thirdparty/openssl/crypto/rsa/rsa_ssl.c diff --git a/drivers/builtin_openssl2/crypto/rsa/rsa_x931.c b/thirdparty/openssl/crypto/rsa/rsa_x931.c similarity index 100% rename from drivers/builtin_openssl2/crypto/rsa/rsa_x931.c rename to thirdparty/openssl/crypto/rsa/rsa_x931.c diff --git a/drivers/builtin_openssl2/crypto/s390xcap.c b/thirdparty/openssl/crypto/s390xcap.c similarity index 100% rename from drivers/builtin_openssl2/crypto/s390xcap.c rename to thirdparty/openssl/crypto/s390xcap.c diff --git a/drivers/builtin_openssl2/crypto/seed/seed.c b/thirdparty/openssl/crypto/seed/seed.c similarity index 100% rename from drivers/builtin_openssl2/crypto/seed/seed.c rename to thirdparty/openssl/crypto/seed/seed.c diff --git a/drivers/builtin_openssl2/crypto/seed/seed_cbc.c b/thirdparty/openssl/crypto/seed/seed_cbc.c similarity index 100% rename from drivers/builtin_openssl2/crypto/seed/seed_cbc.c rename to thirdparty/openssl/crypto/seed/seed_cbc.c diff --git a/drivers/builtin_openssl2/crypto/seed/seed_cfb.c b/thirdparty/openssl/crypto/seed/seed_cfb.c similarity index 100% rename from drivers/builtin_openssl2/crypto/seed/seed_cfb.c rename to thirdparty/openssl/crypto/seed/seed_cfb.c diff --git a/drivers/builtin_openssl2/crypto/seed/seed_ecb.c b/thirdparty/openssl/crypto/seed/seed_ecb.c similarity index 100% rename from drivers/builtin_openssl2/crypto/seed/seed_ecb.c rename to thirdparty/openssl/crypto/seed/seed_ecb.c diff --git a/drivers/builtin_openssl2/crypto/seed/seed_locl.h b/thirdparty/openssl/crypto/seed/seed_locl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/seed/seed_locl.h rename to thirdparty/openssl/crypto/seed/seed_locl.h diff --git a/drivers/builtin_openssl2/crypto/seed/seed_ofb.c b/thirdparty/openssl/crypto/seed/seed_ofb.c similarity index 100% rename from drivers/builtin_openssl2/crypto/seed/seed_ofb.c rename to thirdparty/openssl/crypto/seed/seed_ofb.c diff --git a/drivers/builtin_openssl2/crypto/sha/asm/README b/thirdparty/openssl/crypto/sha/asm/README similarity index 100% rename from drivers/builtin_openssl2/crypto/sha/asm/README rename to thirdparty/openssl/crypto/sha/asm/README diff --git a/drivers/builtin_openssl2/crypto/sha/sha.c b/thirdparty/openssl/crypto/sha/sha.c similarity index 100% rename from drivers/builtin_openssl2/crypto/sha/sha.c rename to thirdparty/openssl/crypto/sha/sha.c diff --git a/drivers/builtin_openssl2/crypto/sha/sha1.c b/thirdparty/openssl/crypto/sha/sha1.c similarity index 100% rename from drivers/builtin_openssl2/crypto/sha/sha1.c rename to thirdparty/openssl/crypto/sha/sha1.c diff --git a/drivers/builtin_openssl2/crypto/sha/sha1_one.c b/thirdparty/openssl/crypto/sha/sha1_one.c similarity index 100% rename from drivers/builtin_openssl2/crypto/sha/sha1_one.c rename to thirdparty/openssl/crypto/sha/sha1_one.c diff --git a/drivers/builtin_openssl2/crypto/sha/sha1dgst.c b/thirdparty/openssl/crypto/sha/sha1dgst.c similarity index 100% rename from drivers/builtin_openssl2/crypto/sha/sha1dgst.c rename to thirdparty/openssl/crypto/sha/sha1dgst.c diff --git a/drivers/builtin_openssl2/crypto/sha/sha256.c b/thirdparty/openssl/crypto/sha/sha256.c similarity index 100% rename from drivers/builtin_openssl2/crypto/sha/sha256.c rename to thirdparty/openssl/crypto/sha/sha256.c diff --git a/drivers/builtin_openssl2/crypto/sha/sha256t.c b/thirdparty/openssl/crypto/sha/sha256t.c similarity index 100% rename from drivers/builtin_openssl2/crypto/sha/sha256t.c rename to thirdparty/openssl/crypto/sha/sha256t.c diff --git a/drivers/builtin_openssl2/crypto/sha/sha512.c b/thirdparty/openssl/crypto/sha/sha512.c similarity index 100% rename from drivers/builtin_openssl2/crypto/sha/sha512.c rename to thirdparty/openssl/crypto/sha/sha512.c diff --git a/drivers/builtin_openssl2/crypto/sha/sha512t.c b/thirdparty/openssl/crypto/sha/sha512t.c similarity index 100% rename from drivers/builtin_openssl2/crypto/sha/sha512t.c rename to thirdparty/openssl/crypto/sha/sha512t.c diff --git a/drivers/builtin_openssl2/crypto/sha/sha_dgst.c b/thirdparty/openssl/crypto/sha/sha_dgst.c similarity index 100% rename from drivers/builtin_openssl2/crypto/sha/sha_dgst.c rename to thirdparty/openssl/crypto/sha/sha_dgst.c diff --git a/drivers/builtin_openssl2/crypto/sha/sha_locl.h b/thirdparty/openssl/crypto/sha/sha_locl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/sha/sha_locl.h rename to thirdparty/openssl/crypto/sha/sha_locl.h diff --git a/drivers/builtin_openssl2/crypto/sha/sha_one.c b/thirdparty/openssl/crypto/sha/sha_one.c similarity index 100% rename from drivers/builtin_openssl2/crypto/sha/sha_one.c rename to thirdparty/openssl/crypto/sha/sha_one.c diff --git a/drivers/builtin_openssl2/crypto/sparc_arch.h b/thirdparty/openssl/crypto/sparc_arch.h similarity index 100% rename from drivers/builtin_openssl2/crypto/sparc_arch.h rename to thirdparty/openssl/crypto/sparc_arch.h diff --git a/drivers/builtin_openssl2/crypto/sparcv9cap.c b/thirdparty/openssl/crypto/sparcv9cap.c similarity index 100% rename from drivers/builtin_openssl2/crypto/sparcv9cap.c rename to thirdparty/openssl/crypto/sparcv9cap.c diff --git a/drivers/builtin_openssl2/crypto/srp/srp_grps.h b/thirdparty/openssl/crypto/srp/srp_grps.h similarity index 100% rename from drivers/builtin_openssl2/crypto/srp/srp_grps.h rename to thirdparty/openssl/crypto/srp/srp_grps.h diff --git a/drivers/builtin_openssl2/crypto/srp/srp_lcl.h b/thirdparty/openssl/crypto/srp/srp_lcl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/srp/srp_lcl.h rename to thirdparty/openssl/crypto/srp/srp_lcl.h diff --git a/drivers/builtin_openssl2/crypto/srp/srp_lib.c b/thirdparty/openssl/crypto/srp/srp_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/srp/srp_lib.c rename to thirdparty/openssl/crypto/srp/srp_lib.c diff --git a/drivers/builtin_openssl2/crypto/srp/srp_vfy.c b/thirdparty/openssl/crypto/srp/srp_vfy.c similarity index 100% rename from drivers/builtin_openssl2/crypto/srp/srp_vfy.c rename to thirdparty/openssl/crypto/srp/srp_vfy.c diff --git a/drivers/builtin_openssl2/crypto/stack/stack.c b/thirdparty/openssl/crypto/stack/stack.c similarity index 100% rename from drivers/builtin_openssl2/crypto/stack/stack.c rename to thirdparty/openssl/crypto/stack/stack.c diff --git a/drivers/builtin_openssl2/crypto/store/README b/thirdparty/openssl/crypto/store/README similarity index 100% rename from drivers/builtin_openssl2/crypto/store/README rename to thirdparty/openssl/crypto/store/README diff --git a/drivers/builtin_openssl2/crypto/store/store.h b/thirdparty/openssl/crypto/store/store.h similarity index 100% rename from drivers/builtin_openssl2/crypto/store/store.h rename to thirdparty/openssl/crypto/store/store.h diff --git a/drivers/builtin_openssl2/crypto/store/str_err.c b/thirdparty/openssl/crypto/store/str_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/store/str_err.c rename to thirdparty/openssl/crypto/store/str_err.c diff --git a/drivers/builtin_openssl2/crypto/store/str_lib.c b/thirdparty/openssl/crypto/store/str_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/store/str_lib.c rename to thirdparty/openssl/crypto/store/str_lib.c diff --git a/drivers/builtin_openssl2/crypto/store/str_locl.h b/thirdparty/openssl/crypto/store/str_locl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/store/str_locl.h rename to thirdparty/openssl/crypto/store/str_locl.h diff --git a/drivers/builtin_openssl2/crypto/store/str_mem.c b/thirdparty/openssl/crypto/store/str_mem.c similarity index 100% rename from drivers/builtin_openssl2/crypto/store/str_mem.c rename to thirdparty/openssl/crypto/store/str_mem.c diff --git a/drivers/builtin_openssl2/crypto/store/str_meth.c b/thirdparty/openssl/crypto/store/str_meth.c similarity index 100% rename from drivers/builtin_openssl2/crypto/store/str_meth.c rename to thirdparty/openssl/crypto/store/str_meth.c diff --git a/drivers/builtin_openssl2/crypto/threads/README b/thirdparty/openssl/crypto/threads/README similarity index 100% rename from drivers/builtin_openssl2/crypto/threads/README rename to thirdparty/openssl/crypto/threads/README diff --git a/drivers/builtin_openssl2/crypto/threads/netware.bat b/thirdparty/openssl/crypto/threads/netware.bat similarity index 100% rename from drivers/builtin_openssl2/crypto/threads/netware.bat rename to thirdparty/openssl/crypto/threads/netware.bat diff --git a/drivers/builtin_openssl2/crypto/threads/profile.sh b/thirdparty/openssl/crypto/threads/profile.sh similarity index 100% rename from drivers/builtin_openssl2/crypto/threads/profile.sh rename to thirdparty/openssl/crypto/threads/profile.sh diff --git a/drivers/builtin_openssl2/crypto/threads/ptest.bat b/thirdparty/openssl/crypto/threads/ptest.bat similarity index 100% rename from drivers/builtin_openssl2/crypto/threads/ptest.bat rename to thirdparty/openssl/crypto/threads/ptest.bat diff --git a/drivers/builtin_openssl2/crypto/threads/pthread.sh b/thirdparty/openssl/crypto/threads/pthread.sh similarity index 100% rename from drivers/builtin_openssl2/crypto/threads/pthread.sh rename to thirdparty/openssl/crypto/threads/pthread.sh diff --git a/drivers/builtin_openssl2/crypto/threads/pthread2.sh b/thirdparty/openssl/crypto/threads/pthread2.sh similarity index 100% rename from drivers/builtin_openssl2/crypto/threads/pthread2.sh rename to thirdparty/openssl/crypto/threads/pthread2.sh diff --git a/drivers/builtin_openssl2/crypto/threads/pthreads-vms.com b/thirdparty/openssl/crypto/threads/pthreads-vms.com similarity index 100% rename from drivers/builtin_openssl2/crypto/threads/pthreads-vms.com rename to thirdparty/openssl/crypto/threads/pthreads-vms.com diff --git a/drivers/builtin_openssl2/crypto/threads/purify.sh b/thirdparty/openssl/crypto/threads/purify.sh similarity index 100% rename from drivers/builtin_openssl2/crypto/threads/purify.sh rename to thirdparty/openssl/crypto/threads/purify.sh diff --git a/drivers/builtin_openssl2/crypto/threads/solaris.sh b/thirdparty/openssl/crypto/threads/solaris.sh similarity index 100% rename from drivers/builtin_openssl2/crypto/threads/solaris.sh rename to thirdparty/openssl/crypto/threads/solaris.sh diff --git a/drivers/builtin_openssl2/crypto/threads/th-lock.c b/thirdparty/openssl/crypto/threads/th-lock.c similarity index 100% rename from drivers/builtin_openssl2/crypto/threads/th-lock.c rename to thirdparty/openssl/crypto/threads/th-lock.c diff --git a/drivers/builtin_openssl2/crypto/threads/win32.bat b/thirdparty/openssl/crypto/threads/win32.bat similarity index 100% rename from drivers/builtin_openssl2/crypto/threads/win32.bat rename to thirdparty/openssl/crypto/threads/win32.bat diff --git a/drivers/builtin_openssl2/crypto/ts/ts_asn1.c b/thirdparty/openssl/crypto/ts/ts_asn1.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ts/ts_asn1.c rename to thirdparty/openssl/crypto/ts/ts_asn1.c diff --git a/drivers/builtin_openssl2/crypto/ts/ts_conf.c b/thirdparty/openssl/crypto/ts/ts_conf.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ts/ts_conf.c rename to thirdparty/openssl/crypto/ts/ts_conf.c diff --git a/drivers/builtin_openssl2/crypto/ts/ts_err.c b/thirdparty/openssl/crypto/ts/ts_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ts/ts_err.c rename to thirdparty/openssl/crypto/ts/ts_err.c diff --git a/drivers/builtin_openssl2/crypto/ts/ts_lib.c b/thirdparty/openssl/crypto/ts/ts_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ts/ts_lib.c rename to thirdparty/openssl/crypto/ts/ts_lib.c diff --git a/drivers/builtin_openssl2/crypto/ts/ts_req_print.c b/thirdparty/openssl/crypto/ts/ts_req_print.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ts/ts_req_print.c rename to thirdparty/openssl/crypto/ts/ts_req_print.c diff --git a/drivers/builtin_openssl2/crypto/ts/ts_req_utils.c b/thirdparty/openssl/crypto/ts/ts_req_utils.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ts/ts_req_utils.c rename to thirdparty/openssl/crypto/ts/ts_req_utils.c diff --git a/drivers/builtin_openssl2/crypto/ts/ts_rsp_print.c b/thirdparty/openssl/crypto/ts/ts_rsp_print.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ts/ts_rsp_print.c rename to thirdparty/openssl/crypto/ts/ts_rsp_print.c diff --git a/drivers/builtin_openssl2/crypto/ts/ts_rsp_sign.c b/thirdparty/openssl/crypto/ts/ts_rsp_sign.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ts/ts_rsp_sign.c rename to thirdparty/openssl/crypto/ts/ts_rsp_sign.c diff --git a/drivers/builtin_openssl2/crypto/ts/ts_rsp_utils.c b/thirdparty/openssl/crypto/ts/ts_rsp_utils.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ts/ts_rsp_utils.c rename to thirdparty/openssl/crypto/ts/ts_rsp_utils.c diff --git a/drivers/builtin_openssl2/crypto/ts/ts_rsp_verify.c b/thirdparty/openssl/crypto/ts/ts_rsp_verify.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ts/ts_rsp_verify.c rename to thirdparty/openssl/crypto/ts/ts_rsp_verify.c diff --git a/drivers/builtin_openssl2/crypto/ts/ts_verify_ctx.c b/thirdparty/openssl/crypto/ts/ts_verify_ctx.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ts/ts_verify_ctx.c rename to thirdparty/openssl/crypto/ts/ts_verify_ctx.c diff --git a/drivers/builtin_openssl2/crypto/txt_db/txt_db.c b/thirdparty/openssl/crypto/txt_db/txt_db.c similarity index 100% rename from drivers/builtin_openssl2/crypto/txt_db/txt_db.c rename to thirdparty/openssl/crypto/txt_db/txt_db.c diff --git a/drivers/builtin_openssl2/crypto/ui/ui_compat.c b/thirdparty/openssl/crypto/ui/ui_compat.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ui/ui_compat.c rename to thirdparty/openssl/crypto/ui/ui_compat.c diff --git a/drivers/builtin_openssl2/crypto/ui/ui_err.c b/thirdparty/openssl/crypto/ui/ui_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ui/ui_err.c rename to thirdparty/openssl/crypto/ui/ui_err.c diff --git a/drivers/builtin_openssl2/crypto/ui/ui_lib.c b/thirdparty/openssl/crypto/ui/ui_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ui/ui_lib.c rename to thirdparty/openssl/crypto/ui/ui_lib.c diff --git a/drivers/builtin_openssl2/crypto/ui/ui_locl.h b/thirdparty/openssl/crypto/ui/ui_locl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/ui/ui_locl.h rename to thirdparty/openssl/crypto/ui/ui_locl.h diff --git a/drivers/builtin_openssl2/crypto/ui/ui_openssl.c b/thirdparty/openssl/crypto/ui/ui_openssl.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ui/ui_openssl.c rename to thirdparty/openssl/crypto/ui/ui_openssl.c diff --git a/drivers/builtin_openssl2/crypto/ui/ui_util.c b/thirdparty/openssl/crypto/ui/ui_util.c similarity index 100% rename from drivers/builtin_openssl2/crypto/ui/ui_util.c rename to thirdparty/openssl/crypto/ui/ui_util.c diff --git a/drivers/builtin_openssl2/crypto/uid.c b/thirdparty/openssl/crypto/uid.c similarity index 100% rename from drivers/builtin_openssl2/crypto/uid.c rename to thirdparty/openssl/crypto/uid.c diff --git a/drivers/builtin_openssl2/crypto/vms_rms.h b/thirdparty/openssl/crypto/vms_rms.h similarity index 100% rename from drivers/builtin_openssl2/crypto/vms_rms.h rename to thirdparty/openssl/crypto/vms_rms.h diff --git a/drivers/builtin_openssl2/crypto/whrlpool/wp_block.c b/thirdparty/openssl/crypto/whrlpool/wp_block.c similarity index 100% rename from drivers/builtin_openssl2/crypto/whrlpool/wp_block.c rename to thirdparty/openssl/crypto/whrlpool/wp_block.c diff --git a/drivers/builtin_openssl2/crypto/whrlpool/wp_dgst.c b/thirdparty/openssl/crypto/whrlpool/wp_dgst.c similarity index 100% rename from drivers/builtin_openssl2/crypto/whrlpool/wp_dgst.c rename to thirdparty/openssl/crypto/whrlpool/wp_dgst.c diff --git a/drivers/builtin_openssl2/crypto/whrlpool/wp_locl.h b/thirdparty/openssl/crypto/whrlpool/wp_locl.h similarity index 100% rename from drivers/builtin_openssl2/crypto/whrlpool/wp_locl.h rename to thirdparty/openssl/crypto/whrlpool/wp_locl.h diff --git a/drivers/builtin_openssl2/crypto/x509/by_dir.c b/thirdparty/openssl/crypto/x509/by_dir.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/by_dir.c rename to thirdparty/openssl/crypto/x509/by_dir.c diff --git a/drivers/builtin_openssl2/crypto/x509/by_file.c b/thirdparty/openssl/crypto/x509/by_file.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/by_file.c rename to thirdparty/openssl/crypto/x509/by_file.c diff --git a/drivers/builtin_openssl2/crypto/x509/vpm_int.h b/thirdparty/openssl/crypto/x509/vpm_int.h similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/vpm_int.h rename to thirdparty/openssl/crypto/x509/vpm_int.h diff --git a/drivers/builtin_openssl2/crypto/x509/x509_att.c b/thirdparty/openssl/crypto/x509/x509_att.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/x509_att.c rename to thirdparty/openssl/crypto/x509/x509_att.c diff --git a/drivers/builtin_openssl2/crypto/x509/x509_cmp.c b/thirdparty/openssl/crypto/x509/x509_cmp.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/x509_cmp.c rename to thirdparty/openssl/crypto/x509/x509_cmp.c diff --git a/drivers/builtin_openssl2/crypto/x509/x509_d2.c b/thirdparty/openssl/crypto/x509/x509_d2.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/x509_d2.c rename to thirdparty/openssl/crypto/x509/x509_d2.c diff --git a/drivers/builtin_openssl2/crypto/x509/x509_def.c b/thirdparty/openssl/crypto/x509/x509_def.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/x509_def.c rename to thirdparty/openssl/crypto/x509/x509_def.c diff --git a/drivers/builtin_openssl2/crypto/x509/x509_err.c b/thirdparty/openssl/crypto/x509/x509_err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/x509_err.c rename to thirdparty/openssl/crypto/x509/x509_err.c diff --git a/drivers/builtin_openssl2/crypto/x509/x509_ext.c b/thirdparty/openssl/crypto/x509/x509_ext.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/x509_ext.c rename to thirdparty/openssl/crypto/x509/x509_ext.c diff --git a/drivers/builtin_openssl2/crypto/x509/x509_lu.c b/thirdparty/openssl/crypto/x509/x509_lu.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/x509_lu.c rename to thirdparty/openssl/crypto/x509/x509_lu.c diff --git a/drivers/builtin_openssl2/crypto/x509/x509_obj.c b/thirdparty/openssl/crypto/x509/x509_obj.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/x509_obj.c rename to thirdparty/openssl/crypto/x509/x509_obj.c diff --git a/drivers/builtin_openssl2/crypto/x509/x509_r2x.c b/thirdparty/openssl/crypto/x509/x509_r2x.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/x509_r2x.c rename to thirdparty/openssl/crypto/x509/x509_r2x.c diff --git a/drivers/builtin_openssl2/crypto/x509/x509_req.c b/thirdparty/openssl/crypto/x509/x509_req.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/x509_req.c rename to thirdparty/openssl/crypto/x509/x509_req.c diff --git a/drivers/builtin_openssl2/crypto/x509/x509_set.c b/thirdparty/openssl/crypto/x509/x509_set.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/x509_set.c rename to thirdparty/openssl/crypto/x509/x509_set.c diff --git a/drivers/builtin_openssl2/crypto/x509/x509_trs.c b/thirdparty/openssl/crypto/x509/x509_trs.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/x509_trs.c rename to thirdparty/openssl/crypto/x509/x509_trs.c diff --git a/drivers/builtin_openssl2/crypto/x509/x509_txt.c b/thirdparty/openssl/crypto/x509/x509_txt.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/x509_txt.c rename to thirdparty/openssl/crypto/x509/x509_txt.c diff --git a/drivers/builtin_openssl2/crypto/x509/x509_v3.c b/thirdparty/openssl/crypto/x509/x509_v3.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/x509_v3.c rename to thirdparty/openssl/crypto/x509/x509_v3.c diff --git a/drivers/builtin_openssl2/crypto/x509/x509_vfy.c b/thirdparty/openssl/crypto/x509/x509_vfy.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/x509_vfy.c rename to thirdparty/openssl/crypto/x509/x509_vfy.c diff --git a/drivers/builtin_openssl2/crypto/x509/x509_vpm.c b/thirdparty/openssl/crypto/x509/x509_vpm.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/x509_vpm.c rename to thirdparty/openssl/crypto/x509/x509_vpm.c diff --git a/drivers/builtin_openssl2/crypto/x509/x509cset.c b/thirdparty/openssl/crypto/x509/x509cset.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/x509cset.c rename to thirdparty/openssl/crypto/x509/x509cset.c diff --git a/drivers/builtin_openssl2/crypto/x509/x509name.c b/thirdparty/openssl/crypto/x509/x509name.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/x509name.c rename to thirdparty/openssl/crypto/x509/x509name.c diff --git a/drivers/builtin_openssl2/crypto/x509/x509rset.c b/thirdparty/openssl/crypto/x509/x509rset.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/x509rset.c rename to thirdparty/openssl/crypto/x509/x509rset.c diff --git a/drivers/builtin_openssl2/crypto/x509/x509spki.c b/thirdparty/openssl/crypto/x509/x509spki.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/x509spki.c rename to thirdparty/openssl/crypto/x509/x509spki.c diff --git a/drivers/builtin_openssl2/crypto/x509/x509type.c b/thirdparty/openssl/crypto/x509/x509type.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/x509type.c rename to thirdparty/openssl/crypto/x509/x509type.c diff --git a/drivers/builtin_openssl2/crypto/x509/x_all.c b/thirdparty/openssl/crypto/x509/x_all.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509/x_all.c rename to thirdparty/openssl/crypto/x509/x_all.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/ext_dat.h b/thirdparty/openssl/crypto/x509v3/ext_dat.h similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/ext_dat.h rename to thirdparty/openssl/crypto/x509v3/ext_dat.h diff --git a/drivers/builtin_openssl2/crypto/x509v3/pcy_cache.c b/thirdparty/openssl/crypto/x509v3/pcy_cache.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/pcy_cache.c rename to thirdparty/openssl/crypto/x509v3/pcy_cache.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/pcy_data.c b/thirdparty/openssl/crypto/x509v3/pcy_data.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/pcy_data.c rename to thirdparty/openssl/crypto/x509v3/pcy_data.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/pcy_int.h b/thirdparty/openssl/crypto/x509v3/pcy_int.h similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/pcy_int.h rename to thirdparty/openssl/crypto/x509v3/pcy_int.h diff --git a/drivers/builtin_openssl2/crypto/x509v3/pcy_lib.c b/thirdparty/openssl/crypto/x509v3/pcy_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/pcy_lib.c rename to thirdparty/openssl/crypto/x509v3/pcy_lib.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/pcy_map.c b/thirdparty/openssl/crypto/x509v3/pcy_map.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/pcy_map.c rename to thirdparty/openssl/crypto/x509v3/pcy_map.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/pcy_node.c b/thirdparty/openssl/crypto/x509v3/pcy_node.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/pcy_node.c rename to thirdparty/openssl/crypto/x509v3/pcy_node.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/pcy_tree.c b/thirdparty/openssl/crypto/x509v3/pcy_tree.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/pcy_tree.c rename to thirdparty/openssl/crypto/x509v3/pcy_tree.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_addr.c b/thirdparty/openssl/crypto/x509v3/v3_addr.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_addr.c rename to thirdparty/openssl/crypto/x509v3/v3_addr.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_akey.c b/thirdparty/openssl/crypto/x509v3/v3_akey.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_akey.c rename to thirdparty/openssl/crypto/x509v3/v3_akey.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_akeya.c b/thirdparty/openssl/crypto/x509v3/v3_akeya.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_akeya.c rename to thirdparty/openssl/crypto/x509v3/v3_akeya.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_alt.c b/thirdparty/openssl/crypto/x509v3/v3_alt.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_alt.c rename to thirdparty/openssl/crypto/x509v3/v3_alt.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_asid.c b/thirdparty/openssl/crypto/x509v3/v3_asid.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_asid.c rename to thirdparty/openssl/crypto/x509v3/v3_asid.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_bcons.c b/thirdparty/openssl/crypto/x509v3/v3_bcons.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_bcons.c rename to thirdparty/openssl/crypto/x509v3/v3_bcons.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_bitst.c b/thirdparty/openssl/crypto/x509v3/v3_bitst.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_bitst.c rename to thirdparty/openssl/crypto/x509v3/v3_bitst.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_conf.c b/thirdparty/openssl/crypto/x509v3/v3_conf.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_conf.c rename to thirdparty/openssl/crypto/x509v3/v3_conf.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_cpols.c b/thirdparty/openssl/crypto/x509v3/v3_cpols.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_cpols.c rename to thirdparty/openssl/crypto/x509v3/v3_cpols.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_crld.c b/thirdparty/openssl/crypto/x509v3/v3_crld.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_crld.c rename to thirdparty/openssl/crypto/x509v3/v3_crld.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_enum.c b/thirdparty/openssl/crypto/x509v3/v3_enum.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_enum.c rename to thirdparty/openssl/crypto/x509v3/v3_enum.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_extku.c b/thirdparty/openssl/crypto/x509v3/v3_extku.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_extku.c rename to thirdparty/openssl/crypto/x509v3/v3_extku.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_genn.c b/thirdparty/openssl/crypto/x509v3/v3_genn.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_genn.c rename to thirdparty/openssl/crypto/x509v3/v3_genn.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_ia5.c b/thirdparty/openssl/crypto/x509v3/v3_ia5.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_ia5.c rename to thirdparty/openssl/crypto/x509v3/v3_ia5.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_info.c b/thirdparty/openssl/crypto/x509v3/v3_info.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_info.c rename to thirdparty/openssl/crypto/x509v3/v3_info.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_int.c b/thirdparty/openssl/crypto/x509v3/v3_int.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_int.c rename to thirdparty/openssl/crypto/x509v3/v3_int.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_lib.c b/thirdparty/openssl/crypto/x509v3/v3_lib.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_lib.c rename to thirdparty/openssl/crypto/x509v3/v3_lib.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_ncons.c b/thirdparty/openssl/crypto/x509v3/v3_ncons.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_ncons.c rename to thirdparty/openssl/crypto/x509v3/v3_ncons.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_ocsp.c b/thirdparty/openssl/crypto/x509v3/v3_ocsp.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_ocsp.c rename to thirdparty/openssl/crypto/x509v3/v3_ocsp.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_pci.c b/thirdparty/openssl/crypto/x509v3/v3_pci.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_pci.c rename to thirdparty/openssl/crypto/x509v3/v3_pci.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_pcia.c b/thirdparty/openssl/crypto/x509v3/v3_pcia.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_pcia.c rename to thirdparty/openssl/crypto/x509v3/v3_pcia.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_pcons.c b/thirdparty/openssl/crypto/x509v3/v3_pcons.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_pcons.c rename to thirdparty/openssl/crypto/x509v3/v3_pcons.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_pku.c b/thirdparty/openssl/crypto/x509v3/v3_pku.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_pku.c rename to thirdparty/openssl/crypto/x509v3/v3_pku.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_pmaps.c b/thirdparty/openssl/crypto/x509v3/v3_pmaps.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_pmaps.c rename to thirdparty/openssl/crypto/x509v3/v3_pmaps.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_prn.c b/thirdparty/openssl/crypto/x509v3/v3_prn.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_prn.c rename to thirdparty/openssl/crypto/x509v3/v3_prn.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_purp.c b/thirdparty/openssl/crypto/x509v3/v3_purp.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_purp.c rename to thirdparty/openssl/crypto/x509v3/v3_purp.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_scts.c b/thirdparty/openssl/crypto/x509v3/v3_scts.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_scts.c rename to thirdparty/openssl/crypto/x509v3/v3_scts.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_skey.c b/thirdparty/openssl/crypto/x509v3/v3_skey.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_skey.c rename to thirdparty/openssl/crypto/x509v3/v3_skey.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_sxnet.c b/thirdparty/openssl/crypto/x509v3/v3_sxnet.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_sxnet.c rename to thirdparty/openssl/crypto/x509v3/v3_sxnet.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3_utl.c b/thirdparty/openssl/crypto/x509v3/v3_utl.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3_utl.c rename to thirdparty/openssl/crypto/x509v3/v3_utl.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3conf.c b/thirdparty/openssl/crypto/x509v3/v3conf.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3conf.c rename to thirdparty/openssl/crypto/x509v3/v3conf.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3err.c b/thirdparty/openssl/crypto/x509v3/v3err.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3err.c rename to thirdparty/openssl/crypto/x509v3/v3err.c diff --git a/drivers/builtin_openssl2/crypto/x509v3/v3prin.c b/thirdparty/openssl/crypto/x509v3/v3prin.c similarity index 100% rename from drivers/builtin_openssl2/crypto/x509v3/v3prin.c rename to thirdparty/openssl/crypto/x509v3/v3prin.c diff --git a/drivers/builtin_openssl2/e_os.h b/thirdparty/openssl/e_os.h similarity index 100% rename from drivers/builtin_openssl2/e_os.h rename to thirdparty/openssl/e_os.h diff --git a/drivers/builtin_openssl2/openssl/aes.h b/thirdparty/openssl/openssl/aes.h similarity index 100% rename from drivers/builtin_openssl2/openssl/aes.h rename to thirdparty/openssl/openssl/aes.h diff --git a/drivers/builtin_openssl2/openssl/asn1.h b/thirdparty/openssl/openssl/asn1.h similarity index 100% rename from drivers/builtin_openssl2/openssl/asn1.h rename to thirdparty/openssl/openssl/asn1.h diff --git a/drivers/builtin_openssl2/openssl/asn1_mac.h b/thirdparty/openssl/openssl/asn1_mac.h similarity index 100% rename from drivers/builtin_openssl2/openssl/asn1_mac.h rename to thirdparty/openssl/openssl/asn1_mac.h diff --git a/drivers/builtin_openssl2/openssl/asn1t.h b/thirdparty/openssl/openssl/asn1t.h similarity index 100% rename from drivers/builtin_openssl2/openssl/asn1t.h rename to thirdparty/openssl/openssl/asn1t.h diff --git a/drivers/builtin_openssl2/openssl/bio.h b/thirdparty/openssl/openssl/bio.h similarity index 100% rename from drivers/builtin_openssl2/openssl/bio.h rename to thirdparty/openssl/openssl/bio.h diff --git a/drivers/builtin_openssl2/openssl/blowfish.h b/thirdparty/openssl/openssl/blowfish.h similarity index 100% rename from drivers/builtin_openssl2/openssl/blowfish.h rename to thirdparty/openssl/openssl/blowfish.h diff --git a/drivers/builtin_openssl2/openssl/bn.h b/thirdparty/openssl/openssl/bn.h similarity index 100% rename from drivers/builtin_openssl2/openssl/bn.h rename to thirdparty/openssl/openssl/bn.h diff --git a/drivers/builtin_openssl2/openssl/buffer.h b/thirdparty/openssl/openssl/buffer.h similarity index 100% rename from drivers/builtin_openssl2/openssl/buffer.h rename to thirdparty/openssl/openssl/buffer.h diff --git a/drivers/builtin_openssl2/openssl/camellia.h b/thirdparty/openssl/openssl/camellia.h similarity index 100% rename from drivers/builtin_openssl2/openssl/camellia.h rename to thirdparty/openssl/openssl/camellia.h diff --git a/drivers/builtin_openssl2/openssl/cast.h b/thirdparty/openssl/openssl/cast.h similarity index 100% rename from drivers/builtin_openssl2/openssl/cast.h rename to thirdparty/openssl/openssl/cast.h diff --git a/drivers/builtin_openssl2/openssl/cmac.h b/thirdparty/openssl/openssl/cmac.h similarity index 100% rename from drivers/builtin_openssl2/openssl/cmac.h rename to thirdparty/openssl/openssl/cmac.h diff --git a/drivers/builtin_openssl2/openssl/cms.h b/thirdparty/openssl/openssl/cms.h similarity index 100% rename from drivers/builtin_openssl2/openssl/cms.h rename to thirdparty/openssl/openssl/cms.h diff --git a/drivers/builtin_openssl2/openssl/comp.h b/thirdparty/openssl/openssl/comp.h similarity index 100% rename from drivers/builtin_openssl2/openssl/comp.h rename to thirdparty/openssl/openssl/comp.h diff --git a/drivers/builtin_openssl2/openssl/conf.h b/thirdparty/openssl/openssl/conf.h similarity index 100% rename from drivers/builtin_openssl2/openssl/conf.h rename to thirdparty/openssl/openssl/conf.h diff --git a/drivers/builtin_openssl2/openssl/conf_api.h b/thirdparty/openssl/openssl/conf_api.h similarity index 100% rename from drivers/builtin_openssl2/openssl/conf_api.h rename to thirdparty/openssl/openssl/conf_api.h diff --git a/drivers/builtin_openssl2/openssl/crypto.h b/thirdparty/openssl/openssl/crypto.h similarity index 100% rename from drivers/builtin_openssl2/openssl/crypto.h rename to thirdparty/openssl/openssl/crypto.h diff --git a/drivers/builtin_openssl2/openssl/des.h b/thirdparty/openssl/openssl/des.h similarity index 100% rename from drivers/builtin_openssl2/openssl/des.h rename to thirdparty/openssl/openssl/des.h diff --git a/drivers/builtin_openssl2/openssl/des_old.h b/thirdparty/openssl/openssl/des_old.h similarity index 100% rename from drivers/builtin_openssl2/openssl/des_old.h rename to thirdparty/openssl/openssl/des_old.h diff --git a/drivers/builtin_openssl2/openssl/dh.h b/thirdparty/openssl/openssl/dh.h similarity index 100% rename from drivers/builtin_openssl2/openssl/dh.h rename to thirdparty/openssl/openssl/dh.h diff --git a/drivers/builtin_openssl2/openssl/dsa.h b/thirdparty/openssl/openssl/dsa.h similarity index 100% rename from drivers/builtin_openssl2/openssl/dsa.h rename to thirdparty/openssl/openssl/dsa.h diff --git a/drivers/builtin_openssl2/openssl/dso.h b/thirdparty/openssl/openssl/dso.h similarity index 100% rename from drivers/builtin_openssl2/openssl/dso.h rename to thirdparty/openssl/openssl/dso.h diff --git a/drivers/builtin_openssl2/openssl/dtls1.h b/thirdparty/openssl/openssl/dtls1.h similarity index 100% rename from drivers/builtin_openssl2/openssl/dtls1.h rename to thirdparty/openssl/openssl/dtls1.h diff --git a/drivers/builtin_openssl2/openssl/e_os2.h b/thirdparty/openssl/openssl/e_os2.h similarity index 100% rename from drivers/builtin_openssl2/openssl/e_os2.h rename to thirdparty/openssl/openssl/e_os2.h diff --git a/drivers/builtin_openssl2/openssl/ebcdic.h b/thirdparty/openssl/openssl/ebcdic.h similarity index 100% rename from drivers/builtin_openssl2/openssl/ebcdic.h rename to thirdparty/openssl/openssl/ebcdic.h diff --git a/drivers/builtin_openssl2/openssl/ec.h b/thirdparty/openssl/openssl/ec.h similarity index 100% rename from drivers/builtin_openssl2/openssl/ec.h rename to thirdparty/openssl/openssl/ec.h diff --git a/drivers/builtin_openssl2/openssl/ecdh.h b/thirdparty/openssl/openssl/ecdh.h similarity index 100% rename from drivers/builtin_openssl2/openssl/ecdh.h rename to thirdparty/openssl/openssl/ecdh.h diff --git a/drivers/builtin_openssl2/openssl/ecdsa.h b/thirdparty/openssl/openssl/ecdsa.h similarity index 100% rename from drivers/builtin_openssl2/openssl/ecdsa.h rename to thirdparty/openssl/openssl/ecdsa.h diff --git a/drivers/builtin_openssl2/openssl/engine.h b/thirdparty/openssl/openssl/engine.h similarity index 100% rename from drivers/builtin_openssl2/openssl/engine.h rename to thirdparty/openssl/openssl/engine.h diff --git a/drivers/builtin_openssl2/openssl/err.h b/thirdparty/openssl/openssl/err.h similarity index 100% rename from drivers/builtin_openssl2/openssl/err.h rename to thirdparty/openssl/openssl/err.h diff --git a/drivers/builtin_openssl2/openssl/evp.h b/thirdparty/openssl/openssl/evp.h similarity index 100% rename from drivers/builtin_openssl2/openssl/evp.h rename to thirdparty/openssl/openssl/evp.h diff --git a/drivers/builtin_openssl2/openssl/hmac.h b/thirdparty/openssl/openssl/hmac.h similarity index 100% rename from drivers/builtin_openssl2/openssl/hmac.h rename to thirdparty/openssl/openssl/hmac.h diff --git a/drivers/builtin_openssl2/openssl/idea.h b/thirdparty/openssl/openssl/idea.h similarity index 100% rename from drivers/builtin_openssl2/openssl/idea.h rename to thirdparty/openssl/openssl/idea.h diff --git a/drivers/builtin_openssl2/openssl/krb5_asn.h b/thirdparty/openssl/openssl/krb5_asn.h similarity index 100% rename from drivers/builtin_openssl2/openssl/krb5_asn.h rename to thirdparty/openssl/openssl/krb5_asn.h diff --git a/drivers/builtin_openssl2/openssl/kssl.h b/thirdparty/openssl/openssl/kssl.h similarity index 100% rename from drivers/builtin_openssl2/openssl/kssl.h rename to thirdparty/openssl/openssl/kssl.h diff --git a/drivers/builtin_openssl2/openssl/lhash.h b/thirdparty/openssl/openssl/lhash.h similarity index 100% rename from drivers/builtin_openssl2/openssl/lhash.h rename to thirdparty/openssl/openssl/lhash.h diff --git a/drivers/builtin_openssl2/openssl/md4.h b/thirdparty/openssl/openssl/md4.h similarity index 100% rename from drivers/builtin_openssl2/openssl/md4.h rename to thirdparty/openssl/openssl/md4.h diff --git a/drivers/builtin_openssl2/openssl/md5.h b/thirdparty/openssl/openssl/md5.h similarity index 100% rename from drivers/builtin_openssl2/openssl/md5.h rename to thirdparty/openssl/openssl/md5.h diff --git a/drivers/builtin_openssl2/openssl/mdc2.h b/thirdparty/openssl/openssl/mdc2.h similarity index 100% rename from drivers/builtin_openssl2/openssl/mdc2.h rename to thirdparty/openssl/openssl/mdc2.h diff --git a/drivers/builtin_openssl2/openssl/modes.h b/thirdparty/openssl/openssl/modes.h similarity index 100% rename from drivers/builtin_openssl2/openssl/modes.h rename to thirdparty/openssl/openssl/modes.h diff --git a/drivers/builtin_openssl2/openssl/obj_mac.h b/thirdparty/openssl/openssl/obj_mac.h similarity index 100% rename from drivers/builtin_openssl2/openssl/obj_mac.h rename to thirdparty/openssl/openssl/obj_mac.h diff --git a/drivers/builtin_openssl2/openssl/objects.h b/thirdparty/openssl/openssl/objects.h similarity index 100% rename from drivers/builtin_openssl2/openssl/objects.h rename to thirdparty/openssl/openssl/objects.h diff --git a/drivers/builtin_openssl2/openssl/ocsp.h b/thirdparty/openssl/openssl/ocsp.h similarity index 100% rename from drivers/builtin_openssl2/openssl/ocsp.h rename to thirdparty/openssl/openssl/ocsp.h diff --git a/drivers/builtin_openssl2/openssl/opensslconf.h b/thirdparty/openssl/openssl/opensslconf.h similarity index 100% rename from drivers/builtin_openssl2/openssl/opensslconf.h rename to thirdparty/openssl/openssl/opensslconf.h diff --git a/drivers/builtin_openssl2/openssl/opensslv.h b/thirdparty/openssl/openssl/opensslv.h similarity index 100% rename from drivers/builtin_openssl2/openssl/opensslv.h rename to thirdparty/openssl/openssl/opensslv.h diff --git a/drivers/builtin_openssl2/openssl/ossl_typ.h b/thirdparty/openssl/openssl/ossl_typ.h similarity index 100% rename from drivers/builtin_openssl2/openssl/ossl_typ.h rename to thirdparty/openssl/openssl/ossl_typ.h diff --git a/drivers/builtin_openssl2/openssl/pem.h b/thirdparty/openssl/openssl/pem.h similarity index 100% rename from drivers/builtin_openssl2/openssl/pem.h rename to thirdparty/openssl/openssl/pem.h diff --git a/drivers/builtin_openssl2/openssl/pem2.h b/thirdparty/openssl/openssl/pem2.h similarity index 100% rename from drivers/builtin_openssl2/openssl/pem2.h rename to thirdparty/openssl/openssl/pem2.h diff --git a/drivers/builtin_openssl2/openssl/pkcs12.h b/thirdparty/openssl/openssl/pkcs12.h similarity index 100% rename from drivers/builtin_openssl2/openssl/pkcs12.h rename to thirdparty/openssl/openssl/pkcs12.h diff --git a/drivers/builtin_openssl2/openssl/pkcs7.h b/thirdparty/openssl/openssl/pkcs7.h similarity index 100% rename from drivers/builtin_openssl2/openssl/pkcs7.h rename to thirdparty/openssl/openssl/pkcs7.h diff --git a/drivers/builtin_openssl2/openssl/pqueue.h b/thirdparty/openssl/openssl/pqueue.h similarity index 100% rename from drivers/builtin_openssl2/openssl/pqueue.h rename to thirdparty/openssl/openssl/pqueue.h diff --git a/drivers/builtin_openssl2/openssl/rand.h b/thirdparty/openssl/openssl/rand.h similarity index 100% rename from drivers/builtin_openssl2/openssl/rand.h rename to thirdparty/openssl/openssl/rand.h diff --git a/drivers/builtin_openssl2/openssl/rc2.h b/thirdparty/openssl/openssl/rc2.h similarity index 100% rename from drivers/builtin_openssl2/openssl/rc2.h rename to thirdparty/openssl/openssl/rc2.h diff --git a/drivers/builtin_openssl2/openssl/rc4.h b/thirdparty/openssl/openssl/rc4.h similarity index 100% rename from drivers/builtin_openssl2/openssl/rc4.h rename to thirdparty/openssl/openssl/rc4.h diff --git a/drivers/builtin_openssl2/openssl/ripemd.h b/thirdparty/openssl/openssl/ripemd.h similarity index 100% rename from drivers/builtin_openssl2/openssl/ripemd.h rename to thirdparty/openssl/openssl/ripemd.h diff --git a/drivers/builtin_openssl2/openssl/rsa.h b/thirdparty/openssl/openssl/rsa.h similarity index 100% rename from drivers/builtin_openssl2/openssl/rsa.h rename to thirdparty/openssl/openssl/rsa.h diff --git a/drivers/builtin_openssl2/openssl/safestack.h b/thirdparty/openssl/openssl/safestack.h similarity index 100% rename from drivers/builtin_openssl2/openssl/safestack.h rename to thirdparty/openssl/openssl/safestack.h diff --git a/drivers/builtin_openssl2/openssl/seed.h b/thirdparty/openssl/openssl/seed.h similarity index 100% rename from drivers/builtin_openssl2/openssl/seed.h rename to thirdparty/openssl/openssl/seed.h diff --git a/drivers/builtin_openssl2/openssl/sha.h b/thirdparty/openssl/openssl/sha.h similarity index 100% rename from drivers/builtin_openssl2/openssl/sha.h rename to thirdparty/openssl/openssl/sha.h diff --git a/drivers/builtin_openssl2/openssl/srp.h b/thirdparty/openssl/openssl/srp.h similarity index 100% rename from drivers/builtin_openssl2/openssl/srp.h rename to thirdparty/openssl/openssl/srp.h diff --git a/drivers/builtin_openssl2/openssl/srtp.h b/thirdparty/openssl/openssl/srtp.h similarity index 100% rename from drivers/builtin_openssl2/openssl/srtp.h rename to thirdparty/openssl/openssl/srtp.h diff --git a/drivers/builtin_openssl2/openssl/ssl.h b/thirdparty/openssl/openssl/ssl.h similarity index 100% rename from drivers/builtin_openssl2/openssl/ssl.h rename to thirdparty/openssl/openssl/ssl.h diff --git a/drivers/builtin_openssl2/openssl/ssl2.h b/thirdparty/openssl/openssl/ssl2.h similarity index 100% rename from drivers/builtin_openssl2/openssl/ssl2.h rename to thirdparty/openssl/openssl/ssl2.h diff --git a/drivers/builtin_openssl2/openssl/ssl23.h b/thirdparty/openssl/openssl/ssl23.h similarity index 100% rename from drivers/builtin_openssl2/openssl/ssl23.h rename to thirdparty/openssl/openssl/ssl23.h diff --git a/drivers/builtin_openssl2/openssl/ssl3.h b/thirdparty/openssl/openssl/ssl3.h similarity index 100% rename from drivers/builtin_openssl2/openssl/ssl3.h rename to thirdparty/openssl/openssl/ssl3.h diff --git a/drivers/builtin_openssl2/openssl/stack.h b/thirdparty/openssl/openssl/stack.h similarity index 100% rename from drivers/builtin_openssl2/openssl/stack.h rename to thirdparty/openssl/openssl/stack.h diff --git a/drivers/builtin_openssl2/openssl/symhacks.h b/thirdparty/openssl/openssl/symhacks.h similarity index 100% rename from drivers/builtin_openssl2/openssl/symhacks.h rename to thirdparty/openssl/openssl/symhacks.h diff --git a/drivers/builtin_openssl2/openssl/tls1.h b/thirdparty/openssl/openssl/tls1.h similarity index 100% rename from drivers/builtin_openssl2/openssl/tls1.h rename to thirdparty/openssl/openssl/tls1.h diff --git a/drivers/builtin_openssl2/openssl/ts.h b/thirdparty/openssl/openssl/ts.h similarity index 100% rename from drivers/builtin_openssl2/openssl/ts.h rename to thirdparty/openssl/openssl/ts.h diff --git a/drivers/builtin_openssl2/openssl/txt_db.h b/thirdparty/openssl/openssl/txt_db.h similarity index 100% rename from drivers/builtin_openssl2/openssl/txt_db.h rename to thirdparty/openssl/openssl/txt_db.h diff --git a/drivers/builtin_openssl2/openssl/ui.h b/thirdparty/openssl/openssl/ui.h similarity index 100% rename from drivers/builtin_openssl2/openssl/ui.h rename to thirdparty/openssl/openssl/ui.h diff --git a/drivers/builtin_openssl2/openssl/ui_compat.h b/thirdparty/openssl/openssl/ui_compat.h similarity index 100% rename from drivers/builtin_openssl2/openssl/ui_compat.h rename to thirdparty/openssl/openssl/ui_compat.h diff --git a/drivers/builtin_openssl2/openssl/whrlpool.h b/thirdparty/openssl/openssl/whrlpool.h similarity index 100% rename from drivers/builtin_openssl2/openssl/whrlpool.h rename to thirdparty/openssl/openssl/whrlpool.h diff --git a/drivers/builtin_openssl2/openssl/x509.h b/thirdparty/openssl/openssl/x509.h similarity index 100% rename from drivers/builtin_openssl2/openssl/x509.h rename to thirdparty/openssl/openssl/x509.h diff --git a/drivers/builtin_openssl2/openssl/x509_vfy.h b/thirdparty/openssl/openssl/x509_vfy.h similarity index 100% rename from drivers/builtin_openssl2/openssl/x509_vfy.h rename to thirdparty/openssl/openssl/x509_vfy.h diff --git a/drivers/builtin_openssl2/openssl/x509v3.h b/thirdparty/openssl/openssl/x509v3.h similarity index 100% rename from drivers/builtin_openssl2/openssl/x509v3.h rename to thirdparty/openssl/openssl/x509v3.h diff --git a/drivers/builtin_openssl2/ssl/bio_ssl.c b/thirdparty/openssl/ssl/bio_ssl.c similarity index 100% rename from drivers/builtin_openssl2/ssl/bio_ssl.c rename to thirdparty/openssl/ssl/bio_ssl.c diff --git a/drivers/builtin_openssl2/ssl/d1_both.c b/thirdparty/openssl/ssl/d1_both.c similarity index 100% rename from drivers/builtin_openssl2/ssl/d1_both.c rename to thirdparty/openssl/ssl/d1_both.c diff --git a/drivers/builtin_openssl2/ssl/d1_clnt.c b/thirdparty/openssl/ssl/d1_clnt.c similarity index 100% rename from drivers/builtin_openssl2/ssl/d1_clnt.c rename to thirdparty/openssl/ssl/d1_clnt.c diff --git a/drivers/builtin_openssl2/ssl/d1_lib.c b/thirdparty/openssl/ssl/d1_lib.c similarity index 100% rename from drivers/builtin_openssl2/ssl/d1_lib.c rename to thirdparty/openssl/ssl/d1_lib.c diff --git a/drivers/builtin_openssl2/ssl/d1_meth.c b/thirdparty/openssl/ssl/d1_meth.c similarity index 100% rename from drivers/builtin_openssl2/ssl/d1_meth.c rename to thirdparty/openssl/ssl/d1_meth.c diff --git a/drivers/builtin_openssl2/ssl/d1_pkt.c b/thirdparty/openssl/ssl/d1_pkt.c similarity index 100% rename from drivers/builtin_openssl2/ssl/d1_pkt.c rename to thirdparty/openssl/ssl/d1_pkt.c diff --git a/drivers/builtin_openssl2/ssl/d1_srtp.c b/thirdparty/openssl/ssl/d1_srtp.c similarity index 100% rename from drivers/builtin_openssl2/ssl/d1_srtp.c rename to thirdparty/openssl/ssl/d1_srtp.c diff --git a/drivers/builtin_openssl2/ssl/d1_srvr.c b/thirdparty/openssl/ssl/d1_srvr.c similarity index 100% rename from drivers/builtin_openssl2/ssl/d1_srvr.c rename to thirdparty/openssl/ssl/d1_srvr.c diff --git a/drivers/builtin_openssl2/ssl/install-ssl.com b/thirdparty/openssl/ssl/install-ssl.com similarity index 100% rename from drivers/builtin_openssl2/ssl/install-ssl.com rename to thirdparty/openssl/ssl/install-ssl.com diff --git a/drivers/builtin_openssl2/ssl/kssl.c b/thirdparty/openssl/ssl/kssl.c similarity index 100% rename from drivers/builtin_openssl2/ssl/kssl.c rename to thirdparty/openssl/ssl/kssl.c diff --git a/drivers/builtin_openssl2/ssl/kssl_lcl.h b/thirdparty/openssl/ssl/kssl_lcl.h similarity index 100% rename from drivers/builtin_openssl2/ssl/kssl_lcl.h rename to thirdparty/openssl/ssl/kssl_lcl.h diff --git a/drivers/builtin_openssl2/ssl/s23_clnt.c b/thirdparty/openssl/ssl/s23_clnt.c similarity index 100% rename from drivers/builtin_openssl2/ssl/s23_clnt.c rename to thirdparty/openssl/ssl/s23_clnt.c diff --git a/drivers/builtin_openssl2/ssl/s23_lib.c b/thirdparty/openssl/ssl/s23_lib.c similarity index 100% rename from drivers/builtin_openssl2/ssl/s23_lib.c rename to thirdparty/openssl/ssl/s23_lib.c diff --git a/drivers/builtin_openssl2/ssl/s23_meth.c b/thirdparty/openssl/ssl/s23_meth.c similarity index 100% rename from drivers/builtin_openssl2/ssl/s23_meth.c rename to thirdparty/openssl/ssl/s23_meth.c diff --git a/drivers/builtin_openssl2/ssl/s23_pkt.c b/thirdparty/openssl/ssl/s23_pkt.c similarity index 100% rename from drivers/builtin_openssl2/ssl/s23_pkt.c rename to thirdparty/openssl/ssl/s23_pkt.c diff --git a/drivers/builtin_openssl2/ssl/s23_srvr.c b/thirdparty/openssl/ssl/s23_srvr.c similarity index 100% rename from drivers/builtin_openssl2/ssl/s23_srvr.c rename to thirdparty/openssl/ssl/s23_srvr.c diff --git a/drivers/builtin_openssl2/ssl/s2_clnt.c b/thirdparty/openssl/ssl/s2_clnt.c similarity index 100% rename from drivers/builtin_openssl2/ssl/s2_clnt.c rename to thirdparty/openssl/ssl/s2_clnt.c diff --git a/drivers/builtin_openssl2/ssl/s2_enc.c b/thirdparty/openssl/ssl/s2_enc.c similarity index 100% rename from drivers/builtin_openssl2/ssl/s2_enc.c rename to thirdparty/openssl/ssl/s2_enc.c diff --git a/drivers/builtin_openssl2/ssl/s2_lib.c b/thirdparty/openssl/ssl/s2_lib.c similarity index 100% rename from drivers/builtin_openssl2/ssl/s2_lib.c rename to thirdparty/openssl/ssl/s2_lib.c diff --git a/drivers/builtin_openssl2/ssl/s2_meth.c b/thirdparty/openssl/ssl/s2_meth.c similarity index 100% rename from drivers/builtin_openssl2/ssl/s2_meth.c rename to thirdparty/openssl/ssl/s2_meth.c diff --git a/drivers/builtin_openssl2/ssl/s2_pkt.c b/thirdparty/openssl/ssl/s2_pkt.c similarity index 100% rename from drivers/builtin_openssl2/ssl/s2_pkt.c rename to thirdparty/openssl/ssl/s2_pkt.c diff --git a/drivers/builtin_openssl2/ssl/s2_srvr.c b/thirdparty/openssl/ssl/s2_srvr.c similarity index 100% rename from drivers/builtin_openssl2/ssl/s2_srvr.c rename to thirdparty/openssl/ssl/s2_srvr.c diff --git a/drivers/builtin_openssl2/ssl/s3_both.c b/thirdparty/openssl/ssl/s3_both.c similarity index 100% rename from drivers/builtin_openssl2/ssl/s3_both.c rename to thirdparty/openssl/ssl/s3_both.c diff --git a/drivers/builtin_openssl2/ssl/s3_cbc.c b/thirdparty/openssl/ssl/s3_cbc.c similarity index 100% rename from drivers/builtin_openssl2/ssl/s3_cbc.c rename to thirdparty/openssl/ssl/s3_cbc.c diff --git a/drivers/builtin_openssl2/ssl/s3_clnt.c b/thirdparty/openssl/ssl/s3_clnt.c similarity index 100% rename from drivers/builtin_openssl2/ssl/s3_clnt.c rename to thirdparty/openssl/ssl/s3_clnt.c diff --git a/drivers/builtin_openssl2/ssl/s3_enc.c b/thirdparty/openssl/ssl/s3_enc.c similarity index 100% rename from drivers/builtin_openssl2/ssl/s3_enc.c rename to thirdparty/openssl/ssl/s3_enc.c diff --git a/drivers/builtin_openssl2/ssl/s3_lib.c b/thirdparty/openssl/ssl/s3_lib.c similarity index 100% rename from drivers/builtin_openssl2/ssl/s3_lib.c rename to thirdparty/openssl/ssl/s3_lib.c diff --git a/drivers/builtin_openssl2/ssl/s3_meth.c b/thirdparty/openssl/ssl/s3_meth.c similarity index 100% rename from drivers/builtin_openssl2/ssl/s3_meth.c rename to thirdparty/openssl/ssl/s3_meth.c diff --git a/drivers/builtin_openssl2/ssl/s3_pkt.c b/thirdparty/openssl/ssl/s3_pkt.c similarity index 100% rename from drivers/builtin_openssl2/ssl/s3_pkt.c rename to thirdparty/openssl/ssl/s3_pkt.c diff --git a/drivers/builtin_openssl2/ssl/s3_srvr.c b/thirdparty/openssl/ssl/s3_srvr.c similarity index 100% rename from drivers/builtin_openssl2/ssl/s3_srvr.c rename to thirdparty/openssl/ssl/s3_srvr.c diff --git a/drivers/builtin_openssl2/ssl/ssl-lib.com b/thirdparty/openssl/ssl/ssl-lib.com similarity index 100% rename from drivers/builtin_openssl2/ssl/ssl-lib.com rename to thirdparty/openssl/ssl/ssl-lib.com diff --git a/drivers/builtin_openssl2/ssl/ssl_algs.c b/thirdparty/openssl/ssl/ssl_algs.c similarity index 100% rename from drivers/builtin_openssl2/ssl/ssl_algs.c rename to thirdparty/openssl/ssl/ssl_algs.c diff --git a/drivers/builtin_openssl2/ssl/ssl_asn1.c b/thirdparty/openssl/ssl/ssl_asn1.c similarity index 100% rename from drivers/builtin_openssl2/ssl/ssl_asn1.c rename to thirdparty/openssl/ssl/ssl_asn1.c diff --git a/drivers/builtin_openssl2/ssl/ssl_cert.c b/thirdparty/openssl/ssl/ssl_cert.c similarity index 100% rename from drivers/builtin_openssl2/ssl/ssl_cert.c rename to thirdparty/openssl/ssl/ssl_cert.c diff --git a/drivers/builtin_openssl2/ssl/ssl_ciph.c b/thirdparty/openssl/ssl/ssl_ciph.c similarity index 100% rename from drivers/builtin_openssl2/ssl/ssl_ciph.c rename to thirdparty/openssl/ssl/ssl_ciph.c diff --git a/drivers/builtin_openssl2/ssl/ssl_conf.c b/thirdparty/openssl/ssl/ssl_conf.c similarity index 100% rename from drivers/builtin_openssl2/ssl/ssl_conf.c rename to thirdparty/openssl/ssl/ssl_conf.c diff --git a/drivers/builtin_openssl2/ssl/ssl_err.c b/thirdparty/openssl/ssl/ssl_err.c similarity index 100% rename from drivers/builtin_openssl2/ssl/ssl_err.c rename to thirdparty/openssl/ssl/ssl_err.c diff --git a/drivers/builtin_openssl2/ssl/ssl_err2.c b/thirdparty/openssl/ssl/ssl_err2.c similarity index 100% rename from drivers/builtin_openssl2/ssl/ssl_err2.c rename to thirdparty/openssl/ssl/ssl_err2.c diff --git a/drivers/builtin_openssl2/ssl/ssl_lib.c b/thirdparty/openssl/ssl/ssl_lib.c similarity index 100% rename from drivers/builtin_openssl2/ssl/ssl_lib.c rename to thirdparty/openssl/ssl/ssl_lib.c diff --git a/drivers/builtin_openssl2/ssl/ssl_locl.h b/thirdparty/openssl/ssl/ssl_locl.h similarity index 100% rename from drivers/builtin_openssl2/ssl/ssl_locl.h rename to thirdparty/openssl/ssl/ssl_locl.h diff --git a/drivers/builtin_openssl2/ssl/ssl_rsa.c b/thirdparty/openssl/ssl/ssl_rsa.c similarity index 100% rename from drivers/builtin_openssl2/ssl/ssl_rsa.c rename to thirdparty/openssl/ssl/ssl_rsa.c diff --git a/drivers/builtin_openssl2/ssl/ssl_sess.c b/thirdparty/openssl/ssl/ssl_sess.c similarity index 100% rename from drivers/builtin_openssl2/ssl/ssl_sess.c rename to thirdparty/openssl/ssl/ssl_sess.c diff --git a/drivers/builtin_openssl2/ssl/ssl_stat.c b/thirdparty/openssl/ssl/ssl_stat.c similarity index 100% rename from drivers/builtin_openssl2/ssl/ssl_stat.c rename to thirdparty/openssl/ssl/ssl_stat.c diff --git a/drivers/builtin_openssl2/ssl/ssl_task.c b/thirdparty/openssl/ssl/ssl_task.c similarity index 100% rename from drivers/builtin_openssl2/ssl/ssl_task.c rename to thirdparty/openssl/ssl/ssl_task.c diff --git a/drivers/builtin_openssl2/ssl/ssl_txt.c b/thirdparty/openssl/ssl/ssl_txt.c similarity index 100% rename from drivers/builtin_openssl2/ssl/ssl_txt.c rename to thirdparty/openssl/ssl/ssl_txt.c diff --git a/drivers/builtin_openssl2/ssl/ssl_utst.c b/thirdparty/openssl/ssl/ssl_utst.c similarity index 100% rename from drivers/builtin_openssl2/ssl/ssl_utst.c rename to thirdparty/openssl/ssl/ssl_utst.c diff --git a/drivers/builtin_openssl2/ssl/t1_clnt.c b/thirdparty/openssl/ssl/t1_clnt.c similarity index 100% rename from drivers/builtin_openssl2/ssl/t1_clnt.c rename to thirdparty/openssl/ssl/t1_clnt.c diff --git a/drivers/builtin_openssl2/ssl/t1_enc.c b/thirdparty/openssl/ssl/t1_enc.c similarity index 100% rename from drivers/builtin_openssl2/ssl/t1_enc.c rename to thirdparty/openssl/ssl/t1_enc.c diff --git a/drivers/builtin_openssl2/ssl/t1_ext.c b/thirdparty/openssl/ssl/t1_ext.c similarity index 100% rename from drivers/builtin_openssl2/ssl/t1_ext.c rename to thirdparty/openssl/ssl/t1_ext.c diff --git a/drivers/builtin_openssl2/ssl/t1_lib.c b/thirdparty/openssl/ssl/t1_lib.c similarity index 100% rename from drivers/builtin_openssl2/ssl/t1_lib.c rename to thirdparty/openssl/ssl/t1_lib.c diff --git a/drivers/builtin_openssl2/ssl/t1_meth.c b/thirdparty/openssl/ssl/t1_meth.c similarity index 100% rename from drivers/builtin_openssl2/ssl/t1_meth.c rename to thirdparty/openssl/ssl/t1_meth.c diff --git a/drivers/builtin_openssl2/ssl/t1_reneg.c b/thirdparty/openssl/ssl/t1_reneg.c similarity index 100% rename from drivers/builtin_openssl2/ssl/t1_reneg.c rename to thirdparty/openssl/ssl/t1_reneg.c diff --git a/drivers/builtin_openssl2/ssl/t1_srvr.c b/thirdparty/openssl/ssl/t1_srvr.c similarity index 100% rename from drivers/builtin_openssl2/ssl/t1_srvr.c rename to thirdparty/openssl/ssl/t1_srvr.c diff --git a/drivers/builtin_openssl2/ssl/t1_trce.c b/thirdparty/openssl/ssl/t1_trce.c similarity index 100% rename from drivers/builtin_openssl2/ssl/t1_trce.c rename to thirdparty/openssl/ssl/t1_trce.c diff --git a/drivers/builtin_openssl2/ssl/tls_srp.c b/thirdparty/openssl/ssl/tls_srp.c similarity index 100% rename from drivers/builtin_openssl2/ssl/tls_srp.c rename to thirdparty/openssl/ssl/tls_srp.c diff --git a/drivers/builtin_openssl2/winrt.cpp b/thirdparty/openssl/winrt.cpp similarity index 100% rename from drivers/builtin_openssl2/winrt.cpp rename to thirdparty/openssl/winrt.cpp diff --git a/drivers/builtin_openssl2/winrt_fix.patch b/thirdparty/openssl/winrt_fix.patch similarity index 100% rename from drivers/builtin_openssl2/winrt_fix.patch rename to thirdparty/openssl/winrt_fix.patch From da09c6131bcdace7e8e62c3dabc62890e9564c97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 13 Oct 2016 18:54:00 +0200 Subject: [PATCH 08/19] modules: Clone env in each module This allows to pass include paths and flags only to a given thirdparty library, thus preventing conflicts between their files (e.g. between opus and openssl which both provide modes.h. This also has the nice effect of making the compilation command smaller for each module as it no longer related to all other modules, only the final linking brings them together. This however requires adding manually the ogg include path in opus and vorbis when building against the builtin ogg, since it is no longer in the global env. Also simplified template 'thirdparty__sources' to 'thirdparty_sources'. "Core" modules like cscript, gdscript, gridmap, ik and virtual_script still use the main env_modules, but it could be changed if need be. --- drivers/png/SCsub | 10 +++++----- modules/cscript/SCsub | 2 +- modules/dds/SCsub | 5 ++--- modules/enet/SCsub | 15 +++++++-------- modules/etc1/SCsub | 15 +++++++-------- modules/gdscript/SCsub | 2 +- modules/gridmap/SCsub | 4 +++- modules/ik/SCsub | 4 +++- modules/jpg/SCsub | 15 +++++++-------- modules/ogg/SCsub | 15 +++++++-------- modules/openssl/SCsub | 20 ++++++++++---------- modules/opus/SCsub | 24 +++++++++++++----------- modules/pbm/SCsub | 5 ++--- modules/pvr/SCsub | 15 +++++++-------- modules/visual_script/SCsub | 2 +- modules/vorbis/SCsub | 19 +++++++++++-------- modules/webp/SCsub | 15 +++++++-------- 17 files changed, 94 insertions(+), 93 deletions(-) diff --git a/drivers/png/SCsub b/drivers/png/SCsub index ea2324c0cfd..1ab42a6db98 100644 --- a/drivers/png/SCsub +++ b/drivers/png/SCsub @@ -5,7 +5,7 @@ Import('env_drivers') if (env["libpng"] == "builtin"): thirdparty_dir = "#thirdparty/libpng/" - thirdparty_png_sources = [ + thirdparty_sources = [ thirdparty_dir + "png.c", thirdparty_dir + "pngerror.c", thirdparty_dir + "pngget.c", @@ -31,13 +31,13 @@ if (env["libpng"] == "builtin"): if "S_compiler" in env: env_neon['CC'] = env['S_compiler'] #env_neon.Append(CPPFLAGS=["-DPNG_ARM_NEON"]) - thirdparty_png_sources.append(env_neon.Object(thirdparty_dir + "/arm/arm_init.c")) - thirdparty_png_sources.append(env_neon.Object(thirdparty_dir + "/arm/filter_neon.S")) + thirdparty_sources.append(env_neon.Object(thirdparty_dir + "/arm/arm_init.c")) + thirdparty_sources.append(env_neon.Object(thirdparty_dir + "/arm/filter_neon.S")) else: env_drivers.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=0"]) - #env_drivers.add_source_files(env.drivers_sources, thirdparty_png_sources) - env.drivers_sources += thirdparty_png_sources # Concatenation necessary for neon objects it seems? + #env_drivers.add_source_files(env.drivers_sources, thirdparty_sources) + env.drivers_sources += thirdparty_sources # Concatenation necessary for neon objects it seems? env_drivers.Append(CPPPATH = [thirdparty_dir]) diff --git a/modules/cscript/SCsub b/modules/cscript/SCsub index 403fe68f662..9ff13fc43f6 100644 --- a/modules/cscript/SCsub +++ b/modules/cscript/SCsub @@ -1,5 +1,5 @@ Import('env') -env.add_source_files(env.modules_sources,"*.cpp") +env.add_source_files(env.modules_sources, "*.cpp") Export('env') diff --git a/modules/dds/SCsub b/modules/dds/SCsub index bcea3a84c04..c54a58e0793 100644 --- a/modules/dds/SCsub +++ b/modules/dds/SCsub @@ -1,7 +1,6 @@ Import('env') Import('env_modules') -env_modules.add_source_files(env.modules_sources, "*.cpp") +env_dds = env_modules.Clone() -Export('env_modules') -Export('env') +env_dds.add_source_files(env.modules_sources, "*.cpp") diff --git a/modules/enet/SCsub b/modules/enet/SCsub index 79231c63e57..66c60baabea 100644 --- a/modules/enet/SCsub +++ b/modules/enet/SCsub @@ -3,9 +3,11 @@ Import('env_modules') # Thirdparty source files +env_enet = env_modules.Clone() + if (env["enet"] != "system"): # builtin thirdparty_dir = "#thirdparty/enet/" - thirdparty_enet_sources = [ + thirdparty_sources = [ "callbacks.c", "compress.c", "host.c", @@ -16,12 +18,9 @@ if (env["enet"] != "system"): # builtin "unix.c", "win32.c", ] - thirdparty_enet_sources = [thirdparty_dir + file for file in thirdparty_enet_sources] + thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] - env_modules.add_source_files(env.modules_sources, thirdparty_enet_sources) - env_modules.Append(CPPPATH = [thirdparty_dir]) + env_enet.add_source_files(env.modules_sources, thirdparty_sources) + env_enet.Append(CPPPATH = [thirdparty_dir]) -env_modules.add_source_files(env.modules_sources, "*.cpp") - -Export('env_modules') -Export('env') +env_enet.add_source_files(env.modules_sources, "*.cpp") diff --git a/modules/etc1/SCsub b/modules/etc1/SCsub index 93c304fe7fa..ad343ab5795 100644 --- a/modules/etc1/SCsub +++ b/modules/etc1/SCsub @@ -1,19 +1,18 @@ Import('env') Import('env_modules') +env_etc1 = env_modules.Clone() + # Thirdparty source files # Not unbundled so far since not widespread as shared library thirdparty_dir = "#thirdparty/rg-etc1/" -thirdparty_etc1_sources = [ +thirdparty_sources = [ "rg_etc1.cpp", ] -thirdparty_etc1_sources = [thirdparty_dir + file for file in thirdparty_etc1_sources] +thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] -env_modules.add_source_files(env.modules_sources, thirdparty_etc1_sources) -env_modules.Append(CPPPATH = [thirdparty_dir]) +env_etc1.add_source_files(env.modules_sources, thirdparty_sources) +env_etc1.Append(CPPPATH = [thirdparty_dir]) # Godot source files -env_modules.add_source_files(env.modules_sources, "*.cpp") - -Export('env_modules') -Export('env') +env_etc1.add_source_files(env.modules_sources, "*.cpp") diff --git a/modules/gdscript/SCsub b/modules/gdscript/SCsub index 403fe68f662..9ff13fc43f6 100644 --- a/modules/gdscript/SCsub +++ b/modules/gdscript/SCsub @@ -1,5 +1,5 @@ Import('env') -env.add_source_files(env.modules_sources,"*.cpp") +env.add_source_files(env.modules_sources, "*.cpp") Export('env') diff --git a/modules/gridmap/SCsub b/modules/gridmap/SCsub index 211a043468e..9ff13fc43f6 100644 --- a/modules/gridmap/SCsub +++ b/modules/gridmap/SCsub @@ -1,3 +1,5 @@ Import('env') -env.add_source_files(env.modules_sources,"*.cpp") +env.add_source_files(env.modules_sources, "*.cpp") + +Export('env') diff --git a/modules/ik/SCsub b/modules/ik/SCsub index 211a043468e..9ff13fc43f6 100644 --- a/modules/ik/SCsub +++ b/modules/ik/SCsub @@ -1,3 +1,5 @@ Import('env') -env.add_source_files(env.modules_sources,"*.cpp") +env.add_source_files(env.modules_sources, "*.cpp") + +Export('env') diff --git a/modules/jpg/SCsub b/modules/jpg/SCsub index 409a8b52d0d..258fd2f4ad2 100644 --- a/modules/jpg/SCsub +++ b/modules/jpg/SCsub @@ -1,19 +1,18 @@ Import('env') Import('env_modules') +env_jpg = env_modules.Clone() + # Thirdparty source files # Not unbundled for now as they are not commonly available as shared library thirdparty_dir = "#thirdparty/jpeg-compressor/" -thirdparty_jpg_sources = [ +thirdparty_sources = [ "jpgd.cpp", ] -thirdparty_jpg_sources = [thirdparty_dir + file for file in thirdparty_jpg_sources] +thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] -env_modules.add_source_files(env.modules_sources, thirdparty_jpg_sources) -env_modules.Append(CPPPATH = [thirdparty_dir]) +env_jpg.add_source_files(env.modules_sources, thirdparty_sources) +env_jpg.Append(CPPPATH = [thirdparty_dir]) # Godot's own source files -env_modules.add_source_files(env.modules_sources, "*.cpp") - -Export('env_modules') -Export('env') +env_jpg.add_source_files(env.modules_sources, "*.cpp") diff --git a/modules/ogg/SCsub b/modules/ogg/SCsub index 42d593f88e4..fd5ddf55c8b 100644 --- a/modules/ogg/SCsub +++ b/modules/ogg/SCsub @@ -1,20 +1,19 @@ Import('env') Import('env_modules') +env_ogg = env_modules.Clone() + # Thirdparty source files if (env["libogg"] != "system"): # builtin thirdparty_dir = "#thirdparty/libogg/" - thirdparty_libogg_sources = [ + thirdparty_sources = [ "bitwise.c", "framing.c", ] - thirdparty_libogg_sources = [thirdparty_dir + file for file in thirdparty_libogg_sources] + thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] - env_modules.add_source_files(env.modules_sources, thirdparty_libogg_sources) - env_modules.Append(CPPPATH = [thirdparty_dir]) + env_ogg.add_source_files(env.modules_sources, thirdparty_sources) + env_ogg.Append(CPPPATH = [thirdparty_dir]) # Godot source files -env_modules.add_source_files(env.modules_sources, "*.cpp") - -Export('env_modules') -Export('env') +env_ogg.add_source_files(env.modules_sources, "*.cpp") diff --git a/modules/openssl/SCsub b/modules/openssl/SCsub index 46080550367..79facba99a5 100644 --- a/modules/openssl/SCsub +++ b/modules/openssl/SCsub @@ -1,12 +1,13 @@ Import('env') Import('env_modules') +env_openssl = env_modules.Clone() # Thirdparty source files if (env["openssl"] != "system"): # builtin thirdparty_dir = "#thirdparty/openssl/" - thirdparty_openssl_sources = [ + thirdparty_sources = [ "ssl/t1_lib.c", "ssl/t1_ext.c", "ssl/s3_srvr.c", @@ -646,11 +647,11 @@ if (env["openssl"] != "system"): # builtin ] if "platform" in env and env["platform"] == "winrt": - thirdparty_openssl_sources += ['winrt.cpp'] + thirdparty_sources += ['winrt.cpp'] - thirdparty_openssl_sources = [thirdparty_dir + file for file in thirdparty_openssl_sources] + thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] - env_modules.add_source_files(env.modules_sources, thirdparty_openssl_sources) + env_openssl.add_source_files(env.modules_sources, thirdparty_sources) # FIXME: Clone the environment to make a env_openssl and not pollute the modules env thirdparty_include_paths = [ @@ -661,25 +662,24 @@ if (env["openssl"] != "system"): # builtin "crypto/modes", "openssl", ] - env_modules.Append(CPPPATH = [thirdparty_dir + "/" + dir for dir in thirdparty_include_paths]) + env_openssl.Append(CPPPATH = [thirdparty_dir + "/" + dir for dir in thirdparty_include_paths]) - env_modules.Append(CPPFLAGS = ["-DOPENSSL_NO_ASM", "-DOPENSSL_THREADS", "-DL_ENDIAN"]) + env_openssl.Append(CPPFLAGS = ["-DOPENSSL_NO_ASM", "-DOPENSSL_THREADS", "-DL_ENDIAN"]) # Workaround for compilation error with GCC/Clang when -Werror is too greedy (GH-4517) import os import methods if not (os.name=="nt" and methods.msvc_is_detected()): # not Windows and not MSVC - env_modules.Append(CFLAGS = ["-Wno-error=implicit-function-declaration"]) + env_openssl.Append(CFLAGS = ["-Wno-error=implicit-function-declaration"]) # Module sources -env_modules.add_source_files(env.modules_sources, "*.cpp") -env_modules.add_source_files(env.modules_sources, "*.c") +env_openssl.add_source_files(env.modules_sources, "*.cpp") +env_openssl.add_source_files(env.modules_sources, "*.c") # platform/winrt need to know openssl is available, pass to main env if "platform" in env and env["platform"] == "winrt": env.Append(CPPPATH = [thirdparty_dir]) env.Append(CPPFLAGS = ['-DOPENSSL_ENABLED']); -Export('env_modules') Export('env') diff --git a/modules/opus/SCsub b/modules/opus/SCsub index a18e008fe0b..5c587a0783b 100644 --- a/modules/opus/SCsub +++ b/modules/opus/SCsub @@ -1,11 +1,13 @@ Import('env') Import('env_modules') +env_opus = env_modules.Clone() + # Thirdparty source files if (env["opus"] != "system"): # builtin thirdparty_dir = "#thirdparty/opus/" - thirdparty_opus_sources = [ + thirdparty_sources = [ "silk/tables_other.c", "silk/sum_sqr_shift.c", "silk/PLC.c", @@ -126,7 +128,7 @@ if (env["opus"] != "system"): # builtin opus_sources_silk = [] if("opus_fixed_point" in env and env.opus_fixed_point=="yes"): - env_modules.Append(CFLAGS = ["-DFIXED_POINT"]) + env_opus.Append(CFLAGS = ["-DFIXED_POINT"]) opus_sources_silk = [ "silk/fixed/schur64_FIX.c", "silk/fixed/residual_energy16_FIX.c", @@ -189,11 +191,10 @@ if (env["opus"] != "system"): # builtin "silk/float/prefilter_FLP.c" ] - thirdparty_opus_sources = [thirdparty_dir + file for file in thirdparty_opus_sources + opus_sources_silk] + thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources + opus_sources_silk] - env_modules.add_source_files(env.modules_sources, thirdparty_opus_sources) - # FIXME: Clone the environment to make a env_opus and not pollute the modules env - env_modules.Append(CFLAGS=["-DHAVE_CONFIG_H"]) + env_opus.add_source_files(env.modules_sources, thirdparty_sources) + env_opus.Append(CFLAGS=["-DHAVE_CONFIG_H"]) thirdparty_include_paths = [ "", @@ -202,10 +203,11 @@ if (env["opus"] != "system"): # builtin "silk/fixed", "silk/float", ] - env_modules.Append(CPPPATH = [thirdparty_dir + "/" + dir for dir in thirdparty_include_paths]) + env_opus.Append(CPPPATH = [thirdparty_dir + "/" + dir for dir in thirdparty_include_paths]) + + # also requires libogg + if (env["libogg"] != "system"): # builtin + env_opus.Append(CPPPATH = ["#thirdparty/libogg"]) # Module files -env_modules.add_source_files(env.modules_sources, "*.cpp") - -Export('env_modules') -Export('env') +env_opus.add_source_files(env.modules_sources, "*.cpp") diff --git a/modules/pbm/SCsub b/modules/pbm/SCsub index bcea3a84c04..e0b19fb2a36 100644 --- a/modules/pbm/SCsub +++ b/modules/pbm/SCsub @@ -1,7 +1,6 @@ Import('env') Import('env_modules') -env_modules.add_source_files(env.modules_sources, "*.cpp") +env_pbm = env_modules.Clone() -Export('env_modules') -Export('env') +env_pbm.add_source_files(env.modules_sources, "*.cpp") diff --git a/modules/pvr/SCsub b/modules/pvr/SCsub index b1696950187..cd0a3129dad 100644 --- a/modules/pvr/SCsub +++ b/modules/pvr/SCsub @@ -1,23 +1,22 @@ Import('env') Import('env_modules') +env_pvr = env_modules.Clone() + # Thirdparty source files # Not unbundled so far since not widespread as shared library thirdparty_dir = "#thirdparty/pvrtccompressor/" -thirdparty_pvr_sources = [ +thirdparty_sources = [ "BitScale.cpp", "MortonTable.cpp", "PvrTcDecoder.cpp", "PvrTcEncoder.cpp", "PvrTcPacket.cpp", ] -thirdparty_pvr_sources = [thirdparty_dir + file for file in thirdparty_pvr_sources] +thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] -env_modules.add_source_files(env.modules_sources, thirdparty_pvr_sources) -env_modules.Append(CPPPATH = [thirdparty_dir]) +env_pvr.add_source_files(env.modules_sources, thirdparty_sources) +env_pvr.Append(CPPPATH = [thirdparty_dir]) # Godot source files -env_modules.add_source_files(env.modules_sources, "*.cpp") - -Export('env_modules') -Export('env') +env_pvr.add_source_files(env.modules_sources, "*.cpp") diff --git a/modules/visual_script/SCsub b/modules/visual_script/SCsub index 403fe68f662..9ff13fc43f6 100644 --- a/modules/visual_script/SCsub +++ b/modules/visual_script/SCsub @@ -1,5 +1,5 @@ Import('env') -env.add_source_files(env.modules_sources,"*.cpp") +env.add_source_files(env.modules_sources, "*.cpp") Export('env') diff --git a/modules/vorbis/SCsub b/modules/vorbis/SCsub index 5427348c394..f3dbc893fc1 100644 --- a/modules/vorbis/SCsub +++ b/modules/vorbis/SCsub @@ -1,10 +1,12 @@ Import('env') Import('env_modules') +env_vorbis = env_modules.Clone() + # Thirdparty source files if (env["libvorbis"] != "system"): # builtin thirdparty_dir = "#thirdparty/libvorbis/" - thirdparty_libvorbis_sources = [ + thirdparty_sources = [ #"analysis.c", #"barkmel.c", "bitrate.c", @@ -32,13 +34,14 @@ if (env["libvorbis"] != "system"): # builtin "window.c", ] - thirdparty_libvorbis_sources = [thirdparty_dir + file for file in thirdparty_libvorbis_sources] + thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] - env_modules.add_source_files(env.modules_sources, thirdparty_libvorbis_sources) - env_modules.Append(CPPPATH = [thirdparty_dir]) + env_vorbis.add_source_files(env.modules_sources, thirdparty_sources) + env_vorbis.Append(CPPPATH = [thirdparty_dir]) + + # also requires libogg + if (env["libogg"] != "system"): # builtin + env_vorbis.Append(CPPPATH = ["#thirdparty/libogg"]) # Godot source files -env_modules.add_source_files(env.modules_sources, "*.cpp") - -Export('env_modules') -Export('env') +env_vorbis.add_source_files(env.modules_sources, "*.cpp") diff --git a/modules/webp/SCsub b/modules/webp/SCsub index f52c5b9af8d..4997aa33598 100644 --- a/modules/webp/SCsub +++ b/modules/webp/SCsub @@ -1,10 +1,12 @@ Import('env') Import('env_modules') +env_webp = env_modules.Clone() + # Thirdparty source files if (env["libwebp"] != "system"): # builtin thirdparty_dir = "#thirdparty/libwebp/" - thirdparty_libwebp_sources = [ + thirdparty_sources = [ "enc/webpenc.c", "enc/near_lossless.c", "enc/frame.c", @@ -108,13 +110,10 @@ if (env["libwebp"] != "system"): # builtin "dsp/enc_sse2.c", "dsp/upsampling_sse2.c", ] - thirdparty_libwebp_sources = [thirdparty_dir + file for file in thirdparty_libwebp_sources] + thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] - env_modules.add_source_files(env.modules_sources, thirdparty_libwebp_sources) - env_modules.Append(CPPPATH = [thirdparty_dir]) + env_webp.add_source_files(env.modules_sources, thirdparty_sources) + env_webp.Append(CPPPATH = [thirdparty_dir]) # Godot source files -env_modules.add_source_files(env.modules_sources, "*.cpp") - -Export('env_modules') -Export('env') +env_webp.add_source_files(env.modules_sources, "*.cpp") From cfcc8a20e862b758c32bd3f152186e6df0591a24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 13 Oct 2016 19:40:40 +0200 Subject: [PATCH 09/19] theora: Move to a module and split thirdparty lib Same rationale as the previous commits. --- SConstruct | 10 +-- drivers/SCsub | 2 - drivers/register_driver_types.cpp | 22 +---- drivers/theora/SCsub | 65 --------------- drivers/theora/theora.exp | 55 ------------- modules/theora/SCsub | 81 +++++++++++++++++++ modules/theora/config.py | 6 ++ modules/theora/register_types.cpp | 45 +++++++++++ modules/theora/register_types.h | 30 +++++++ .../theora/video_stream_theora.cpp | 9 +-- .../theora/video_stream_theora.h | 17 ++-- {drivers => modules}/theora/yuv2rgb.h | 0 platform/bb10/detect.py | 3 +- platform/javascript/detect.py | 2 +- platform/x11/detect.py | 17 ++-- thirdparty/README.md | 13 +++ .../theora => thirdparty/libtheora}/COPYING | 0 .../theora => thirdparty/libtheora}/LICENSE | 0 .../theora => thirdparty/libtheora}/analyze.c | 0 .../libtheora}/apiwrapper.c | 0 .../libtheora}/apiwrapper.h | 0 .../theora => thirdparty/libtheora}/bitpack.c | 0 .../theora => thirdparty/libtheora}/bitpack.h | 0 .../theora => thirdparty/libtheora}/cpu.c | 0 .../theora => thirdparty/libtheora}/cpu.h | 0 .../theora => thirdparty/libtheora}/dct.h | 0 .../libtheora}/decapiwrapper.c | 0 .../theora => thirdparty/libtheora}/decinfo.c | 0 .../theora => thirdparty/libtheora}/decint.h | 0 .../theora => thirdparty/libtheora}/decode.c | 0 .../theora => thirdparty/libtheora}/dequant.c | 0 .../theora => thirdparty/libtheora}/dequant.h | 0 .../libtheora}/encapiwrapper.c | 0 .../theora => thirdparty/libtheora}/encfrag.c | 0 .../theora => thirdparty/libtheora}/encinfo.c | 0 .../theora => thirdparty/libtheora}/encint.h | 0 .../theora => thirdparty/libtheora}/encode.c | 0 .../libtheora}/encoder_disabled.c | 0 .../theora => thirdparty/libtheora}/enquant.c | 0 .../theora => thirdparty/libtheora}/enquant.h | 0 .../theora => thirdparty/libtheora}/fdct.c | 0 .../libtheora}/fragment.c | 0 .../theora => thirdparty/libtheora}/huffdec.c | 0 .../theora => thirdparty/libtheora}/huffdec.h | 0 .../theora => thirdparty/libtheora}/huffenc.c | 0 .../theora => thirdparty/libtheora}/huffenc.h | 0 .../theora => thirdparty/libtheora}/huffman.h | 0 .../theora => thirdparty/libtheora}/idct.c | 0 .../theora => thirdparty/libtheora}/info.c | 0 .../libtheora}/internal.c | 0 .../libtheora}/internal.h | 0 .../theora => thirdparty/libtheora}/mathops.c | 0 .../theora => thirdparty/libtheora}/mathops.h | 0 .../theora => thirdparty/libtheora}/mcenc.c | 0 .../theora => thirdparty/libtheora}/modedec.h | 0 .../libtheora}/ocintrin.h | 0 .../theora => thirdparty/libtheora}/quant.c | 0 .../theora => thirdparty/libtheora}/quant.h | 0 .../theora => thirdparty/libtheora}/rate.c | 0 .../theora => thirdparty/libtheora}/state.c | 0 .../libtheora}/theora/codec.h | 0 .../libtheora}/theora/theora.h | 0 .../libtheora}/theora/theoradec.h | 0 .../libtheora}/theora/theoraenc.h | 0 .../libtheora}/tokenize.c | 0 .../libtheora}/x86/mmxencfrag.c | 0 .../libtheora}/x86/mmxfdct.c | 0 .../libtheora}/x86/mmxfrag.c | 0 .../libtheora}/x86/mmxfrag.h | 0 .../libtheora}/x86/mmxidct.c | 0 .../libtheora}/x86/mmxloop.h | 0 .../libtheora}/x86/mmxstate.c | 0 .../libtheora}/x86/sse2fdct.c | 0 .../libtheora}/x86/x86enc.c | 0 .../libtheora}/x86/x86enc.h | 0 .../libtheora}/x86/x86int.h | 0 .../libtheora}/x86/x86state.c | 0 .../libtheora}/x86_vc/mmxencfrag.c | 0 .../libtheora}/x86_vc/mmxfdct.c | 0 .../libtheora}/x86_vc/mmxfrag.c | 0 .../libtheora}/x86_vc/mmxfrag.h | 0 .../libtheora}/x86_vc/mmxidct.c | 0 .../libtheora}/x86_vc/mmxloop.h | 0 .../libtheora}/x86_vc/mmxstate.c | 0 .../libtheora}/x86_vc/x86enc.c | 0 .../libtheora}/x86_vc/x86enc.h | 0 .../libtheora}/x86_vc/x86int.h | 0 .../libtheora}/x86_vc/x86state.c | 0 88 files changed, 199 insertions(+), 178 deletions(-) delete mode 100644 drivers/theora/SCsub delete mode 100644 drivers/theora/theora.exp create mode 100644 modules/theora/SCsub create mode 100644 modules/theora/config.py create mode 100644 modules/theora/register_types.cpp create mode 100644 modules/theora/register_types.h rename {drivers => modules}/theora/video_stream_theora.cpp (99%) rename {drivers => modules}/theora/video_stream_theora.h (98%) rename {drivers => modules}/theora/yuv2rgb.h (100%) rename {drivers/theora => thirdparty/libtheora}/COPYING (100%) rename {drivers/theora => thirdparty/libtheora}/LICENSE (100%) rename {drivers/theora => thirdparty/libtheora}/analyze.c (100%) rename {drivers/theora => thirdparty/libtheora}/apiwrapper.c (100%) rename {drivers/theora => thirdparty/libtheora}/apiwrapper.h (100%) rename {drivers/theora => thirdparty/libtheora}/bitpack.c (100%) rename {drivers/theora => thirdparty/libtheora}/bitpack.h (100%) rename {drivers/theora => thirdparty/libtheora}/cpu.c (100%) rename {drivers/theora => thirdparty/libtheora}/cpu.h (100%) rename {drivers/theora => thirdparty/libtheora}/dct.h (100%) rename {drivers/theora => thirdparty/libtheora}/decapiwrapper.c (100%) rename {drivers/theora => thirdparty/libtheora}/decinfo.c (100%) rename {drivers/theora => thirdparty/libtheora}/decint.h (100%) rename {drivers/theora => thirdparty/libtheora}/decode.c (100%) rename {drivers/theora => thirdparty/libtheora}/dequant.c (100%) rename {drivers/theora => thirdparty/libtheora}/dequant.h (100%) rename {drivers/theora => thirdparty/libtheora}/encapiwrapper.c (100%) rename {drivers/theora => thirdparty/libtheora}/encfrag.c (100%) rename {drivers/theora => thirdparty/libtheora}/encinfo.c (100%) rename {drivers/theora => thirdparty/libtheora}/encint.h (100%) rename {drivers/theora => thirdparty/libtheora}/encode.c (100%) rename {drivers/theora => thirdparty/libtheora}/encoder_disabled.c (100%) rename {drivers/theora => thirdparty/libtheora}/enquant.c (100%) rename {drivers/theora => thirdparty/libtheora}/enquant.h (100%) rename {drivers/theora => thirdparty/libtheora}/fdct.c (100%) rename {drivers/theora => thirdparty/libtheora}/fragment.c (100%) rename {drivers/theora => thirdparty/libtheora}/huffdec.c (100%) rename {drivers/theora => thirdparty/libtheora}/huffdec.h (100%) rename {drivers/theora => thirdparty/libtheora}/huffenc.c (100%) rename {drivers/theora => thirdparty/libtheora}/huffenc.h (100%) rename {drivers/theora => thirdparty/libtheora}/huffman.h (100%) rename {drivers/theora => thirdparty/libtheora}/idct.c (100%) rename {drivers/theora => thirdparty/libtheora}/info.c (100%) rename {drivers/theora => thirdparty/libtheora}/internal.c (100%) rename {drivers/theora => thirdparty/libtheora}/internal.h (100%) rename {drivers/theora => thirdparty/libtheora}/mathops.c (100%) rename {drivers/theora => thirdparty/libtheora}/mathops.h (100%) rename {drivers/theora => thirdparty/libtheora}/mcenc.c (100%) rename {drivers/theora => thirdparty/libtheora}/modedec.h (100%) rename {drivers/theora => thirdparty/libtheora}/ocintrin.h (100%) rename {drivers/theora => thirdparty/libtheora}/quant.c (100%) rename {drivers/theora => thirdparty/libtheora}/quant.h (100%) rename {drivers/theora => thirdparty/libtheora}/rate.c (100%) rename {drivers/theora => thirdparty/libtheora}/state.c (100%) rename {drivers => thirdparty/libtheora}/theora/codec.h (100%) rename {drivers => thirdparty/libtheora}/theora/theora.h (100%) rename {drivers => thirdparty/libtheora}/theora/theoradec.h (100%) rename {drivers => thirdparty/libtheora}/theora/theoraenc.h (100%) rename {drivers/theora => thirdparty/libtheora}/tokenize.c (100%) rename {drivers/theora => thirdparty/libtheora}/x86/mmxencfrag.c (100%) rename {drivers/theora => thirdparty/libtheora}/x86/mmxfdct.c (100%) rename {drivers/theora => thirdparty/libtheora}/x86/mmxfrag.c (100%) rename {drivers/theora => thirdparty/libtheora}/x86/mmxfrag.h (100%) rename {drivers/theora => thirdparty/libtheora}/x86/mmxidct.c (100%) rename {drivers/theora => thirdparty/libtheora}/x86/mmxloop.h (100%) rename {drivers/theora => thirdparty/libtheora}/x86/mmxstate.c (100%) rename {drivers/theora => thirdparty/libtheora}/x86/sse2fdct.c (100%) rename {drivers/theora => thirdparty/libtheora}/x86/x86enc.c (100%) rename {drivers/theora => thirdparty/libtheora}/x86/x86enc.h (100%) rename {drivers/theora => thirdparty/libtheora}/x86/x86int.h (100%) rename {drivers/theora => thirdparty/libtheora}/x86/x86state.c (100%) rename {drivers/theora => thirdparty/libtheora}/x86_vc/mmxencfrag.c (100%) rename {drivers/theora => thirdparty/libtheora}/x86_vc/mmxfdct.c (100%) rename {drivers/theora => thirdparty/libtheora}/x86_vc/mmxfrag.c (100%) rename {drivers/theora => thirdparty/libtheora}/x86_vc/mmxfrag.h (100%) rename {drivers/theora => thirdparty/libtheora}/x86_vc/mmxidct.c (100%) rename {drivers/theora => thirdparty/libtheora}/x86_vc/mmxloop.h (100%) rename {drivers/theora => thirdparty/libtheora}/x86_vc/mmxstate.c (100%) rename {drivers/theora => thirdparty/libtheora}/x86_vc/x86enc.c (100%) rename {drivers/theora => thirdparty/libtheora}/x86_vc/x86enc.h (100%) rename {drivers/theora => thirdparty/libtheora}/x86_vc/x86int.h (100%) rename {drivers/theora => thirdparty/libtheora}/x86_vc/x86state.c (100%) diff --git a/SConstruct b/SConstruct index e52e224de70..4ed3845f978 100644 --- a/SConstruct +++ b/SConstruct @@ -121,11 +121,10 @@ opts.Add('tools','Build Tools (Including Editor): (yes/no)','yes') opts.Add('gdscript','Build GDSCript support: (yes/no)','yes') opts.Add('libogg','Ogg library for ogg container support (system/builtin)','builtin') opts.Add('libvorbis','Ogg Vorbis library for vorbis support (system/builtin)','builtin') +opts.Add('libtheora','Theora library for theora module (system/builtin)','builtin') opts.Add('opus','Opus and opusfile library for Opus format support: (system/builtin)','builtin') opts.Add('minizip','Build Minizip Archive Support: (yes/no)','yes') opts.Add('squish','Squish BC Texture Compression in editor (yes/no)','yes') -opts.Add('theora','Theora Video (yes/no)','yes') -opts.Add('theoralib','Theora Video (yes/no)','no') opts.Add('freetype','Freetype support in editor','builtin') opts.Add('xml','XML Save/Load support (yes/no)','yes') opts.Add('libpng','libpng library for image loader support (system/builtin)','builtin') @@ -331,13 +330,6 @@ if selected_platform in platform_list: if (env_base['squish']=='yes'): env.Append(CPPFLAGS=['-DSQUISH_ENABLED']); - - if (env['theora']=='yes'): - env['theoralib']='yes' - env.Append(CPPFLAGS=['-DTHEORA_ENABLED']); - if (env['theoralib']=='yes'): - env.Append(CPPFLAGS=['-DTHEORALIB_ENABLED']); - if (env['tools']=='yes'): env.Append(CPPFLAGS=['-DTOOLS_ENABLED']) if (env['disable_3d']=='yes'): diff --git a/drivers/SCsub b/drivers/SCsub index 4ce95c79700..8b7ec80dcdc 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -24,8 +24,6 @@ SConscript("chibi/SCsub"); if (env["tools"]=="yes"): SConscript("convex_decomp/SCsub"); -if (env["theoralib"]=="yes"): - SConscript("theora/SCsub"); if (env['musepack']=='yes'): SConscript("mpc/SCsub"); if (env["squish"]=="yes" and env["tools"]=="yes"): diff --git a/drivers/register_driver_types.cpp b/drivers/register_driver_types.cpp index 8aead0e2fc2..6d48d94d44e 100644 --- a/drivers/register_driver_types.cpp +++ b/drivers/register_driver_types.cpp @@ -28,6 +28,7 @@ /*************************************************************************/ #include "register_driver_types.h" +#include "core/math/geometry.h" #include "png/image_loader_png.h" #include "png/resource_saver_png.h" #include "chibi/event_stream_chibi.h" @@ -45,11 +46,6 @@ #include "platform/windows/export/export.h" #endif -#ifdef THEORA_ENABLED -#include "theora/video_stream_theora.h" -#endif - - #include "drivers/nrex/regex.h" #ifdef MUSEPACK_ENABLED @@ -59,10 +55,6 @@ static ImageLoaderPNG *image_loader_png=NULL; static ResourceSaverPNG *resource_saver_png=NULL; -#ifdef THEORA_ENABLED -static ResourceFormatLoaderVideoStreamTheora* theora_stream_loader = NULL; -#endif - #ifdef MUSEPACK_ENABLED static ResourceFormatLoaderAudioStreamMPC * mpc_stream_loader=NULL; #endif @@ -103,13 +95,6 @@ void register_driver_types() { #endif -#ifdef THEORA_ENABLED - theora_stream_loader = memnew( ResourceFormatLoaderVideoStreamTheora ); - ResourceLoader::add_resource_format_loader(theora_stream_loader); - ObjectTypeDB::register_type(); -#endif - - #ifdef TOOLS_ENABLED #ifdef SQUISH_ENABLED @@ -123,11 +108,6 @@ void register_driver_types() { void unregister_driver_types() { -#ifdef THEORA_ENABLED - memdelete (theora_stream_loader); -#endif - - #ifdef MUSEPACK_ENABLED memdelete (mpc_stream_loader); diff --git a/drivers/theora/SCsub b/drivers/theora/SCsub deleted file mode 100644 index 94477d2827f..00000000000 --- a/drivers/theora/SCsub +++ /dev/null @@ -1,65 +0,0 @@ -Import('env') - -sources = [ - #"theora/analyze.c", - #"theora/apiwrapper.c", - "theora/bitpack.c", - "theora/cpu.c", - #"theora/decapiwrapper.c", - "theora/decinfo.c", - "theora/decode.c", - "theora/dequant.c", - #"theora/encapiwrapper.c", - #"theora/encfrag.c", - #"theora/encinfo.c", - #"theora/encode.c", - #"theora/encoder_disabled.c", - #"theora/enquant.c", - #"theora/fdct.c", - "theora/fragment.c", - "theora/huffdec.c", - #"theora/huffenc.c", - "theora/idct.c", - "theora/info.c", - "theora/internal.c", - #"theora/mathops.c", - #"theora/mcenc.c", - "theora/quant.c", - #"theora/rate.c", - "theora/state.c", - #"theora/tokenize.c", - "theora/video_stream_theora.cpp", -] - -sources_x86 = [ - #"theora/x86/mmxencfrag.c", - #"theora/x86/mmxfdct.c", - "theora/x86/mmxfrag.c", - "theora/x86/mmxidct.c", - "theora/x86/mmxstate.c", - #"theora/x86/sse2fdct.c", - #"theora/x86/x86enc.c", - "theora/x86/x86state.c", -] - -sources_x86_vc = [ - #"theora/x86_vc/mmxencfrag.c", - #"theora/x86_vc/mmxfdct.c", - "theora/x86_vc/mmxfrag.c", - "theora/x86_vc/mmxidct.c", - "theora/x86_vc/mmxstate.c", - #"theora/x86_vc/x86enc.c", - "theora/x86_vc/x86state.c", -] - -env.drivers_sources += sources - -if (env["x86_opt_gcc"]): - env.drivers_sources += sources_x86 - -if (env["x86_opt_vc"]): - env.drivers_sources += sources_x86_vc - -if (env["x86_opt_gcc"] or env["x86_opt_vc"]): - Import('env_drivers') - env_drivers.Append(CCFLAGS=["-DOC_X86_ASM"]) diff --git a/drivers/theora/theora.exp b/drivers/theora/theora.exp deleted file mode 100644 index b4e0225f1ed..00000000000 --- a/drivers/theora/theora.exp +++ /dev/null @@ -1,55 +0,0 @@ -# export list for libtheora -_theora_version_string -_theora_version_number -_theora_encode_init -_theora_encode_YUVin -_theora_encode_packetout -_theora_encode_header -_theora_encode_comment -_theora_encode_tables -_theora_decode_header -_theora_decode_init -_theora_decode_packetin -_theora_decode_YUVout -_theora_control -_theora_packet_isheader -_theora_packet_iskeyframe -_theora_granule_shift -_theora_granule_frame -_theora_granule_time -_theora_info_init -_theora_info_clear -_theora_clear -_theora_comment_init -_theora_comment_add -_theora_comment_add_tag -_theora_comment_query -_theora_comment_query_count -_theora_comment_clear -_th_version_string -_th_version_number -_th_decode_headerin -_th_decode_alloc -_th_setup_free -_th_decode_ctl -_th_decode_packetin -_th_decode_ycbcr_out -_th_decode_free -_th_packet_isheader -_th_packet_iskeyframe -_th_granule_frame -_th_granule_time -_th_info_init -_th_info_clear -_th_comment_init -_th_comment_add -_th_comment_add_tag -_th_comment_query -_th_comment_query_count -_th_comment_clear -_th_encode_alloc -_th_encode_ctl -_th_encode_flushheader -_th_encode_packetout -_th_encode_ycbcr_in -_th_encode_free diff --git a/modules/theora/SCsub b/modules/theora/SCsub new file mode 100644 index 00000000000..cdb78e955e0 --- /dev/null +++ b/modules/theora/SCsub @@ -0,0 +1,81 @@ +Import('env') +Import('env_modules') + +env_theora = env_modules.Clone() + +# Thirdparty source files +if (env["libtheora"] != "system"): # builtin + thirdparty_dir = "#thirdparty/libtheora/" + thirdparty_sources = [ + "analyze.c", + "apiwrapper.c", + "bitpack.c", + "cpu.c", + "decapiwrapper.c", + "decinfo.c", + "decode.c", + "dequant.c", + "encapiwrapper.c", + "encfrag.c", + "encinfo.c", + "encode.c", + "encoder_disabled.c", + "enquant.c", + "fdct.c", + "fragment.c", + "huffdec.c", + "huffenc.c", + "idct.c", + "info.c", + "internal.c", + "mathops.c", + "mcenc.c", + "quant.c", + "rate.c", + "state.c", + "tokenize.c", + ] + + thirdparty_sources_x86 = [ + "x86/mmxencfrag.c", + "x86/mmxfdct.c", + "x86/mmxfrag.c", + "x86/mmxidct.c", + "x86/mmxstate.c", + "x86/sse2fdct.c", + "x86/x86enc.c", + "x86/x86state.c", + ] + + thirdparty_sources_x86_vc = [ + "x86_vc/mmxencfrag.c", + "x86_vc/mmxfdct.c", + "x86_vc/mmxfrag.c", + "x86_vc/mmxidct.c", + "x86_vc/mmxstate.c", + "x86_vc/x86enc.c", + "x86_vc/x86state.c", + ] + + if (env["x86_opt_gcc"]): + thirdparty_sources += thirdparty_sources_x86 + + if (env["x86_opt_vc"]): + thirdparty_sources += thirdparty_sources_x86_vc + + if (env["x86_opt_gcc"] or env["x86_opt_vc"]): + env_theora.Append(CCFLAGS = ["-DOC_X86_ASM"]) + + thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] + + env_theora.add_source_files(env.modules_sources, thirdparty_sources) + env_theora.Append(CPPPATH = [thirdparty_dir]) + + # also requires libogg and libvorbis + if (env["libogg"] != "system"): # builtin + env_theora.Append(CPPPATH = ["#thirdparty/libogg"]) + if (env["libvorbis"] != "system"): # builtin + env_theora.Append(CPPPATH = ["#thirdparty/libvorbis"]) + +# Godot source files +env_theora.add_source_files(env.modules_sources, "*.cpp") diff --git a/modules/theora/config.py b/modules/theora/config.py new file mode 100644 index 00000000000..368e97e152c --- /dev/null +++ b/modules/theora/config.py @@ -0,0 +1,6 @@ + +def can_build(platform): + return True + +def configure(env): + pass diff --git a/modules/theora/register_types.cpp b/modules/theora/register_types.cpp new file mode 100644 index 00000000000..282b59b0ec4 --- /dev/null +++ b/modules/theora/register_types.cpp @@ -0,0 +1,45 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "register_types.h" + +#include "video_stream_theora.h" + +static ResourceFormatLoaderVideoStreamTheora* theora_stream_loader = NULL; + +void register_theora_types() { + + theora_stream_loader = memnew( ResourceFormatLoaderVideoStreamTheora ); + ResourceLoader::add_resource_format_loader(theora_stream_loader); + ObjectTypeDB::register_type(); +} + +void unregister_theora_types() { + + memdelete( theora_stream_loader ); +} diff --git a/modules/theora/register_types.h b/modules/theora/register_types.h new file mode 100644 index 00000000000..18bdbf0c4c2 --- /dev/null +++ b/modules/theora/register_types.h @@ -0,0 +1,30 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_theora_types(); +void unregister_theora_types(); diff --git a/drivers/theora/video_stream_theora.cpp b/modules/theora/video_stream_theora.cpp similarity index 99% rename from drivers/theora/video_stream_theora.cpp rename to modules/theora/video_stream_theora.cpp index 1f3832ec16c..3ddfee3a1dc 100644 --- a/drivers/theora/video_stream_theora.cpp +++ b/modules/theora/video_stream_theora.cpp @@ -26,13 +26,11 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifdef THEORA_ENABLED - #include "video_stream_theora.h" + +#include "globals.h" #include "os/os.h" #include "yuv2rgb.h" -#include "globals.h" - int VideoStreamPlaybackTheora:: buffer_data() { @@ -940,6 +938,3 @@ String ResourceFormatLoaderVideoStreamTheora::get_resource_type(const String &p_ return "VideoStreamTheora"; return ""; } - -#endif - diff --git a/drivers/theora/video_stream_theora.h b/modules/theora/video_stream_theora.h similarity index 98% rename from drivers/theora/video_stream_theora.h rename to modules/theora/video_stream_theora.h index 54848158442..04a5c56ee5c 100644 --- a/drivers/theora/video_stream_theora.h +++ b/modules/theora/video_stream_theora.h @@ -29,16 +29,15 @@ #ifndef VIDEO_STREAM_THEORA_H #define VIDEO_STREAM_THEORA_H -#ifdef THEORA_ENABLED - -#include "theora/theoradec.h" -#include "vorbis/codec.h" -#include "os/file_access.h" -#include "ring_buffer.h" #include "io/resource_loader.h" -#include "scene/resources/video_stream.h" +#include "os/file_access.h" #include "os/thread.h" #include "os/semaphore.h" +#include "ring_buffer.h" +#include "scene/resources/video_stream.h" + +#include +#include //#define THEORA_USE_THREAD_STREAMING @@ -197,8 +196,4 @@ public: }; - - -#endif - #endif diff --git a/drivers/theora/yuv2rgb.h b/modules/theora/yuv2rgb.h similarity index 100% rename from drivers/theora/yuv2rgb.h rename to modules/theora/yuv2rgb.h diff --git a/platform/bb10/detect.py b/platform/bb10/detect.py index 2860b7f0903..5aa68b36dcb 100644 --- a/platform/bb10/detect.py +++ b/platform/bb10/detect.py @@ -33,8 +33,7 @@ def get_flags(): return [ ('tools', 'no'), - ('theora', 'no'), - + ('module_theora_enabled', 'no'), ] def configure(env): diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index f80c3b4915d..fce680b0021 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -26,10 +26,10 @@ def get_flags(): return [ ('tools', 'no'), - ('theora', 'no'), ('musepack', 'no'), ('squish', 'no'), ('etc1', 'no'), + ('module_theora_enabled', 'no'), ] diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 98c2d1e8fde..7c22bd97ffd 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -73,7 +73,6 @@ def get_flags(): ("openssl", "system"), ('freetype','yes'), # use system freetype ('libpng', 'system'), - #("theora","no"), ] @@ -155,16 +154,24 @@ def configure(env): if (env["enet"] == "system"): env.ParseConfig('pkg-config libenet --cflags --libs') - if (env["libogg"] == "system"): - env.ParseConfig('pkg-config ogg --cflags --libs') + # Sound and video libraries + # Keep the order as it triggers chained dependencies (ogg needed by others, etc.) + + if (env["libtheora"] == "system"): + env["libogg"] = "system" # Needed to link against system libtheora + env["libvorbis"] = "system" # Needed to link against system libtheora + env.ParseConfig('pkg-config theora theoradec --cflags --libs') if (env["libvorbis"] == "system"): env["libogg"] = "system" # Needed to link against system libvorbis - env.ParseConfig('pkg-config vorbis vorbisfile ogg --cflags --libs') + env.ParseConfig('pkg-config vorbis vorbisfile --cflags --libs') if (env["opus"] == "system"): env["libogg"] = "system" # Needed to link against system opus - env.ParseConfig('pkg-config opus opusfile ogg --cflags --libs') + env.ParseConfig('pkg-config opus opusfile --cflags --libs') + + if (env["libogg"] == "system"): + env.ParseConfig('pkg-config ogg --cflags --libs') env.Append(CPPFLAGS=['-DOPENGL_ENABLED']) diff --git a/thirdparty/README.md b/thirdparty/README.md index a8c2c7df953..a567eb177de 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -132,3 +132,16 @@ Files extracted from upstream source: Files extracted from upstream source: - all of them: rg_etc1.{cpp,h} + + +## theora + +- Upstream: https://www.theora.org +- Version: 1.1.1 +- License: BSD-3-Clause + +Files extracted from upstream source: + +- all .c, .h in lib/ +- all .h files in include/theora/ as theora/ +- COPYING and LICENSE diff --git a/drivers/theora/COPYING b/thirdparty/libtheora/COPYING similarity index 100% rename from drivers/theora/COPYING rename to thirdparty/libtheora/COPYING diff --git a/drivers/theora/LICENSE b/thirdparty/libtheora/LICENSE similarity index 100% rename from drivers/theora/LICENSE rename to thirdparty/libtheora/LICENSE diff --git a/drivers/theora/analyze.c b/thirdparty/libtheora/analyze.c similarity index 100% rename from drivers/theora/analyze.c rename to thirdparty/libtheora/analyze.c diff --git a/drivers/theora/apiwrapper.c b/thirdparty/libtheora/apiwrapper.c similarity index 100% rename from drivers/theora/apiwrapper.c rename to thirdparty/libtheora/apiwrapper.c diff --git a/drivers/theora/apiwrapper.h b/thirdparty/libtheora/apiwrapper.h similarity index 100% rename from drivers/theora/apiwrapper.h rename to thirdparty/libtheora/apiwrapper.h diff --git a/drivers/theora/bitpack.c b/thirdparty/libtheora/bitpack.c similarity index 100% rename from drivers/theora/bitpack.c rename to thirdparty/libtheora/bitpack.c diff --git a/drivers/theora/bitpack.h b/thirdparty/libtheora/bitpack.h similarity index 100% rename from drivers/theora/bitpack.h rename to thirdparty/libtheora/bitpack.h diff --git a/drivers/theora/cpu.c b/thirdparty/libtheora/cpu.c similarity index 100% rename from drivers/theora/cpu.c rename to thirdparty/libtheora/cpu.c diff --git a/drivers/theora/cpu.h b/thirdparty/libtheora/cpu.h similarity index 100% rename from drivers/theora/cpu.h rename to thirdparty/libtheora/cpu.h diff --git a/drivers/theora/dct.h b/thirdparty/libtheora/dct.h similarity index 100% rename from drivers/theora/dct.h rename to thirdparty/libtheora/dct.h diff --git a/drivers/theora/decapiwrapper.c b/thirdparty/libtheora/decapiwrapper.c similarity index 100% rename from drivers/theora/decapiwrapper.c rename to thirdparty/libtheora/decapiwrapper.c diff --git a/drivers/theora/decinfo.c b/thirdparty/libtheora/decinfo.c similarity index 100% rename from drivers/theora/decinfo.c rename to thirdparty/libtheora/decinfo.c diff --git a/drivers/theora/decint.h b/thirdparty/libtheora/decint.h similarity index 100% rename from drivers/theora/decint.h rename to thirdparty/libtheora/decint.h diff --git a/drivers/theora/decode.c b/thirdparty/libtheora/decode.c similarity index 100% rename from drivers/theora/decode.c rename to thirdparty/libtheora/decode.c diff --git a/drivers/theora/dequant.c b/thirdparty/libtheora/dequant.c similarity index 100% rename from drivers/theora/dequant.c rename to thirdparty/libtheora/dequant.c diff --git a/drivers/theora/dequant.h b/thirdparty/libtheora/dequant.h similarity index 100% rename from drivers/theora/dequant.h rename to thirdparty/libtheora/dequant.h diff --git a/drivers/theora/encapiwrapper.c b/thirdparty/libtheora/encapiwrapper.c similarity index 100% rename from drivers/theora/encapiwrapper.c rename to thirdparty/libtheora/encapiwrapper.c diff --git a/drivers/theora/encfrag.c b/thirdparty/libtheora/encfrag.c similarity index 100% rename from drivers/theora/encfrag.c rename to thirdparty/libtheora/encfrag.c diff --git a/drivers/theora/encinfo.c b/thirdparty/libtheora/encinfo.c similarity index 100% rename from drivers/theora/encinfo.c rename to thirdparty/libtheora/encinfo.c diff --git a/drivers/theora/encint.h b/thirdparty/libtheora/encint.h similarity index 100% rename from drivers/theora/encint.h rename to thirdparty/libtheora/encint.h diff --git a/drivers/theora/encode.c b/thirdparty/libtheora/encode.c similarity index 100% rename from drivers/theora/encode.c rename to thirdparty/libtheora/encode.c diff --git a/drivers/theora/encoder_disabled.c b/thirdparty/libtheora/encoder_disabled.c similarity index 100% rename from drivers/theora/encoder_disabled.c rename to thirdparty/libtheora/encoder_disabled.c diff --git a/drivers/theora/enquant.c b/thirdparty/libtheora/enquant.c similarity index 100% rename from drivers/theora/enquant.c rename to thirdparty/libtheora/enquant.c diff --git a/drivers/theora/enquant.h b/thirdparty/libtheora/enquant.h similarity index 100% rename from drivers/theora/enquant.h rename to thirdparty/libtheora/enquant.h diff --git a/drivers/theora/fdct.c b/thirdparty/libtheora/fdct.c similarity index 100% rename from drivers/theora/fdct.c rename to thirdparty/libtheora/fdct.c diff --git a/drivers/theora/fragment.c b/thirdparty/libtheora/fragment.c similarity index 100% rename from drivers/theora/fragment.c rename to thirdparty/libtheora/fragment.c diff --git a/drivers/theora/huffdec.c b/thirdparty/libtheora/huffdec.c similarity index 100% rename from drivers/theora/huffdec.c rename to thirdparty/libtheora/huffdec.c diff --git a/drivers/theora/huffdec.h b/thirdparty/libtheora/huffdec.h similarity index 100% rename from drivers/theora/huffdec.h rename to thirdparty/libtheora/huffdec.h diff --git a/drivers/theora/huffenc.c b/thirdparty/libtheora/huffenc.c similarity index 100% rename from drivers/theora/huffenc.c rename to thirdparty/libtheora/huffenc.c diff --git a/drivers/theora/huffenc.h b/thirdparty/libtheora/huffenc.h similarity index 100% rename from drivers/theora/huffenc.h rename to thirdparty/libtheora/huffenc.h diff --git a/drivers/theora/huffman.h b/thirdparty/libtheora/huffman.h similarity index 100% rename from drivers/theora/huffman.h rename to thirdparty/libtheora/huffman.h diff --git a/drivers/theora/idct.c b/thirdparty/libtheora/idct.c similarity index 100% rename from drivers/theora/idct.c rename to thirdparty/libtheora/idct.c diff --git a/drivers/theora/info.c b/thirdparty/libtheora/info.c similarity index 100% rename from drivers/theora/info.c rename to thirdparty/libtheora/info.c diff --git a/drivers/theora/internal.c b/thirdparty/libtheora/internal.c similarity index 100% rename from drivers/theora/internal.c rename to thirdparty/libtheora/internal.c diff --git a/drivers/theora/internal.h b/thirdparty/libtheora/internal.h similarity index 100% rename from drivers/theora/internal.h rename to thirdparty/libtheora/internal.h diff --git a/drivers/theora/mathops.c b/thirdparty/libtheora/mathops.c similarity index 100% rename from drivers/theora/mathops.c rename to thirdparty/libtheora/mathops.c diff --git a/drivers/theora/mathops.h b/thirdparty/libtheora/mathops.h similarity index 100% rename from drivers/theora/mathops.h rename to thirdparty/libtheora/mathops.h diff --git a/drivers/theora/mcenc.c b/thirdparty/libtheora/mcenc.c similarity index 100% rename from drivers/theora/mcenc.c rename to thirdparty/libtheora/mcenc.c diff --git a/drivers/theora/modedec.h b/thirdparty/libtheora/modedec.h similarity index 100% rename from drivers/theora/modedec.h rename to thirdparty/libtheora/modedec.h diff --git a/drivers/theora/ocintrin.h b/thirdparty/libtheora/ocintrin.h similarity index 100% rename from drivers/theora/ocintrin.h rename to thirdparty/libtheora/ocintrin.h diff --git a/drivers/theora/quant.c b/thirdparty/libtheora/quant.c similarity index 100% rename from drivers/theora/quant.c rename to thirdparty/libtheora/quant.c diff --git a/drivers/theora/quant.h b/thirdparty/libtheora/quant.h similarity index 100% rename from drivers/theora/quant.h rename to thirdparty/libtheora/quant.h diff --git a/drivers/theora/rate.c b/thirdparty/libtheora/rate.c similarity index 100% rename from drivers/theora/rate.c rename to thirdparty/libtheora/rate.c diff --git a/drivers/theora/state.c b/thirdparty/libtheora/state.c similarity index 100% rename from drivers/theora/state.c rename to thirdparty/libtheora/state.c diff --git a/drivers/theora/codec.h b/thirdparty/libtheora/theora/codec.h similarity index 100% rename from drivers/theora/codec.h rename to thirdparty/libtheora/theora/codec.h diff --git a/drivers/theora/theora.h b/thirdparty/libtheora/theora/theora.h similarity index 100% rename from drivers/theora/theora.h rename to thirdparty/libtheora/theora/theora.h diff --git a/drivers/theora/theoradec.h b/thirdparty/libtheora/theora/theoradec.h similarity index 100% rename from drivers/theora/theoradec.h rename to thirdparty/libtheora/theora/theoradec.h diff --git a/drivers/theora/theoraenc.h b/thirdparty/libtheora/theora/theoraenc.h similarity index 100% rename from drivers/theora/theoraenc.h rename to thirdparty/libtheora/theora/theoraenc.h diff --git a/drivers/theora/tokenize.c b/thirdparty/libtheora/tokenize.c similarity index 100% rename from drivers/theora/tokenize.c rename to thirdparty/libtheora/tokenize.c diff --git a/drivers/theora/x86/mmxencfrag.c b/thirdparty/libtheora/x86/mmxencfrag.c similarity index 100% rename from drivers/theora/x86/mmxencfrag.c rename to thirdparty/libtheora/x86/mmxencfrag.c diff --git a/drivers/theora/x86/mmxfdct.c b/thirdparty/libtheora/x86/mmxfdct.c similarity index 100% rename from drivers/theora/x86/mmxfdct.c rename to thirdparty/libtheora/x86/mmxfdct.c diff --git a/drivers/theora/x86/mmxfrag.c b/thirdparty/libtheora/x86/mmxfrag.c similarity index 100% rename from drivers/theora/x86/mmxfrag.c rename to thirdparty/libtheora/x86/mmxfrag.c diff --git a/drivers/theora/x86/mmxfrag.h b/thirdparty/libtheora/x86/mmxfrag.h similarity index 100% rename from drivers/theora/x86/mmxfrag.h rename to thirdparty/libtheora/x86/mmxfrag.h diff --git a/drivers/theora/x86/mmxidct.c b/thirdparty/libtheora/x86/mmxidct.c similarity index 100% rename from drivers/theora/x86/mmxidct.c rename to thirdparty/libtheora/x86/mmxidct.c diff --git a/drivers/theora/x86/mmxloop.h b/thirdparty/libtheora/x86/mmxloop.h similarity index 100% rename from drivers/theora/x86/mmxloop.h rename to thirdparty/libtheora/x86/mmxloop.h diff --git a/drivers/theora/x86/mmxstate.c b/thirdparty/libtheora/x86/mmxstate.c similarity index 100% rename from drivers/theora/x86/mmxstate.c rename to thirdparty/libtheora/x86/mmxstate.c diff --git a/drivers/theora/x86/sse2fdct.c b/thirdparty/libtheora/x86/sse2fdct.c similarity index 100% rename from drivers/theora/x86/sse2fdct.c rename to thirdparty/libtheora/x86/sse2fdct.c diff --git a/drivers/theora/x86/x86enc.c b/thirdparty/libtheora/x86/x86enc.c similarity index 100% rename from drivers/theora/x86/x86enc.c rename to thirdparty/libtheora/x86/x86enc.c diff --git a/drivers/theora/x86/x86enc.h b/thirdparty/libtheora/x86/x86enc.h similarity index 100% rename from drivers/theora/x86/x86enc.h rename to thirdparty/libtheora/x86/x86enc.h diff --git a/drivers/theora/x86/x86int.h b/thirdparty/libtheora/x86/x86int.h similarity index 100% rename from drivers/theora/x86/x86int.h rename to thirdparty/libtheora/x86/x86int.h diff --git a/drivers/theora/x86/x86state.c b/thirdparty/libtheora/x86/x86state.c similarity index 100% rename from drivers/theora/x86/x86state.c rename to thirdparty/libtheora/x86/x86state.c diff --git a/drivers/theora/x86_vc/mmxencfrag.c b/thirdparty/libtheora/x86_vc/mmxencfrag.c similarity index 100% rename from drivers/theora/x86_vc/mmxencfrag.c rename to thirdparty/libtheora/x86_vc/mmxencfrag.c diff --git a/drivers/theora/x86_vc/mmxfdct.c b/thirdparty/libtheora/x86_vc/mmxfdct.c similarity index 100% rename from drivers/theora/x86_vc/mmxfdct.c rename to thirdparty/libtheora/x86_vc/mmxfdct.c diff --git a/drivers/theora/x86_vc/mmxfrag.c b/thirdparty/libtheora/x86_vc/mmxfrag.c similarity index 100% rename from drivers/theora/x86_vc/mmxfrag.c rename to thirdparty/libtheora/x86_vc/mmxfrag.c diff --git a/drivers/theora/x86_vc/mmxfrag.h b/thirdparty/libtheora/x86_vc/mmxfrag.h similarity index 100% rename from drivers/theora/x86_vc/mmxfrag.h rename to thirdparty/libtheora/x86_vc/mmxfrag.h diff --git a/drivers/theora/x86_vc/mmxidct.c b/thirdparty/libtheora/x86_vc/mmxidct.c similarity index 100% rename from drivers/theora/x86_vc/mmxidct.c rename to thirdparty/libtheora/x86_vc/mmxidct.c diff --git a/drivers/theora/x86_vc/mmxloop.h b/thirdparty/libtheora/x86_vc/mmxloop.h similarity index 100% rename from drivers/theora/x86_vc/mmxloop.h rename to thirdparty/libtheora/x86_vc/mmxloop.h diff --git a/drivers/theora/x86_vc/mmxstate.c b/thirdparty/libtheora/x86_vc/mmxstate.c similarity index 100% rename from drivers/theora/x86_vc/mmxstate.c rename to thirdparty/libtheora/x86_vc/mmxstate.c diff --git a/drivers/theora/x86_vc/x86enc.c b/thirdparty/libtheora/x86_vc/x86enc.c similarity index 100% rename from drivers/theora/x86_vc/x86enc.c rename to thirdparty/libtheora/x86_vc/x86enc.c diff --git a/drivers/theora/x86_vc/x86enc.h b/thirdparty/libtheora/x86_vc/x86enc.h similarity index 100% rename from drivers/theora/x86_vc/x86enc.h rename to thirdparty/libtheora/x86_vc/x86enc.h diff --git a/drivers/theora/x86_vc/x86int.h b/thirdparty/libtheora/x86_vc/x86int.h similarity index 100% rename from drivers/theora/x86_vc/x86int.h rename to thirdparty/libtheora/x86_vc/x86int.h diff --git a/drivers/theora/x86_vc/x86state.c b/thirdparty/libtheora/x86_vc/x86state.c similarity index 100% rename from drivers/theora/x86_vc/x86state.c rename to thirdparty/libtheora/x86_vc/x86state.c From 5c12c9e69b85023934dc85f3aada03da150556be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 13 Oct 2016 20:46:42 +0200 Subject: [PATCH 10/19] mpc: Move to a module and split thirdparty libmpcdec --- SConstruct | 5 +-- drivers/SCsub | 2 - drivers/mpc/SCsub | 21 --------- drivers/register_driver_types.cpp | 21 --------- modules/mpc/SCsub | 26 +++++++++++ {drivers => modules}/mpc/audio_stream_mpc.cpp | 0 {drivers => modules}/mpc/audio_stream_mpc.h | 11 +++-- modules/mpc/config.py | 6 +++ modules/mpc/register_types.cpp | 45 +++++++++++++++++++ modules/mpc/register_types.h | 30 +++++++++++++ platform/javascript/detect.py | 2 +- thirdparty/README.md | 13 ++++++ thirdparty/libmpcdec/COPYING | 31 +++++++++++++ .../mpc => thirdparty/libmpcdec}/decoder.h | 0 .../mpc => thirdparty/libmpcdec}/huffman.c | 0 .../mpc => thirdparty/libmpcdec}/huffman.h | 0 .../mpc => thirdparty/libmpcdec}/internal.h | 0 .../libmpcdec}/mpc/datatypes.h | 0 .../libmpcdec}/mpc/minimax.h | 0 .../libmpcdec}/mpc/mpc_types.h | 0 .../libmpcdec}/mpc/mpcdec.h | 0 .../libmpcdec}/mpc/mpcmath.h | 0 .../libmpcdec}/mpc/reader.h | 0 .../libmpcdec}/mpc/streaminfo.h | 0 .../libmpcdec}/mpc_bits_reader.c | 0 .../libmpcdec}/mpc_bits_reader.h | 0 .../libmpcdec}/mpc_decoder.c | 0 .../mpc => thirdparty/libmpcdec}/mpc_demux.c | 0 .../mpc => thirdparty/libmpcdec}/mpc_reader.c | 0 .../libmpcdec}/mpcdec_math.h | 0 .../mpc => thirdparty/libmpcdec}/requant.c | 0 .../mpc => thirdparty/libmpcdec}/requant.h | 0 .../mpc => thirdparty/libmpcdec}/streaminfo.c | 0 .../libmpcdec}/synth_filter.c | 0 34 files changed, 158 insertions(+), 55 deletions(-) delete mode 100644 drivers/mpc/SCsub create mode 100644 modules/mpc/SCsub rename {drivers => modules}/mpc/audio_stream_mpc.cpp (100%) rename {drivers => modules}/mpc/audio_stream_mpc.h (98%) create mode 100644 modules/mpc/config.py create mode 100644 modules/mpc/register_types.cpp create mode 100644 modules/mpc/register_types.h create mode 100644 thirdparty/libmpcdec/COPYING rename {drivers/mpc => thirdparty/libmpcdec}/decoder.h (100%) rename {drivers/mpc => thirdparty/libmpcdec}/huffman.c (100%) rename {drivers/mpc => thirdparty/libmpcdec}/huffman.h (100%) rename {drivers/mpc => thirdparty/libmpcdec}/internal.h (100%) rename {drivers => thirdparty/libmpcdec}/mpc/datatypes.h (100%) rename {drivers => thirdparty/libmpcdec}/mpc/minimax.h (100%) rename {drivers => thirdparty/libmpcdec}/mpc/mpc_types.h (100%) rename {drivers => thirdparty/libmpcdec}/mpc/mpcdec.h (100%) rename {drivers => thirdparty/libmpcdec}/mpc/mpcmath.h (100%) rename {drivers => thirdparty/libmpcdec}/mpc/reader.h (100%) rename {drivers => thirdparty/libmpcdec}/mpc/streaminfo.h (100%) rename {drivers/mpc => thirdparty/libmpcdec}/mpc_bits_reader.c (100%) rename {drivers/mpc => thirdparty/libmpcdec}/mpc_bits_reader.h (100%) rename {drivers/mpc => thirdparty/libmpcdec}/mpc_decoder.c (100%) rename {drivers/mpc => thirdparty/libmpcdec}/mpc_demux.c (100%) rename {drivers/mpc => thirdparty/libmpcdec}/mpc_reader.c (100%) rename {drivers/mpc => thirdparty/libmpcdec}/mpcdec_math.h (100%) rename {drivers/mpc => thirdparty/libmpcdec}/requant.c (100%) rename {drivers/mpc => thirdparty/libmpcdec}/requant.h (100%) rename {drivers/mpc => thirdparty/libmpcdec}/streaminfo.c (100%) rename {drivers/mpc => thirdparty/libmpcdec}/synth_filter.c (100%) diff --git a/SConstruct b/SConstruct index 4ed3845f978..66c066b141f 100644 --- a/SConstruct +++ b/SConstruct @@ -131,7 +131,7 @@ opts.Add('libpng','libpng library for image loader support (system/builtin)','bu opts.Add('libwebp','libwebp library for webp module (system/builtin)','builtin') opts.Add('builtin_zlib','Use built-in zlib (yes/no)','yes') opts.Add('openssl','OpenSSL library for openssl module (system/builtin)','builtin') -opts.Add('musepack','Musepack Audio (yes/no)','yes') +opts.Add('libmpcdec','libmpcdec library for mpc module (system/builtin)','builtin') opts.Add('enet','ENet library (system/builtin)','builtin') opts.Add("CXX", "C++ Compiler") opts.Add("CC", "C Compiler") @@ -318,9 +318,6 @@ if selected_platform in platform_list: if (env.use_ptrcall): env.Append(CPPFLAGS=['-DPTRCALL_ENABLED']); - if (env['musepack']=='yes'): - env.Append(CPPFLAGS=['-DMUSEPACK_ENABLED']); - if (env["builtin_zlib"]=='yes'): env.Append(CPPPATH=['#drivers/builtin_zlib/zlib']) diff --git a/drivers/SCsub b/drivers/SCsub index 8b7ec80dcdc..3862a095bab 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -24,8 +24,6 @@ SConscript("chibi/SCsub"); if (env["tools"]=="yes"): SConscript("convex_decomp/SCsub"); -if (env['musepack']=='yes'): - SConscript("mpc/SCsub"); if (env["squish"]=="yes" and env["tools"]=="yes"): SConscript("squish/SCsub"); if (env["freetype"]!="no"): diff --git a/drivers/mpc/SCsub b/drivers/mpc/SCsub deleted file mode 100644 index 32ffdb863f3..00000000000 --- a/drivers/mpc/SCsub +++ /dev/null @@ -1,21 +0,0 @@ -Import('env') - - -mpc_sources = [ - "mpc/huffman.c", - "mpc/mpc_bits_reader.c", - "mpc/mpc_decoder.c", - "mpc/mpc_demux.c", - "mpc/mpc_reader.c", - "mpc/requant.c", - "mpc/streaminfo.c", - "mpc/synth_filter.c", -] - -env.drivers_sources+=mpc_sources - -env.add_source_files(env.drivers_sources,"*.cpp") - -#env.add_source_files(env.drivers_sources, mpc_sources) - -Export('env') diff --git a/drivers/register_driver_types.cpp b/drivers/register_driver_types.cpp index 6d48d94d44e..1999a9a7c9c 100644 --- a/drivers/register_driver_types.cpp +++ b/drivers/register_driver_types.cpp @@ -48,17 +48,9 @@ #include "drivers/nrex/regex.h" -#ifdef MUSEPACK_ENABLED -#include "mpc/audio_stream_mpc.h" -#endif - static ImageLoaderPNG *image_loader_png=NULL; static ResourceSaverPNG *resource_saver_png=NULL; -#ifdef MUSEPACK_ENABLED -static ResourceFormatLoaderAudioStreamMPC * mpc_stream_loader=NULL; -#endif - void register_core_driver_types() { @@ -87,14 +79,6 @@ void register_driver_types() { Geometry::_decompose_func=b2d_decompose; #endif -#ifdef MUSEPACK_ENABLED - - mpc_stream_loader=memnew( ResourceFormatLoaderAudioStreamMPC ); - ResourceLoader::add_resource_format_loader(mpc_stream_loader); - ObjectTypeDB::register_type(); - -#endif - #ifdef TOOLS_ENABLED #ifdef SQUISH_ENABLED @@ -108,10 +92,5 @@ void register_driver_types() { void unregister_driver_types() { -#ifdef MUSEPACK_ENABLED - - memdelete (mpc_stream_loader); -#endif - finalize_chibi(); } diff --git a/modules/mpc/SCsub b/modules/mpc/SCsub new file mode 100644 index 00000000000..d2662c34ab8 --- /dev/null +++ b/modules/mpc/SCsub @@ -0,0 +1,26 @@ +Import('env') +Import('env_modules') + +env_mpc = env_modules.Clone() + +# Thirdparty source files +if (env["libmpcdec"] != "system"): # builtin + thirdparty_dir = "#thirdparty/libmpcdec/" + thirdparty_sources = [ + "huffman.c", + "mpc_bits_reader.c", + "mpc_decoder.c", + "mpc_demux.c", + "mpc_reader.c", + "requant.c", + "streaminfo.c", + "synth_filter.c", + ] + + thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] + + env_mpc.add_source_files(env.modules_sources, thirdparty_sources) + env_mpc.Append(CPPPATH = [thirdparty_dir]) + +# Godot source files +env_mpc.add_source_files(env.modules_sources, "*.cpp") diff --git a/drivers/mpc/audio_stream_mpc.cpp b/modules/mpc/audio_stream_mpc.cpp similarity index 100% rename from drivers/mpc/audio_stream_mpc.cpp rename to modules/mpc/audio_stream_mpc.cpp diff --git a/drivers/mpc/audio_stream_mpc.h b/modules/mpc/audio_stream_mpc.h similarity index 98% rename from drivers/mpc/audio_stream_mpc.h rename to modules/mpc/audio_stream_mpc.h index 27f55777d60..c982bdc3587 100644 --- a/drivers/mpc/audio_stream_mpc.h +++ b/modules/mpc/audio_stream_mpc.h @@ -29,13 +29,12 @@ #ifndef AUDIO_STREAM_MPC_H #define AUDIO_STREAM_MPC_H -#include "scene/resources/audio_stream.h" -#include "os/file_access.h" -#include "mpc/mpcdec.h" -#include "os/thread_safe.h" #include "io/resource_loader.h" -//#include "../libmpcdec/decoder.h" -//#include "../libmpcdec/internal.h" +#include "os/file_access.h" +#include "os/thread_safe.h" +#include "scene/resources/audio_stream.h" + +#include class AudioStreamPlaybackMPC : public AudioStreamPlayback { diff --git a/modules/mpc/config.py b/modules/mpc/config.py new file mode 100644 index 00000000000..368e97e152c --- /dev/null +++ b/modules/mpc/config.py @@ -0,0 +1,6 @@ + +def can_build(platform): + return True + +def configure(env): + pass diff --git a/modules/mpc/register_types.cpp b/modules/mpc/register_types.cpp new file mode 100644 index 00000000000..f6a1f59dcab --- /dev/null +++ b/modules/mpc/register_types.cpp @@ -0,0 +1,45 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "register_types.h" + +#include "audio_stream_mpc.h" + +static ResourceFormatLoaderAudioStreamMPC* mpc_stream_loader = NULL; + +void register_mpc_types() { + + mpc_stream_loader=memnew( ResourceFormatLoaderAudioStreamMPC ); + ResourceLoader::add_resource_format_loader(mpc_stream_loader); + ObjectTypeDB::register_type(); +} + +void unregister_mpc_types() { + + memdelete( mpc_stream_loader ); +} diff --git a/modules/mpc/register_types.h b/modules/mpc/register_types.h new file mode 100644 index 00000000000..3d0661ed627 --- /dev/null +++ b/modules/mpc/register_types.h @@ -0,0 +1,30 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_mpc_types(); +void unregister_mpc_types(); diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index fce680b0021..fce57acc3be 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -26,9 +26,9 @@ def get_flags(): return [ ('tools', 'no'), - ('musepack', 'no'), ('squish', 'no'), ('etc1', 'no'), + ('module_mpc_enabled', 'no'), ('module_theora_enabled', 'no'), ] diff --git a/thirdparty/README.md b/thirdparty/README.md index a567eb177de..39809e079c6 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -29,6 +29,19 @@ Files extracted from upstream source: - jpgd.{c,h} +## libmpcdec + +- Upstream: https://www.musepack.net +- Version: SVN somewhere between SV7 and SV8 (r475) +- License: BSD-3-Clause + +Files extracted from upstream source: + +- all .c and .h files in libmpcdec/ +- include/mpc as mpc/ +- COPYING from libmpcdec/ + + ## libogg - Upstream: https://www.xiph.org/ogg diff --git a/thirdparty/libmpcdec/COPYING b/thirdparty/libmpcdec/COPYING new file mode 100644 index 00000000000..10190c014a4 --- /dev/null +++ b/thirdparty/libmpcdec/COPYING @@ -0,0 +1,31 @@ +Copyright (c) 2005, The Musepack Development Team +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of the The Musepack Development Team nor the + names of its contributors may be used to endorse or promote + products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/drivers/mpc/decoder.h b/thirdparty/libmpcdec/decoder.h similarity index 100% rename from drivers/mpc/decoder.h rename to thirdparty/libmpcdec/decoder.h diff --git a/drivers/mpc/huffman.c b/thirdparty/libmpcdec/huffman.c similarity index 100% rename from drivers/mpc/huffman.c rename to thirdparty/libmpcdec/huffman.c diff --git a/drivers/mpc/huffman.h b/thirdparty/libmpcdec/huffman.h similarity index 100% rename from drivers/mpc/huffman.h rename to thirdparty/libmpcdec/huffman.h diff --git a/drivers/mpc/internal.h b/thirdparty/libmpcdec/internal.h similarity index 100% rename from drivers/mpc/internal.h rename to thirdparty/libmpcdec/internal.h diff --git a/drivers/mpc/datatypes.h b/thirdparty/libmpcdec/mpc/datatypes.h similarity index 100% rename from drivers/mpc/datatypes.h rename to thirdparty/libmpcdec/mpc/datatypes.h diff --git a/drivers/mpc/minimax.h b/thirdparty/libmpcdec/mpc/minimax.h similarity index 100% rename from drivers/mpc/minimax.h rename to thirdparty/libmpcdec/mpc/minimax.h diff --git a/drivers/mpc/mpc_types.h b/thirdparty/libmpcdec/mpc/mpc_types.h similarity index 100% rename from drivers/mpc/mpc_types.h rename to thirdparty/libmpcdec/mpc/mpc_types.h diff --git a/drivers/mpc/mpcdec.h b/thirdparty/libmpcdec/mpc/mpcdec.h similarity index 100% rename from drivers/mpc/mpcdec.h rename to thirdparty/libmpcdec/mpc/mpcdec.h diff --git a/drivers/mpc/mpcmath.h b/thirdparty/libmpcdec/mpc/mpcmath.h similarity index 100% rename from drivers/mpc/mpcmath.h rename to thirdparty/libmpcdec/mpc/mpcmath.h diff --git a/drivers/mpc/reader.h b/thirdparty/libmpcdec/mpc/reader.h similarity index 100% rename from drivers/mpc/reader.h rename to thirdparty/libmpcdec/mpc/reader.h diff --git a/drivers/mpc/streaminfo.h b/thirdparty/libmpcdec/mpc/streaminfo.h similarity index 100% rename from drivers/mpc/streaminfo.h rename to thirdparty/libmpcdec/mpc/streaminfo.h diff --git a/drivers/mpc/mpc_bits_reader.c b/thirdparty/libmpcdec/mpc_bits_reader.c similarity index 100% rename from drivers/mpc/mpc_bits_reader.c rename to thirdparty/libmpcdec/mpc_bits_reader.c diff --git a/drivers/mpc/mpc_bits_reader.h b/thirdparty/libmpcdec/mpc_bits_reader.h similarity index 100% rename from drivers/mpc/mpc_bits_reader.h rename to thirdparty/libmpcdec/mpc_bits_reader.h diff --git a/drivers/mpc/mpc_decoder.c b/thirdparty/libmpcdec/mpc_decoder.c similarity index 100% rename from drivers/mpc/mpc_decoder.c rename to thirdparty/libmpcdec/mpc_decoder.c diff --git a/drivers/mpc/mpc_demux.c b/thirdparty/libmpcdec/mpc_demux.c similarity index 100% rename from drivers/mpc/mpc_demux.c rename to thirdparty/libmpcdec/mpc_demux.c diff --git a/drivers/mpc/mpc_reader.c b/thirdparty/libmpcdec/mpc_reader.c similarity index 100% rename from drivers/mpc/mpc_reader.c rename to thirdparty/libmpcdec/mpc_reader.c diff --git a/drivers/mpc/mpcdec_math.h b/thirdparty/libmpcdec/mpcdec_math.h similarity index 100% rename from drivers/mpc/mpcdec_math.h rename to thirdparty/libmpcdec/mpcdec_math.h diff --git a/drivers/mpc/requant.c b/thirdparty/libmpcdec/requant.c similarity index 100% rename from drivers/mpc/requant.c rename to thirdparty/libmpcdec/requant.c diff --git a/drivers/mpc/requant.h b/thirdparty/libmpcdec/requant.h similarity index 100% rename from drivers/mpc/requant.h rename to thirdparty/libmpcdec/requant.h diff --git a/drivers/mpc/streaminfo.c b/thirdparty/libmpcdec/streaminfo.c similarity index 100% rename from drivers/mpc/streaminfo.c rename to thirdparty/libmpcdec/streaminfo.c diff --git a/drivers/mpc/synth_filter.c b/thirdparty/libmpcdec/synth_filter.c similarity index 100% rename from drivers/mpc/synth_filter.c rename to thirdparty/libmpcdec/synth_filter.c From 8981ff8a84e8cc6967afe3a11613e7d72d8ac599 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 13 Oct 2016 20:58:40 +0200 Subject: [PATCH 11/19] rtaudio: Split thirdparty files --- drivers/SCsub | 3 ++- drivers/rtaudio/SCsub | 18 ++++++++++++++++-- drivers/rtaudio/audio_driver_rtaudio.cpp | 2 ++ drivers/rtaudio/audio_driver_rtaudio.h | 3 ++- thirdparty/README.md | 11 +++++++++++ {drivers => thirdparty}/rtaudio/RtAudio.cpp | 0 {drivers => thirdparty}/rtaudio/RtAudio.h | 0 7 files changed, 33 insertions(+), 4 deletions(-) rename {drivers => thirdparty}/rtaudio/RtAudio.cpp (100%) rename {drivers => thirdparty}/rtaudio/RtAudio.h (100%) diff --git a/drivers/SCsub b/drivers/SCsub index 3862a095bab..8538f2745d2 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -18,7 +18,8 @@ SConscript("png/SCsub"); if (env["builtin_zlib"]=="yes"): SConscript("builtin_zlib/SCsub"); -SConscript("rtaudio/SCsub"); +if (env["platform"] == "windows"): + SConscript("rtaudio/SCsub"); SConscript("nrex/SCsub"); SConscript("chibi/SCsub"); if (env["tools"]=="yes"): diff --git a/drivers/rtaudio/SCsub b/drivers/rtaudio/SCsub index 6699efef756..836c84c43c2 100644 --- a/drivers/rtaudio/SCsub +++ b/drivers/rtaudio/SCsub @@ -1,4 +1,18 @@ Import('env') -Export('env'); -env.add_source_files(env.drivers_sources,"*.cpp") +# Not cloning the env, the includes need to be accessible for platform/ + +# Thirdparty source files +thirdparty_dir = "#thirdparty/rtaudio/" +thirdparty_sources = [ + "RtAudio.cpp", +] +thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] + +env.add_source_files(env.drivers_sources, thirdparty_sources) +env.Append(CPPPATH = [thirdparty_dir]) + +# Driver source files +env.add_source_files(env.drivers_sources, "*.cpp") + +Export('env') diff --git a/drivers/rtaudio/audio_driver_rtaudio.cpp b/drivers/rtaudio/audio_driver_rtaudio.cpp index 1bea828680e..fbe7ac68d42 100644 --- a/drivers/rtaudio/audio_driver_rtaudio.cpp +++ b/drivers/rtaudio/audio_driver_rtaudio.cpp @@ -27,8 +27,10 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "audio_driver_rtaudio.h" + #include "globals.h" #include "os/os.h" + #ifdef RTAUDIO_ENABLED const char* AudioDriverRtAudio::get_name() const { diff --git a/drivers/rtaudio/audio_driver_rtaudio.h b/drivers/rtaudio/audio_driver_rtaudio.h index ccb3d005c10..82055f6d177 100644 --- a/drivers/rtaudio/audio_driver_rtaudio.h +++ b/drivers/rtaudio/audio_driver_rtaudio.h @@ -32,7 +32,8 @@ #ifdef RTAUDIO_ENABLED #include "servers/audio/audio_server_sw.h" -#include "drivers/rtaudio/RtAudio.h" + +#include class AudioDriverRtAudio : public AudioDriverSW { diff --git a/thirdparty/README.md b/thirdparty/README.md index 39809e079c6..f3a18df668c 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -147,6 +147,17 @@ Files extracted from upstream source: - all of them: rg_etc1.{cpp,h} +## rtaudio + +- Upstream: http://www.music.mcgill.ca/~gary/rtaudio/ +- Version: 4.1.2 +- License: MIT-like + +Files extracted from upstream source: + +- RtAudio.{cpp,h} + + ## theora - Upstream: https://www.theora.org diff --git a/drivers/rtaudio/RtAudio.cpp b/thirdparty/rtaudio/RtAudio.cpp similarity index 100% rename from drivers/rtaudio/RtAudio.cpp rename to thirdparty/rtaudio/RtAudio.cpp diff --git a/drivers/rtaudio/RtAudio.h b/thirdparty/rtaudio/RtAudio.h similarity index 100% rename from drivers/rtaudio/RtAudio.h rename to thirdparty/rtaudio/RtAudio.h From 8311a78df5cdf257297c1ec7493cb098dc76f010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 13 Oct 2016 21:48:06 +0200 Subject: [PATCH 12/19] squish: Move to a module and split thirdparty lib --- SConstruct | 5 +-- drivers/SCsub | 2 - drivers/register_driver_types.cpp | 13 ------ drivers/squish/SCsub | 23 ---------- modules/squish/SCsub | 27 ++++++++++++ modules/squish/config.py | 10 +++++ .../squish/image_compress_squish.cpp | 5 ++- .../squish/image_compress_squish.h | 3 -- modules/squish/register_types.cpp | 42 +++++++++++++++++++ modules/squish/register_types.h | 32 ++++++++++++++ platform/javascript/detect.py | 3 +- platform/x11/detect.py | 3 ++ thirdparty/README.md | 12 ++++++ {drivers => thirdparty}/squish/alpha.cpp | 3 +- {drivers => thirdparty}/squish/alpha.h | 2 +- {drivers => thirdparty}/squish/clusterfit.cpp | 0 {drivers => thirdparty}/squish/clusterfit.h | 2 +- .../squish/colourblock.cpp | 0 {drivers => thirdparty}/squish/colourblock.h | 2 +- {drivers => thirdparty}/squish/colourfit.cpp | 0 {drivers => thirdparty}/squish/colourfit.h | 2 +- {drivers => thirdparty}/squish/colourset.cpp | 0 {drivers => thirdparty}/squish/colourset.h | 2 +- {drivers => thirdparty}/squish/config.h | 0 {drivers => thirdparty}/squish/maths.cpp | 0 {drivers => thirdparty}/squish/maths.h | 0 {drivers => thirdparty}/squish/rangefit.cpp | 0 {drivers => thirdparty}/squish/rangefit.h | 2 +- {drivers => thirdparty}/squish/simd.h | 0 {drivers => thirdparty}/squish/simd_float.h | 0 {drivers => thirdparty}/squish/simd_sse.h | 0 {drivers => thirdparty}/squish/simd_ve.h | 0 .../squish/singlecolourfit.cpp | 5 ++- .../squish/singlecolourfit.h | 2 +- .../squish/singlecolourlookup.inl | 0 {drivers => thirdparty}/squish/squish.cpp | 2 +- {drivers => thirdparty}/squish/squish.h | 0 37 files changed, 144 insertions(+), 60 deletions(-) delete mode 100644 drivers/squish/SCsub create mode 100644 modules/squish/SCsub create mode 100644 modules/squish/config.py rename {drivers => modules}/squish/image_compress_squish.cpp (99%) rename {drivers => modules}/squish/image_compress_squish.h (99%) create mode 100644 modules/squish/register_types.cpp create mode 100644 modules/squish/register_types.h rename {drivers => thirdparty}/squish/alpha.cpp (99%) rename {drivers => thirdparty}/squish/alpha.h (98%) rename {drivers => thirdparty}/squish/clusterfit.cpp (100%) rename {drivers => thirdparty}/squish/clusterfit.h (98%) rename {drivers => thirdparty}/squish/colourblock.cpp (100%) rename {drivers => thirdparty}/squish/colourblock.h (98%) rename {drivers => thirdparty}/squish/colourfit.cpp (100%) rename {drivers => thirdparty}/squish/colourfit.h (98%) rename {drivers => thirdparty}/squish/colourset.cpp (100%) rename {drivers => thirdparty}/squish/colourset.h (98%) rename {drivers => thirdparty}/squish/config.h (100%) rename {drivers => thirdparty}/squish/maths.cpp (100%) rename {drivers => thirdparty}/squish/maths.h (100%) rename {drivers => thirdparty}/squish/rangefit.cpp (100%) rename {drivers => thirdparty}/squish/rangefit.h (98%) rename {drivers => thirdparty}/squish/simd.h (100%) rename {drivers => thirdparty}/squish/simd_float.h (100%) rename {drivers => thirdparty}/squish/simd_sse.h (100%) rename {drivers => thirdparty}/squish/simd_ve.h (100%) rename {drivers => thirdparty}/squish/singlecolourfit.cpp (98%) rename {drivers => thirdparty}/squish/singlecolourfit.h (98%) rename {drivers => thirdparty}/squish/singlecolourlookup.inl (100%) rename {drivers => thirdparty}/squish/squish.cpp (99%) rename {drivers => thirdparty}/squish/squish.h (100%) diff --git a/SConstruct b/SConstruct index 66c066b141f..c2fba48f919 100644 --- a/SConstruct +++ b/SConstruct @@ -124,7 +124,7 @@ opts.Add('libvorbis','Ogg Vorbis library for vorbis support (system/builtin)','b opts.Add('libtheora','Theora library for theora module (system/builtin)','builtin') opts.Add('opus','Opus and opusfile library for Opus format support: (system/builtin)','builtin') opts.Add('minizip','Build Minizip Archive Support: (yes/no)','yes') -opts.Add('squish','Squish BC Texture Compression in editor (yes/no)','yes') +opts.Add('squish','Squish library for BC Texture Compression in editor (system/builtin)','builtin') opts.Add('freetype','Freetype support in editor','builtin') opts.Add('xml','XML Save/Load support (yes/no)','yes') opts.Add('libpng','libpng library for image loader support (system/builtin)','builtin') @@ -324,9 +324,6 @@ if selected_platform in platform_list: # to test 64 bits compiltion # env.Append(CPPFLAGS=['-m64']) - if (env_base['squish']=='yes'): - env.Append(CPPFLAGS=['-DSQUISH_ENABLED']); - if (env['tools']=='yes'): env.Append(CPPFLAGS=['-DTOOLS_ENABLED']) if (env['disable_3d']=='yes'): diff --git a/drivers/SCsub b/drivers/SCsub index 8538f2745d2..bc0d948f41b 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -25,8 +25,6 @@ SConscript("chibi/SCsub"); if (env["tools"]=="yes"): SConscript("convex_decomp/SCsub"); -if (env["squish"]=="yes" and env["tools"]=="yes"): - SConscript("squish/SCsub"); if (env["freetype"]!="no"): SConscript("freetype/SCsub"); diff --git a/drivers/register_driver_types.cpp b/drivers/register_driver_types.cpp index 1999a9a7c9c..31d53e0185a 100644 --- a/drivers/register_driver_types.cpp +++ b/drivers/register_driver_types.cpp @@ -33,11 +33,6 @@ #include "png/resource_saver_png.h" #include "chibi/event_stream_chibi.h" - -#ifdef TOOLS_ENABLED -#include "squish/image_compress_squish.h" -#endif - #ifdef TOOLS_ENABLED #include "convex_decomp/b2d_decompose.h" #endif @@ -79,14 +74,6 @@ void register_driver_types() { Geometry::_decompose_func=b2d_decompose; #endif -#ifdef TOOLS_ENABLED -#ifdef SQUISH_ENABLED - - Image::set_compress_bc_func(image_compress_squish); - -#endif -#endif - initialize_chibi(); } diff --git a/drivers/squish/SCsub b/drivers/squish/SCsub deleted file mode 100644 index da39dc1ebc0..00000000000 --- a/drivers/squish/SCsub +++ /dev/null @@ -1,23 +0,0 @@ -Import('env') - - -squish_sources=[ -'squish/alpha.cpp', -'squish/clusterfit.cpp', -'squish/colourblock.cpp', -'squish/colourfit.cpp', -'squish/colourset.cpp', -'squish/maths.cpp', -'squish/rangefit.cpp', -'squish/singlecolourfit.cpp', -'squish/squish.cpp', -'squish/image_compress_squish.cpp', -] - - -if (env["tools"]=="yes"): - env.drivers_sources+=squish_sources - -#env.add_source_files(env.drivers_sources, squish_sources) - -Export('env') diff --git a/modules/squish/SCsub b/modules/squish/SCsub new file mode 100644 index 00000000000..072921ef641 --- /dev/null +++ b/modules/squish/SCsub @@ -0,0 +1,27 @@ +Import('env') +Import('env_modules') + +env_squish = env_modules.Clone() + +# Thirdparty source files +if (env["squish"] != "system"): # builtin + thirdparty_dir = "#thirdparty/squish/" + thirdparty_sources = [ + "alpha.cpp", + "clusterfit.cpp", + "colourblock.cpp", + "colourfit.cpp", + "colourset.cpp", + "maths.cpp", + "rangefit.cpp", + "singlecolourfit.cpp", + "squish.cpp", + ] + + thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] + + env_squish.add_source_files(env.modules_sources, thirdparty_sources) + env_squish.Append(CPPPATH = [thirdparty_dir]) + +# Godot source files +env_squish.add_source_files(env.modules_sources, "*.cpp") diff --git a/modules/squish/config.py b/modules/squish/config.py new file mode 100644 index 00000000000..d28d9c702ef --- /dev/null +++ b/modules/squish/config.py @@ -0,0 +1,10 @@ + +def can_build(platform): + return True + +def configure(env): + # Tools only, disabled for non-tools + # TODO: Find a cleaner way to achieve that + if (env["tools"] == "no"): + env["module_squish_enabled"] = "no" + env.disabled_modules.append("squish") diff --git a/drivers/squish/image_compress_squish.cpp b/modules/squish/image_compress_squish.cpp similarity index 99% rename from drivers/squish/image_compress_squish.cpp rename to modules/squish/image_compress_squish.cpp index 95de83d5a5f..ac7c935ceb5 100644 --- a/drivers/squish/image_compress_squish.cpp +++ b/modules/squish/image_compress_squish.cpp @@ -27,9 +27,11 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include "image_compress_squish.h" -#include "squish/squish.h" + #include "print_string.h" +#include + void image_compress_squish(Image *p_image) { int w=p_image->get_width(); @@ -88,4 +90,3 @@ void image_compress_squish(Image *p_image) { p_image->create(p_image->get_width(),p_image->get_height(),p_image->get_mipmaps(),target_format,data); } - diff --git a/drivers/squish/image_compress_squish.h b/modules/squish/image_compress_squish.h similarity index 99% rename from drivers/squish/image_compress_squish.h rename to modules/squish/image_compress_squish.h index 8c37ac2caa6..19dd9006746 100644 --- a/drivers/squish/image_compress_squish.h +++ b/modules/squish/image_compress_squish.h @@ -29,11 +29,8 @@ #ifndef IMAGE_COMPRESS_SQUISH_H #define IMAGE_COMPRESS_SQUISH_H - #include "image.h" - void image_compress_squish(Image *p_image); - #endif // IMAGE_COMPRESS_SQUISH_H diff --git a/modules/squish/register_types.cpp b/modules/squish/register_types.cpp new file mode 100644 index 00000000000..9e9621eb64a --- /dev/null +++ b/modules/squish/register_types.cpp @@ -0,0 +1,42 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "register_types.h" + +#ifdef TOOLS_ENABLED + +#include "image_compress_squish.h" + +void register_squish_types() { + + Image::set_compress_bc_func(image_compress_squish); +} + +void unregister_squish_types() {} + +#endif diff --git a/modules/squish/register_types.h b/modules/squish/register_types.h new file mode 100644 index 00000000000..bbde6a44bf8 --- /dev/null +++ b/modules/squish/register_types.h @@ -0,0 +1,32 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#ifdef TOOLS_ENABLED +void register_squish_types(); +void unregister_squish_types(); +#endif diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index fce57acc3be..19427eff148 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -26,8 +26,7 @@ def get_flags(): return [ ('tools', 'no'), - ('squish', 'no'), - ('etc1', 'no'), + ('module_etc1_enabled', 'no'), ('module_mpc_enabled', 'no'), ('module_theora_enabled', 'no'), ] diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 7c22bd97ffd..90122eef4af 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -154,6 +154,9 @@ def configure(env): if (env["enet"] == "system"): env.ParseConfig('pkg-config libenet --cflags --libs') + if (env["squish"] == "system" and env["tools"] == "yes"): + env.ParseConfig('pkg-config libsquish --cflags --libs') + # Sound and video libraries # Keep the order as it triggers chained dependencies (ogg needed by others, etc.) diff --git a/thirdparty/README.md b/thirdparty/README.md index f3a18df668c..a044e6dcdc5 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -158,6 +158,18 @@ Files extracted from upstream source: - RtAudio.{cpp,h} +## squish + +- Upstream: https://code.google.com/archive/p/libsquish + and patches from https://github.com/Cavewhere/squish +- Version: 1.11 +- License: MIT + +Files extracted from upstream source: + +- all .cpp, .h and .inl files + + ## theora - Upstream: https://www.theora.org diff --git a/drivers/squish/alpha.cpp b/thirdparty/squish/alpha.cpp similarity index 99% rename from drivers/squish/alpha.cpp rename to thirdparty/squish/alpha.cpp index 2ddb7dc28b7..2292081e7ad 100644 --- a/drivers/squish/alpha.cpp +++ b/thirdparty/squish/alpha.cpp @@ -24,6 +24,7 @@ -------------------------------------------------------------------------- */ #include "alpha.h" +#include #include namespace squish { @@ -114,7 +115,7 @@ static int FitCodes( u8 const* rgba, int mask, u8 const* codes, u8* indices ) // find the least error and corresponding index int value = rgba[4*i + 3]; - int least = 2147483647; //INT_MAX + int least = INT_MAX; int index = 0; for( int j = 0; j < 8; ++j ) { diff --git a/drivers/squish/alpha.h b/thirdparty/squish/alpha.h similarity index 98% rename from drivers/squish/alpha.h rename to thirdparty/squish/alpha.h index d56fe4d2c65..57360525516 100644 --- a/drivers/squish/alpha.h +++ b/thirdparty/squish/alpha.h @@ -26,7 +26,7 @@ #ifndef SQUISH_ALPHA_H #define SQUISH_ALPHA_H -#include "squish/squish.h" +#include namespace squish { diff --git a/drivers/squish/clusterfit.cpp b/thirdparty/squish/clusterfit.cpp similarity index 100% rename from drivers/squish/clusterfit.cpp rename to thirdparty/squish/clusterfit.cpp diff --git a/drivers/squish/clusterfit.h b/thirdparty/squish/clusterfit.h similarity index 98% rename from drivers/squish/clusterfit.h rename to thirdparty/squish/clusterfit.h index 2d2b67103b9..17db5d387c2 100644 --- a/drivers/squish/clusterfit.h +++ b/thirdparty/squish/clusterfit.h @@ -27,7 +27,7 @@ #ifndef SQUISH_CLUSTERFIT_H #define SQUISH_CLUSTERFIT_H -#include "squish/squish.h" +#include #include "maths.h" #include "simd.h" #include "colourfit.h" diff --git a/drivers/squish/colourblock.cpp b/thirdparty/squish/colourblock.cpp similarity index 100% rename from drivers/squish/colourblock.cpp rename to thirdparty/squish/colourblock.cpp diff --git a/drivers/squish/colourblock.h b/thirdparty/squish/colourblock.h similarity index 98% rename from drivers/squish/colourblock.h rename to thirdparty/squish/colourblock.h index 8a25b42a63c..df0a47217f4 100644 --- a/drivers/squish/colourblock.h +++ b/thirdparty/squish/colourblock.h @@ -26,7 +26,7 @@ #ifndef SQUISH_COLOURBLOCK_H #define SQUISH_COLOURBLOCK_H -#include "squish/squish.h" +#include #include "maths.h" namespace squish { diff --git a/drivers/squish/colourfit.cpp b/thirdparty/squish/colourfit.cpp similarity index 100% rename from drivers/squish/colourfit.cpp rename to thirdparty/squish/colourfit.cpp diff --git a/drivers/squish/colourfit.h b/thirdparty/squish/colourfit.h similarity index 98% rename from drivers/squish/colourfit.h rename to thirdparty/squish/colourfit.h index d048b487092..a2d0559a32c 100644 --- a/drivers/squish/colourfit.h +++ b/thirdparty/squish/colourfit.h @@ -26,7 +26,7 @@ #ifndef SQUISH_COLOURFIT_H #define SQUISH_COLOURFIT_H -#include "squish/squish.h" +#include #include "maths.h" namespace squish { diff --git a/drivers/squish/colourset.cpp b/thirdparty/squish/colourset.cpp similarity index 100% rename from drivers/squish/colourset.cpp rename to thirdparty/squish/colourset.cpp diff --git a/drivers/squish/colourset.h b/thirdparty/squish/colourset.h similarity index 98% rename from drivers/squish/colourset.h rename to thirdparty/squish/colourset.h index 803e787f5b4..dcf56ae28e8 100644 --- a/drivers/squish/colourset.h +++ b/thirdparty/squish/colourset.h @@ -26,7 +26,7 @@ #ifndef SQUISH_COLOURSET_H #define SQUISH_COLOURSET_H -#include "squish/squish.h" +#include #include "maths.h" namespace squish { diff --git a/drivers/squish/config.h b/thirdparty/squish/config.h similarity index 100% rename from drivers/squish/config.h rename to thirdparty/squish/config.h diff --git a/drivers/squish/maths.cpp b/thirdparty/squish/maths.cpp similarity index 100% rename from drivers/squish/maths.cpp rename to thirdparty/squish/maths.cpp diff --git a/drivers/squish/maths.h b/thirdparty/squish/maths.h similarity index 100% rename from drivers/squish/maths.h rename to thirdparty/squish/maths.h diff --git a/drivers/squish/rangefit.cpp b/thirdparty/squish/rangefit.cpp similarity index 100% rename from drivers/squish/rangefit.cpp rename to thirdparty/squish/rangefit.cpp diff --git a/drivers/squish/rangefit.h b/thirdparty/squish/rangefit.h similarity index 98% rename from drivers/squish/rangefit.h rename to thirdparty/squish/rangefit.h index 9d74f9c128d..795201993aa 100644 --- a/drivers/squish/rangefit.h +++ b/thirdparty/squish/rangefit.h @@ -26,7 +26,7 @@ #ifndef SQUISH_RANGEFIT_H #define SQUISH_RANGEFIT_H -#include "squish/squish.h" +#include #include "colourfit.h" #include "maths.h" diff --git a/drivers/squish/simd.h b/thirdparty/squish/simd.h similarity index 100% rename from drivers/squish/simd.h rename to thirdparty/squish/simd.h diff --git a/drivers/squish/simd_float.h b/thirdparty/squish/simd_float.h similarity index 100% rename from drivers/squish/simd_float.h rename to thirdparty/squish/simd_float.h diff --git a/drivers/squish/simd_sse.h b/thirdparty/squish/simd_sse.h similarity index 100% rename from drivers/squish/simd_sse.h rename to thirdparty/squish/simd_sse.h diff --git a/drivers/squish/simd_ve.h b/thirdparty/squish/simd_ve.h similarity index 100% rename from drivers/squish/simd_ve.h rename to thirdparty/squish/simd_ve.h diff --git a/drivers/squish/singlecolourfit.cpp b/thirdparty/squish/singlecolourfit.cpp similarity index 98% rename from drivers/squish/singlecolourfit.cpp rename to thirdparty/squish/singlecolourfit.cpp index ac8be1ad722..bd02cc41abe 100644 --- a/drivers/squish/singlecolourfit.cpp +++ b/thirdparty/squish/singlecolourfit.cpp @@ -26,6 +26,7 @@ #include "singlecolourfit.h" #include "colourset.h" #include "colourblock.h" +#include namespace squish { @@ -68,7 +69,7 @@ SingleColourFit::SingleColourFit( ColourSet const* colours, int flags ) m_colour[2] = ( u8 )FloatToInt( 255.0f*values->Z(), 255 ); // initialise the best error - m_besterror = 2147483647; //INT_MAX + m_besterror = INT_MAX; } void SingleColourFit::Compress3( void* block ) @@ -130,7 +131,7 @@ void SingleColourFit::Compress4( void* block ) void SingleColourFit::ComputeEndPoints( SingleColourLookup const* const* lookups ) { // check each index combination (endpoint or intermediate) - m_error = 2147483647; //INT_MAX + m_error = INT_MAX; for( int index = 0; index < 2; ++index ) { // check the error for this codebook index diff --git a/drivers/squish/singlecolourfit.h b/thirdparty/squish/singlecolourfit.h similarity index 98% rename from drivers/squish/singlecolourfit.h rename to thirdparty/squish/singlecolourfit.h index c8dce2a5a06..0388fda0287 100644 --- a/drivers/squish/singlecolourfit.h +++ b/thirdparty/squish/singlecolourfit.h @@ -26,7 +26,7 @@ #ifndef SQUISH_SINGLECOLOURFIT_H #define SQUISH_SINGLECOLOURFIT_H -#include "squish/squish.h" +#include #include "colourfit.h" namespace squish { diff --git a/drivers/squish/singlecolourlookup.inl b/thirdparty/squish/singlecolourlookup.inl similarity index 100% rename from drivers/squish/singlecolourlookup.inl rename to thirdparty/squish/singlecolourlookup.inl diff --git a/drivers/squish/squish.cpp b/thirdparty/squish/squish.cpp similarity index 99% rename from drivers/squish/squish.cpp rename to thirdparty/squish/squish.cpp index 400a3b0c46e..bbe89bfcfe5 100644 --- a/drivers/squish/squish.cpp +++ b/thirdparty/squish/squish.cpp @@ -23,7 +23,7 @@ -------------------------------------------------------------------------- */ -#include "squish/squish.h" +#include #include "colourset.h" #include "maths.h" #include "rangefit.h" diff --git a/drivers/squish/squish.h b/thirdparty/squish/squish.h similarity index 100% rename from drivers/squish/squish.h rename to thirdparty/squish/squish.h From 249836e530f51cbb2f8692a479a35900c425fdd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 13 Oct 2016 21:52:16 +0200 Subject: [PATCH 13/19] squish: Update to upstream 1.14 Sources are untouched, tarball from https://sourceforge.net/projects/libsquish --- thirdparty/README.md | 5 +- thirdparty/squish/alpha.cpp | 583 +++--- thirdparty/squish/alpha.h | 40 +- thirdparty/squish/clusterfit.cpp | 667 ++++--- thirdparty/squish/clusterfit.h | 68 +- thirdparty/squish/colourblock.cpp | 334 ++-- thirdparty/squish/colourblock.h | 40 +- thirdparty/squish/colourfit.cpp | 66 +- thirdparty/squish/colourfit.h | 55 +- thirdparty/squish/colourset.cpp | 194 +- thirdparty/squish/colourset.h | 62 +- thirdparty/squish/config.h | 40 +- thirdparty/squish/maths.cpp | 384 ++-- thirdparty/squish/maths.h | 372 ++-- thirdparty/squish/rangefit.cpp | 337 ++-- thirdparty/squish/rangefit.h | 58 +- thirdparty/squish/simd.h | 38 +- thirdparty/squish/simd_float.h | 312 ++-- thirdparty/squish/simd_sse.h | 282 +-- thirdparty/squish/simd_ve.h | 280 +-- thirdparty/squish/singlecolourfit.cpp | 249 ++- thirdparty/squish/singlecolourfit.h | 66 +- thirdparty/squish/singlecolourlookup.inl | 2080 +++++++++++----------- thirdparty/squish/squish.cpp | 536 ++++-- thirdparty/squish/squish.h | 407 +++-- 25 files changed, 3912 insertions(+), 3643 deletions(-) diff --git a/thirdparty/README.md b/thirdparty/README.md index a044e6dcdc5..f5a70e85b37 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -160,9 +160,8 @@ Files extracted from upstream source: ## squish -- Upstream: https://code.google.com/archive/p/libsquish - and patches from https://github.com/Cavewhere/squish -- Version: 1.11 +- Upstream: https://sourceforge.net/projects/libsquish +- Version: 1.14 - License: MIT Files extracted from upstream source: diff --git a/thirdparty/squish/alpha.cpp b/thirdparty/squish/alpha.cpp index 2292081e7ad..7039c1a3b8e 100644 --- a/thirdparty/squish/alpha.cpp +++ b/thirdparty/squish/alpha.cpp @@ -1,29 +1,30 @@ /* ----------------------------------------------------------------------------- - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------- */ - + #include "alpha.h" + #include #include @@ -31,319 +32,319 @@ namespace squish { static int FloatToInt( float a, int limit ) { - // use ANSI round-to-zero behaviour to get round-to-nearest - int i = ( int )( a + 0.5f ); + // use ANSI round-to-zero behaviour to get round-to-nearest + int i = ( int )( a + 0.5f ); - // clamp to the limit - if( i < 0 ) - i = 0; - else if( i > limit ) - i = limit; + // clamp to the limit + if( i < 0 ) + i = 0; + else if( i > limit ) + i = limit; - // done - return i; + // done + return i; } void CompressAlphaDxt3( u8 const* rgba, int mask, void* block ) { - u8* bytes = reinterpret_cast< u8* >( block ); - - // quantise and pack the alpha values pairwise - for( int i = 0; i < 8; ++i ) - { - // quantise down to 4 bits - float alpha1 = ( float )rgba[8*i + 3] * ( 15.0f/255.0f ); - float alpha2 = ( float )rgba[8*i + 7] * ( 15.0f/255.0f ); - int quant1 = FloatToInt( alpha1, 15 ); - int quant2 = FloatToInt( alpha2, 15 ); - - // set alpha to zero where masked - int bit1 = 1 << ( 2*i ); - int bit2 = 1 << ( 2*i + 1 ); - if( ( mask & bit1 ) == 0 ) - quant1 = 0; - if( ( mask & bit2 ) == 0 ) - quant2 = 0; + u8* bytes = reinterpret_cast< u8* >( block ); - // pack into the byte - bytes[i] = ( u8 )( quant1 | ( quant2 << 4 ) ); - } + // quantise and pack the alpha values pairwise + for( int i = 0; i < 8; ++i ) + { + // quantise down to 4 bits + float alpha1 = ( float )rgba[8*i + 3] * ( 15.0f/255.0f ); + float alpha2 = ( float )rgba[8*i + 7] * ( 15.0f/255.0f ); + int quant1 = FloatToInt( alpha1, 15 ); + int quant2 = FloatToInt( alpha2, 15 ); + + // set alpha to zero where masked + int bit1 = 1 << ( 2*i ); + int bit2 = 1 << ( 2*i + 1 ); + if( ( mask & bit1 ) == 0 ) + quant1 = 0; + if( ( mask & bit2 ) == 0 ) + quant2 = 0; + + // pack into the byte + bytes[i] = ( u8 )( quant1 | ( quant2 << 4 ) ); + } } void DecompressAlphaDxt3( u8* rgba, void const* block ) { - u8 const* bytes = reinterpret_cast< u8 const* >( block ); - - // unpack the alpha values pairwise - for( int i = 0; i < 8; ++i ) - { - // quantise down to 4 bits - u8 quant = bytes[i]; - - // unpack the values - u8 lo = quant & 0x0f; - u8 hi = quant & 0xf0; + u8 const* bytes = reinterpret_cast< u8 const* >( block ); - // convert back up to bytes - rgba[8*i + 3] = lo | ( lo << 4 ); - rgba[8*i + 7] = hi | ( hi >> 4 ); - } + // unpack the alpha values pairwise + for( int i = 0; i < 8; ++i ) + { + // quantise down to 4 bits + u8 quant = bytes[i]; + + // unpack the values + u8 lo = quant & 0x0f; + u8 hi = quant & 0xf0; + + // convert back up to bytes + rgba[8*i + 3] = lo | ( lo << 4 ); + rgba[8*i + 7] = hi | ( hi >> 4 ); + } } static void FixRange( int& min, int& max, int steps ) { - if( max - min < steps ) - max = std::min( min + steps, 255 ); - if( max - min < steps ) - min = std::max( 0, max - steps ); + if( max - min < steps ) + max = std::min( min + steps, 255 ); + if( max - min < steps ) + min = std::max( 0, max - steps ); } static int FitCodes( u8 const* rgba, int mask, u8 const* codes, u8* indices ) { - // fit each alpha value to the codebook - int err = 0; - for( int i = 0; i < 16; ++i ) - { - // check this pixel is valid - int bit = 1 << i; - if( ( mask & bit ) == 0 ) - { - // use the first code - indices[i] = 0; - continue; - } - - // find the least error and corresponding index - int value = rgba[4*i + 3]; - int least = INT_MAX; - int index = 0; - for( int j = 0; j < 8; ++j ) - { - // get the squared error from this code - int dist = ( int )value - ( int )codes[j]; - dist *= dist; - - // compare with the best so far - if( dist < least ) - { - least = dist; - index = j; - } - } - - // save this index and accumulate the error - indices[i] = ( u8 )index; - err += least; - } - - // return the total error - return err; + // fit each alpha value to the codebook + int err = 0; + for( int i = 0; i < 16; ++i ) + { + // check this pixel is valid + int bit = 1 << i; + if( ( mask & bit ) == 0 ) + { + // use the first code + indices[i] = 0; + continue; + } + + // find the least error and corresponding index + int value = rgba[4*i + 3]; + int least = INT_MAX; + int index = 0; + for( int j = 0; j < 8; ++j ) + { + // get the squared error from this code + int dist = ( int )value - ( int )codes[j]; + dist *= dist; + + // compare with the best so far + if( dist < least ) + { + least = dist; + index = j; + } + } + + // save this index and accumulate the error + indices[i] = ( u8 )index; + err += least; + } + + // return the total error + return err; } static void WriteAlphaBlock( int alpha0, int alpha1, u8 const* indices, void* block ) { - u8* bytes = reinterpret_cast< u8* >( block ); - - // write the first two bytes - bytes[0] = ( u8 )alpha0; - bytes[1] = ( u8 )alpha1; - - // pack the indices with 3 bits each - u8* dest = bytes + 2; - u8 const* src = indices; - for( int i = 0; i < 2; ++i ) - { - // pack 8 3-bit values - int value = 0; - for( int j = 0; j < 8; ++j ) - { - int index = *src++; - value |= ( index << 3*j ); - } - - // store in 3 bytes - for( int j = 0; j < 3; ++j ) - { - int byte = ( value >> 8*j ) & 0xff; - *dest++ = ( u8 )byte; - } - } + u8* bytes = reinterpret_cast< u8* >( block ); + + // write the first two bytes + bytes[0] = ( u8 )alpha0; + bytes[1] = ( u8 )alpha1; + + // pack the indices with 3 bits each + u8* dest = bytes + 2; + u8 const* src = indices; + for( int i = 0; i < 2; ++i ) + { + // pack 8 3-bit values + int value = 0; + for( int j = 0; j < 8; ++j ) + { + int index = *src++; + value |= ( index << 3*j ); + } + + // store in 3 bytes + for( int j = 0; j < 3; ++j ) + { + int byte = ( value >> 8*j ) & 0xff; + *dest++ = ( u8 )byte; + } + } } static void WriteAlphaBlock5( int alpha0, int alpha1, u8 const* indices, void* block ) { - // check the relative values of the endpoints - if( alpha0 > alpha1 ) - { - // swap the indices - u8 swapped[16]; - for( int i = 0; i < 16; ++i ) - { - u8 index = indices[i]; - if( index == 0 ) - swapped[i] = 1; - else if( index == 1 ) - swapped[i] = 0; - else if( index <= 5 ) - swapped[i] = 7 - index; - else - swapped[i] = index; - } - - // write the block - WriteAlphaBlock( alpha1, alpha0, swapped, block ); - } - else - { - // write the block - WriteAlphaBlock( alpha0, alpha1, indices, block ); - } + // check the relative values of the endpoints + if( alpha0 > alpha1 ) + { + // swap the indices + u8 swapped[16]; + for( int i = 0; i < 16; ++i ) + { + u8 index = indices[i]; + if( index == 0 ) + swapped[i] = 1; + else if( index == 1 ) + swapped[i] = 0; + else if( index <= 5 ) + swapped[i] = 7 - index; + else + swapped[i] = index; + } + + // write the block + WriteAlphaBlock( alpha1, alpha0, swapped, block ); + } + else + { + // write the block + WriteAlphaBlock( alpha0, alpha1, indices, block ); + } } static void WriteAlphaBlock7( int alpha0, int alpha1, u8 const* indices, void* block ) { - // check the relative values of the endpoints - if( alpha0 < alpha1 ) - { - // swap the indices - u8 swapped[16]; - for( int i = 0; i < 16; ++i ) - { - u8 index = indices[i]; - if( index == 0 ) - swapped[i] = 1; - else if( index == 1 ) - swapped[i] = 0; - else - swapped[i] = 9 - index; - } - - // write the block - WriteAlphaBlock( alpha1, alpha0, swapped, block ); - } - else - { - // write the block - WriteAlphaBlock( alpha0, alpha1, indices, block ); - } + // check the relative values of the endpoints + if( alpha0 < alpha1 ) + { + // swap the indices + u8 swapped[16]; + for( int i = 0; i < 16; ++i ) + { + u8 index = indices[i]; + if( index == 0 ) + swapped[i] = 1; + else if( index == 1 ) + swapped[i] = 0; + else + swapped[i] = 9 - index; + } + + // write the block + WriteAlphaBlock( alpha1, alpha0, swapped, block ); + } + else + { + // write the block + WriteAlphaBlock( alpha0, alpha1, indices, block ); + } } void CompressAlphaDxt5( u8 const* rgba, int mask, void* block ) { - // get the range for 5-alpha and 7-alpha interpolation - int min5 = 255; - int max5 = 0; - int min7 = 255; - int max7 = 0; - for( int i = 0; i < 16; ++i ) - { - // check this pixel is valid - int bit = 1 << i; - if( ( mask & bit ) == 0 ) - continue; + // get the range for 5-alpha and 7-alpha interpolation + int min5 = 255; + int max5 = 0; + int min7 = 255; + int max7 = 0; + for( int i = 0; i < 16; ++i ) + { + // check this pixel is valid + int bit = 1 << i; + if( ( mask & bit ) == 0 ) + continue; - // incorporate into the min/max - int value = rgba[4*i + 3]; - if( value < min7 ) - min7 = value; - if( value > max7 ) - max7 = value; - if( value != 0 && value < min5 ) - min5 = value; - if( value != 255 && value > max5 ) - max5 = value; - } - - // handle the case that no valid range was found - if( min5 > max5 ) - min5 = max5; - if( min7 > max7 ) - min7 = max7; - - // fix the range to be the minimum in each case - FixRange( min5, max5, 5 ); - FixRange( min7, max7, 7 ); - - // set up the 5-alpha code book - u8 codes5[8]; - codes5[0] = ( u8 )min5; - codes5[1] = ( u8 )max5; - for( int i = 1; i < 5; ++i ) - codes5[1 + i] = ( u8 )( ( ( 5 - i )*min5 + i*max5 )/5 ); - codes5[6] = 0; - codes5[7] = 255; - - // set up the 7-alpha code book - u8 codes7[8]; - codes7[0] = ( u8 )min7; - codes7[1] = ( u8 )max7; - for( int i = 1; i < 7; ++i ) - codes7[1 + i] = ( u8 )( ( ( 7 - i )*min7 + i*max7 )/7 ); - - // fit the data to both code books - u8 indices5[16]; - u8 indices7[16]; - int err5 = FitCodes( rgba, mask, codes5, indices5 ); - int err7 = FitCodes( rgba, mask, codes7, indices7 ); - - // save the block with least error - if( err5 <= err7 ) - WriteAlphaBlock5( min5, max5, indices5, block ); - else - WriteAlphaBlock7( min7, max7, indices7, block ); + // incorporate into the min/max + int value = rgba[4*i + 3]; + if( value < min7 ) + min7 = value; + if( value > max7 ) + max7 = value; + if( value != 0 && value < min5 ) + min5 = value; + if( value != 255 && value > max5 ) + max5 = value; + } + + // handle the case that no valid range was found + if( min5 > max5 ) + min5 = max5; + if( min7 > max7 ) + min7 = max7; + + // fix the range to be the minimum in each case + FixRange( min5, max5, 5 ); + FixRange( min7, max7, 7 ); + + // set up the 5-alpha code book + u8 codes5[8]; + codes5[0] = ( u8 )min5; + codes5[1] = ( u8 )max5; + for( int i = 1; i < 5; ++i ) + codes5[1 + i] = ( u8 )( ( ( 5 - i )*min5 + i*max5 )/5 ); + codes5[6] = 0; + codes5[7] = 255; + + // set up the 7-alpha code book + u8 codes7[8]; + codes7[0] = ( u8 )min7; + codes7[1] = ( u8 )max7; + for( int i = 1; i < 7; ++i ) + codes7[1 + i] = ( u8 )( ( ( 7 - i )*min7 + i*max7 )/7 ); + + // fit the data to both code books + u8 indices5[16]; + u8 indices7[16]; + int err5 = FitCodes( rgba, mask, codes5, indices5 ); + int err7 = FitCodes( rgba, mask, codes7, indices7 ); + + // save the block with least error + if( err5 <= err7 ) + WriteAlphaBlock5( min5, max5, indices5, block ); + else + WriteAlphaBlock7( min7, max7, indices7, block ); } void DecompressAlphaDxt5( u8* rgba, void const* block ) { - // get the two alpha values - u8 const* bytes = reinterpret_cast< u8 const* >( block ); - int alpha0 = bytes[0]; - int alpha1 = bytes[1]; - - // compare the values to build the codebook - u8 codes[8]; - codes[0] = ( u8 )alpha0; - codes[1] = ( u8 )alpha1; - if( alpha0 <= alpha1 ) - { - // use 5-alpha codebook - for( int i = 1; i < 5; ++i ) - codes[1 + i] = ( u8 )( ( ( 5 - i )*alpha0 + i*alpha1 )/5 ); - codes[6] = 0; - codes[7] = 255; - } - else - { - // use 7-alpha codebook - for( int i = 1; i < 7; ++i ) - codes[1 + i] = ( u8 )( ( ( 7 - i )*alpha0 + i*alpha1 )/7 ); - } - - // decode the indices - u8 indices[16]; - u8 const* src = bytes + 2; - u8* dest = indices; - for( int i = 0; i < 2; ++i ) - { - // grab 3 bytes - int value = 0; - for( int j = 0; j < 3; ++j ) - { - int byte = *src++; - value |= ( byte << 8*j ); - } - - // unpack 8 3-bit values from it - for( int j = 0; j < 8; ++j ) - { - int index = ( value >> 3*j ) & 0x7; - *dest++ = ( u8 )index; - } - } - - // write out the indexed codebook values - for( int i = 0; i < 16; ++i ) - rgba[4*i + 3] = codes[indices[i]]; + // get the two alpha values + u8 const* bytes = reinterpret_cast< u8 const* >( block ); + int alpha0 = bytes[0]; + int alpha1 = bytes[1]; + + // compare the values to build the codebook + u8 codes[8]; + codes[0] = ( u8 )alpha0; + codes[1] = ( u8 )alpha1; + if( alpha0 <= alpha1 ) + { + // use 5-alpha codebook + for( int i = 1; i < 5; ++i ) + codes[1 + i] = ( u8 )( ( ( 5 - i )*alpha0 + i*alpha1 )/5 ); + codes[6] = 0; + codes[7] = 255; + } + else + { + // use 7-alpha codebook + for( int i = 1; i < 7; ++i ) + codes[1 + i] = ( u8 )( ( ( 7 - i )*alpha0 + i*alpha1 )/7 ); + } + + // decode the indices + u8 indices[16]; + u8 const* src = bytes + 2; + u8* dest = indices; + for( int i = 0; i < 2; ++i ) + { + // grab 3 bytes + int value = 0; + for( int j = 0; j < 3; ++j ) + { + int byte = *src++; + value |= ( byte << 8*j ); + } + + // unpack 8 3-bit values from it + for( int j = 0; j < 8; ++j ) + { + int index = ( value >> 3*j ) & 0x7; + *dest++ = ( u8 )index; + } + } + + // write out the indexed codebook values + for( int i = 0; i < 16; ++i ) + rgba[4*i + 3] = codes[indices[i]]; } } // namespace squish diff --git a/thirdparty/squish/alpha.h b/thirdparty/squish/alpha.h index 57360525516..a1fffd4049b 100644 --- a/thirdparty/squish/alpha.h +++ b/thirdparty/squish/alpha.h @@ -1,32 +1,32 @@ /* ----------------------------------------------------------------------------- - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------- */ - + #ifndef SQUISH_ALPHA_H #define SQUISH_ALPHA_H -#include +#include "squish.h" namespace squish { diff --git a/thirdparty/squish/clusterfit.cpp b/thirdparty/squish/clusterfit.cpp index afea84880c8..1610ecb5d86 100644 --- a/thirdparty/squish/clusterfit.cpp +++ b/thirdparty/squish/clusterfit.cpp @@ -1,29 +1,29 @@ /* ----------------------------------------------------------------------------- - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Copyright (c) 2007 Ignacio Castano icastano@nvidia.com + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + Copyright (c) 2007 Ignacio Castano icastano@nvidia.com - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------- */ - + #include "clusterfit.h" #include "colourset.h" #include "colourblock.h" @@ -31,363 +31,362 @@ namespace squish { -ClusterFit::ClusterFit( ColourSet const* colours, int flags ) +ClusterFit::ClusterFit( ColourSet const* colours, int flags, float* metric ) : ColourFit( colours, flags ) { - // set the iteration count - m_iterationCount = ( m_flags & kColourIterativeClusterFit ) ? kMaxIterations : 1; + // set the iteration count + m_iterationCount = ( m_flags & kColourIterativeClusterFit ) ? kMaxIterations : 1; - // initialise the best error - m_besterror = VEC4_CONST( FLT_MAX ); + // initialise the metric (old perceptual = 0.2126f, 0.7152f, 0.0722f) + if( metric ) + m_metric = Vec4( metric[0], metric[1], metric[2], 1.0f ); + else + m_metric = VEC4_CONST( 1.0f ); - // initialise the metric - bool perceptual = ( ( m_flags & kColourMetricPerceptual ) != 0 ); - if( perceptual ) - m_metric = Vec4( 0.2126f, 0.7152f, 0.0722f, 0.0f ); - else - m_metric = VEC4_CONST( 1.0f ); + // initialise the best error + m_besterror = VEC4_CONST( FLT_MAX ); - // cache some values - int const count = m_colours->GetCount(); - Vec3 const* values = m_colours->GetPoints(); + // cache some values + int const count = m_colours->GetCount(); + Vec3 const* values = m_colours->GetPoints(); - // get the covariance matrix - Sym3x3 covariance = ComputeWeightedCovariance( count, values, m_colours->GetWeights() ); - - // compute the principle component - m_principle = ComputePrincipleComponent( covariance ); + // get the covariance matrix + Sym3x3 covariance = ComputeWeightedCovariance( count, values, m_colours->GetWeights() ); + + // compute the principle component + m_principle = ComputePrincipleComponent( covariance ); } bool ClusterFit::ConstructOrdering( Vec3 const& axis, int iteration ) { - // cache some values - int const count = m_colours->GetCount(); - Vec3 const* values = m_colours->GetPoints(); + // cache some values + int const count = m_colours->GetCount(); + Vec3 const* values = m_colours->GetPoints(); - // build the list of dot products - float dps[16]; - u8* order = ( u8* )m_order + 16*iteration; - for( int i = 0; i < count; ++i ) - { - dps[i] = Dot( values[i], axis ); - order[i] = ( u8 )i; - } - - // stable sort using them - for( int i = 0; i < count; ++i ) - { - for( int j = i; j > 0 && dps[j] < dps[j - 1]; --j ) - { - std::swap( dps[j], dps[j - 1] ); - std::swap( order[j], order[j - 1] ); - } - } - - // check this ordering is unique - for( int it = 0; it < iteration; ++it ) - { - u8 const* prev = ( u8* )m_order + 16*it; - bool same = true; - for( int i = 0; i < count; ++i ) - { - if( order[i] != prev[i] ) - { - same = false; - break; - } - } - if( same ) - return false; - } - - // copy the ordering and weight all the points - Vec3 const* unweighted = m_colours->GetPoints(); - float const* weights = m_colours->GetWeights(); - m_xsum_wsum = VEC4_CONST( 0.0f ); - for( int i = 0; i < count; ++i ) - { - int j = order[i]; - Vec4 p( unweighted[j].X(), unweighted[j].Y(), unweighted[j].Z(), 1.0f ); - Vec4 w( weights[j] ); - Vec4 x = p*w; - m_points_weights[i] = x; - m_xsum_wsum += x; - } - return true; + // build the list of dot products + float dps[16]; + u8* order = ( u8* )m_order + 16*iteration; + for( int i = 0; i < count; ++i ) + { + dps[i] = Dot( values[i], axis ); + order[i] = ( u8 )i; + } + + // stable sort using them + for( int i = 0; i < count; ++i ) + { + for( int j = i; j > 0 && dps[j] < dps[j - 1]; --j ) + { + std::swap( dps[j], dps[j - 1] ); + std::swap( order[j], order[j - 1] ); + } + } + + // check this ordering is unique + for( int it = 0; it < iteration; ++it ) + { + u8 const* prev = ( u8* )m_order + 16*it; + bool same = true; + for( int i = 0; i < count; ++i ) + { + if( order[i] != prev[i] ) + { + same = false; + break; + } + } + if( same ) + return false; + } + + // copy the ordering and weight all the points + Vec3 const* unweighted = m_colours->GetPoints(); + float const* weights = m_colours->GetWeights(); + m_xsum_wsum = VEC4_CONST( 0.0f ); + for( int i = 0; i < count; ++i ) + { + int j = order[i]; + Vec4 p( unweighted[j].X(), unweighted[j].Y(), unweighted[j].Z(), 1.0f ); + Vec4 w( weights[j] ); + Vec4 x = p*w; + m_points_weights[i] = x; + m_xsum_wsum += x; + } + return true; } void ClusterFit::Compress3( void* block ) { - // declare variables - int const count = m_colours->GetCount(); - Vec4 const two = VEC4_CONST( 2.0 ); - Vec4 const one = VEC4_CONST( 1.0f ); - Vec4 const half_half2( 0.5f, 0.5f, 0.5f, 0.25f ); - Vec4 const zero = VEC4_CONST( 0.0f ); - Vec4 const half = VEC4_CONST( 0.5f ); - Vec4 const grid( 31.0f, 63.0f, 31.0f, 0.0f ); - Vec4 const gridrcp( 1.0f/31.0f, 1.0f/63.0f, 1.0f/31.0f, 0.0f ); + // declare variables + int const count = m_colours->GetCount(); + Vec4 const two = VEC4_CONST( 2.0 ); + Vec4 const one = VEC4_CONST( 1.0f ); + Vec4 const half_half2( 0.5f, 0.5f, 0.5f, 0.25f ); + Vec4 const zero = VEC4_CONST( 0.0f ); + Vec4 const half = VEC4_CONST( 0.5f ); + Vec4 const grid( 31.0f, 63.0f, 31.0f, 0.0f ); + Vec4 const gridrcp( 1.0f/31.0f, 1.0f/63.0f, 1.0f/31.0f, 0.0f ); - // prepare an ordering using the principle axis - ConstructOrdering( m_principle, 0 ); - - // check all possible clusters and iterate on the total order - Vec4 beststart = VEC4_CONST( 0.0f ); - Vec4 bestend = VEC4_CONST( 0.0f ); - Vec4 besterror = m_besterror; - u8 bestindices[16]; - int bestiteration = 0; - int besti = 0, bestj = 0; - - // loop over iterations (we avoid the case that all points in first or last cluster) - for( int iterationIndex = 0;; ) - { - // first cluster [0,i) is at the start - Vec4 part0 = VEC4_CONST( 0.0f ); - for( int i = 0; i < count; ++i ) - { - // second cluster [i,j) is half along - Vec4 part1 = ( i == 0 ) ? m_points_weights[0] : VEC4_CONST( 0.0f ); - int jmin = ( i == 0 ) ? 1 : i; - for( int j = jmin;; ) - { - // last cluster [j,count) is at the end - Vec4 part2 = m_xsum_wsum - part1 - part0; - - // compute least squares terms directly - Vec4 alphax_sum = MultiplyAdd( part1, half_half2, part0 ); - Vec4 alpha2_sum = alphax_sum.SplatW(); + // prepare an ordering using the principle axis + ConstructOrdering( m_principle, 0 ); - Vec4 betax_sum = MultiplyAdd( part1, half_half2, part2 ); - Vec4 beta2_sum = betax_sum.SplatW(); + // check all possible clusters and iterate on the total order + Vec4 beststart = VEC4_CONST( 0.0f ); + Vec4 bestend = VEC4_CONST( 0.0f ); + Vec4 besterror = m_besterror; + u8 bestindices[16]; + int bestiteration = 0; + int besti = 0, bestj = 0; - Vec4 alphabeta_sum = ( part1*half_half2 ).SplatW(); + // loop over iterations (we avoid the case that all points in first or last cluster) + for( int iterationIndex = 0;; ) + { + // first cluster [0,i) is at the start + Vec4 part0 = VEC4_CONST( 0.0f ); + for( int i = 0; i < count; ++i ) + { + // second cluster [i,j) is half along + Vec4 part1 = ( i == 0 ) ? m_points_weights[0] : VEC4_CONST( 0.0f ); + int jmin = ( i == 0 ) ? 1 : i; + for( int j = jmin;; ) + { + // last cluster [j,count) is at the end + Vec4 part2 = m_xsum_wsum - part1 - part0; - // compute the least-squares optimal points - Vec4 factor = Reciprocal( NegativeMultiplySubtract( alphabeta_sum, alphabeta_sum, alpha2_sum*beta2_sum ) ); - Vec4 a = NegativeMultiplySubtract( betax_sum, alphabeta_sum, alphax_sum*beta2_sum )*factor; - Vec4 b = NegativeMultiplySubtract( alphax_sum, alphabeta_sum, betax_sum*alpha2_sum )*factor; + // compute least squares terms directly + Vec4 alphax_sum = MultiplyAdd( part1, half_half2, part0 ); + Vec4 alpha2_sum = alphax_sum.SplatW(); - // clamp to the grid - a = Min( one, Max( zero, a ) ); - b = Min( one, Max( zero, b ) ); - a = Truncate( MultiplyAdd( grid, a, half ) )*gridrcp; - b = Truncate( MultiplyAdd( grid, b, half ) )*gridrcp; - - // compute the error (we skip the constant xxsum) - Vec4 e1 = MultiplyAdd( a*a, alpha2_sum, b*b*beta2_sum ); - Vec4 e2 = NegativeMultiplySubtract( a, alphax_sum, a*b*alphabeta_sum ); - Vec4 e3 = NegativeMultiplySubtract( b, betax_sum, e2 ); - Vec4 e4 = MultiplyAdd( two, e3, e1 ); + Vec4 betax_sum = MultiplyAdd( part1, half_half2, part2 ); + Vec4 beta2_sum = betax_sum.SplatW(); - // apply the metric to the error term - Vec4 e5 = e4*m_metric; - Vec4 error = e5.SplatX() + e5.SplatY() + e5.SplatZ(); - - // keep the solution if it wins - if( CompareAnyLessThan( error, besterror ) ) - { - beststart = a; - bestend = b; - besti = i; - bestj = j; - besterror = error; - bestiteration = iterationIndex; - } + Vec4 alphabeta_sum = ( part1*half_half2 ).SplatW(); - // advance - if( j == count ) - break; - part1 += m_points_weights[j]; - ++j; - } + // compute the least-squares optimal points + Vec4 factor = Reciprocal( NegativeMultiplySubtract( alphabeta_sum, alphabeta_sum, alpha2_sum*beta2_sum ) ); + Vec4 a = NegativeMultiplySubtract( betax_sum, alphabeta_sum, alphax_sum*beta2_sum )*factor; + Vec4 b = NegativeMultiplySubtract( alphax_sum, alphabeta_sum, betax_sum*alpha2_sum )*factor; - // advance - part0 += m_points_weights[i]; - } - - // stop if we didn't improve in this iteration - if( bestiteration != iterationIndex ) - break; - - // advance if possible - ++iterationIndex; - if( iterationIndex == m_iterationCount ) - break; - - // stop if a new iteration is an ordering that has already been tried - Vec3 axis = ( bestend - beststart ).GetVec3(); - if( !ConstructOrdering( axis, iterationIndex ) ) - break; - } - - // save the block if necessary - if( CompareAnyLessThan( besterror, m_besterror ) ) - { - // remap the indices - u8 const* order = ( u8* )m_order + 16*bestiteration; + // clamp to the grid + a = Min( one, Max( zero, a ) ); + b = Min( one, Max( zero, b ) ); + a = Truncate( MultiplyAdd( grid, a, half ) )*gridrcp; + b = Truncate( MultiplyAdd( grid, b, half ) )*gridrcp; - u8 unordered[16]; - for( int m = 0; m < besti; ++m ) - unordered[order[m]] = 0; - for( int m = besti; m < bestj; ++m ) - unordered[order[m]] = 2; - for( int m = bestj; m < count; ++m ) - unordered[order[m]] = 1; + // compute the error (we skip the constant xxsum) + Vec4 e1 = MultiplyAdd( a*a, alpha2_sum, b*b*beta2_sum ); + Vec4 e2 = NegativeMultiplySubtract( a, alphax_sum, a*b*alphabeta_sum ); + Vec4 e3 = NegativeMultiplySubtract( b, betax_sum, e2 ); + Vec4 e4 = MultiplyAdd( two, e3, e1 ); - m_colours->RemapIndices( unordered, bestindices ); - - // save the block - WriteColourBlock3( beststart.GetVec3(), bestend.GetVec3(), bestindices, block ); + // apply the metric to the error term + Vec4 e5 = e4*m_metric; + Vec4 error = e5.SplatX() + e5.SplatY() + e5.SplatZ(); - // save the error - m_besterror = besterror; - } + // keep the solution if it wins + if( CompareAnyLessThan( error, besterror ) ) + { + beststart = a; + bestend = b; + besti = i; + bestj = j; + besterror = error; + bestiteration = iterationIndex; + } + + // advance + if( j == count ) + break; + part1 += m_points_weights[j]; + ++j; + } + + // advance + part0 += m_points_weights[i]; + } + + // stop if we didn't improve in this iteration + if( bestiteration != iterationIndex ) + break; + + // advance if possible + ++iterationIndex; + if( iterationIndex == m_iterationCount ) + break; + + // stop if a new iteration is an ordering that has already been tried + Vec3 axis = ( bestend - beststart ).GetVec3(); + if( !ConstructOrdering( axis, iterationIndex ) ) + break; + } + + // save the block if necessary + if( CompareAnyLessThan( besterror, m_besterror ) ) + { + // remap the indices + u8 const* order = ( u8* )m_order + 16*bestiteration; + + u8 unordered[16]; + for( int m = 0; m < besti; ++m ) + unordered[order[m]] = 0; + for( int m = besti; m < bestj; ++m ) + unordered[order[m]] = 2; + for( int m = bestj; m < count; ++m ) + unordered[order[m]] = 1; + + m_colours->RemapIndices( unordered, bestindices ); + + // save the block + WriteColourBlock3( beststart.GetVec3(), bestend.GetVec3(), bestindices, block ); + + // save the error + m_besterror = besterror; + } } void ClusterFit::Compress4( void* block ) { - // declare variables - int const count = m_colours->GetCount(); - Vec4 const two = VEC4_CONST( 2.0f ); - Vec4 const one = VEC4_CONST( 1.0f ); - Vec4 const onethird_onethird2( 1.0f/3.0f, 1.0f/3.0f, 1.0f/3.0f, 1.0f/9.0f ); - Vec4 const twothirds_twothirds2( 2.0f/3.0f, 2.0f/3.0f, 2.0f/3.0f, 4.0f/9.0f ); - Vec4 const twonineths = VEC4_CONST( 2.0f/9.0f ); - Vec4 const zero = VEC4_CONST( 0.0f ); - Vec4 const half = VEC4_CONST( 0.5f ); - Vec4 const grid( 31.0f, 63.0f, 31.0f, 0.0f ); - Vec4 const gridrcp( 1.0f/31.0f, 1.0f/63.0f, 1.0f/31.0f, 0.0f ); + // declare variables + int const count = m_colours->GetCount(); + Vec4 const two = VEC4_CONST( 2.0f ); + Vec4 const one = VEC4_CONST( 1.0f ); + Vec4 const onethird_onethird2( 1.0f/3.0f, 1.0f/3.0f, 1.0f/3.0f, 1.0f/9.0f ); + Vec4 const twothirds_twothirds2( 2.0f/3.0f, 2.0f/3.0f, 2.0f/3.0f, 4.0f/9.0f ); + Vec4 const twonineths = VEC4_CONST( 2.0f/9.0f ); + Vec4 const zero = VEC4_CONST( 0.0f ); + Vec4 const half = VEC4_CONST( 0.5f ); + Vec4 const grid( 31.0f, 63.0f, 31.0f, 0.0f ); + Vec4 const gridrcp( 1.0f/31.0f, 1.0f/63.0f, 1.0f/31.0f, 0.0f ); - // prepare an ordering using the principle axis - ConstructOrdering( m_principle, 0 ); - - // check all possible clusters and iterate on the total order - Vec4 beststart = VEC4_CONST( 0.0f ); - Vec4 bestend = VEC4_CONST( 0.0f ); - Vec4 besterror = m_besterror; - u8 bestindices[16]; - int bestiteration = 0; - int besti = 0, bestj = 0, bestk = 0; - - // loop over iterations (we avoid the case that all points in first or last cluster) - for( int iterationIndex = 0;; ) - { - // first cluster [0,i) is at the start - Vec4 part0 = VEC4_CONST( 0.0f ); - for( int i = 0; i < count; ++i ) - { - // second cluster [i,j) is one third along - Vec4 part1 = VEC4_CONST( 0.0f ); - for( int j = i;; ) - { - // third cluster [j,k) is two thirds along - Vec4 part2 = ( j == 0 ) ? m_points_weights[0] : VEC4_CONST( 0.0f ); - int kmin = ( j == 0 ) ? 1 : j; - for( int k = kmin;; ) - { - // last cluster [k,count) is at the end - Vec4 part3 = m_xsum_wsum - part2 - part1 - part0; + // prepare an ordering using the principle axis + ConstructOrdering( m_principle, 0 ); - // compute least squares terms directly - Vec4 const alphax_sum = MultiplyAdd( part2, onethird_onethird2, MultiplyAdd( part1, twothirds_twothirds2, part0 ) ); - Vec4 const alpha2_sum = alphax_sum.SplatW(); - - Vec4 const betax_sum = MultiplyAdd( part1, onethird_onethird2, MultiplyAdd( part2, twothirds_twothirds2, part3 ) ); - Vec4 const beta2_sum = betax_sum.SplatW(); - - Vec4 const alphabeta_sum = twonineths*( part1 + part2 ).SplatW(); + // check all possible clusters and iterate on the total order + Vec4 beststart = VEC4_CONST( 0.0f ); + Vec4 bestend = VEC4_CONST( 0.0f ); + Vec4 besterror = m_besterror; + u8 bestindices[16]; + int bestiteration = 0; + int besti = 0, bestj = 0, bestk = 0; - // compute the least-squares optimal points - Vec4 factor = Reciprocal( NegativeMultiplySubtract( alphabeta_sum, alphabeta_sum, alpha2_sum*beta2_sum ) ); - Vec4 a = NegativeMultiplySubtract( betax_sum, alphabeta_sum, alphax_sum*beta2_sum )*factor; - Vec4 b = NegativeMultiplySubtract( alphax_sum, alphabeta_sum, betax_sum*alpha2_sum )*factor; + // loop over iterations (we avoid the case that all points in first or last cluster) + for( int iterationIndex = 0;; ) + { + // first cluster [0,i) is at the start + Vec4 part0 = VEC4_CONST( 0.0f ); + for( int i = 0; i < count; ++i ) + { + // second cluster [i,j) is one third along + Vec4 part1 = VEC4_CONST( 0.0f ); + for( int j = i;; ) + { + // third cluster [j,k) is two thirds along + Vec4 part2 = ( j == 0 ) ? m_points_weights[0] : VEC4_CONST( 0.0f ); + int kmin = ( j == 0 ) ? 1 : j; + for( int k = kmin;; ) + { + // last cluster [k,count) is at the end + Vec4 part3 = m_xsum_wsum - part2 - part1 - part0; - // clamp to the grid - a = Min( one, Max( zero, a ) ); - b = Min( one, Max( zero, b ) ); - a = Truncate( MultiplyAdd( grid, a, half ) )*gridrcp; - b = Truncate( MultiplyAdd( grid, b, half ) )*gridrcp; - - // compute the error (we skip the constant xxsum) - Vec4 e1 = MultiplyAdd( a*a, alpha2_sum, b*b*beta2_sum ); - Vec4 e2 = NegativeMultiplySubtract( a, alphax_sum, a*b*alphabeta_sum ); - Vec4 e3 = NegativeMultiplySubtract( b, betax_sum, e2 ); - Vec4 e4 = MultiplyAdd( two, e3, e1 ); + // compute least squares terms directly + Vec4 const alphax_sum = MultiplyAdd( part2, onethird_onethird2, MultiplyAdd( part1, twothirds_twothirds2, part0 ) ); + Vec4 const alpha2_sum = alphax_sum.SplatW(); - // apply the metric to the error term - Vec4 e5 = e4*m_metric; - Vec4 error = e5.SplatX() + e5.SplatY() + e5.SplatZ(); + Vec4 const betax_sum = MultiplyAdd( part1, onethird_onethird2, MultiplyAdd( part2, twothirds_twothirds2, part3 ) ); + Vec4 const beta2_sum = betax_sum.SplatW(); - // keep the solution if it wins - if( CompareAnyLessThan( error, besterror ) ) - { - beststart = a; - bestend = b; - besterror = error; - besti = i; - bestj = j; - bestk = k; - bestiteration = iterationIndex; - } + Vec4 const alphabeta_sum = twonineths*( part1 + part2 ).SplatW(); - // advance - if( k == count ) - break; - part2 += m_points_weights[k]; - ++k; - } + // compute the least-squares optimal points + Vec4 factor = Reciprocal( NegativeMultiplySubtract( alphabeta_sum, alphabeta_sum, alpha2_sum*beta2_sum ) ); + Vec4 a = NegativeMultiplySubtract( betax_sum, alphabeta_sum, alphax_sum*beta2_sum )*factor; + Vec4 b = NegativeMultiplySubtract( alphax_sum, alphabeta_sum, betax_sum*alpha2_sum )*factor; - // advance - if( j == count ) - break; - part1 += m_points_weights[j]; - ++j; - } + // clamp to the grid + a = Min( one, Max( zero, a ) ); + b = Min( one, Max( zero, b ) ); + a = Truncate( MultiplyAdd( grid, a, half ) )*gridrcp; + b = Truncate( MultiplyAdd( grid, b, half ) )*gridrcp; - // advance - part0 += m_points_weights[i]; - } - - // stop if we didn't improve in this iteration - if( bestiteration != iterationIndex ) - break; - - // advance if possible - ++iterationIndex; - if( iterationIndex == m_iterationCount ) - break; - - // stop if a new iteration is an ordering that has already been tried - Vec3 axis = ( bestend - beststart ).GetVec3(); - if( !ConstructOrdering( axis, iterationIndex ) ) - break; - } + // compute the error (we skip the constant xxsum) + Vec4 e1 = MultiplyAdd( a*a, alpha2_sum, b*b*beta2_sum ); + Vec4 e2 = NegativeMultiplySubtract( a, alphax_sum, a*b*alphabeta_sum ); + Vec4 e3 = NegativeMultiplySubtract( b, betax_sum, e2 ); + Vec4 e4 = MultiplyAdd( two, e3, e1 ); - // save the block if necessary - if( CompareAnyLessThan( besterror, m_besterror ) ) - { - // remap the indices - u8 const* order = ( u8* )m_order + 16*bestiteration; + // apply the metric to the error term + Vec4 e5 = e4*m_metric; + Vec4 error = e5.SplatX() + e5.SplatY() + e5.SplatZ(); - u8 unordered[16]; - for( int m = 0; m < besti; ++m ) - unordered[order[m]] = 0; - for( int m = besti; m < bestj; ++m ) - unordered[order[m]] = 2; - for( int m = bestj; m < bestk; ++m ) - unordered[order[m]] = 3; - for( int m = bestk; m < count; ++m ) - unordered[order[m]] = 1; + // keep the solution if it wins + if( CompareAnyLessThan( error, besterror ) ) + { + beststart = a; + bestend = b; + besterror = error; + besti = i; + bestj = j; + bestk = k; + bestiteration = iterationIndex; + } - m_colours->RemapIndices( unordered, bestindices ); - - // save the block - WriteColourBlock4( beststart.GetVec3(), bestend.GetVec3(), bestindices, block ); + // advance + if( k == count ) + break; + part2 += m_points_weights[k]; + ++k; + } - // save the error - m_besterror = besterror; - } + // advance + if( j == count ) + break; + part1 += m_points_weights[j]; + ++j; + } + + // advance + part0 += m_points_weights[i]; + } + + // stop if we didn't improve in this iteration + if( bestiteration != iterationIndex ) + break; + + // advance if possible + ++iterationIndex; + if( iterationIndex == m_iterationCount ) + break; + + // stop if a new iteration is an ordering that has already been tried + Vec3 axis = ( bestend - beststart ).GetVec3(); + if( !ConstructOrdering( axis, iterationIndex ) ) + break; + } + + // save the block if necessary + if( CompareAnyLessThan( besterror, m_besterror ) ) + { + // remap the indices + u8 const* order = ( u8* )m_order + 16*bestiteration; + + u8 unordered[16]; + for( int m = 0; m < besti; ++m ) + unordered[order[m]] = 0; + for( int m = besti; m < bestj; ++m ) + unordered[order[m]] = 2; + for( int m = bestj; m < bestk; ++m ) + unordered[order[m]] = 3; + for( int m = bestk; m < count; ++m ) + unordered[order[m]] = 1; + + m_colours->RemapIndices( unordered, bestindices ); + + // save the block + WriteColourBlock4( beststart.GetVec3(), bestend.GetVec3(), bestindices, block ); + + // save the error + m_besterror = besterror; + } } } // namespace squish diff --git a/thirdparty/squish/clusterfit.h b/thirdparty/squish/clusterfit.h index 17db5d387c2..999396b2628 100644 --- a/thirdparty/squish/clusterfit.h +++ b/thirdparty/squish/clusterfit.h @@ -1,33 +1,33 @@ /* ----------------------------------------------------------------------------- - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Copyright (c) 2007 Ignacio Castano icastano@nvidia.com + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + Copyright (c) 2007 Ignacio Castano icastano@nvidia.com - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------- */ - + #ifndef SQUISH_CLUSTERFIT_H #define SQUISH_CLUSTERFIT_H -#include +#include "squish.h" #include "maths.h" #include "simd.h" #include "colourfit.h" @@ -37,23 +37,23 @@ namespace squish { class ClusterFit : public ColourFit { public: - ClusterFit( ColourSet const* colours, int flags ); - + ClusterFit( ColourSet const* colours, int flags, float* metric ); + private: - bool ConstructOrdering( Vec3 const& axis, int iteration ); + bool ConstructOrdering( Vec3 const& axis, int iteration ); - virtual void Compress3( void* block ); - virtual void Compress4( void* block ); + virtual void Compress3( void* block ); + virtual void Compress4( void* block ); - enum { kMaxIterations = 8 }; + enum { kMaxIterations = 8 }; - int m_iterationCount; - Vec3 m_principle; - u8 m_order[16*kMaxIterations]; - Vec4 m_points_weights[16]; - Vec4 m_xsum_wsum; - Vec4 m_metric; - Vec4 m_besterror; + int m_iterationCount; + Vec3 m_principle; + u8 m_order[16*kMaxIterations]; + Vec4 m_points_weights[16]; + Vec4 m_xsum_wsum; + Vec4 m_metric; + Vec4 m_besterror; }; } // namespace squish diff --git a/thirdparty/squish/colourblock.cpp b/thirdparty/squish/colourblock.cpp index e6a5788b748..af8b980365a 100644 --- a/thirdparty/squish/colourblock.cpp +++ b/thirdparty/squish/colourblock.cpp @@ -1,214 +1,214 @@ /* ----------------------------------------------------------------------------- - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------- */ - + #include "colourblock.h" namespace squish { static int FloatToInt( float a, int limit ) { - // use ANSI round-to-zero behaviour to get round-to-nearest - int i = ( int )( a + 0.5f ); + // use ANSI round-to-zero behaviour to get round-to-nearest + int i = ( int )( a + 0.5f ); - // clamp to the limit - if( i < 0 ) - i = 0; - else if( i > limit ) - i = limit; + // clamp to the limit + if( i < 0 ) + i = 0; + else if( i > limit ) + i = limit; - // done - return i; + // done + return i; } static int FloatTo565( Vec3::Arg colour ) { - // get the components in the correct range - int r = FloatToInt( 31.0f*colour.X(), 31 ); - int g = FloatToInt( 63.0f*colour.Y(), 63 ); - int b = FloatToInt( 31.0f*colour.Z(), 31 ); - - // pack into a single value - return ( r << 11 ) | ( g << 5 ) | b; + // get the components in the correct range + int r = FloatToInt( 31.0f*colour.X(), 31 ); + int g = FloatToInt( 63.0f*colour.Y(), 63 ); + int b = FloatToInt( 31.0f*colour.Z(), 31 ); + + // pack into a single value + return ( r << 11 ) | ( g << 5 ) | b; } static void WriteColourBlock( int a, int b, u8* indices, void* block ) { - // get the block as bytes - u8* bytes = ( u8* )block; + // get the block as bytes + u8* bytes = ( u8* )block; - // write the endpoints - bytes[0] = ( u8 )( a & 0xff ); - bytes[1] = ( u8 )( a >> 8 ); - bytes[2] = ( u8 )( b & 0xff ); - bytes[3] = ( u8 )( b >> 8 ); - - // write the indices - for( int i = 0; i < 4; ++i ) - { - u8 const* ind = indices + 4*i; - bytes[4 + i] = ind[0] | ( ind[1] << 2 ) | ( ind[2] << 4 ) | ( ind[3] << 6 ); - } + // write the endpoints + bytes[0] = ( u8 )( a & 0xff ); + bytes[1] = ( u8 )( a >> 8 ); + bytes[2] = ( u8 )( b & 0xff ); + bytes[3] = ( u8 )( b >> 8 ); + + // write the indices + for( int i = 0; i < 4; ++i ) + { + u8 const* ind = indices + 4*i; + bytes[4 + i] = ind[0] | ( ind[1] << 2 ) | ( ind[2] << 4 ) | ( ind[3] << 6 ); + } } void WriteColourBlock3( Vec3::Arg start, Vec3::Arg end, u8 const* indices, void* block ) { - // get the packed values - int a = FloatTo565( start ); - int b = FloatTo565( end ); + // get the packed values + int a = FloatTo565( start ); + int b = FloatTo565( end ); - // remap the indices - u8 remapped[16]; - if( a <= b ) - { - // use the indices directly - for( int i = 0; i < 16; ++i ) - remapped[i] = indices[i]; - } - else - { - // swap a and b - std::swap( a, b ); - for( int i = 0; i < 16; ++i ) - { - if( indices[i] == 0 ) - remapped[i] = 1; - else if( indices[i] == 1 ) - remapped[i] = 0; - else - remapped[i] = indices[i]; - } - } - - // write the block - WriteColourBlock( a, b, remapped, block ); + // remap the indices + u8 remapped[16]; + if( a <= b ) + { + // use the indices directly + for( int i = 0; i < 16; ++i ) + remapped[i] = indices[i]; + } + else + { + // swap a and b + std::swap( a, b ); + for( int i = 0; i < 16; ++i ) + { + if( indices[i] == 0 ) + remapped[i] = 1; + else if( indices[i] == 1 ) + remapped[i] = 0; + else + remapped[i] = indices[i]; + } + } + + // write the block + WriteColourBlock( a, b, remapped, block ); } void WriteColourBlock4( Vec3::Arg start, Vec3::Arg end, u8 const* indices, void* block ) { - // get the packed values - int a = FloatTo565( start ); - int b = FloatTo565( end ); + // get the packed values + int a = FloatTo565( start ); + int b = FloatTo565( end ); - // remap the indices - u8 remapped[16]; - if( a < b ) - { - // swap a and b - std::swap( a, b ); - for( int i = 0; i < 16; ++i ) - remapped[i] = ( indices[i] ^ 0x1 ) & 0x3; - } - else if( a == b ) - { - // use index 0 - for( int i = 0; i < 16; ++i ) - remapped[i] = 0; - } - else - { - // use the indices directly - for( int i = 0; i < 16; ++i ) - remapped[i] = indices[i]; - } - - // write the block - WriteColourBlock( a, b, remapped, block ); + // remap the indices + u8 remapped[16]; + if( a < b ) + { + // swap a and b + std::swap( a, b ); + for( int i = 0; i < 16; ++i ) + remapped[i] = ( indices[i] ^ 0x1 ) & 0x3; + } + else if( a == b ) + { + // use index 0 + for( int i = 0; i < 16; ++i ) + remapped[i] = 0; + } + else + { + // use the indices directly + for( int i = 0; i < 16; ++i ) + remapped[i] = indices[i]; + } + + // write the block + WriteColourBlock( a, b, remapped, block ); } static int Unpack565( u8 const* packed, u8* colour ) { - // build the packed value - int value = ( int )packed[0] | ( ( int )packed[1] << 8 ); - - // get the components in the stored range - u8 red = ( u8 )( ( value >> 11 ) & 0x1f ); - u8 green = ( u8 )( ( value >> 5 ) & 0x3f ); - u8 blue = ( u8 )( value & 0x1f ); + // build the packed value + int value = ( int )packed[0] | ( ( int )packed[1] << 8 ); - // scale up to 8 bits - colour[0] = ( red << 3 ) | ( red >> 2 ); - colour[1] = ( green << 2 ) | ( green >> 4 ); - colour[2] = ( blue << 3 ) | ( blue >> 2 ); - colour[3] = 255; - - // return the value - return value; + // get the components in the stored range + u8 red = ( u8 )( ( value >> 11 ) & 0x1f ); + u8 green = ( u8 )( ( value >> 5 ) & 0x3f ); + u8 blue = ( u8 )( value & 0x1f ); + + // scale up to 8 bits + colour[0] = ( red << 3 ) | ( red >> 2 ); + colour[1] = ( green << 2 ) | ( green >> 4 ); + colour[2] = ( blue << 3 ) | ( blue >> 2 ); + colour[3] = 255; + + // return the value + return value; } void DecompressColour( u8* rgba, void const* block, bool isDxt1 ) { - // get the block bytes - u8 const* bytes = reinterpret_cast< u8 const* >( block ); - - // unpack the endpoints - u8 codes[16]; - int a = Unpack565( bytes, codes ); - int b = Unpack565( bytes + 2, codes + 4 ); - - // generate the midpoints - for( int i = 0; i < 3; ++i ) - { - int c = codes[i]; - int d = codes[4 + i]; + // get the block bytes + u8 const* bytes = reinterpret_cast< u8 const* >( block ); - if( isDxt1 && a <= b ) - { - codes[8 + i] = ( u8 )( ( c + d )/2 ); - codes[12 + i] = 0; - } - else - { - codes[8 + i] = ( u8 )( ( 2*c + d )/3 ); - codes[12 + i] = ( u8 )( ( c + 2*d )/3 ); - } - } - - // fill in alpha for the intermediate values - codes[8 + 3] = 255; - codes[12 + 3] = ( isDxt1 && a <= b ) ? 0 : 255; - - // unpack the indices - u8 indices[16]; - for( int i = 0; i < 4; ++i ) - { - u8* ind = indices + 4*i; - u8 packed = bytes[4 + i]; - - ind[0] = packed & 0x3; - ind[1] = ( packed >> 2 ) & 0x3; - ind[2] = ( packed >> 4 ) & 0x3; - ind[3] = ( packed >> 6 ) & 0x3; - } + // unpack the endpoints + u8 codes[16]; + int a = Unpack565( bytes, codes ); + int b = Unpack565( bytes + 2, codes + 4 ); - // store out the colours - for( int i = 0; i < 16; ++i ) - { - u8 offset = 4*indices[i]; - for( int j = 0; j < 4; ++j ) - rgba[4*i + j] = codes[offset + j]; - } + // generate the midpoints + for( int i = 0; i < 3; ++i ) + { + int c = codes[i]; + int d = codes[4 + i]; + + if( isDxt1 && a <= b ) + { + codes[8 + i] = ( u8 )( ( c + d )/2 ); + codes[12 + i] = 0; + } + else + { + codes[8 + i] = ( u8 )( ( 2*c + d )/3 ); + codes[12 + i] = ( u8 )( ( c + 2*d )/3 ); + } + } + + // fill in alpha for the intermediate values + codes[8 + 3] = 255; + codes[12 + 3] = ( isDxt1 && a <= b ) ? 0 : 255; + + // unpack the indices + u8 indices[16]; + for( int i = 0; i < 4; ++i ) + { + u8* ind = indices + 4*i; + u8 packed = bytes[4 + i]; + + ind[0] = packed & 0x3; + ind[1] = ( packed >> 2 ) & 0x3; + ind[2] = ( packed >> 4 ) & 0x3; + ind[3] = ( packed >> 6 ) & 0x3; + } + + // store out the colours + for( int i = 0; i < 16; ++i ) + { + u8 offset = 4*indices[i]; + for( int j = 0; j < 4; ++j ) + rgba[4*i + j] = codes[offset + j]; + } } } // namespace squish diff --git a/thirdparty/squish/colourblock.h b/thirdparty/squish/colourblock.h index df0a47217f4..fee2cd7c5dc 100644 --- a/thirdparty/squish/colourblock.h +++ b/thirdparty/squish/colourblock.h @@ -1,32 +1,32 @@ /* ----------------------------------------------------------------------------- - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------- */ - + #ifndef SQUISH_COLOURBLOCK_H #define SQUISH_COLOURBLOCK_H -#include +#include "squish.h" #include "maths.h" namespace squish { diff --git a/thirdparty/squish/colourfit.cpp b/thirdparty/squish/colourfit.cpp index dba2b87e81d..e45b656557f 100644 --- a/thirdparty/squish/colourfit.cpp +++ b/thirdparty/squish/colourfit.cpp @@ -1,50 +1,54 @@ /* ----------------------------------------------------------------------------- - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------- */ - + #include "colourfit.h" #include "colourset.h" namespace squish { -ColourFit::ColourFit( ColourSet const* colours, int flags ) - : m_colours( colours ), - m_flags( flags ) +ColourFit::ColourFit( ColourSet const* colours, int flags ) + : m_colours( colours ), + m_flags( flags ) +{ +} + +ColourFit::~ColourFit() { } void ColourFit::Compress( void* block ) { - bool isDxt1 = ( ( m_flags & kDxt1 ) != 0 ); - if( isDxt1 ) - { - Compress3( block ); - if( !m_colours->IsTransparent() ) - Compress4( block ); - } - else - Compress4( block ); + bool isDxt1 = ( ( m_flags & kDxt1 ) != 0 ); + if( isDxt1 ) + { + Compress3( block ); + if( !m_colours->IsTransparent() ) + Compress4( block ); + } + else + Compress4( block ); } } // namespace squish diff --git a/thirdparty/squish/colourfit.h b/thirdparty/squish/colourfit.h index a2d0559a32c..e73dceb2eba 100644 --- a/thirdparty/squish/colourfit.h +++ b/thirdparty/squish/colourfit.h @@ -1,34 +1,36 @@ /* ----------------------------------------------------------------------------- - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------- */ - + #ifndef SQUISH_COLOURFIT_H #define SQUISH_COLOURFIT_H -#include +#include "squish.h" #include "maths.h" +#include + namespace squish { class ColourSet; @@ -36,16 +38,17 @@ class ColourSet; class ColourFit { public: - ColourFit( ColourSet const* colours, int flags ); + ColourFit( ColourSet const* colours, int flags ); + virtual ~ColourFit(); - void Compress( void* block ); + void Compress( void* block ); protected: - virtual void Compress3( void* block ) = 0; - virtual void Compress4( void* block ) = 0; + virtual void Compress3( void* block ) = 0; + virtual void Compress4( void* block ) = 0; - ColourSet const* m_colours; - int m_flags; + ColourSet const* m_colours; + int m_flags; }; } // namespace squish diff --git a/thirdparty/squish/colourset.cpp b/thirdparty/squish/colourset.cpp index 97d29d9873e..e9005564719 100644 --- a/thirdparty/squish/colourset.cpp +++ b/thirdparty/squish/colourset.cpp @@ -1,121 +1,121 @@ /* ----------------------------------------------------------------------------- - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------- */ - + #include "colourset.h" namespace squish { ColourSet::ColourSet( u8 const* rgba, int mask, int flags ) - : m_count( 0 ), - m_transparent( false ) + : m_count( 0 ), + m_transparent( false ) { - // check the compression mode for dxt1 - bool isDxt1 = ( ( flags & kDxt1 ) != 0 ); - bool weightByAlpha = ( ( flags & kWeightColourByAlpha ) != 0 ); + // check the compression mode for dxt1 + bool isDxt1 = ( ( flags & kDxt1 ) != 0 ); + bool weightByAlpha = ( ( flags & kWeightColourByAlpha ) != 0 ); - // create the minimal set - for( int i = 0; i < 16; ++i ) - { - // check this pixel is enabled - int bit = 1 << i; - if( ( mask & bit ) == 0 ) - { - m_remap[i] = -1; - continue; - } - - // check for transparent pixels when using dxt1 - if( isDxt1 && rgba[4*i + 3] < 128 ) - { - m_remap[i] = -1; - m_transparent = true; - continue; - } + // create the minimal set + for( int i = 0; i < 16; ++i ) + { + // check this pixel is enabled + int bit = 1 << i; + if( ( mask & bit ) == 0 ) + { + m_remap[i] = -1; + continue; + } - // loop over previous points for a match - for( int j = 0;; ++j ) - { - // allocate a new point - if( j == i ) - { - // normalise coordinates to [0,1] - float x = ( float )rgba[4*i] / 255.0f; - float y = ( float )rgba[4*i + 1] / 255.0f; - float z = ( float )rgba[4*i + 2] / 255.0f; - - // ensure there is always non-zero weight even for zero alpha - float w = ( float )( rgba[4*i + 3] + 1 ) / 256.0f; + // check for transparent pixels when using dxt1 + if( isDxt1 && rgba[4*i + 3] < 128 ) + { + m_remap[i] = -1; + m_transparent = true; + continue; + } - // add the point - m_points[m_count] = Vec3( x, y, z ); - m_weights[m_count] = ( weightByAlpha ? w : 1.0f ); - m_remap[i] = m_count; - - // advance - ++m_count; - break; - } - - // check for a match - int oldbit = 1 << j; - bool match = ( ( mask & oldbit ) != 0 ) - && ( rgba[4*i] == rgba[4*j] ) - && ( rgba[4*i + 1] == rgba[4*j + 1] ) - && ( rgba[4*i + 2] == rgba[4*j + 2] ) - && ( rgba[4*j + 3] >= 128 || !isDxt1 ); - if( match ) - { - // get the index of the match - int index = m_remap[j]; - - // ensure there is always non-zero weight even for zero alpha - float w = ( float )( rgba[4*i + 3] + 1 ) / 256.0f; + // loop over previous points for a match + for( int j = 0;; ++j ) + { + // allocate a new point + if( j == i ) + { + // normalise coordinates to [0,1] + float x = ( float )rgba[4*i] / 255.0f; + float y = ( float )rgba[4*i + 1] / 255.0f; + float z = ( float )rgba[4*i + 2] / 255.0f; - // map to this point and increase the weight - m_weights[index] += ( weightByAlpha ? w : 1.0f ); - m_remap[i] = index; - break; - } - } - } + // ensure there is always non-zero weight even for zero alpha + float w = ( float )( rgba[4*i + 3] + 1 ) / 256.0f; - // square root the weights - for( int i = 0; i < m_count; ++i ) - m_weights[i] = std::sqrt( m_weights[i] ); + // add the point + m_points[m_count] = Vec3( x, y, z ); + m_weights[m_count] = ( weightByAlpha ? w : 1.0f ); + m_remap[i] = m_count; + + // advance + ++m_count; + break; + } + + // check for a match + int oldbit = 1 << j; + bool match = ( ( mask & oldbit ) != 0 ) + && ( rgba[4*i] == rgba[4*j] ) + && ( rgba[4*i + 1] == rgba[4*j + 1] ) + && ( rgba[4*i + 2] == rgba[4*j + 2] ) + && ( rgba[4*j + 3] >= 128 || !isDxt1 ); + if( match ) + { + // get the index of the match + int index = m_remap[j]; + + // ensure there is always non-zero weight even for zero alpha + float w = ( float )( rgba[4*i + 3] + 1 ) / 256.0f; + + // map to this point and increase the weight + m_weights[index] += ( weightByAlpha ? w : 1.0f ); + m_remap[i] = index; + break; + } + } + } + + // square root the weights + for( int i = 0; i < m_count; ++i ) + m_weights[i] = std::sqrt( m_weights[i] ); } void ColourSet::RemapIndices( u8 const* source, u8* target ) const { - for( int i = 0; i < 16; ++i ) - { - int j = m_remap[i]; - if( j == -1 ) - target[i] = 3; - else - target[i] = source[j]; - } + for( int i = 0; i < 16; ++i ) + { + int j = m_remap[i]; + if( j == -1 ) + target[i] = 3; + else + target[i] = source[j]; + } } } // namespace squish diff --git a/thirdparty/squish/colourset.h b/thirdparty/squish/colourset.h index dcf56ae28e8..e13bb6fc355 100644 --- a/thirdparty/squish/colourset.h +++ b/thirdparty/squish/colourset.h @@ -1,32 +1,32 @@ /* ----------------------------------------------------------------------------- - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------- */ - + #ifndef SQUISH_COLOURSET_H #define SQUISH_COLOURSET_H -#include +#include "squish.h" #include "maths.h" namespace squish { @@ -36,21 +36,21 @@ namespace squish { class ColourSet { public: - ColourSet( u8 const* rgba, int mask, int flags ); + ColourSet( u8 const* rgba, int mask, int flags ); - int GetCount() const { return m_count; } - Vec3 const* GetPoints() const { return m_points; } - float const* GetWeights() const { return m_weights; } - bool IsTransparent() const { return m_transparent; } + int GetCount() const { return m_count; } + Vec3 const* GetPoints() const { return m_points; } + float const* GetWeights() const { return m_weights; } + bool IsTransparent() const { return m_transparent; } - void RemapIndices( u8 const* source, u8* target ) const; + void RemapIndices( u8 const* source, u8* target ) const; private: - int m_count; - Vec3 m_points[16]; - float m_weights[16]; - int m_remap[16]; - bool m_transparent; + int m_count; + Vec3 m_points[16]; + float m_weights[16]; + int m_remap[16]; + bool m_transparent; }; } // namespace sqish diff --git a/thirdparty/squish/config.h b/thirdparty/squish/config.h index 7bf3760c265..92edefe966e 100644 --- a/thirdparty/squish/config.h +++ b/thirdparty/squish/config.h @@ -1,28 +1,28 @@ /* ----------------------------------------------------------------------------- - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------- */ - + #ifndef SQUISH_CONFIG_H #define SQUISH_CONFIG_H @@ -36,7 +36,7 @@ #define SQUISH_USE_SSE 0 #endif -// Internally et SQUISH_USE_SIMD when either Altivec or SSE is available. +// Internally set SQUISH_USE_SIMD when either Altivec or SSE is available. #if SQUISH_USE_ALTIVEC && SQUISH_USE_SSE #error "Cannot enable both Altivec and SSE!" #endif diff --git a/thirdparty/squish/maths.cpp b/thirdparty/squish/maths.cpp index 59818a4d2bb..4fa0bcfb355 100644 --- a/thirdparty/squish/maths.cpp +++ b/thirdparty/squish/maths.cpp @@ -1,227 +1,259 @@ /* ----------------------------------------------------------------------------- - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------- */ - + /*! @file - The symmetric eigensystem solver algorithm is from - http://www.geometrictools.com/Documentation/EigenSymmetric3x3.pdf + The symmetric eigensystem solver algorithm is from + http://www.geometrictools.com/Documentation/EigenSymmetric3x3.pdf */ #include "maths.h" +#include "simd.h" #include namespace squish { Sym3x3 ComputeWeightedCovariance( int n, Vec3 const* points, float const* weights ) { - // compute the centroid - float total = 0.0f; - Vec3 centroid( 0.0f ); - for( int i = 0; i < n; ++i ) - { - total += weights[i]; - centroid += weights[i]*points[i]; - } - centroid /= total; + // compute the centroid + float total = 0.0f; + Vec3 centroid( 0.0f ); + for( int i = 0; i < n; ++i ) + { + total += weights[i]; + centroid += weights[i]*points[i]; + } + if( total > FLT_EPSILON ) + centroid /= total; - // accumulate the covariance matrix - Sym3x3 covariance( 0.0f ); - for( int i = 0; i < n; ++i ) - { - Vec3 a = points[i] - centroid; - Vec3 b = weights[i]*a; - - covariance[0] += a.X()*b.X(); - covariance[1] += a.X()*b.Y(); - covariance[2] += a.X()*b.Z(); - covariance[3] += a.Y()*b.Y(); - covariance[4] += a.Y()*b.Z(); - covariance[5] += a.Z()*b.Z(); - } - - // return it - return covariance; + // accumulate the covariance matrix + Sym3x3 covariance( 0.0f ); + for( int i = 0; i < n; ++i ) + { + Vec3 a = points[i] - centroid; + Vec3 b = weights[i]*a; + + covariance[0] += a.X()*b.X(); + covariance[1] += a.X()*b.Y(); + covariance[2] += a.X()*b.Z(); + covariance[3] += a.Y()*b.Y(); + covariance[4] += a.Y()*b.Z(); + covariance[5] += a.Z()*b.Z(); + } + + // return it + return covariance; } +#if 0 + static Vec3 GetMultiplicity1Evector( Sym3x3 const& matrix, float evalue ) { - // compute M - Sym3x3 m; - m[0] = matrix[0] - evalue; - m[1] = matrix[1]; - m[2] = matrix[2]; - m[3] = matrix[3] - evalue; - m[4] = matrix[4]; - m[5] = matrix[5] - evalue; + // compute M + Sym3x3 m; + m[0] = matrix[0] - evalue; + m[1] = matrix[1]; + m[2] = matrix[2]; + m[3] = matrix[3] - evalue; + m[4] = matrix[4]; + m[5] = matrix[5] - evalue; - // compute U - Sym3x3 u; - u[0] = m[3]*m[5] - m[4]*m[4]; - u[1] = m[2]*m[4] - m[1]*m[5]; - u[2] = m[1]*m[4] - m[2]*m[3]; - u[3] = m[0]*m[5] - m[2]*m[2]; - u[4] = m[1]*m[2] - m[4]*m[0]; - u[5] = m[0]*m[3] - m[1]*m[1]; + // compute U + Sym3x3 u; + u[0] = m[3]*m[5] - m[4]*m[4]; + u[1] = m[2]*m[4] - m[1]*m[5]; + u[2] = m[1]*m[4] - m[2]*m[3]; + u[3] = m[0]*m[5] - m[2]*m[2]; + u[4] = m[1]*m[2] - m[4]*m[0]; + u[5] = m[0]*m[3] - m[1]*m[1]; - // find the largest component - float mc = std::fabs( u[0] ); - int mi = 0; - for( int i = 1; i < 6; ++i ) - { - float c = std::fabs( u[i] ); - if( c > mc ) - { - mc = c; - mi = i; - } - } + // find the largest component + float mc = std::fabs( u[0] ); + int mi = 0; + for( int i = 1; i < 6; ++i ) + { + float c = std::fabs( u[i] ); + if( c > mc ) + { + mc = c; + mi = i; + } + } - // pick the column with this component - switch( mi ) - { - case 0: - return Vec3( u[0], u[1], u[2] ); + // pick the column with this component + switch( mi ) + { + case 0: + return Vec3( u[0], u[1], u[2] ); - case 1: - case 3: - return Vec3( u[1], u[3], u[4] ); + case 1: + case 3: + return Vec3( u[1], u[3], u[4] ); - default: - return Vec3( u[2], u[4], u[5] ); - } + default: + return Vec3( u[2], u[4], u[5] ); + } } static Vec3 GetMultiplicity2Evector( Sym3x3 const& matrix, float evalue ) { - // compute M - Sym3x3 m; - m[0] = matrix[0] - evalue; - m[1] = matrix[1]; - m[2] = matrix[2]; - m[3] = matrix[3] - evalue; - m[4] = matrix[4]; - m[5] = matrix[5] - evalue; + // compute M + Sym3x3 m; + m[0] = matrix[0] - evalue; + m[1] = matrix[1]; + m[2] = matrix[2]; + m[3] = matrix[3] - evalue; + m[4] = matrix[4]; + m[5] = matrix[5] - evalue; - // find the largest component - float mc = std::fabs( m[0] ); - int mi = 0; - for( int i = 1; i < 6; ++i ) - { - float c = std::fabs( m[i] ); - if( c > mc ) - { - mc = c; - mi = i; - } - } + // find the largest component + float mc = std::fabs( m[0] ); + int mi = 0; + for( int i = 1; i < 6; ++i ) + { + float c = std::fabs( m[i] ); + if( c > mc ) + { + mc = c; + mi = i; + } + } - // pick the first eigenvector based on this index - switch( mi ) - { - case 0: - case 1: - return Vec3( -m[1], m[0], 0.0f ); + // pick the first eigenvector based on this index + switch( mi ) + { + case 0: + case 1: + return Vec3( -m[1], m[0], 0.0f ); - case 2: - return Vec3( m[2], 0.0f, -m[0] ); + case 2: + return Vec3( m[2], 0.0f, -m[0] ); - case 3: - case 4: - return Vec3( 0.0f, -m[4], m[3] ); + case 3: + case 4: + return Vec3( 0.0f, -m[4], m[3] ); - default: - return Vec3( 0.0f, -m[5], m[4] ); - } + default: + return Vec3( 0.0f, -m[5], m[4] ); + } } Vec3 ComputePrincipleComponent( Sym3x3 const& matrix ) { - // compute the cubic coefficients - float c0 = matrix[0]*matrix[3]*matrix[5] - + 2.0f*matrix[1]*matrix[2]*matrix[4] - - matrix[0]*matrix[4]*matrix[4] - - matrix[3]*matrix[2]*matrix[2] - - matrix[5]*matrix[1]*matrix[1]; - float c1 = matrix[0]*matrix[3] + matrix[0]*matrix[5] + matrix[3]*matrix[5] - - matrix[1]*matrix[1] - matrix[2]*matrix[2] - matrix[4]*matrix[4]; - float c2 = matrix[0] + matrix[3] + matrix[5]; + // compute the cubic coefficients + float c0 = matrix[0]*matrix[3]*matrix[5] + + 2.0f*matrix[1]*matrix[2]*matrix[4] + - matrix[0]*matrix[4]*matrix[4] + - matrix[3]*matrix[2]*matrix[2] + - matrix[5]*matrix[1]*matrix[1]; + float c1 = matrix[0]*matrix[3] + matrix[0]*matrix[5] + matrix[3]*matrix[5] + - matrix[1]*matrix[1] - matrix[2]*matrix[2] - matrix[4]*matrix[4]; + float c2 = matrix[0] + matrix[3] + matrix[5]; - // compute the quadratic coefficients - float a = c1 - ( 1.0f/3.0f )*c2*c2; - float b = ( -2.0f/27.0f )*c2*c2*c2 + ( 1.0f/3.0f )*c1*c2 - c0; + // compute the quadratic coefficients + float a = c1 - ( 1.0f/3.0f )*c2*c2; + float b = ( -2.0f/27.0f )*c2*c2*c2 + ( 1.0f/3.0f )*c1*c2 - c0; - // compute the root count check - float Q = 0.25f*b*b + ( 1.0f/27.0f )*a*a*a; + // compute the root count check + float Q = 0.25f*b*b + ( 1.0f/27.0f )*a*a*a; - // test the multiplicity - if( FLT_EPSILON < Q ) - { - // only one root, which implies we have a multiple of the identity + // test the multiplicity + if( FLT_EPSILON < Q ) + { + // only one root, which implies we have a multiple of the identity return Vec3( 1.0f ); - } - else if( Q < -FLT_EPSILON ) - { - // three distinct roots - float theta = std::atan2( std::sqrt( -Q ), -0.5f*b ); - float rho = std::sqrt( 0.25f*b*b - Q ); + } + else if( Q < -FLT_EPSILON ) + { + // three distinct roots + float theta = std::atan2( std::sqrt( -Q ), -0.5f*b ); + float rho = std::sqrt( 0.25f*b*b - Q ); - float rt = std::pow( rho, 1.0f/3.0f ); - float ct = std::cos( theta/3.0f ); - float st = std::sin( theta/3.0f ); + float rt = std::pow( rho, 1.0f/3.0f ); + float ct = std::cos( theta/3.0f ); + float st = std::sin( theta/3.0f ); - float l1 = ( 1.0f/3.0f )*c2 + 2.0f*rt*ct; - float l2 = ( 1.0f/3.0f )*c2 - rt*( ct + ( float )sqrt( 3.0f )*st ); - float l3 = ( 1.0f/3.0f )*c2 - rt*( ct - ( float )sqrt( 3.0f )*st ); + float l1 = ( 1.0f/3.0f )*c2 + 2.0f*rt*ct; + float l2 = ( 1.0f/3.0f )*c2 - rt*( ct + ( float )sqrt( 3.0f )*st ); + float l3 = ( 1.0f/3.0f )*c2 - rt*( ct - ( float )sqrt( 3.0f )*st ); - // pick the larger - if( std::fabs( l2 ) > std::fabs( l1 ) ) - l1 = l2; - if( std::fabs( l3 ) > std::fabs( l1 ) ) - l1 = l3; + // pick the larger + if( std::fabs( l2 ) > std::fabs( l1 ) ) + l1 = l2; + if( std::fabs( l3 ) > std::fabs( l1 ) ) + l1 = l3; - // get the eigenvector - return GetMultiplicity1Evector( matrix, l1 ); - } - else // if( -FLT_EPSILON <= Q && Q <= FLT_EPSILON ) - { - // two roots - float rt; - if( b < 0.0f ) - rt = -std::pow( -0.5f*b, 1.0f/3.0f ); - else - rt = std::pow( 0.5f*b, 1.0f/3.0f ); - - float l1 = ( 1.0f/3.0f )*c2 + rt; // repeated - float l2 = ( 1.0f/3.0f )*c2 - 2.0f*rt; - - // get the eigenvector - if( std::fabs( l1 ) > std::fabs( l2 ) ) - return GetMultiplicity2Evector( matrix, l1 ); - else - return GetMultiplicity1Evector( matrix, l2 ); - } + // get the eigenvector + return GetMultiplicity1Evector( matrix, l1 ); + } + else // if( -FLT_EPSILON <= Q && Q <= FLT_EPSILON ) + { + // two roots + float rt; + if( b < 0.0f ) + rt = -std::pow( -0.5f*b, 1.0f/3.0f ); + else + rt = std::pow( 0.5f*b, 1.0f/3.0f ); + + float l1 = ( 1.0f/3.0f )*c2 + rt; // repeated + float l2 = ( 1.0f/3.0f )*c2 - 2.0f*rt; + + // get the eigenvector + if( std::fabs( l1 ) > std::fabs( l2 ) ) + return GetMultiplicity2Evector( matrix, l1 ); + else + return GetMultiplicity1Evector( matrix, l2 ); + } } +#else + +#define POWER_ITERATION_COUNT 8 + +Vec3 ComputePrincipleComponent( Sym3x3 const& matrix ) +{ + Vec4 const row0( matrix[0], matrix[1], matrix[2], 0.0f ); + Vec4 const row1( matrix[1], matrix[3], matrix[4], 0.0f ); + Vec4 const row2( matrix[2], matrix[4], matrix[5], 0.0f ); + Vec4 v = VEC4_CONST( 1.0f ); + for( int i = 0; i < POWER_ITERATION_COUNT; ++i ) + { + // matrix multiply + Vec4 w = row0*v.SplatX(); + w = MultiplyAdd(row1, v.SplatY(), w); + w = MultiplyAdd(row2, v.SplatZ(), w); + + // get max component from xyz in all channels + Vec4 a = Max(w.SplatX(), Max(w.SplatY(), w.SplatZ())); + + // divide through and advance + v = w*Reciprocal(a); + } + return v.GetVec3(); +} + +#endif + } // namespace squish diff --git a/thirdparty/squish/maths.h b/thirdparty/squish/maths.h index 769ae463f72..59c32196b16 100644 --- a/thirdparty/squish/maths.h +++ b/thirdparty/squish/maths.h @@ -1,28 +1,28 @@ /* ----------------------------------------------------------------------------- - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------- */ - + #ifndef SQUISH_MATHS_H #define SQUISH_MATHS_H @@ -35,194 +35,194 @@ namespace squish { class Vec3 { public: - typedef Vec3 const& Arg; + typedef Vec3 const& Arg; - Vec3() - { - } + Vec3() + { + } - explicit Vec3( float s ) - { - m_x = s; - m_y = s; - m_z = s; - } + explicit Vec3( float s ) + { + m_x = s; + m_y = s; + m_z = s; + } - Vec3( float x, float y, float z ) - { - m_x = x; - m_y = y; - m_z = z; - } - - float X() const { return m_x; } - float Y() const { return m_y; } - float Z() const { return m_z; } - - Vec3 operator-() const - { - return Vec3( -m_x, -m_y, -m_z ); - } - - Vec3& operator+=( Arg v ) - { - m_x += v.m_x; - m_y += v.m_y; - m_z += v.m_z; - return *this; - } - - Vec3& operator-=( Arg v ) - { - m_x -= v.m_x; - m_y -= v.m_y; - m_z -= v.m_z; - return *this; - } - - Vec3& operator*=( Arg v ) - { - m_x *= v.m_x; - m_y *= v.m_y; - m_z *= v.m_z; - return *this; - } - - Vec3& operator*=( float s ) - { - m_x *= s; - m_y *= s; - m_z *= s; - return *this; - } - - Vec3& operator/=( Arg v ) - { - m_x /= v.m_x; - m_y /= v.m_y; - m_z /= v.m_z; - return *this; - } - - Vec3& operator/=( float s ) - { - float t = 1.0f/s; - m_x *= t; - m_y *= t; - m_z *= t; - return *this; - } - - friend Vec3 operator+( Arg left, Arg right ) - { - Vec3 copy( left ); - return copy += right; - } - - friend Vec3 operator-( Arg left, Arg right ) - { - Vec3 copy( left ); - return copy -= right; - } - - friend Vec3 operator*( Arg left, Arg right ) - { - Vec3 copy( left ); - return copy *= right; - } - - friend Vec3 operator*( Arg left, float right ) - { - Vec3 copy( left ); - return copy *= right; - } - - friend Vec3 operator*( float left, Arg right ) - { - Vec3 copy( right ); - return copy *= left; - } - - friend Vec3 operator/( Arg left, Arg right ) - { - Vec3 copy( left ); - return copy /= right; - } - - friend Vec3 operator/( Arg left, float right ) - { - Vec3 copy( left ); - return copy /= right; - } - - friend float Dot( Arg left, Arg right ) - { - return left.m_x*right.m_x + left.m_y*right.m_y + left.m_z*right.m_z; - } - - friend Vec3 Min( Arg left, Arg right ) - { - return Vec3( - std::min( left.m_x, right.m_x ), - std::min( left.m_y, right.m_y ), - std::min( left.m_z, right.m_z ) - ); - } + Vec3( float x, float y, float z ) + { + m_x = x; + m_y = y; + m_z = z; + } - friend Vec3 Max( Arg left, Arg right ) - { - return Vec3( - std::max( left.m_x, right.m_x ), - std::max( left.m_y, right.m_y ), - std::max( left.m_z, right.m_z ) - ); - } + float X() const { return m_x; } + float Y() const { return m_y; } + float Z() const { return m_z; } - friend Vec3 Truncate( Arg v ) - { - return Vec3( - v.m_x > 0.0f ? std::floor( v.m_x ) : std::ceil( v.m_x ), - v.m_y > 0.0f ? std::floor( v.m_y ) : std::ceil( v.m_y ), - v.m_z > 0.0f ? std::floor( v.m_z ) : std::ceil( v.m_z ) - ); - } + Vec3 operator-() const + { + return Vec3( -m_x, -m_y, -m_z ); + } + + Vec3& operator+=( Arg v ) + { + m_x += v.m_x; + m_y += v.m_y; + m_z += v.m_z; + return *this; + } + + Vec3& operator-=( Arg v ) + { + m_x -= v.m_x; + m_y -= v.m_y; + m_z -= v.m_z; + return *this; + } + + Vec3& operator*=( Arg v ) + { + m_x *= v.m_x; + m_y *= v.m_y; + m_z *= v.m_z; + return *this; + } + + Vec3& operator*=( float s ) + { + m_x *= s; + m_y *= s; + m_z *= s; + return *this; + } + + Vec3& operator/=( Arg v ) + { + m_x /= v.m_x; + m_y /= v.m_y; + m_z /= v.m_z; + return *this; + } + + Vec3& operator/=( float s ) + { + float t = 1.0f/s; + m_x *= t; + m_y *= t; + m_z *= t; + return *this; + } + + friend Vec3 operator+( Arg left, Arg right ) + { + Vec3 copy( left ); + return copy += right; + } + + friend Vec3 operator-( Arg left, Arg right ) + { + Vec3 copy( left ); + return copy -= right; + } + + friend Vec3 operator*( Arg left, Arg right ) + { + Vec3 copy( left ); + return copy *= right; + } + + friend Vec3 operator*( Arg left, float right ) + { + Vec3 copy( left ); + return copy *= right; + } + + friend Vec3 operator*( float left, Arg right ) + { + Vec3 copy( right ); + return copy *= left; + } + + friend Vec3 operator/( Arg left, Arg right ) + { + Vec3 copy( left ); + return copy /= right; + } + + friend Vec3 operator/( Arg left, float right ) + { + Vec3 copy( left ); + return copy /= right; + } + + friend float Dot( Arg left, Arg right ) + { + return left.m_x*right.m_x + left.m_y*right.m_y + left.m_z*right.m_z; + } + + friend Vec3 Min( Arg left, Arg right ) + { + return Vec3( + std::min( left.m_x, right.m_x ), + std::min( left.m_y, right.m_y ), + std::min( left.m_z, right.m_z ) + ); + } + + friend Vec3 Max( Arg left, Arg right ) + { + return Vec3( + std::max( left.m_x, right.m_x ), + std::max( left.m_y, right.m_y ), + std::max( left.m_z, right.m_z ) + ); + } + + friend Vec3 Truncate( Arg v ) + { + return Vec3( + v.m_x > 0.0f ? std::floor( v.m_x ) : std::ceil( v.m_x ), + v.m_y > 0.0f ? std::floor( v.m_y ) : std::ceil( v.m_y ), + v.m_z > 0.0f ? std::floor( v.m_z ) : std::ceil( v.m_z ) + ); + } private: - float m_x; - float m_y; - float m_z; + float m_x; + float m_y; + float m_z; }; inline float LengthSquared( Vec3::Arg v ) { - return Dot( v, v ); + return Dot( v, v ); } class Sym3x3 { public: - Sym3x3() - { - } + Sym3x3() + { + } - Sym3x3( float s ) - { - for( int i = 0; i < 6; ++i ) - m_x[i] = s; - } + Sym3x3( float s ) + { + for( int i = 0; i < 6; ++i ) + m_x[i] = s; + } - float operator[]( int index ) const - { - return m_x[index]; - } + float operator[]( int index ) const + { + return m_x[index]; + } - float& operator[]( int index ) - { - return m_x[index]; - } + float& operator[]( int index ) + { + return m_x[index]; + } private: - float m_x[6]; + float m_x[6]; }; Sym3x3 ComputeWeightedCovariance( int n, Vec3 const* points, float const* weights ); diff --git a/thirdparty/squish/rangefit.cpp b/thirdparty/squish/rangefit.cpp index 5a664360565..adc07ed7d22 100644 --- a/thirdparty/squish/rangefit.cpp +++ b/thirdparty/squish/rangefit.cpp @@ -1,28 +1,28 @@ /* ----------------------------------------------------------------------------- - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------- */ - + #include "rangefit.h" #include "colourset.h" #include "colourblock.h" @@ -30,173 +30,172 @@ namespace squish { -RangeFit::RangeFit( ColourSet const* colours, int flags ) +RangeFit::RangeFit( ColourSet const* colours, int flags, float* metric ) : ColourFit( colours, flags ) { - // initialise the metric - bool perceptual = ( ( m_flags & kColourMetricPerceptual ) != 0 ); - if( perceptual ) - m_metric = Vec3( 0.2126f, 0.7152f, 0.0722f ); - else - m_metric = Vec3( 1.0f ); + // initialise the metric (old perceptual = 0.2126f, 0.7152f, 0.0722f) + if( metric ) + m_metric = Vec3( metric[0], metric[1], metric[2] ); + else + m_metric = Vec3( 1.0f ); - // initialise the best error - m_besterror = FLT_MAX; + // initialise the best error + m_besterror = FLT_MAX; - // cache some values - int const count = m_colours->GetCount(); - Vec3 const* values = m_colours->GetPoints(); - float const* weights = m_colours->GetWeights(); - - // get the covariance matrix - Sym3x3 covariance = ComputeWeightedCovariance( count, values, weights ); - - // compute the principle component - Vec3 principle = ComputePrincipleComponent( covariance ); + // cache some values + int const count = m_colours->GetCount(); + Vec3 const* values = m_colours->GetPoints(); + float const* weights = m_colours->GetWeights(); - // get the min and max range as the codebook endpoints - Vec3 start( 0.0f ); - Vec3 end( 0.0f ); - if( count > 0 ) - { - float min, max; - - // compute the range - start = end = values[0]; - min = max = Dot( values[0], principle ); - for( int i = 1; i < count; ++i ) - { - float val = Dot( values[i], principle ); - if( val < min ) - { - start = values[i]; - min = val; - } - else if( val > max ) - { - end = values[i]; - max = val; - } - } - } - - // clamp the output to [0, 1] - Vec3 const one( 1.0f ); - Vec3 const zero( 0.0f ); - start = Min( one, Max( zero, start ) ); - end = Min( one, Max( zero, end ) ); + // get the covariance matrix + Sym3x3 covariance = ComputeWeightedCovariance( count, values, weights ); - // clamp to the grid and save - Vec3 const grid( 31.0f, 63.0f, 31.0f ); - Vec3 const gridrcp( 1.0f/31.0f, 1.0f/63.0f, 1.0f/31.0f ); - Vec3 const half( 0.5f ); - m_start = Truncate( grid*start + half )*gridrcp; - m_end = Truncate( grid*end + half )*gridrcp; + // compute the principle component + Vec3 principle = ComputePrincipleComponent( covariance ); + + // get the min and max range as the codebook endpoints + Vec3 start( 0.0f ); + Vec3 end( 0.0f ); + if( count > 0 ) + { + float min, max; + + // compute the range + start = end = values[0]; + min = max = Dot( values[0], principle ); + for( int i = 1; i < count; ++i ) + { + float val = Dot( values[i], principle ); + if( val < min ) + { + start = values[i]; + min = val; + } + else if( val > max ) + { + end = values[i]; + max = val; + } + } + } + + // clamp the output to [0, 1] + Vec3 const one( 1.0f ); + Vec3 const zero( 0.0f ); + start = Min( one, Max( zero, start ) ); + end = Min( one, Max( zero, end ) ); + + // clamp to the grid and save + Vec3 const grid( 31.0f, 63.0f, 31.0f ); + Vec3 const gridrcp( 1.0f/31.0f, 1.0f/63.0f, 1.0f/31.0f ); + Vec3 const half( 0.5f ); + m_start = Truncate( grid*start + half )*gridrcp; + m_end = Truncate( grid*end + half )*gridrcp; } void RangeFit::Compress3( void* block ) { - // cache some values - int const count = m_colours->GetCount(); - Vec3 const* values = m_colours->GetPoints(); - - // create a codebook - Vec3 codes[3]; - codes[0] = m_start; - codes[1] = m_end; - codes[2] = 0.5f*m_start + 0.5f*m_end; + // cache some values + int const count = m_colours->GetCount(); + Vec3 const* values = m_colours->GetPoints(); - // match each point to the closest code - u8 closest[16]; - float error = 0.0f; - for( int i = 0; i < count; ++i ) - { - // find the closest code - float dist = FLT_MAX; - int idx = 0; - for( int j = 0; j < 3; ++j ) - { - float d = LengthSquared( m_metric*( values[i] - codes[j] ) ); - if( d < dist ) - { - dist = d; - idx = j; - } - } - - // save the index - closest[i] = ( u8 )idx; - - // accumulate the error - error += dist; - } - - // save this scheme if it wins - if( error < m_besterror ) - { - // remap the indices - u8 indices[16]; - m_colours->RemapIndices( closest, indices ); - - // save the block - WriteColourBlock3( m_start, m_end, indices, block ); - - // save the error - m_besterror = error; - } + // create a codebook + Vec3 codes[3]; + codes[0] = m_start; + codes[1] = m_end; + codes[2] = 0.5f*m_start + 0.5f*m_end; + + // match each point to the closest code + u8 closest[16]; + float error = 0.0f; + for( int i = 0; i < count; ++i ) + { + // find the closest code + float dist = FLT_MAX; + int idx = 0; + for( int j = 0; j < 3; ++j ) + { + float d = LengthSquared( m_metric*( values[i] - codes[j] ) ); + if( d < dist ) + { + dist = d; + idx = j; + } + } + + // save the index + closest[i] = ( u8 )idx; + + // accumulate the error + error += dist; + } + + // save this scheme if it wins + if( error < m_besterror ) + { + // remap the indices + u8 indices[16]; + m_colours->RemapIndices( closest, indices ); + + // save the block + WriteColourBlock3( m_start, m_end, indices, block ); + + // save the error + m_besterror = error; + } } void RangeFit::Compress4( void* block ) { - // cache some values - int const count = m_colours->GetCount(); - Vec3 const* values = m_colours->GetPoints(); - - // create a codebook - Vec3 codes[4]; - codes[0] = m_start; - codes[1] = m_end; - codes[2] = ( 2.0f/3.0f )*m_start + ( 1.0f/3.0f )*m_end; - codes[3] = ( 1.0f/3.0f )*m_start + ( 2.0f/3.0f )*m_end; + // cache some values + int const count = m_colours->GetCount(); + Vec3 const* values = m_colours->GetPoints(); - // match each point to the closest code - u8 closest[16]; - float error = 0.0f; - for( int i = 0; i < count; ++i ) - { - // find the closest code - float dist = FLT_MAX; - int idx = 0; - for( int j = 0; j < 4; ++j ) - { - float d = LengthSquared( m_metric*( values[i] - codes[j] ) ); - if( d < dist ) - { - dist = d; - idx = j; - } - } - - // save the index - closest[i] = ( u8 )idx; - - // accumulate the error - error += dist; - } - - // save this scheme if it wins - if( error < m_besterror ) - { - // remap the indices - u8 indices[16]; - m_colours->RemapIndices( closest, indices ); - - // save the block - WriteColourBlock4( m_start, m_end, indices, block ); + // create a codebook + Vec3 codes[4]; + codes[0] = m_start; + codes[1] = m_end; + codes[2] = ( 2.0f/3.0f )*m_start + ( 1.0f/3.0f )*m_end; + codes[3] = ( 1.0f/3.0f )*m_start + ( 2.0f/3.0f )*m_end; - // save the error - m_besterror = error; - } + // match each point to the closest code + u8 closest[16]; + float error = 0.0f; + for( int i = 0; i < count; ++i ) + { + // find the closest code + float dist = FLT_MAX; + int idx = 0; + for( int j = 0; j < 4; ++j ) + { + float d = LengthSquared( m_metric*( values[i] - codes[j] ) ); + if( d < dist ) + { + dist = d; + idx = j; + } + } + + // save the index + closest[i] = ( u8 )idx; + + // accumulate the error + error += dist; + } + + // save this scheme if it wins + if( error < m_besterror ) + { + // remap the indices + u8 indices[16]; + m_colours->RemapIndices( closest, indices ); + + // save the block + WriteColourBlock4( m_start, m_end, indices, block ); + + // save the error + m_besterror = error; + } } } // namespace squish diff --git a/thirdparty/squish/rangefit.h b/thirdparty/squish/rangefit.h index 795201993aa..bdb21a90074 100644 --- a/thirdparty/squish/rangefit.h +++ b/thirdparty/squish/rangefit.h @@ -1,32 +1,32 @@ /* ----------------------------------------------------------------------------- - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------- */ - + #ifndef SQUISH_RANGEFIT_H #define SQUISH_RANGEFIT_H -#include +#include "squish.h" #include "colourfit.h" #include "maths.h" @@ -37,16 +37,16 @@ class ColourSet; class RangeFit : public ColourFit { public: - RangeFit( ColourSet const* colours, int flags ); - + RangeFit( ColourSet const* colours, int flags, float* metric ); + private: - virtual void Compress3( void* block ); - virtual void Compress4( void* block ); - - Vec3 m_metric; - Vec3 m_start; - Vec3 m_end; - float m_besterror; + virtual void Compress3( void* block ); + virtual void Compress4( void* block ); + + Vec3 m_metric; + Vec3 m_start; + Vec3 m_end; + float m_besterror; }; } // squish diff --git a/thirdparty/squish/simd.h b/thirdparty/squish/simd.h index 22bd10a4606..1e02fa160eb 100644 --- a/thirdparty/squish/simd.h +++ b/thirdparty/squish/simd.h @@ -1,28 +1,28 @@ /* ----------------------------------------------------------------------------- - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------- */ - + #ifndef SQUISH_SIMD_H #define SQUISH_SIMD_H diff --git a/thirdparty/squish/simd_float.h b/thirdparty/squish/simd_float.h index e6351b80eb0..030ea70950c 100644 --- a/thirdparty/squish/simd_float.h +++ b/thirdparty/squish/simd_float.h @@ -1,28 +1,28 @@ /* ----------------------------------------------------------------------------- - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------- */ - + #ifndef SQUISH_SIMD_FLOAT_H #define SQUISH_SIMD_FLOAT_H @@ -35,146 +35,146 @@ namespace squish { class Vec4 { public: - typedef Vec4 const& Arg; + typedef Vec4 const& Arg; - Vec4() {} - - explicit Vec4( float s ) - : m_x( s ), - m_y( s ), - m_z( s ), - m_w( s ) - { - } - - Vec4( float x, float y, float z, float w ) - : m_x( x ), - m_y( y ), - m_z( z ), - m_w( w ) - { - } - - Vec3 GetVec3() const - { - return Vec3( m_x, m_y, m_z ); - } - - Vec4 SplatX() const { return Vec4( m_x ); } - Vec4 SplatY() const { return Vec4( m_y ); } - Vec4 SplatZ() const { return Vec4( m_z ); } - Vec4 SplatW() const { return Vec4( m_w ); } + Vec4() {} + + explicit Vec4( float s ) + : m_x( s ), + m_y( s ), + m_z( s ), + m_w( s ) + { + } + + Vec4( float x, float y, float z, float w ) + : m_x( x ), + m_y( y ), + m_z( z ), + m_w( w ) + { + } + + Vec3 GetVec3() const + { + return Vec3( m_x, m_y, m_z ); + } + + Vec4 SplatX() const { return Vec4( m_x ); } + Vec4 SplatY() const { return Vec4( m_y ); } + Vec4 SplatZ() const { return Vec4( m_z ); } + Vec4 SplatW() const { return Vec4( m_w ); } + + Vec4& operator+=( Arg v ) + { + m_x += v.m_x; + m_y += v.m_y; + m_z += v.m_z; + m_w += v.m_w; + return *this; + } + + Vec4& operator-=( Arg v ) + { + m_x -= v.m_x; + m_y -= v.m_y; + m_z -= v.m_z; + m_w -= v.m_w; + return *this; + } + + Vec4& operator*=( Arg v ) + { + m_x *= v.m_x; + m_y *= v.m_y; + m_z *= v.m_z; + m_w *= v.m_w; + return *this; + } + + friend Vec4 operator+( Vec4::Arg left, Vec4::Arg right ) + { + Vec4 copy( left ); + return copy += right; + } + + friend Vec4 operator-( Vec4::Arg left, Vec4::Arg right ) + { + Vec4 copy( left ); + return copy -= right; + } + + friend Vec4 operator*( Vec4::Arg left, Vec4::Arg right ) + { + Vec4 copy( left ); + return copy *= right; + } + + //! Returns a*b + c + friend Vec4 MultiplyAdd( Vec4::Arg a, Vec4::Arg b, Vec4::Arg c ) + { + return a*b + c; + } + + //! Returns -( a*b - c ) + friend Vec4 NegativeMultiplySubtract( Vec4::Arg a, Vec4::Arg b, Vec4::Arg c ) + { + return c - a*b; + } + + friend Vec4 Reciprocal( Vec4::Arg v ) + { + return Vec4( + 1.0f/v.m_x, + 1.0f/v.m_y, + 1.0f/v.m_z, + 1.0f/v.m_w + ); + } + + friend Vec4 Min( Vec4::Arg left, Vec4::Arg right ) + { + return Vec4( + std::min( left.m_x, right.m_x ), + std::min( left.m_y, right.m_y ), + std::min( left.m_z, right.m_z ), + std::min( left.m_w, right.m_w ) + ); + } + + friend Vec4 Max( Vec4::Arg left, Vec4::Arg right ) + { + return Vec4( + std::max( left.m_x, right.m_x ), + std::max( left.m_y, right.m_y ), + std::max( left.m_z, right.m_z ), + std::max( left.m_w, right.m_w ) + ); + } + + friend Vec4 Truncate( Vec4::Arg v ) + { + return Vec4( + v.m_x > 0.0f ? std::floor( v.m_x ) : std::ceil( v.m_x ), + v.m_y > 0.0f ? std::floor( v.m_y ) : std::ceil( v.m_y ), + v.m_z > 0.0f ? std::floor( v.m_z ) : std::ceil( v.m_z ), + v.m_w > 0.0f ? std::floor( v.m_w ) : std::ceil( v.m_w ) + ); + } + + friend bool CompareAnyLessThan( Vec4::Arg left, Vec4::Arg right ) + { + return left.m_x < right.m_x + || left.m_y < right.m_y + || left.m_z < right.m_z + || left.m_w < right.m_w; + } - Vec4& operator+=( Arg v ) - { - m_x += v.m_x; - m_y += v.m_y; - m_z += v.m_z; - m_w += v.m_w; - return *this; - } - - Vec4& operator-=( Arg v ) - { - m_x -= v.m_x; - m_y -= v.m_y; - m_z -= v.m_z; - m_w -= v.m_w; - return *this; - } - - Vec4& operator*=( Arg v ) - { - m_x *= v.m_x; - m_y *= v.m_y; - m_z *= v.m_z; - m_w *= v.m_w; - return *this; - } - - friend Vec4 operator+( Vec4::Arg left, Vec4::Arg right ) - { - Vec4 copy( left ); - return copy += right; - } - - friend Vec4 operator-( Vec4::Arg left, Vec4::Arg right ) - { - Vec4 copy( left ); - return copy -= right; - } - - friend Vec4 operator*( Vec4::Arg left, Vec4::Arg right ) - { - Vec4 copy( left ); - return copy *= right; - } - - //! Returns a*b + c - friend Vec4 MultiplyAdd( Vec4::Arg a, Vec4::Arg b, Vec4::Arg c ) - { - return a*b + c; - } - - //! Returns -( a*b - c ) - friend Vec4 NegativeMultiplySubtract( Vec4::Arg a, Vec4::Arg b, Vec4::Arg c ) - { - return c - a*b; - } - - friend Vec4 Reciprocal( Vec4::Arg v ) - { - return Vec4( - 1.0f/v.m_x, - 1.0f/v.m_y, - 1.0f/v.m_z, - 1.0f/v.m_w - ); - } - - friend Vec4 Min( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( - std::min( left.m_x, right.m_x ), - std::min( left.m_y, right.m_y ), - std::min( left.m_z, right.m_z ), - std::min( left.m_w, right.m_w ) - ); - } - - friend Vec4 Max( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( - std::max( left.m_x, right.m_x ), - std::max( left.m_y, right.m_y ), - std::max( left.m_z, right.m_z ), - std::max( left.m_w, right.m_w ) - ); - } - - friend Vec4 Truncate( Vec4::Arg v ) - { - return Vec4( - v.m_x > 0.0f ? std::floor( v.m_x ) : std::ceil( v.m_x ), - v.m_y > 0.0f ? std::floor( v.m_y ) : std::ceil( v.m_y ), - v.m_z > 0.0f ? std::floor( v.m_z ) : std::ceil( v.m_z ), - v.m_w > 0.0f ? std::floor( v.m_w ) : std::ceil( v.m_w ) - ); - } - - friend bool CompareAnyLessThan( Vec4::Arg left, Vec4::Arg right ) - { - return left.m_x < right.m_x - || left.m_y < right.m_y - || left.m_z < right.m_z - || left.m_w < right.m_w; - } - private: - float m_x; - float m_y; - float m_z; - float m_w; + float m_x; + float m_y; + float m_z; + float m_w; }; } // namespace squish diff --git a/thirdparty/squish/simd_sse.h b/thirdparty/squish/simd_sse.h index e584f2a0e52..2e8be4ca7be 100644 --- a/thirdparty/squish/simd_sse.h +++ b/thirdparty/squish/simd_sse.h @@ -1,28 +1,28 @@ /* ----------------------------------------------------------------------------- - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------- */ - + #ifndef SQUISH_SIMD_SSE_H #define SQUISH_SIMD_SSE_H @@ -31,11 +31,11 @@ #include #endif -#define SQUISH_SSE_SPLAT( a ) \ - ( ( a ) | ( ( a ) << 2 ) | ( ( a ) << 4 ) | ( ( a ) << 6 ) ) +#define SQUISH_SSE_SPLAT( a ) \ + ( ( a ) | ( ( a ) << 2 ) | ( ( a ) << 4 ) | ( ( a ) << 6 ) ) -#define SQUISH_SSE_SHUF( x, y, z, w ) \ - ( ( x ) | ( ( y ) << 2 ) | ( ( z ) << 4 ) | ( ( w ) << 6 ) ) +#define SQUISH_SSE_SHUF( x, y, z, w ) \ + ( ( x ) | ( ( y ) << 2 ) | ( ( z ) << 4 ) | ( ( w ) << 6 ) ) namespace squish { @@ -44,135 +44,135 @@ namespace squish { class Vec4 { public: - typedef Vec4 const& Arg; + typedef Vec4 const& Arg; - Vec4() {} - - explicit Vec4( __m128 v ) : m_v( v ) {} - - Vec4( Vec4 const& arg ) : m_v( arg.m_v ) {} - - Vec4& operator=( Vec4 const& arg ) - { - m_v = arg.m_v; - return *this; - } - - explicit Vec4( float s ) : m_v( _mm_set1_ps( s ) ) {} - - Vec4( float x, float y, float z, float w ) : m_v( _mm_setr_ps( x, y, z, w ) ) {} - - Vec3 GetVec3() const - { + Vec4() {} + + explicit Vec4( __m128 v ) : m_v( v ) {} + + Vec4( Vec4 const& arg ) : m_v( arg.m_v ) {} + + Vec4& operator=( Vec4 const& arg ) + { + m_v = arg.m_v; + return *this; + } + + explicit Vec4( float s ) : m_v( _mm_set1_ps( s ) ) {} + + Vec4( float x, float y, float z, float w ) : m_v( _mm_setr_ps( x, y, z, w ) ) {} + + Vec3 GetVec3() const + { #ifdef __GNUC__ - __attribute__ ((__aligned__ (16))) float c[4]; + __attribute__ ((__aligned__ (16))) float c[4]; #else - __declspec(align(16)) float c[4]; + __declspec(align(16)) float c[4]; #endif - _mm_store_ps( c, m_v ); - return Vec3( c[0], c[1], c[2] ); - } - - Vec4 SplatX() const { return Vec4( _mm_shuffle_ps( m_v, m_v, SQUISH_SSE_SPLAT( 0 ) ) ); } - Vec4 SplatY() const { return Vec4( _mm_shuffle_ps( m_v, m_v, SQUISH_SSE_SPLAT( 1 ) ) ); } - Vec4 SplatZ() const { return Vec4( _mm_shuffle_ps( m_v, m_v, SQUISH_SSE_SPLAT( 2 ) ) ); } - Vec4 SplatW() const { return Vec4( _mm_shuffle_ps( m_v, m_v, SQUISH_SSE_SPLAT( 3 ) ) ); } + _mm_store_ps( c, m_v ); + return Vec3( c[0], c[1], c[2] ); + } - Vec4& operator+=( Arg v ) - { - m_v = _mm_add_ps( m_v, v.m_v ); - return *this; - } - - Vec4& operator-=( Arg v ) - { - m_v = _mm_sub_ps( m_v, v.m_v ); - return *this; - } - - Vec4& operator*=( Arg v ) - { - m_v = _mm_mul_ps( m_v, v.m_v ); - return *this; - } - - friend Vec4 operator+( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( _mm_add_ps( left.m_v, right.m_v ) ); - } - - friend Vec4 operator-( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( _mm_sub_ps( left.m_v, right.m_v ) ); - } - - friend Vec4 operator*( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( _mm_mul_ps( left.m_v, right.m_v ) ); - } - - //! Returns a*b + c - friend Vec4 MultiplyAdd( Vec4::Arg a, Vec4::Arg b, Vec4::Arg c ) - { - return Vec4( _mm_add_ps( _mm_mul_ps( a.m_v, b.m_v ), c.m_v ) ); - } - - //! Returns -( a*b - c ) - friend Vec4 NegativeMultiplySubtract( Vec4::Arg a, Vec4::Arg b, Vec4::Arg c ) - { - return Vec4( _mm_sub_ps( c.m_v, _mm_mul_ps( a.m_v, b.m_v ) ) ); - } - - friend Vec4 Reciprocal( Vec4::Arg v ) - { - // get the reciprocal estimate - __m128 estimate = _mm_rcp_ps( v.m_v ); + Vec4 SplatX() const { return Vec4( _mm_shuffle_ps( m_v, m_v, SQUISH_SSE_SPLAT( 0 ) ) ); } + Vec4 SplatY() const { return Vec4( _mm_shuffle_ps( m_v, m_v, SQUISH_SSE_SPLAT( 1 ) ) ); } + Vec4 SplatZ() const { return Vec4( _mm_shuffle_ps( m_v, m_v, SQUISH_SSE_SPLAT( 2 ) ) ); } + Vec4 SplatW() const { return Vec4( _mm_shuffle_ps( m_v, m_v, SQUISH_SSE_SPLAT( 3 ) ) ); } - // one round of Newton-Rhaphson refinement - __m128 diff = _mm_sub_ps( _mm_set1_ps( 1.0f ), _mm_mul_ps( estimate, v.m_v ) ); - return Vec4( _mm_add_ps( _mm_mul_ps( diff, estimate ), estimate ) ); - } - - friend Vec4 Min( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( _mm_min_ps( left.m_v, right.m_v ) ); - } - - friend Vec4 Max( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( _mm_max_ps( left.m_v, right.m_v ) ); - } - - friend Vec4 Truncate( Vec4::Arg v ) - { + Vec4& operator+=( Arg v ) + { + m_v = _mm_add_ps( m_v, v.m_v ); + return *this; + } + + Vec4& operator-=( Arg v ) + { + m_v = _mm_sub_ps( m_v, v.m_v ); + return *this; + } + + Vec4& operator*=( Arg v ) + { + m_v = _mm_mul_ps( m_v, v.m_v ); + return *this; + } + + friend Vec4 operator+( Vec4::Arg left, Vec4::Arg right ) + { + return Vec4( _mm_add_ps( left.m_v, right.m_v ) ); + } + + friend Vec4 operator-( Vec4::Arg left, Vec4::Arg right ) + { + return Vec4( _mm_sub_ps( left.m_v, right.m_v ) ); + } + + friend Vec4 operator*( Vec4::Arg left, Vec4::Arg right ) + { + return Vec4( _mm_mul_ps( left.m_v, right.m_v ) ); + } + + //! Returns a*b + c + friend Vec4 MultiplyAdd( Vec4::Arg a, Vec4::Arg b, Vec4::Arg c ) + { + return Vec4( _mm_add_ps( _mm_mul_ps( a.m_v, b.m_v ), c.m_v ) ); + } + + //! Returns -( a*b - c ) + friend Vec4 NegativeMultiplySubtract( Vec4::Arg a, Vec4::Arg b, Vec4::Arg c ) + { + return Vec4( _mm_sub_ps( c.m_v, _mm_mul_ps( a.m_v, b.m_v ) ) ); + } + + friend Vec4 Reciprocal( Vec4::Arg v ) + { + // get the reciprocal estimate + __m128 estimate = _mm_rcp_ps( v.m_v ); + + // one round of Newton-Rhaphson refinement + __m128 diff = _mm_sub_ps( _mm_set1_ps( 1.0f ), _mm_mul_ps( estimate, v.m_v ) ); + return Vec4( _mm_add_ps( _mm_mul_ps( diff, estimate ), estimate ) ); + } + + friend Vec4 Min( Vec4::Arg left, Vec4::Arg right ) + { + return Vec4( _mm_min_ps( left.m_v, right.m_v ) ); + } + + friend Vec4 Max( Vec4::Arg left, Vec4::Arg right ) + { + return Vec4( _mm_max_ps( left.m_v, right.m_v ) ); + } + + friend Vec4 Truncate( Vec4::Arg v ) + { #if ( SQUISH_USE_SSE == 1 ) - // convert to ints - __m128 input = v.m_v; - __m64 lo = _mm_cvttps_pi32( input ); - __m64 hi = _mm_cvttps_pi32( _mm_movehl_ps( input, input ) ); + // convert to ints + __m128 input = v.m_v; + __m64 lo = _mm_cvttps_pi32( input ); + __m64 hi = _mm_cvttps_pi32( _mm_movehl_ps( input, input ) ); - // convert to floats - __m128 part = _mm_movelh_ps( input, _mm_cvtpi32_ps( input, hi ) ); - __m128 truncated = _mm_cvtpi32_ps( part, lo ); - - // clear out the MMX multimedia state to allow FP calls later - _mm_empty(); - return Vec4( truncated ); + // convert to floats + __m128 part = _mm_movelh_ps( input, _mm_cvtpi32_ps( input, hi ) ); + __m128 truncated = _mm_cvtpi32_ps( part, lo ); + + // clear out the MMX multimedia state to allow FP calls later + _mm_empty(); + return Vec4( truncated ); #else - // use SSE2 instructions - return Vec4( _mm_cvtepi32_ps( _mm_cvttps_epi32( v.m_v ) ) ); + // use SSE2 instructions + return Vec4( _mm_cvtepi32_ps( _mm_cvttps_epi32( v.m_v ) ) ); #endif - } - - friend bool CompareAnyLessThan( Vec4::Arg left, Vec4::Arg right ) - { - __m128 bits = _mm_cmplt_ps( left.m_v, right.m_v ); - int value = _mm_movemask_ps( bits ); - return value != 0; - } - + } + + friend bool CompareAnyLessThan( Vec4::Arg left, Vec4::Arg right ) + { + __m128 bits = _mm_cmplt_ps( left.m_v, right.m_v ); + int value = _mm_movemask_ps( bits ); + return value != 0; + } + private: - __m128 m_v; + __m128 m_v; }; } // namespace squish diff --git a/thirdparty/squish/simd_ve.h b/thirdparty/squish/simd_ve.h index 9a33955ffc3..08a15375032 100644 --- a/thirdparty/squish/simd_ve.h +++ b/thirdparty/squish/simd_ve.h @@ -1,28 +1,28 @@ /* ----------------------------------------------------------------------------- - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------- */ - + #ifndef SQUISH_SIMD_VE_H #define SQUISH_SIMD_VE_H @@ -31,134 +31,134 @@ namespace squish { -#define VEC4_CONST( X ) Vec4( ( vector float )( X ) ) +#define VEC4_CONST( X ) Vec4( ( vector float ){ X } ) class Vec4 { public: - typedef Vec4 Arg; + typedef Vec4 Arg; - Vec4() {} - - explicit Vec4( vector float v ) : m_v( v ) {} - - Vec4( Vec4 const& arg ) : m_v( arg.m_v ) {} - - Vec4& operator=( Vec4 const& arg ) - { - m_v = arg.m_v; - return *this; - } - - explicit Vec4( float s ) - { - union { vector float v; float c[4]; } u; - u.c[0] = s; - u.c[1] = s; - u.c[2] = s; - u.c[3] = s; - m_v = u.v; - } - - Vec4( float x, float y, float z, float w ) - { - union { vector float v; float c[4]; } u; - u.c[0] = x; - u.c[1] = y; - u.c[2] = z; - u.c[3] = w; - m_v = u.v; - } - - Vec3 GetVec3() const - { - union { vector float v; float c[4]; } u; - u.v = m_v; - return Vec3( u.c[0], u.c[1], u.c[2] ); - } - - Vec4 SplatX() const { return Vec4( vec_splat( m_v, 0 ) ); } - Vec4 SplatY() const { return Vec4( vec_splat( m_v, 1 ) ); } - Vec4 SplatZ() const { return Vec4( vec_splat( m_v, 2 ) ); } - Vec4 SplatW() const { return Vec4( vec_splat( m_v, 3 ) ); } + Vec4() {} + + explicit Vec4( vector float v ) : m_v( v ) {} + + Vec4( Vec4 const& arg ) : m_v( arg.m_v ) {} + + Vec4& operator=( Vec4 const& arg ) + { + m_v = arg.m_v; + return *this; + } + + explicit Vec4( float s ) + { + union { vector float v; float c[4]; } u; + u.c[0] = s; + u.c[1] = s; + u.c[2] = s; + u.c[3] = s; + m_v = u.v; + } + + Vec4( float x, float y, float z, float w ) + { + union { vector float v; float c[4]; } u; + u.c[0] = x; + u.c[1] = y; + u.c[2] = z; + u.c[3] = w; + m_v = u.v; + } + + Vec3 GetVec3() const + { + union { vector float v; float c[4]; } u; + u.v = m_v; + return Vec3( u.c[0], u.c[1], u.c[2] ); + } + + Vec4 SplatX() const { return Vec4( vec_splat( m_v, 0 ) ); } + Vec4 SplatY() const { return Vec4( vec_splat( m_v, 1 ) ); } + Vec4 SplatZ() const { return Vec4( vec_splat( m_v, 2 ) ); } + Vec4 SplatW() const { return Vec4( vec_splat( m_v, 3 ) ); } + + Vec4& operator+=( Arg v ) + { + m_v = vec_add( m_v, v.m_v ); + return *this; + } + + Vec4& operator-=( Arg v ) + { + m_v = vec_sub( m_v, v.m_v ); + return *this; + } + + Vec4& operator*=( Arg v ) + { + m_v = vec_madd( m_v, v.m_v, ( vector float ){ -0.0f } ); + return *this; + } + + friend Vec4 operator+( Vec4::Arg left, Vec4::Arg right ) + { + return Vec4( vec_add( left.m_v, right.m_v ) ); + } + + friend Vec4 operator-( Vec4::Arg left, Vec4::Arg right ) + { + return Vec4( vec_sub( left.m_v, right.m_v ) ); + } + + friend Vec4 operator*( Vec4::Arg left, Vec4::Arg right ) + { + return Vec4( vec_madd( left.m_v, right.m_v, ( vector float ){ -0.0f } ) ); + } + + //! Returns a*b + c + friend Vec4 MultiplyAdd( Vec4::Arg a, Vec4::Arg b, Vec4::Arg c ) + { + return Vec4( vec_madd( a.m_v, b.m_v, c.m_v ) ); + } + + //! Returns -( a*b - c ) + friend Vec4 NegativeMultiplySubtract( Vec4::Arg a, Vec4::Arg b, Vec4::Arg c ) + { + return Vec4( vec_nmsub( a.m_v, b.m_v, c.m_v ) ); + } + + friend Vec4 Reciprocal( Vec4::Arg v ) + { + // get the reciprocal estimate + vector float estimate = vec_re( v.m_v ); + + // one round of Newton-Rhaphson refinement + vector float diff = vec_nmsub( estimate, v.m_v, ( vector float ){ 1.0f } ); + return Vec4( vec_madd( diff, estimate, estimate ) ); + } + + friend Vec4 Min( Vec4::Arg left, Vec4::Arg right ) + { + return Vec4( vec_min( left.m_v, right.m_v ) ); + } + + friend Vec4 Max( Vec4::Arg left, Vec4::Arg right ) + { + return Vec4( vec_max( left.m_v, right.m_v ) ); + } + + friend Vec4 Truncate( Vec4::Arg v ) + { + return Vec4( vec_trunc( v.m_v ) ); + } + + friend bool CompareAnyLessThan( Vec4::Arg left, Vec4::Arg right ) + { + return vec_any_lt( left.m_v, right.m_v ) != 0; + } - Vec4& operator+=( Arg v ) - { - m_v = vec_add( m_v, v.m_v ); - return *this; - } - - Vec4& operator-=( Arg v ) - { - m_v = vec_sub( m_v, v.m_v ); - return *this; - } - - Vec4& operator*=( Arg v ) - { - m_v = vec_madd( m_v, v.m_v, ( vector float )( -0.0f ) ); - return *this; - } - - friend Vec4 operator+( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( vec_add( left.m_v, right.m_v ) ); - } - - friend Vec4 operator-( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( vec_sub( left.m_v, right.m_v ) ); - } - - friend Vec4 operator*( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( vec_madd( left.m_v, right.m_v, ( vector float )( -0.0f ) ) ); - } - - //! Returns a*b + c - friend Vec4 MultiplyAdd( Vec4::Arg a, Vec4::Arg b, Vec4::Arg c ) - { - return Vec4( vec_madd( a.m_v, b.m_v, c.m_v ) ); - } - - //! Returns -( a*b - c ) - friend Vec4 NegativeMultiplySubtract( Vec4::Arg a, Vec4::Arg b, Vec4::Arg c ) - { - return Vec4( vec_nmsub( a.m_v, b.m_v, c.m_v ) ); - } - - friend Vec4 Reciprocal( Vec4::Arg v ) - { - // get the reciprocal estimate - vector float estimate = vec_re( v.m_v ); - - // one round of Newton-Rhaphson refinement - vector float diff = vec_nmsub( estimate, v.m_v, ( vector float )( 1.0f ) ); - return Vec4( vec_madd( diff, estimate, estimate ) ); - } - - friend Vec4 Min( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( vec_min( left.m_v, right.m_v ) ); - } - - friend Vec4 Max( Vec4::Arg left, Vec4::Arg right ) - { - return Vec4( vec_max( left.m_v, right.m_v ) ); - } - - friend Vec4 Truncate( Vec4::Arg v ) - { - return Vec4( vec_trunc( v.m_v ) ); - } - - friend bool CompareAnyLessThan( Vec4::Arg left, Vec4::Arg right ) - { - return vec_any_lt( left.m_v, right.m_v ) != 0; - } - private: - vector float m_v; + vector float m_v; }; } // namespace squish diff --git a/thirdparty/squish/singlecolourfit.cpp b/thirdparty/squish/singlecolourfit.cpp index bd02cc41abe..cef0ebc410b 100644 --- a/thirdparty/squish/singlecolourfit.cpp +++ b/thirdparty/squish/singlecolourfit.cpp @@ -1,173 +1,172 @@ /* ----------------------------------------------------------------------------- - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------- */ - + #include "singlecolourfit.h" #include "colourset.h" #include "colourblock.h" -#include namespace squish { struct SourceBlock { - u8 start; - u8 end; - u8 error; + u8 start; + u8 end; + u8 error; }; struct SingleColourLookup { - SourceBlock sources[2]; + SourceBlock sources[2]; }; #include "singlecolourlookup.inl" static int FloatToInt( float a, int limit ) { - // use ANSI round-to-zero behaviour to get round-to-nearest - int i = ( int )( a + 0.5f ); + // use ANSI round-to-zero behaviour to get round-to-nearest + int i = ( int )( a + 0.5f ); - // clamp to the limit - if( i < 0 ) - i = 0; - else if( i > limit ) - i = limit; + // clamp to the limit + if( i < 0 ) + i = 0; + else if( i > limit ) + i = limit; - // done - return i; + // done + return i; } SingleColourFit::SingleColourFit( ColourSet const* colours, int flags ) : ColourFit( colours, flags ) { - // grab the single colour - Vec3 const* values = m_colours->GetPoints(); - m_colour[0] = ( u8 )FloatToInt( 255.0f*values->X(), 255 ); - m_colour[1] = ( u8 )FloatToInt( 255.0f*values->Y(), 255 ); - m_colour[2] = ( u8 )FloatToInt( 255.0f*values->Z(), 255 ); - - // initialise the best error - m_besterror = INT_MAX; + // grab the single colour + Vec3 const* values = m_colours->GetPoints(); + m_colour[0] = ( u8 )FloatToInt( 255.0f*values->X(), 255 ); + m_colour[1] = ( u8 )FloatToInt( 255.0f*values->Y(), 255 ); + m_colour[2] = ( u8 )FloatToInt( 255.0f*values->Z(), 255 ); + + // initialise the best error + m_besterror = INT_MAX; } void SingleColourFit::Compress3( void* block ) { - // build the table of lookups - SingleColourLookup const* const lookups[] = - { - lookup_5_3, - lookup_6_3, - lookup_5_3 - }; - - // find the best end-points and index - ComputeEndPoints( lookups ); - - // build the block if we win - if( m_error < m_besterror ) - { - // remap the indices - u8 indices[16]; - m_colours->RemapIndices( &m_index, indices ); - - // save the block - WriteColourBlock3( m_start, m_end, indices, block ); + // build the table of lookups + SingleColourLookup const* const lookups[] = + { + lookup_5_3, + lookup_6_3, + lookup_5_3 + }; - // save the error - m_besterror = m_error; - } + // find the best end-points and index + ComputeEndPoints( lookups ); + + // build the block if we win + if( m_error < m_besterror ) + { + // remap the indices + u8 indices[16]; + m_colours->RemapIndices( &m_index, indices ); + + // save the block + WriteColourBlock3( m_start, m_end, indices, block ); + + // save the error + m_besterror = m_error; + } } void SingleColourFit::Compress4( void* block ) { - // build the table of lookups - SingleColourLookup const* const lookups[] = - { - lookup_5_4, - lookup_6_4, - lookup_5_4 - }; - - // find the best end-points and index - ComputeEndPoints( lookups ); - - // build the block if we win - if( m_error < m_besterror ) - { - // remap the indices - u8 indices[16]; - m_colours->RemapIndices( &m_index, indices ); - - // save the block - WriteColourBlock4( m_start, m_end, indices, block ); + // build the table of lookups + SingleColourLookup const* const lookups[] = + { + lookup_5_4, + lookup_6_4, + lookup_5_4 + }; - // save the error - m_besterror = m_error; - } + // find the best end-points and index + ComputeEndPoints( lookups ); + + // build the block if we win + if( m_error < m_besterror ) + { + // remap the indices + u8 indices[16]; + m_colours->RemapIndices( &m_index, indices ); + + // save the block + WriteColourBlock4( m_start, m_end, indices, block ); + + // save the error + m_besterror = m_error; + } } void SingleColourFit::ComputeEndPoints( SingleColourLookup const* const* lookups ) { - // check each index combination (endpoint or intermediate) - m_error = INT_MAX; - for( int index = 0; index < 2; ++index ) - { - // check the error for this codebook index - SourceBlock const* sources[3]; - int error = 0; - for( int channel = 0; channel < 3; ++channel ) - { - // grab the lookup table and index for this channel - SingleColourLookup const* lookup = lookups[channel]; - int target = m_colour[channel]; - - // store a pointer to the source for this channel - sources[channel] = lookup[target].sources + index; - - // accumulate the error - int diff = sources[channel]->error; - error += diff*diff; - } - - // keep it if the error is lower - if( error < m_error ) - { - m_start = Vec3( - ( float )sources[0]->start/31.0f, - ( float )sources[1]->start/63.0f, - ( float )sources[2]->start/31.0f - ); - m_end = Vec3( - ( float )sources[0]->end/31.0f, - ( float )sources[1]->end/63.0f, - ( float )sources[2]->end/31.0f - ); - m_index = ( u8 )( 2*index ); - m_error = error; - } - } + // check each index combination (endpoint or intermediate) + m_error = INT_MAX; + for( int index = 0; index < 2; ++index ) + { + // check the error for this codebook index + SourceBlock const* sources[3]; + int error = 0; + for( int channel = 0; channel < 3; ++channel ) + { + // grab the lookup table and index for this channel + SingleColourLookup const* lookup = lookups[channel]; + int target = m_colour[channel]; + + // store a pointer to the source for this channel + sources[channel] = lookup[target].sources + index; + + // accumulate the error + int diff = sources[channel]->error; + error += diff*diff; + } + + // keep it if the error is lower + if( error < m_error ) + { + m_start = Vec3( + ( float )sources[0]->start/31.0f, + ( float )sources[1]->start/63.0f, + ( float )sources[2]->start/31.0f + ); + m_end = Vec3( + ( float )sources[0]->end/31.0f, + ( float )sources[1]->end/63.0f, + ( float )sources[2]->end/31.0f + ); + m_index = ( u8 )( 2*index ); + m_error = error; + } + } } } // namespace squish diff --git a/thirdparty/squish/singlecolourfit.h b/thirdparty/squish/singlecolourfit.h index 0388fda0287..974ce772569 100644 --- a/thirdparty/squish/singlecolourfit.h +++ b/thirdparty/squish/singlecolourfit.h @@ -1,32 +1,32 @@ /* ----------------------------------------------------------------------------- - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------- */ - + #ifndef SQUISH_SINGLECOLOURFIT_H #define SQUISH_SINGLECOLOURFIT_H -#include +#include "squish.h" #include "colourfit.h" namespace squish { @@ -37,20 +37,20 @@ struct SingleColourLookup; class SingleColourFit : public ColourFit { public: - SingleColourFit( ColourSet const* colours, int flags ); - + SingleColourFit( ColourSet const* colours, int flags ); + private: - virtual void Compress3( void* block ); - virtual void Compress4( void* block ); - - void ComputeEndPoints( SingleColourLookup const* const* lookups ); - - u8 m_colour[3]; - Vec3 m_start; - Vec3 m_end; - u8 m_index; - int m_error; - int m_besterror; + virtual void Compress3( void* block ); + virtual void Compress4( void* block ); + + void ComputeEndPoints( SingleColourLookup const* const* lookups ); + + u8 m_colour[3]; + Vec3 m_start; + Vec3 m_end; + u8 m_index; + int m_error; + int m_besterror; }; } // namespace squish diff --git a/thirdparty/squish/singlecolourlookup.inl b/thirdparty/squish/singlecolourlookup.inl index f1c95a1028d..5b44a1e5e62 100644 --- a/thirdparty/squish/singlecolourlookup.inl +++ b/thirdparty/squish/singlecolourlookup.inl @@ -1,1040 +1,1064 @@ +/* ----------------------------------------------------------------------------- -static SingleColourLookup const lookup_5_3[] = + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + -------------------------------------------------------------------------- */ + +static SingleColourLookup const lookup_5_3[] = { - { { { 0, 0, 0 }, { 0, 0, 0 } } }, - { { { 0, 0, 1 }, { 0, 0, 1 } } }, - { { { 0, 0, 2 }, { 0, 0, 2 } } }, - { { { 0, 0, 3 }, { 0, 1, 1 } } }, - { { { 0, 0, 4 }, { 0, 1, 0 } } }, - { { { 1, 0, 3 }, { 0, 1, 1 } } }, - { { { 1, 0, 2 }, { 0, 1, 2 } } }, - { { { 1, 0, 1 }, { 0, 2, 1 } } }, - { { { 1, 0, 0 }, { 0, 2, 0 } } }, - { { { 1, 0, 1 }, { 0, 2, 1 } } }, - { { { 1, 0, 2 }, { 0, 2, 2 } } }, - { { { 1, 0, 3 }, { 0, 3, 1 } } }, - { { { 1, 0, 4 }, { 0, 3, 0 } } }, - { { { 2, 0, 3 }, { 0, 3, 1 } } }, - { { { 2, 0, 2 }, { 0, 3, 2 } } }, - { { { 2, 0, 1 }, { 0, 4, 1 } } }, - { { { 2, 0, 0 }, { 0, 4, 0 } } }, - { { { 2, 0, 1 }, { 0, 4, 1 } } }, - { { { 2, 0, 2 }, { 0, 4, 2 } } }, - { { { 2, 0, 3 }, { 0, 5, 1 } } }, - { { { 2, 0, 4 }, { 0, 5, 0 } } }, - { { { 3, 0, 3 }, { 0, 5, 1 } } }, - { { { 3, 0, 2 }, { 0, 5, 2 } } }, - { { { 3, 0, 1 }, { 0, 6, 1 } } }, - { { { 3, 0, 0 }, { 0, 6, 0 } } }, - { { { 3, 0, 1 }, { 0, 6, 1 } } }, - { { { 3, 0, 2 }, { 0, 6, 2 } } }, - { { { 3, 0, 3 }, { 0, 7, 1 } } }, - { { { 3, 0, 4 }, { 0, 7, 0 } } }, - { { { 4, 0, 4 }, { 0, 7, 1 } } }, - { { { 4, 0, 3 }, { 0, 7, 2 } } }, - { { { 4, 0, 2 }, { 1, 7, 1 } } }, - { { { 4, 0, 1 }, { 1, 7, 0 } } }, - { { { 4, 0, 0 }, { 0, 8, 0 } } }, - { { { 4, 0, 1 }, { 0, 8, 1 } } }, - { { { 4, 0, 2 }, { 2, 7, 1 } } }, - { { { 4, 0, 3 }, { 2, 7, 0 } } }, - { { { 4, 0, 4 }, { 0, 9, 0 } } }, - { { { 5, 0, 3 }, { 0, 9, 1 } } }, - { { { 5, 0, 2 }, { 3, 7, 1 } } }, - { { { 5, 0, 1 }, { 3, 7, 0 } } }, - { { { 5, 0, 0 }, { 0, 10, 0 } } }, - { { { 5, 0, 1 }, { 0, 10, 1 } } }, - { { { 5, 0, 2 }, { 0, 10, 2 } } }, - { { { 5, 0, 3 }, { 0, 11, 1 } } }, - { { { 5, 0, 4 }, { 0, 11, 0 } } }, - { { { 6, 0, 3 }, { 0, 11, 1 } } }, - { { { 6, 0, 2 }, { 0, 11, 2 } } }, - { { { 6, 0, 1 }, { 0, 12, 1 } } }, - { { { 6, 0, 0 }, { 0, 12, 0 } } }, - { { { 6, 0, 1 }, { 0, 12, 1 } } }, - { { { 6, 0, 2 }, { 0, 12, 2 } } }, - { { { 6, 0, 3 }, { 0, 13, 1 } } }, - { { { 6, 0, 4 }, { 0, 13, 0 } } }, - { { { 7, 0, 3 }, { 0, 13, 1 } } }, - { { { 7, 0, 2 }, { 0, 13, 2 } } }, - { { { 7, 0, 1 }, { 0, 14, 1 } } }, - { { { 7, 0, 0 }, { 0, 14, 0 } } }, - { { { 7, 0, 1 }, { 0, 14, 1 } } }, - { { { 7, 0, 2 }, { 0, 14, 2 } } }, - { { { 7, 0, 3 }, { 0, 15, 1 } } }, - { { { 7, 0, 4 }, { 0, 15, 0 } } }, - { { { 8, 0, 4 }, { 0, 15, 1 } } }, - { { { 8, 0, 3 }, { 0, 15, 2 } } }, - { { { 8, 0, 2 }, { 1, 15, 1 } } }, - { { { 8, 0, 1 }, { 1, 15, 0 } } }, - { { { 8, 0, 0 }, { 0, 16, 0 } } }, - { { { 8, 0, 1 }, { 0, 16, 1 } } }, - { { { 8, 0, 2 }, { 2, 15, 1 } } }, - { { { 8, 0, 3 }, { 2, 15, 0 } } }, - { { { 8, 0, 4 }, { 0, 17, 0 } } }, - { { { 9, 0, 3 }, { 0, 17, 1 } } }, - { { { 9, 0, 2 }, { 3, 15, 1 } } }, - { { { 9, 0, 1 }, { 3, 15, 0 } } }, - { { { 9, 0, 0 }, { 0, 18, 0 } } }, - { { { 9, 0, 1 }, { 0, 18, 1 } } }, - { { { 9, 0, 2 }, { 0, 18, 2 } } }, - { { { 9, 0, 3 }, { 0, 19, 1 } } }, - { { { 9, 0, 4 }, { 0, 19, 0 } } }, - { { { 10, 0, 3 }, { 0, 19, 1 } } }, - { { { 10, 0, 2 }, { 0, 19, 2 } } }, - { { { 10, 0, 1 }, { 0, 20, 1 } } }, - { { { 10, 0, 0 }, { 0, 20, 0 } } }, - { { { 10, 0, 1 }, { 0, 20, 1 } } }, - { { { 10, 0, 2 }, { 0, 20, 2 } } }, - { { { 10, 0, 3 }, { 0, 21, 1 } } }, - { { { 10, 0, 4 }, { 0, 21, 0 } } }, - { { { 11, 0, 3 }, { 0, 21, 1 } } }, - { { { 11, 0, 2 }, { 0, 21, 2 } } }, - { { { 11, 0, 1 }, { 0, 22, 1 } } }, - { { { 11, 0, 0 }, { 0, 22, 0 } } }, - { { { 11, 0, 1 }, { 0, 22, 1 } } }, - { { { 11, 0, 2 }, { 0, 22, 2 } } }, - { { { 11, 0, 3 }, { 0, 23, 1 } } }, - { { { 11, 0, 4 }, { 0, 23, 0 } } }, - { { { 12, 0, 4 }, { 0, 23, 1 } } }, - { { { 12, 0, 3 }, { 0, 23, 2 } } }, - { { { 12, 0, 2 }, { 1, 23, 1 } } }, - { { { 12, 0, 1 }, { 1, 23, 0 } } }, - { { { 12, 0, 0 }, { 0, 24, 0 } } }, - { { { 12, 0, 1 }, { 0, 24, 1 } } }, - { { { 12, 0, 2 }, { 2, 23, 1 } } }, - { { { 12, 0, 3 }, { 2, 23, 0 } } }, - { { { 12, 0, 4 }, { 0, 25, 0 } } }, - { { { 13, 0, 3 }, { 0, 25, 1 } } }, - { { { 13, 0, 2 }, { 3, 23, 1 } } }, - { { { 13, 0, 1 }, { 3, 23, 0 } } }, - { { { 13, 0, 0 }, { 0, 26, 0 } } }, - { { { 13, 0, 1 }, { 0, 26, 1 } } }, - { { { 13, 0, 2 }, { 0, 26, 2 } } }, - { { { 13, 0, 3 }, { 0, 27, 1 } } }, - { { { 13, 0, 4 }, { 0, 27, 0 } } }, - { { { 14, 0, 3 }, { 0, 27, 1 } } }, - { { { 14, 0, 2 }, { 0, 27, 2 } } }, - { { { 14, 0, 1 }, { 0, 28, 1 } } }, - { { { 14, 0, 0 }, { 0, 28, 0 } } }, - { { { 14, 0, 1 }, { 0, 28, 1 } } }, - { { { 14, 0, 2 }, { 0, 28, 2 } } }, - { { { 14, 0, 3 }, { 0, 29, 1 } } }, - { { { 14, 0, 4 }, { 0, 29, 0 } } }, - { { { 15, 0, 3 }, { 0, 29, 1 } } }, - { { { 15, 0, 2 }, { 0, 29, 2 } } }, - { { { 15, 0, 1 }, { 0, 30, 1 } } }, - { { { 15, 0, 0 }, { 0, 30, 0 } } }, - { { { 15, 0, 1 }, { 0, 30, 1 } } }, - { { { 15, 0, 2 }, { 0, 30, 2 } } }, - { { { 15, 0, 3 }, { 0, 31, 1 } } }, - { { { 15, 0, 4 }, { 0, 31, 0 } } }, - { { { 16, 0, 4 }, { 0, 31, 1 } } }, - { { { 16, 0, 3 }, { 0, 31, 2 } } }, - { { { 16, 0, 2 }, { 1, 31, 1 } } }, - { { { 16, 0, 1 }, { 1, 31, 0 } } }, - { { { 16, 0, 0 }, { 4, 28, 0 } } }, - { { { 16, 0, 1 }, { 4, 28, 1 } } }, - { { { 16, 0, 2 }, { 2, 31, 1 } } }, - { { { 16, 0, 3 }, { 2, 31, 0 } } }, - { { { 16, 0, 4 }, { 4, 29, 0 } } }, - { { { 17, 0, 3 }, { 4, 29, 1 } } }, - { { { 17, 0, 2 }, { 3, 31, 1 } } }, - { { { 17, 0, 1 }, { 3, 31, 0 } } }, - { { { 17, 0, 0 }, { 4, 30, 0 } } }, - { { { 17, 0, 1 }, { 4, 30, 1 } } }, - { { { 17, 0, 2 }, { 4, 30, 2 } } }, - { { { 17, 0, 3 }, { 4, 31, 1 } } }, - { { { 17, 0, 4 }, { 4, 31, 0 } } }, - { { { 18, 0, 3 }, { 4, 31, 1 } } }, - { { { 18, 0, 2 }, { 4, 31, 2 } } }, - { { { 18, 0, 1 }, { 5, 31, 1 } } }, - { { { 18, 0, 0 }, { 5, 31, 0 } } }, - { { { 18, 0, 1 }, { 5, 31, 1 } } }, - { { { 18, 0, 2 }, { 5, 31, 2 } } }, - { { { 18, 0, 3 }, { 6, 31, 1 } } }, - { { { 18, 0, 4 }, { 6, 31, 0 } } }, - { { { 19, 0, 3 }, { 6, 31, 1 } } }, - { { { 19, 0, 2 }, { 6, 31, 2 } } }, - { { { 19, 0, 1 }, { 7, 31, 1 } } }, - { { { 19, 0, 0 }, { 7, 31, 0 } } }, - { { { 19, 0, 1 }, { 7, 31, 1 } } }, - { { { 19, 0, 2 }, { 7, 31, 2 } } }, - { { { 19, 0, 3 }, { 8, 31, 1 } } }, - { { { 19, 0, 4 }, { 8, 31, 0 } } }, - { { { 20, 0, 4 }, { 8, 31, 1 } } }, - { { { 20, 0, 3 }, { 8, 31, 2 } } }, - { { { 20, 0, 2 }, { 9, 31, 1 } } }, - { { { 20, 0, 1 }, { 9, 31, 0 } } }, - { { { 20, 0, 0 }, { 12, 28, 0 } } }, - { { { 20, 0, 1 }, { 12, 28, 1 } } }, - { { { 20, 0, 2 }, { 10, 31, 1 } } }, - { { { 20, 0, 3 }, { 10, 31, 0 } } }, - { { { 20, 0, 4 }, { 12, 29, 0 } } }, - { { { 21, 0, 3 }, { 12, 29, 1 } } }, - { { { 21, 0, 2 }, { 11, 31, 1 } } }, - { { { 21, 0, 1 }, { 11, 31, 0 } } }, - { { { 21, 0, 0 }, { 12, 30, 0 } } }, - { { { 21, 0, 1 }, { 12, 30, 1 } } }, - { { { 21, 0, 2 }, { 12, 30, 2 } } }, - { { { 21, 0, 3 }, { 12, 31, 1 } } }, - { { { 21, 0, 4 }, { 12, 31, 0 } } }, - { { { 22, 0, 3 }, { 12, 31, 1 } } }, - { { { 22, 0, 2 }, { 12, 31, 2 } } }, - { { { 22, 0, 1 }, { 13, 31, 1 } } }, - { { { 22, 0, 0 }, { 13, 31, 0 } } }, - { { { 22, 0, 1 }, { 13, 31, 1 } } }, - { { { 22, 0, 2 }, { 13, 31, 2 } } }, - { { { 22, 0, 3 }, { 14, 31, 1 } } }, - { { { 22, 0, 4 }, { 14, 31, 0 } } }, - { { { 23, 0, 3 }, { 14, 31, 1 } } }, - { { { 23, 0, 2 }, { 14, 31, 2 } } }, - { { { 23, 0, 1 }, { 15, 31, 1 } } }, - { { { 23, 0, 0 }, { 15, 31, 0 } } }, - { { { 23, 0, 1 }, { 15, 31, 1 } } }, - { { { 23, 0, 2 }, { 15, 31, 2 } } }, - { { { 23, 0, 3 }, { 16, 31, 1 } } }, - { { { 23, 0, 4 }, { 16, 31, 0 } } }, - { { { 24, 0, 4 }, { 16, 31, 1 } } }, - { { { 24, 0, 3 }, { 16, 31, 2 } } }, - { { { 24, 0, 2 }, { 17, 31, 1 } } }, - { { { 24, 0, 1 }, { 17, 31, 0 } } }, - { { { 24, 0, 0 }, { 20, 28, 0 } } }, - { { { 24, 0, 1 }, { 20, 28, 1 } } }, - { { { 24, 0, 2 }, { 18, 31, 1 } } }, - { { { 24, 0, 3 }, { 18, 31, 0 } } }, - { { { 24, 0, 4 }, { 20, 29, 0 } } }, - { { { 25, 0, 3 }, { 20, 29, 1 } } }, - { { { 25, 0, 2 }, { 19, 31, 1 } } }, - { { { 25, 0, 1 }, { 19, 31, 0 } } }, - { { { 25, 0, 0 }, { 20, 30, 0 } } }, - { { { 25, 0, 1 }, { 20, 30, 1 } } }, - { { { 25, 0, 2 }, { 20, 30, 2 } } }, - { { { 25, 0, 3 }, { 20, 31, 1 } } }, - { { { 25, 0, 4 }, { 20, 31, 0 } } }, - { { { 26, 0, 3 }, { 20, 31, 1 } } }, - { { { 26, 0, 2 }, { 20, 31, 2 } } }, - { { { 26, 0, 1 }, { 21, 31, 1 } } }, - { { { 26, 0, 0 }, { 21, 31, 0 } } }, - { { { 26, 0, 1 }, { 21, 31, 1 } } }, - { { { 26, 0, 2 }, { 21, 31, 2 } } }, - { { { 26, 0, 3 }, { 22, 31, 1 } } }, - { { { 26, 0, 4 }, { 22, 31, 0 } } }, - { { { 27, 0, 3 }, { 22, 31, 1 } } }, - { { { 27, 0, 2 }, { 22, 31, 2 } } }, - { { { 27, 0, 1 }, { 23, 31, 1 } } }, - { { { 27, 0, 0 }, { 23, 31, 0 } } }, - { { { 27, 0, 1 }, { 23, 31, 1 } } }, - { { { 27, 0, 2 }, { 23, 31, 2 } } }, - { { { 27, 0, 3 }, { 24, 31, 1 } } }, - { { { 27, 0, 4 }, { 24, 31, 0 } } }, - { { { 28, 0, 4 }, { 24, 31, 1 } } }, - { { { 28, 0, 3 }, { 24, 31, 2 } } }, - { { { 28, 0, 2 }, { 25, 31, 1 } } }, - { { { 28, 0, 1 }, { 25, 31, 0 } } }, - { { { 28, 0, 0 }, { 28, 28, 0 } } }, - { { { 28, 0, 1 }, { 28, 28, 1 } } }, - { { { 28, 0, 2 }, { 26, 31, 1 } } }, - { { { 28, 0, 3 }, { 26, 31, 0 } } }, - { { { 28, 0, 4 }, { 28, 29, 0 } } }, - { { { 29, 0, 3 }, { 28, 29, 1 } } }, - { { { 29, 0, 2 }, { 27, 31, 1 } } }, - { { { 29, 0, 1 }, { 27, 31, 0 } } }, - { { { 29, 0, 0 }, { 28, 30, 0 } } }, - { { { 29, 0, 1 }, { 28, 30, 1 } } }, - { { { 29, 0, 2 }, { 28, 30, 2 } } }, - { { { 29, 0, 3 }, { 28, 31, 1 } } }, - { { { 29, 0, 4 }, { 28, 31, 0 } } }, - { { { 30, 0, 3 }, { 28, 31, 1 } } }, - { { { 30, 0, 2 }, { 28, 31, 2 } } }, - { { { 30, 0, 1 }, { 29, 31, 1 } } }, - { { { 30, 0, 0 }, { 29, 31, 0 } } }, - { { { 30, 0, 1 }, { 29, 31, 1 } } }, - { { { 30, 0, 2 }, { 29, 31, 2 } } }, - { { { 30, 0, 3 }, { 30, 31, 1 } } }, - { { { 30, 0, 4 }, { 30, 31, 0 } } }, - { { { 31, 0, 3 }, { 30, 31, 1 } } }, - { { { 31, 0, 2 }, { 30, 31, 2 } } }, - { { { 31, 0, 1 }, { 31, 31, 1 } } }, - { { { 31, 0, 0 }, { 31, 31, 0 } } } + { { { 0, 0, 0 }, { 0, 0, 0 } } }, + { { { 0, 0, 1 }, { 0, 0, 1 } } }, + { { { 0, 0, 2 }, { 0, 0, 2 } } }, + { { { 0, 0, 3 }, { 0, 1, 1 } } }, + { { { 0, 0, 4 }, { 0, 1, 0 } } }, + { { { 1, 0, 3 }, { 0, 1, 1 } } }, + { { { 1, 0, 2 }, { 0, 1, 2 } } }, + { { { 1, 0, 1 }, { 0, 2, 1 } } }, + { { { 1, 0, 0 }, { 0, 2, 0 } } }, + { { { 1, 0, 1 }, { 0, 2, 1 } } }, + { { { 1, 0, 2 }, { 0, 2, 2 } } }, + { { { 1, 0, 3 }, { 0, 3, 1 } } }, + { { { 1, 0, 4 }, { 0, 3, 0 } } }, + { { { 2, 0, 3 }, { 0, 3, 1 } } }, + { { { 2, 0, 2 }, { 0, 3, 2 } } }, + { { { 2, 0, 1 }, { 0, 4, 1 } } }, + { { { 2, 0, 0 }, { 0, 4, 0 } } }, + { { { 2, 0, 1 }, { 0, 4, 1 } } }, + { { { 2, 0, 2 }, { 0, 4, 2 } } }, + { { { 2, 0, 3 }, { 0, 5, 1 } } }, + { { { 2, 0, 4 }, { 0, 5, 0 } } }, + { { { 3, 0, 3 }, { 0, 5, 1 } } }, + { { { 3, 0, 2 }, { 0, 5, 2 } } }, + { { { 3, 0, 1 }, { 0, 6, 1 } } }, + { { { 3, 0, 0 }, { 0, 6, 0 } } }, + { { { 3, 0, 1 }, { 0, 6, 1 } } }, + { { { 3, 0, 2 }, { 0, 6, 2 } } }, + { { { 3, 0, 3 }, { 0, 7, 1 } } }, + { { { 3, 0, 4 }, { 0, 7, 0 } } }, + { { { 4, 0, 4 }, { 0, 7, 1 } } }, + { { { 4, 0, 3 }, { 0, 7, 2 } } }, + { { { 4, 0, 2 }, { 1, 7, 1 } } }, + { { { 4, 0, 1 }, { 1, 7, 0 } } }, + { { { 4, 0, 0 }, { 0, 8, 0 } } }, + { { { 4, 0, 1 }, { 0, 8, 1 } } }, + { { { 4, 0, 2 }, { 2, 7, 1 } } }, + { { { 4, 0, 3 }, { 2, 7, 0 } } }, + { { { 4, 0, 4 }, { 0, 9, 0 } } }, + { { { 5, 0, 3 }, { 0, 9, 1 } } }, + { { { 5, 0, 2 }, { 3, 7, 1 } } }, + { { { 5, 0, 1 }, { 3, 7, 0 } } }, + { { { 5, 0, 0 }, { 0, 10, 0 } } }, + { { { 5, 0, 1 }, { 0, 10, 1 } } }, + { { { 5, 0, 2 }, { 0, 10, 2 } } }, + { { { 5, 0, 3 }, { 0, 11, 1 } } }, + { { { 5, 0, 4 }, { 0, 11, 0 } } }, + { { { 6, 0, 3 }, { 0, 11, 1 } } }, + { { { 6, 0, 2 }, { 0, 11, 2 } } }, + { { { 6, 0, 1 }, { 0, 12, 1 } } }, + { { { 6, 0, 0 }, { 0, 12, 0 } } }, + { { { 6, 0, 1 }, { 0, 12, 1 } } }, + { { { 6, 0, 2 }, { 0, 12, 2 } } }, + { { { 6, 0, 3 }, { 0, 13, 1 } } }, + { { { 6, 0, 4 }, { 0, 13, 0 } } }, + { { { 7, 0, 3 }, { 0, 13, 1 } } }, + { { { 7, 0, 2 }, { 0, 13, 2 } } }, + { { { 7, 0, 1 }, { 0, 14, 1 } } }, + { { { 7, 0, 0 }, { 0, 14, 0 } } }, + { { { 7, 0, 1 }, { 0, 14, 1 } } }, + { { { 7, 0, 2 }, { 0, 14, 2 } } }, + { { { 7, 0, 3 }, { 0, 15, 1 } } }, + { { { 7, 0, 4 }, { 0, 15, 0 } } }, + { { { 8, 0, 4 }, { 0, 15, 1 } } }, + { { { 8, 0, 3 }, { 0, 15, 2 } } }, + { { { 8, 0, 2 }, { 1, 15, 1 } } }, + { { { 8, 0, 1 }, { 1, 15, 0 } } }, + { { { 8, 0, 0 }, { 0, 16, 0 } } }, + { { { 8, 0, 1 }, { 0, 16, 1 } } }, + { { { 8, 0, 2 }, { 2, 15, 1 } } }, + { { { 8, 0, 3 }, { 2, 15, 0 } } }, + { { { 8, 0, 4 }, { 0, 17, 0 } } }, + { { { 9, 0, 3 }, { 0, 17, 1 } } }, + { { { 9, 0, 2 }, { 3, 15, 1 } } }, + { { { 9, 0, 1 }, { 3, 15, 0 } } }, + { { { 9, 0, 0 }, { 0, 18, 0 } } }, + { { { 9, 0, 1 }, { 0, 18, 1 } } }, + { { { 9, 0, 2 }, { 0, 18, 2 } } }, + { { { 9, 0, 3 }, { 0, 19, 1 } } }, + { { { 9, 0, 4 }, { 0, 19, 0 } } }, + { { { 10, 0, 3 }, { 0, 19, 1 } } }, + { { { 10, 0, 2 }, { 0, 19, 2 } } }, + { { { 10, 0, 1 }, { 0, 20, 1 } } }, + { { { 10, 0, 0 }, { 0, 20, 0 } } }, + { { { 10, 0, 1 }, { 0, 20, 1 } } }, + { { { 10, 0, 2 }, { 0, 20, 2 } } }, + { { { 10, 0, 3 }, { 0, 21, 1 } } }, + { { { 10, 0, 4 }, { 0, 21, 0 } } }, + { { { 11, 0, 3 }, { 0, 21, 1 } } }, + { { { 11, 0, 2 }, { 0, 21, 2 } } }, + { { { 11, 0, 1 }, { 0, 22, 1 } } }, + { { { 11, 0, 0 }, { 0, 22, 0 } } }, + { { { 11, 0, 1 }, { 0, 22, 1 } } }, + { { { 11, 0, 2 }, { 0, 22, 2 } } }, + { { { 11, 0, 3 }, { 0, 23, 1 } } }, + { { { 11, 0, 4 }, { 0, 23, 0 } } }, + { { { 12, 0, 4 }, { 0, 23, 1 } } }, + { { { 12, 0, 3 }, { 0, 23, 2 } } }, + { { { 12, 0, 2 }, { 1, 23, 1 } } }, + { { { 12, 0, 1 }, { 1, 23, 0 } } }, + { { { 12, 0, 0 }, { 0, 24, 0 } } }, + { { { 12, 0, 1 }, { 0, 24, 1 } } }, + { { { 12, 0, 2 }, { 2, 23, 1 } } }, + { { { 12, 0, 3 }, { 2, 23, 0 } } }, + { { { 12, 0, 4 }, { 0, 25, 0 } } }, + { { { 13, 0, 3 }, { 0, 25, 1 } } }, + { { { 13, 0, 2 }, { 3, 23, 1 } } }, + { { { 13, 0, 1 }, { 3, 23, 0 } } }, + { { { 13, 0, 0 }, { 0, 26, 0 } } }, + { { { 13, 0, 1 }, { 0, 26, 1 } } }, + { { { 13, 0, 2 }, { 0, 26, 2 } } }, + { { { 13, 0, 3 }, { 0, 27, 1 } } }, + { { { 13, 0, 4 }, { 0, 27, 0 } } }, + { { { 14, 0, 3 }, { 0, 27, 1 } } }, + { { { 14, 0, 2 }, { 0, 27, 2 } } }, + { { { 14, 0, 1 }, { 0, 28, 1 } } }, + { { { 14, 0, 0 }, { 0, 28, 0 } } }, + { { { 14, 0, 1 }, { 0, 28, 1 } } }, + { { { 14, 0, 2 }, { 0, 28, 2 } } }, + { { { 14, 0, 3 }, { 0, 29, 1 } } }, + { { { 14, 0, 4 }, { 0, 29, 0 } } }, + { { { 15, 0, 3 }, { 0, 29, 1 } } }, + { { { 15, 0, 2 }, { 0, 29, 2 } } }, + { { { 15, 0, 1 }, { 0, 30, 1 } } }, + { { { 15, 0, 0 }, { 0, 30, 0 } } }, + { { { 15, 0, 1 }, { 0, 30, 1 } } }, + { { { 15, 0, 2 }, { 0, 30, 2 } } }, + { { { 15, 0, 3 }, { 0, 31, 1 } } }, + { { { 15, 0, 4 }, { 0, 31, 0 } } }, + { { { 16, 0, 4 }, { 0, 31, 1 } } }, + { { { 16, 0, 3 }, { 0, 31, 2 } } }, + { { { 16, 0, 2 }, { 1, 31, 1 } } }, + { { { 16, 0, 1 }, { 1, 31, 0 } } }, + { { { 16, 0, 0 }, { 4, 28, 0 } } }, + { { { 16, 0, 1 }, { 4, 28, 1 } } }, + { { { 16, 0, 2 }, { 2, 31, 1 } } }, + { { { 16, 0, 3 }, { 2, 31, 0 } } }, + { { { 16, 0, 4 }, { 4, 29, 0 } } }, + { { { 17, 0, 3 }, { 4, 29, 1 } } }, + { { { 17, 0, 2 }, { 3, 31, 1 } } }, + { { { 17, 0, 1 }, { 3, 31, 0 } } }, + { { { 17, 0, 0 }, { 4, 30, 0 } } }, + { { { 17, 0, 1 }, { 4, 30, 1 } } }, + { { { 17, 0, 2 }, { 4, 30, 2 } } }, + { { { 17, 0, 3 }, { 4, 31, 1 } } }, + { { { 17, 0, 4 }, { 4, 31, 0 } } }, + { { { 18, 0, 3 }, { 4, 31, 1 } } }, + { { { 18, 0, 2 }, { 4, 31, 2 } } }, + { { { 18, 0, 1 }, { 5, 31, 1 } } }, + { { { 18, 0, 0 }, { 5, 31, 0 } } }, + { { { 18, 0, 1 }, { 5, 31, 1 } } }, + { { { 18, 0, 2 }, { 5, 31, 2 } } }, + { { { 18, 0, 3 }, { 6, 31, 1 } } }, + { { { 18, 0, 4 }, { 6, 31, 0 } } }, + { { { 19, 0, 3 }, { 6, 31, 1 } } }, + { { { 19, 0, 2 }, { 6, 31, 2 } } }, + { { { 19, 0, 1 }, { 7, 31, 1 } } }, + { { { 19, 0, 0 }, { 7, 31, 0 } } }, + { { { 19, 0, 1 }, { 7, 31, 1 } } }, + { { { 19, 0, 2 }, { 7, 31, 2 } } }, + { { { 19, 0, 3 }, { 8, 31, 1 } } }, + { { { 19, 0, 4 }, { 8, 31, 0 } } }, + { { { 20, 0, 4 }, { 8, 31, 1 } } }, + { { { 20, 0, 3 }, { 8, 31, 2 } } }, + { { { 20, 0, 2 }, { 9, 31, 1 } } }, + { { { 20, 0, 1 }, { 9, 31, 0 } } }, + { { { 20, 0, 0 }, { 12, 28, 0 } } }, + { { { 20, 0, 1 }, { 12, 28, 1 } } }, + { { { 20, 0, 2 }, { 10, 31, 1 } } }, + { { { 20, 0, 3 }, { 10, 31, 0 } } }, + { { { 20, 0, 4 }, { 12, 29, 0 } } }, + { { { 21, 0, 3 }, { 12, 29, 1 } } }, + { { { 21, 0, 2 }, { 11, 31, 1 } } }, + { { { 21, 0, 1 }, { 11, 31, 0 } } }, + { { { 21, 0, 0 }, { 12, 30, 0 } } }, + { { { 21, 0, 1 }, { 12, 30, 1 } } }, + { { { 21, 0, 2 }, { 12, 30, 2 } } }, + { { { 21, 0, 3 }, { 12, 31, 1 } } }, + { { { 21, 0, 4 }, { 12, 31, 0 } } }, + { { { 22, 0, 3 }, { 12, 31, 1 } } }, + { { { 22, 0, 2 }, { 12, 31, 2 } } }, + { { { 22, 0, 1 }, { 13, 31, 1 } } }, + { { { 22, 0, 0 }, { 13, 31, 0 } } }, + { { { 22, 0, 1 }, { 13, 31, 1 } } }, + { { { 22, 0, 2 }, { 13, 31, 2 } } }, + { { { 22, 0, 3 }, { 14, 31, 1 } } }, + { { { 22, 0, 4 }, { 14, 31, 0 } } }, + { { { 23, 0, 3 }, { 14, 31, 1 } } }, + { { { 23, 0, 2 }, { 14, 31, 2 } } }, + { { { 23, 0, 1 }, { 15, 31, 1 } } }, + { { { 23, 0, 0 }, { 15, 31, 0 } } }, + { { { 23, 0, 1 }, { 15, 31, 1 } } }, + { { { 23, 0, 2 }, { 15, 31, 2 } } }, + { { { 23, 0, 3 }, { 16, 31, 1 } } }, + { { { 23, 0, 4 }, { 16, 31, 0 } } }, + { { { 24, 0, 4 }, { 16, 31, 1 } } }, + { { { 24, 0, 3 }, { 16, 31, 2 } } }, + { { { 24, 0, 2 }, { 17, 31, 1 } } }, + { { { 24, 0, 1 }, { 17, 31, 0 } } }, + { { { 24, 0, 0 }, { 20, 28, 0 } } }, + { { { 24, 0, 1 }, { 20, 28, 1 } } }, + { { { 24, 0, 2 }, { 18, 31, 1 } } }, + { { { 24, 0, 3 }, { 18, 31, 0 } } }, + { { { 24, 0, 4 }, { 20, 29, 0 } } }, + { { { 25, 0, 3 }, { 20, 29, 1 } } }, + { { { 25, 0, 2 }, { 19, 31, 1 } } }, + { { { 25, 0, 1 }, { 19, 31, 0 } } }, + { { { 25, 0, 0 }, { 20, 30, 0 } } }, + { { { 25, 0, 1 }, { 20, 30, 1 } } }, + { { { 25, 0, 2 }, { 20, 30, 2 } } }, + { { { 25, 0, 3 }, { 20, 31, 1 } } }, + { { { 25, 0, 4 }, { 20, 31, 0 } } }, + { { { 26, 0, 3 }, { 20, 31, 1 } } }, + { { { 26, 0, 2 }, { 20, 31, 2 } } }, + { { { 26, 0, 1 }, { 21, 31, 1 } } }, + { { { 26, 0, 0 }, { 21, 31, 0 } } }, + { { { 26, 0, 1 }, { 21, 31, 1 } } }, + { { { 26, 0, 2 }, { 21, 31, 2 } } }, + { { { 26, 0, 3 }, { 22, 31, 1 } } }, + { { { 26, 0, 4 }, { 22, 31, 0 } } }, + { { { 27, 0, 3 }, { 22, 31, 1 } } }, + { { { 27, 0, 2 }, { 22, 31, 2 } } }, + { { { 27, 0, 1 }, { 23, 31, 1 } } }, + { { { 27, 0, 0 }, { 23, 31, 0 } } }, + { { { 27, 0, 1 }, { 23, 31, 1 } } }, + { { { 27, 0, 2 }, { 23, 31, 2 } } }, + { { { 27, 0, 3 }, { 24, 31, 1 } } }, + { { { 27, 0, 4 }, { 24, 31, 0 } } }, + { { { 28, 0, 4 }, { 24, 31, 1 } } }, + { { { 28, 0, 3 }, { 24, 31, 2 } } }, + { { { 28, 0, 2 }, { 25, 31, 1 } } }, + { { { 28, 0, 1 }, { 25, 31, 0 } } }, + { { { 28, 0, 0 }, { 28, 28, 0 } } }, + { { { 28, 0, 1 }, { 28, 28, 1 } } }, + { { { 28, 0, 2 }, { 26, 31, 1 } } }, + { { { 28, 0, 3 }, { 26, 31, 0 } } }, + { { { 28, 0, 4 }, { 28, 29, 0 } } }, + { { { 29, 0, 3 }, { 28, 29, 1 } } }, + { { { 29, 0, 2 }, { 27, 31, 1 } } }, + { { { 29, 0, 1 }, { 27, 31, 0 } } }, + { { { 29, 0, 0 }, { 28, 30, 0 } } }, + { { { 29, 0, 1 }, { 28, 30, 1 } } }, + { { { 29, 0, 2 }, { 28, 30, 2 } } }, + { { { 29, 0, 3 }, { 28, 31, 1 } } }, + { { { 29, 0, 4 }, { 28, 31, 0 } } }, + { { { 30, 0, 3 }, { 28, 31, 1 } } }, + { { { 30, 0, 2 }, { 28, 31, 2 } } }, + { { { 30, 0, 1 }, { 29, 31, 1 } } }, + { { { 30, 0, 0 }, { 29, 31, 0 } } }, + { { { 30, 0, 1 }, { 29, 31, 1 } } }, + { { { 30, 0, 2 }, { 29, 31, 2 } } }, + { { { 30, 0, 3 }, { 30, 31, 1 } } }, + { { { 30, 0, 4 }, { 30, 31, 0 } } }, + { { { 31, 0, 3 }, { 30, 31, 1 } } }, + { { { 31, 0, 2 }, { 30, 31, 2 } } }, + { { { 31, 0, 1 }, { 31, 31, 1 } } }, + { { { 31, 0, 0 }, { 31, 31, 0 } } } }; -static SingleColourLookup const lookup_6_3[] = +static SingleColourLookup const lookup_6_3[] = { - { { { 0, 0, 0 }, { 0, 0, 0 } } }, - { { { 0, 0, 1 }, { 0, 1, 1 } } }, - { { { 0, 0, 2 }, { 0, 1, 0 } } }, - { { { 1, 0, 1 }, { 0, 2, 1 } } }, - { { { 1, 0, 0 }, { 0, 2, 0 } } }, - { { { 1, 0, 1 }, { 0, 3, 1 } } }, - { { { 1, 0, 2 }, { 0, 3, 0 } } }, - { { { 2, 0, 1 }, { 0, 4, 1 } } }, - { { { 2, 0, 0 }, { 0, 4, 0 } } }, - { { { 2, 0, 1 }, { 0, 5, 1 } } }, - { { { 2, 0, 2 }, { 0, 5, 0 } } }, - { { { 3, 0, 1 }, { 0, 6, 1 } } }, - { { { 3, 0, 0 }, { 0, 6, 0 } } }, - { { { 3, 0, 1 }, { 0, 7, 1 } } }, - { { { 3, 0, 2 }, { 0, 7, 0 } } }, - { { { 4, 0, 1 }, { 0, 8, 1 } } }, - { { { 4, 0, 0 }, { 0, 8, 0 } } }, - { { { 4, 0, 1 }, { 0, 9, 1 } } }, - { { { 4, 0, 2 }, { 0, 9, 0 } } }, - { { { 5, 0, 1 }, { 0, 10, 1 } } }, - { { { 5, 0, 0 }, { 0, 10, 0 } } }, - { { { 5, 0, 1 }, { 0, 11, 1 } } }, - { { { 5, 0, 2 }, { 0, 11, 0 } } }, - { { { 6, 0, 1 }, { 0, 12, 1 } } }, - { { { 6, 0, 0 }, { 0, 12, 0 } } }, - { { { 6, 0, 1 }, { 0, 13, 1 } } }, - { { { 6, 0, 2 }, { 0, 13, 0 } } }, - { { { 7, 0, 1 }, { 0, 14, 1 } } }, - { { { 7, 0, 0 }, { 0, 14, 0 } } }, - { { { 7, 0, 1 }, { 0, 15, 1 } } }, - { { { 7, 0, 2 }, { 0, 15, 0 } } }, - { { { 8, 0, 1 }, { 0, 16, 1 } } }, - { { { 8, 0, 0 }, { 0, 16, 0 } } }, - { { { 8, 0, 1 }, { 0, 17, 1 } } }, - { { { 8, 0, 2 }, { 0, 17, 0 } } }, - { { { 9, 0, 1 }, { 0, 18, 1 } } }, - { { { 9, 0, 0 }, { 0, 18, 0 } } }, - { { { 9, 0, 1 }, { 0, 19, 1 } } }, - { { { 9, 0, 2 }, { 0, 19, 0 } } }, - { { { 10, 0, 1 }, { 0, 20, 1 } } }, - { { { 10, 0, 0 }, { 0, 20, 0 } } }, - { { { 10, 0, 1 }, { 0, 21, 1 } } }, - { { { 10, 0, 2 }, { 0, 21, 0 } } }, - { { { 11, 0, 1 }, { 0, 22, 1 } } }, - { { { 11, 0, 0 }, { 0, 22, 0 } } }, - { { { 11, 0, 1 }, { 0, 23, 1 } } }, - { { { 11, 0, 2 }, { 0, 23, 0 } } }, - { { { 12, 0, 1 }, { 0, 24, 1 } } }, - { { { 12, 0, 0 }, { 0, 24, 0 } } }, - { { { 12, 0, 1 }, { 0, 25, 1 } } }, - { { { 12, 0, 2 }, { 0, 25, 0 } } }, - { { { 13, 0, 1 }, { 0, 26, 1 } } }, - { { { 13, 0, 0 }, { 0, 26, 0 } } }, - { { { 13, 0, 1 }, { 0, 27, 1 } } }, - { { { 13, 0, 2 }, { 0, 27, 0 } } }, - { { { 14, 0, 1 }, { 0, 28, 1 } } }, - { { { 14, 0, 0 }, { 0, 28, 0 } } }, - { { { 14, 0, 1 }, { 0, 29, 1 } } }, - { { { 14, 0, 2 }, { 0, 29, 0 } } }, - { { { 15, 0, 1 }, { 0, 30, 1 } } }, - { { { 15, 0, 0 }, { 0, 30, 0 } } }, - { { { 15, 0, 1 }, { 0, 31, 1 } } }, - { { { 15, 0, 2 }, { 0, 31, 0 } } }, - { { { 16, 0, 2 }, { 1, 31, 1 } } }, - { { { 16, 0, 1 }, { 1, 31, 0 } } }, - { { { 16, 0, 0 }, { 0, 32, 0 } } }, - { { { 16, 0, 1 }, { 2, 31, 0 } } }, - { { { 16, 0, 2 }, { 0, 33, 0 } } }, - { { { 17, 0, 1 }, { 3, 31, 0 } } }, - { { { 17, 0, 0 }, { 0, 34, 0 } } }, - { { { 17, 0, 1 }, { 4, 31, 0 } } }, - { { { 17, 0, 2 }, { 0, 35, 0 } } }, - { { { 18, 0, 1 }, { 5, 31, 0 } } }, - { { { 18, 0, 0 }, { 0, 36, 0 } } }, - { { { 18, 0, 1 }, { 6, 31, 0 } } }, - { { { 18, 0, 2 }, { 0, 37, 0 } } }, - { { { 19, 0, 1 }, { 7, 31, 0 } } }, - { { { 19, 0, 0 }, { 0, 38, 0 } } }, - { { { 19, 0, 1 }, { 8, 31, 0 } } }, - { { { 19, 0, 2 }, { 0, 39, 0 } } }, - { { { 20, 0, 1 }, { 9, 31, 0 } } }, - { { { 20, 0, 0 }, { 0, 40, 0 } } }, - { { { 20, 0, 1 }, { 10, 31, 0 } } }, - { { { 20, 0, 2 }, { 0, 41, 0 } } }, - { { { 21, 0, 1 }, { 11, 31, 0 } } }, - { { { 21, 0, 0 }, { 0, 42, 0 } } }, - { { { 21, 0, 1 }, { 12, 31, 0 } } }, - { { { 21, 0, 2 }, { 0, 43, 0 } } }, - { { { 22, 0, 1 }, { 13, 31, 0 } } }, - { { { 22, 0, 0 }, { 0, 44, 0 } } }, - { { { 22, 0, 1 }, { 14, 31, 0 } } }, - { { { 22, 0, 2 }, { 0, 45, 0 } } }, - { { { 23, 0, 1 }, { 15, 31, 0 } } }, - { { { 23, 0, 0 }, { 0, 46, 0 } } }, - { { { 23, 0, 1 }, { 0, 47, 1 } } }, - { { { 23, 0, 2 }, { 0, 47, 0 } } }, - { { { 24, 0, 1 }, { 0, 48, 1 } } }, - { { { 24, 0, 0 }, { 0, 48, 0 } } }, - { { { 24, 0, 1 }, { 0, 49, 1 } } }, - { { { 24, 0, 2 }, { 0, 49, 0 } } }, - { { { 25, 0, 1 }, { 0, 50, 1 } } }, - { { { 25, 0, 0 }, { 0, 50, 0 } } }, - { { { 25, 0, 1 }, { 0, 51, 1 } } }, - { { { 25, 0, 2 }, { 0, 51, 0 } } }, - { { { 26, 0, 1 }, { 0, 52, 1 } } }, - { { { 26, 0, 0 }, { 0, 52, 0 } } }, - { { { 26, 0, 1 }, { 0, 53, 1 } } }, - { { { 26, 0, 2 }, { 0, 53, 0 } } }, - { { { 27, 0, 1 }, { 0, 54, 1 } } }, - { { { 27, 0, 0 }, { 0, 54, 0 } } }, - { { { 27, 0, 1 }, { 0, 55, 1 } } }, - { { { 27, 0, 2 }, { 0, 55, 0 } } }, - { { { 28, 0, 1 }, { 0, 56, 1 } } }, - { { { 28, 0, 0 }, { 0, 56, 0 } } }, - { { { 28, 0, 1 }, { 0, 57, 1 } } }, - { { { 28, 0, 2 }, { 0, 57, 0 } } }, - { { { 29, 0, 1 }, { 0, 58, 1 } } }, - { { { 29, 0, 0 }, { 0, 58, 0 } } }, - { { { 29, 0, 1 }, { 0, 59, 1 } } }, - { { { 29, 0, 2 }, { 0, 59, 0 } } }, - { { { 30, 0, 1 }, { 0, 60, 1 } } }, - { { { 30, 0, 0 }, { 0, 60, 0 } } }, - { { { 30, 0, 1 }, { 0, 61, 1 } } }, - { { { 30, 0, 2 }, { 0, 61, 0 } } }, - { { { 31, 0, 1 }, { 0, 62, 1 } } }, - { { { 31, 0, 0 }, { 0, 62, 0 } } }, - { { { 31, 0, 1 }, { 0, 63, 1 } } }, - { { { 31, 0, 2 }, { 0, 63, 0 } } }, - { { { 32, 0, 2 }, { 1, 63, 1 } } }, - { { { 32, 0, 1 }, { 1, 63, 0 } } }, - { { { 32, 0, 0 }, { 16, 48, 0 } } }, - { { { 32, 0, 1 }, { 2, 63, 0 } } }, - { { { 32, 0, 2 }, { 16, 49, 0 } } }, - { { { 33, 0, 1 }, { 3, 63, 0 } } }, - { { { 33, 0, 0 }, { 16, 50, 0 } } }, - { { { 33, 0, 1 }, { 4, 63, 0 } } }, - { { { 33, 0, 2 }, { 16, 51, 0 } } }, - { { { 34, 0, 1 }, { 5, 63, 0 } } }, - { { { 34, 0, 0 }, { 16, 52, 0 } } }, - { { { 34, 0, 1 }, { 6, 63, 0 } } }, - { { { 34, 0, 2 }, { 16, 53, 0 } } }, - { { { 35, 0, 1 }, { 7, 63, 0 } } }, - { { { 35, 0, 0 }, { 16, 54, 0 } } }, - { { { 35, 0, 1 }, { 8, 63, 0 } } }, - { { { 35, 0, 2 }, { 16, 55, 0 } } }, - { { { 36, 0, 1 }, { 9, 63, 0 } } }, - { { { 36, 0, 0 }, { 16, 56, 0 } } }, - { { { 36, 0, 1 }, { 10, 63, 0 } } }, - { { { 36, 0, 2 }, { 16, 57, 0 } } }, - { { { 37, 0, 1 }, { 11, 63, 0 } } }, - { { { 37, 0, 0 }, { 16, 58, 0 } } }, - { { { 37, 0, 1 }, { 12, 63, 0 } } }, - { { { 37, 0, 2 }, { 16, 59, 0 } } }, - { { { 38, 0, 1 }, { 13, 63, 0 } } }, - { { { 38, 0, 0 }, { 16, 60, 0 } } }, - { { { 38, 0, 1 }, { 14, 63, 0 } } }, - { { { 38, 0, 2 }, { 16, 61, 0 } } }, - { { { 39, 0, 1 }, { 15, 63, 0 } } }, - { { { 39, 0, 0 }, { 16, 62, 0 } } }, - { { { 39, 0, 1 }, { 16, 63, 1 } } }, - { { { 39, 0, 2 }, { 16, 63, 0 } } }, - { { { 40, 0, 1 }, { 17, 63, 1 } } }, - { { { 40, 0, 0 }, { 17, 63, 0 } } }, - { { { 40, 0, 1 }, { 18, 63, 1 } } }, - { { { 40, 0, 2 }, { 18, 63, 0 } } }, - { { { 41, 0, 1 }, { 19, 63, 1 } } }, - { { { 41, 0, 0 }, { 19, 63, 0 } } }, - { { { 41, 0, 1 }, { 20, 63, 1 } } }, - { { { 41, 0, 2 }, { 20, 63, 0 } } }, - { { { 42, 0, 1 }, { 21, 63, 1 } } }, - { { { 42, 0, 0 }, { 21, 63, 0 } } }, - { { { 42, 0, 1 }, { 22, 63, 1 } } }, - { { { 42, 0, 2 }, { 22, 63, 0 } } }, - { { { 43, 0, 1 }, { 23, 63, 1 } } }, - { { { 43, 0, 0 }, { 23, 63, 0 } } }, - { { { 43, 0, 1 }, { 24, 63, 1 } } }, - { { { 43, 0, 2 }, { 24, 63, 0 } } }, - { { { 44, 0, 1 }, { 25, 63, 1 } } }, - { { { 44, 0, 0 }, { 25, 63, 0 } } }, - { { { 44, 0, 1 }, { 26, 63, 1 } } }, - { { { 44, 0, 2 }, { 26, 63, 0 } } }, - { { { 45, 0, 1 }, { 27, 63, 1 } } }, - { { { 45, 0, 0 }, { 27, 63, 0 } } }, - { { { 45, 0, 1 }, { 28, 63, 1 } } }, - { { { 45, 0, 2 }, { 28, 63, 0 } } }, - { { { 46, 0, 1 }, { 29, 63, 1 } } }, - { { { 46, 0, 0 }, { 29, 63, 0 } } }, - { { { 46, 0, 1 }, { 30, 63, 1 } } }, - { { { 46, 0, 2 }, { 30, 63, 0 } } }, - { { { 47, 0, 1 }, { 31, 63, 1 } } }, - { { { 47, 0, 0 }, { 31, 63, 0 } } }, - { { { 47, 0, 1 }, { 32, 63, 1 } } }, - { { { 47, 0, 2 }, { 32, 63, 0 } } }, - { { { 48, 0, 2 }, { 33, 63, 1 } } }, - { { { 48, 0, 1 }, { 33, 63, 0 } } }, - { { { 48, 0, 0 }, { 48, 48, 0 } } }, - { { { 48, 0, 1 }, { 34, 63, 0 } } }, - { { { 48, 0, 2 }, { 48, 49, 0 } } }, - { { { 49, 0, 1 }, { 35, 63, 0 } } }, - { { { 49, 0, 0 }, { 48, 50, 0 } } }, - { { { 49, 0, 1 }, { 36, 63, 0 } } }, - { { { 49, 0, 2 }, { 48, 51, 0 } } }, - { { { 50, 0, 1 }, { 37, 63, 0 } } }, - { { { 50, 0, 0 }, { 48, 52, 0 } } }, - { { { 50, 0, 1 }, { 38, 63, 0 } } }, - { { { 50, 0, 2 }, { 48, 53, 0 } } }, - { { { 51, 0, 1 }, { 39, 63, 0 } } }, - { { { 51, 0, 0 }, { 48, 54, 0 } } }, - { { { 51, 0, 1 }, { 40, 63, 0 } } }, - { { { 51, 0, 2 }, { 48, 55, 0 } } }, - { { { 52, 0, 1 }, { 41, 63, 0 } } }, - { { { 52, 0, 0 }, { 48, 56, 0 } } }, - { { { 52, 0, 1 }, { 42, 63, 0 } } }, - { { { 52, 0, 2 }, { 48, 57, 0 } } }, - { { { 53, 0, 1 }, { 43, 63, 0 } } }, - { { { 53, 0, 0 }, { 48, 58, 0 } } }, - { { { 53, 0, 1 }, { 44, 63, 0 } } }, - { { { 53, 0, 2 }, { 48, 59, 0 } } }, - { { { 54, 0, 1 }, { 45, 63, 0 } } }, - { { { 54, 0, 0 }, { 48, 60, 0 } } }, - { { { 54, 0, 1 }, { 46, 63, 0 } } }, - { { { 54, 0, 2 }, { 48, 61, 0 } } }, - { { { 55, 0, 1 }, { 47, 63, 0 } } }, - { { { 55, 0, 0 }, { 48, 62, 0 } } }, - { { { 55, 0, 1 }, { 48, 63, 1 } } }, - { { { 55, 0, 2 }, { 48, 63, 0 } } }, - { { { 56, 0, 1 }, { 49, 63, 1 } } }, - { { { 56, 0, 0 }, { 49, 63, 0 } } }, - { { { 56, 0, 1 }, { 50, 63, 1 } } }, - { { { 56, 0, 2 }, { 50, 63, 0 } } }, - { { { 57, 0, 1 }, { 51, 63, 1 } } }, - { { { 57, 0, 0 }, { 51, 63, 0 } } }, - { { { 57, 0, 1 }, { 52, 63, 1 } } }, - { { { 57, 0, 2 }, { 52, 63, 0 } } }, - { { { 58, 0, 1 }, { 53, 63, 1 } } }, - { { { 58, 0, 0 }, { 53, 63, 0 } } }, - { { { 58, 0, 1 }, { 54, 63, 1 } } }, - { { { 58, 0, 2 }, { 54, 63, 0 } } }, - { { { 59, 0, 1 }, { 55, 63, 1 } } }, - { { { 59, 0, 0 }, { 55, 63, 0 } } }, - { { { 59, 0, 1 }, { 56, 63, 1 } } }, - { { { 59, 0, 2 }, { 56, 63, 0 } } }, - { { { 60, 0, 1 }, { 57, 63, 1 } } }, - { { { 60, 0, 0 }, { 57, 63, 0 } } }, - { { { 60, 0, 1 }, { 58, 63, 1 } } }, - { { { 60, 0, 2 }, { 58, 63, 0 } } }, - { { { 61, 0, 1 }, { 59, 63, 1 } } }, - { { { 61, 0, 0 }, { 59, 63, 0 } } }, - { { { 61, 0, 1 }, { 60, 63, 1 } } }, - { { { 61, 0, 2 }, { 60, 63, 0 } } }, - { { { 62, 0, 1 }, { 61, 63, 1 } } }, - { { { 62, 0, 0 }, { 61, 63, 0 } } }, - { { { 62, 0, 1 }, { 62, 63, 1 } } }, - { { { 62, 0, 2 }, { 62, 63, 0 } } }, - { { { 63, 0, 1 }, { 63, 63, 1 } } }, - { { { 63, 0, 0 }, { 63, 63, 0 } } } + { { { 0, 0, 0 }, { 0, 0, 0 } } }, + { { { 0, 0, 1 }, { 0, 1, 1 } } }, + { { { 0, 0, 2 }, { 0, 1, 0 } } }, + { { { 1, 0, 1 }, { 0, 2, 1 } } }, + { { { 1, 0, 0 }, { 0, 2, 0 } } }, + { { { 1, 0, 1 }, { 0, 3, 1 } } }, + { { { 1, 0, 2 }, { 0, 3, 0 } } }, + { { { 2, 0, 1 }, { 0, 4, 1 } } }, + { { { 2, 0, 0 }, { 0, 4, 0 } } }, + { { { 2, 0, 1 }, { 0, 5, 1 } } }, + { { { 2, 0, 2 }, { 0, 5, 0 } } }, + { { { 3, 0, 1 }, { 0, 6, 1 } } }, + { { { 3, 0, 0 }, { 0, 6, 0 } } }, + { { { 3, 0, 1 }, { 0, 7, 1 } } }, + { { { 3, 0, 2 }, { 0, 7, 0 } } }, + { { { 4, 0, 1 }, { 0, 8, 1 } } }, + { { { 4, 0, 0 }, { 0, 8, 0 } } }, + { { { 4, 0, 1 }, { 0, 9, 1 } } }, + { { { 4, 0, 2 }, { 0, 9, 0 } } }, + { { { 5, 0, 1 }, { 0, 10, 1 } } }, + { { { 5, 0, 0 }, { 0, 10, 0 } } }, + { { { 5, 0, 1 }, { 0, 11, 1 } } }, + { { { 5, 0, 2 }, { 0, 11, 0 } } }, + { { { 6, 0, 1 }, { 0, 12, 1 } } }, + { { { 6, 0, 0 }, { 0, 12, 0 } } }, + { { { 6, 0, 1 }, { 0, 13, 1 } } }, + { { { 6, 0, 2 }, { 0, 13, 0 } } }, + { { { 7, 0, 1 }, { 0, 14, 1 } } }, + { { { 7, 0, 0 }, { 0, 14, 0 } } }, + { { { 7, 0, 1 }, { 0, 15, 1 } } }, + { { { 7, 0, 2 }, { 0, 15, 0 } } }, + { { { 8, 0, 1 }, { 0, 16, 1 } } }, + { { { 8, 0, 0 }, { 0, 16, 0 } } }, + { { { 8, 0, 1 }, { 0, 17, 1 } } }, + { { { 8, 0, 2 }, { 0, 17, 0 } } }, + { { { 9, 0, 1 }, { 0, 18, 1 } } }, + { { { 9, 0, 0 }, { 0, 18, 0 } } }, + { { { 9, 0, 1 }, { 0, 19, 1 } } }, + { { { 9, 0, 2 }, { 0, 19, 0 } } }, + { { { 10, 0, 1 }, { 0, 20, 1 } } }, + { { { 10, 0, 0 }, { 0, 20, 0 } } }, + { { { 10, 0, 1 }, { 0, 21, 1 } } }, + { { { 10, 0, 2 }, { 0, 21, 0 } } }, + { { { 11, 0, 1 }, { 0, 22, 1 } } }, + { { { 11, 0, 0 }, { 0, 22, 0 } } }, + { { { 11, 0, 1 }, { 0, 23, 1 } } }, + { { { 11, 0, 2 }, { 0, 23, 0 } } }, + { { { 12, 0, 1 }, { 0, 24, 1 } } }, + { { { 12, 0, 0 }, { 0, 24, 0 } } }, + { { { 12, 0, 1 }, { 0, 25, 1 } } }, + { { { 12, 0, 2 }, { 0, 25, 0 } } }, + { { { 13, 0, 1 }, { 0, 26, 1 } } }, + { { { 13, 0, 0 }, { 0, 26, 0 } } }, + { { { 13, 0, 1 }, { 0, 27, 1 } } }, + { { { 13, 0, 2 }, { 0, 27, 0 } } }, + { { { 14, 0, 1 }, { 0, 28, 1 } } }, + { { { 14, 0, 0 }, { 0, 28, 0 } } }, + { { { 14, 0, 1 }, { 0, 29, 1 } } }, + { { { 14, 0, 2 }, { 0, 29, 0 } } }, + { { { 15, 0, 1 }, { 0, 30, 1 } } }, + { { { 15, 0, 0 }, { 0, 30, 0 } } }, + { { { 15, 0, 1 }, { 0, 31, 1 } } }, + { { { 15, 0, 2 }, { 0, 31, 0 } } }, + { { { 16, 0, 2 }, { 1, 31, 1 } } }, + { { { 16, 0, 1 }, { 1, 31, 0 } } }, + { { { 16, 0, 0 }, { 0, 32, 0 } } }, + { { { 16, 0, 1 }, { 2, 31, 0 } } }, + { { { 16, 0, 2 }, { 0, 33, 0 } } }, + { { { 17, 0, 1 }, { 3, 31, 0 } } }, + { { { 17, 0, 0 }, { 0, 34, 0 } } }, + { { { 17, 0, 1 }, { 4, 31, 0 } } }, + { { { 17, 0, 2 }, { 0, 35, 0 } } }, + { { { 18, 0, 1 }, { 5, 31, 0 } } }, + { { { 18, 0, 0 }, { 0, 36, 0 } } }, + { { { 18, 0, 1 }, { 6, 31, 0 } } }, + { { { 18, 0, 2 }, { 0, 37, 0 } } }, + { { { 19, 0, 1 }, { 7, 31, 0 } } }, + { { { 19, 0, 0 }, { 0, 38, 0 } } }, + { { { 19, 0, 1 }, { 8, 31, 0 } } }, + { { { 19, 0, 2 }, { 0, 39, 0 } } }, + { { { 20, 0, 1 }, { 9, 31, 0 } } }, + { { { 20, 0, 0 }, { 0, 40, 0 } } }, + { { { 20, 0, 1 }, { 10, 31, 0 } } }, + { { { 20, 0, 2 }, { 0, 41, 0 } } }, + { { { 21, 0, 1 }, { 11, 31, 0 } } }, + { { { 21, 0, 0 }, { 0, 42, 0 } } }, + { { { 21, 0, 1 }, { 12, 31, 0 } } }, + { { { 21, 0, 2 }, { 0, 43, 0 } } }, + { { { 22, 0, 1 }, { 13, 31, 0 } } }, + { { { 22, 0, 0 }, { 0, 44, 0 } } }, + { { { 22, 0, 1 }, { 14, 31, 0 } } }, + { { { 22, 0, 2 }, { 0, 45, 0 } } }, + { { { 23, 0, 1 }, { 15, 31, 0 } } }, + { { { 23, 0, 0 }, { 0, 46, 0 } } }, + { { { 23, 0, 1 }, { 0, 47, 1 } } }, + { { { 23, 0, 2 }, { 0, 47, 0 } } }, + { { { 24, 0, 1 }, { 0, 48, 1 } } }, + { { { 24, 0, 0 }, { 0, 48, 0 } } }, + { { { 24, 0, 1 }, { 0, 49, 1 } } }, + { { { 24, 0, 2 }, { 0, 49, 0 } } }, + { { { 25, 0, 1 }, { 0, 50, 1 } } }, + { { { 25, 0, 0 }, { 0, 50, 0 } } }, + { { { 25, 0, 1 }, { 0, 51, 1 } } }, + { { { 25, 0, 2 }, { 0, 51, 0 } } }, + { { { 26, 0, 1 }, { 0, 52, 1 } } }, + { { { 26, 0, 0 }, { 0, 52, 0 } } }, + { { { 26, 0, 1 }, { 0, 53, 1 } } }, + { { { 26, 0, 2 }, { 0, 53, 0 } } }, + { { { 27, 0, 1 }, { 0, 54, 1 } } }, + { { { 27, 0, 0 }, { 0, 54, 0 } } }, + { { { 27, 0, 1 }, { 0, 55, 1 } } }, + { { { 27, 0, 2 }, { 0, 55, 0 } } }, + { { { 28, 0, 1 }, { 0, 56, 1 } } }, + { { { 28, 0, 0 }, { 0, 56, 0 } } }, + { { { 28, 0, 1 }, { 0, 57, 1 } } }, + { { { 28, 0, 2 }, { 0, 57, 0 } } }, + { { { 29, 0, 1 }, { 0, 58, 1 } } }, + { { { 29, 0, 0 }, { 0, 58, 0 } } }, + { { { 29, 0, 1 }, { 0, 59, 1 } } }, + { { { 29, 0, 2 }, { 0, 59, 0 } } }, + { { { 30, 0, 1 }, { 0, 60, 1 } } }, + { { { 30, 0, 0 }, { 0, 60, 0 } } }, + { { { 30, 0, 1 }, { 0, 61, 1 } } }, + { { { 30, 0, 2 }, { 0, 61, 0 } } }, + { { { 31, 0, 1 }, { 0, 62, 1 } } }, + { { { 31, 0, 0 }, { 0, 62, 0 } } }, + { { { 31, 0, 1 }, { 0, 63, 1 } } }, + { { { 31, 0, 2 }, { 0, 63, 0 } } }, + { { { 32, 0, 2 }, { 1, 63, 1 } } }, + { { { 32, 0, 1 }, { 1, 63, 0 } } }, + { { { 32, 0, 0 }, { 16, 48, 0 } } }, + { { { 32, 0, 1 }, { 2, 63, 0 } } }, + { { { 32, 0, 2 }, { 16, 49, 0 } } }, + { { { 33, 0, 1 }, { 3, 63, 0 } } }, + { { { 33, 0, 0 }, { 16, 50, 0 } } }, + { { { 33, 0, 1 }, { 4, 63, 0 } } }, + { { { 33, 0, 2 }, { 16, 51, 0 } } }, + { { { 34, 0, 1 }, { 5, 63, 0 } } }, + { { { 34, 0, 0 }, { 16, 52, 0 } } }, + { { { 34, 0, 1 }, { 6, 63, 0 } } }, + { { { 34, 0, 2 }, { 16, 53, 0 } } }, + { { { 35, 0, 1 }, { 7, 63, 0 } } }, + { { { 35, 0, 0 }, { 16, 54, 0 } } }, + { { { 35, 0, 1 }, { 8, 63, 0 } } }, + { { { 35, 0, 2 }, { 16, 55, 0 } } }, + { { { 36, 0, 1 }, { 9, 63, 0 } } }, + { { { 36, 0, 0 }, { 16, 56, 0 } } }, + { { { 36, 0, 1 }, { 10, 63, 0 } } }, + { { { 36, 0, 2 }, { 16, 57, 0 } } }, + { { { 37, 0, 1 }, { 11, 63, 0 } } }, + { { { 37, 0, 0 }, { 16, 58, 0 } } }, + { { { 37, 0, 1 }, { 12, 63, 0 } } }, + { { { 37, 0, 2 }, { 16, 59, 0 } } }, + { { { 38, 0, 1 }, { 13, 63, 0 } } }, + { { { 38, 0, 0 }, { 16, 60, 0 } } }, + { { { 38, 0, 1 }, { 14, 63, 0 } } }, + { { { 38, 0, 2 }, { 16, 61, 0 } } }, + { { { 39, 0, 1 }, { 15, 63, 0 } } }, + { { { 39, 0, 0 }, { 16, 62, 0 } } }, + { { { 39, 0, 1 }, { 16, 63, 1 } } }, + { { { 39, 0, 2 }, { 16, 63, 0 } } }, + { { { 40, 0, 1 }, { 17, 63, 1 } } }, + { { { 40, 0, 0 }, { 17, 63, 0 } } }, + { { { 40, 0, 1 }, { 18, 63, 1 } } }, + { { { 40, 0, 2 }, { 18, 63, 0 } } }, + { { { 41, 0, 1 }, { 19, 63, 1 } } }, + { { { 41, 0, 0 }, { 19, 63, 0 } } }, + { { { 41, 0, 1 }, { 20, 63, 1 } } }, + { { { 41, 0, 2 }, { 20, 63, 0 } } }, + { { { 42, 0, 1 }, { 21, 63, 1 } } }, + { { { 42, 0, 0 }, { 21, 63, 0 } } }, + { { { 42, 0, 1 }, { 22, 63, 1 } } }, + { { { 42, 0, 2 }, { 22, 63, 0 } } }, + { { { 43, 0, 1 }, { 23, 63, 1 } } }, + { { { 43, 0, 0 }, { 23, 63, 0 } } }, + { { { 43, 0, 1 }, { 24, 63, 1 } } }, + { { { 43, 0, 2 }, { 24, 63, 0 } } }, + { { { 44, 0, 1 }, { 25, 63, 1 } } }, + { { { 44, 0, 0 }, { 25, 63, 0 } } }, + { { { 44, 0, 1 }, { 26, 63, 1 } } }, + { { { 44, 0, 2 }, { 26, 63, 0 } } }, + { { { 45, 0, 1 }, { 27, 63, 1 } } }, + { { { 45, 0, 0 }, { 27, 63, 0 } } }, + { { { 45, 0, 1 }, { 28, 63, 1 } } }, + { { { 45, 0, 2 }, { 28, 63, 0 } } }, + { { { 46, 0, 1 }, { 29, 63, 1 } } }, + { { { 46, 0, 0 }, { 29, 63, 0 } } }, + { { { 46, 0, 1 }, { 30, 63, 1 } } }, + { { { 46, 0, 2 }, { 30, 63, 0 } } }, + { { { 47, 0, 1 }, { 31, 63, 1 } } }, + { { { 47, 0, 0 }, { 31, 63, 0 } } }, + { { { 47, 0, 1 }, { 32, 63, 1 } } }, + { { { 47, 0, 2 }, { 32, 63, 0 } } }, + { { { 48, 0, 2 }, { 33, 63, 1 } } }, + { { { 48, 0, 1 }, { 33, 63, 0 } } }, + { { { 48, 0, 0 }, { 48, 48, 0 } } }, + { { { 48, 0, 1 }, { 34, 63, 0 } } }, + { { { 48, 0, 2 }, { 48, 49, 0 } } }, + { { { 49, 0, 1 }, { 35, 63, 0 } } }, + { { { 49, 0, 0 }, { 48, 50, 0 } } }, + { { { 49, 0, 1 }, { 36, 63, 0 } } }, + { { { 49, 0, 2 }, { 48, 51, 0 } } }, + { { { 50, 0, 1 }, { 37, 63, 0 } } }, + { { { 50, 0, 0 }, { 48, 52, 0 } } }, + { { { 50, 0, 1 }, { 38, 63, 0 } } }, + { { { 50, 0, 2 }, { 48, 53, 0 } } }, + { { { 51, 0, 1 }, { 39, 63, 0 } } }, + { { { 51, 0, 0 }, { 48, 54, 0 } } }, + { { { 51, 0, 1 }, { 40, 63, 0 } } }, + { { { 51, 0, 2 }, { 48, 55, 0 } } }, + { { { 52, 0, 1 }, { 41, 63, 0 } } }, + { { { 52, 0, 0 }, { 48, 56, 0 } } }, + { { { 52, 0, 1 }, { 42, 63, 0 } } }, + { { { 52, 0, 2 }, { 48, 57, 0 } } }, + { { { 53, 0, 1 }, { 43, 63, 0 } } }, + { { { 53, 0, 0 }, { 48, 58, 0 } } }, + { { { 53, 0, 1 }, { 44, 63, 0 } } }, + { { { 53, 0, 2 }, { 48, 59, 0 } } }, + { { { 54, 0, 1 }, { 45, 63, 0 } } }, + { { { 54, 0, 0 }, { 48, 60, 0 } } }, + { { { 54, 0, 1 }, { 46, 63, 0 } } }, + { { { 54, 0, 2 }, { 48, 61, 0 } } }, + { { { 55, 0, 1 }, { 47, 63, 0 } } }, + { { { 55, 0, 0 }, { 48, 62, 0 } } }, + { { { 55, 0, 1 }, { 48, 63, 1 } } }, + { { { 55, 0, 2 }, { 48, 63, 0 } } }, + { { { 56, 0, 1 }, { 49, 63, 1 } } }, + { { { 56, 0, 0 }, { 49, 63, 0 } } }, + { { { 56, 0, 1 }, { 50, 63, 1 } } }, + { { { 56, 0, 2 }, { 50, 63, 0 } } }, + { { { 57, 0, 1 }, { 51, 63, 1 } } }, + { { { 57, 0, 0 }, { 51, 63, 0 } } }, + { { { 57, 0, 1 }, { 52, 63, 1 } } }, + { { { 57, 0, 2 }, { 52, 63, 0 } } }, + { { { 58, 0, 1 }, { 53, 63, 1 } } }, + { { { 58, 0, 0 }, { 53, 63, 0 } } }, + { { { 58, 0, 1 }, { 54, 63, 1 } } }, + { { { 58, 0, 2 }, { 54, 63, 0 } } }, + { { { 59, 0, 1 }, { 55, 63, 1 } } }, + { { { 59, 0, 0 }, { 55, 63, 0 } } }, + { { { 59, 0, 1 }, { 56, 63, 1 } } }, + { { { 59, 0, 2 }, { 56, 63, 0 } } }, + { { { 60, 0, 1 }, { 57, 63, 1 } } }, + { { { 60, 0, 0 }, { 57, 63, 0 } } }, + { { { 60, 0, 1 }, { 58, 63, 1 } } }, + { { { 60, 0, 2 }, { 58, 63, 0 } } }, + { { { 61, 0, 1 }, { 59, 63, 1 } } }, + { { { 61, 0, 0 }, { 59, 63, 0 } } }, + { { { 61, 0, 1 }, { 60, 63, 1 } } }, + { { { 61, 0, 2 }, { 60, 63, 0 } } }, + { { { 62, 0, 1 }, { 61, 63, 1 } } }, + { { { 62, 0, 0 }, { 61, 63, 0 } } }, + { { { 62, 0, 1 }, { 62, 63, 1 } } }, + { { { 62, 0, 2 }, { 62, 63, 0 } } }, + { { { 63, 0, 1 }, { 63, 63, 1 } } }, + { { { 63, 0, 0 }, { 63, 63, 0 } } } }; -static SingleColourLookup const lookup_5_4[] = +static SingleColourLookup const lookup_5_4[] = { - { { { 0, 0, 0 }, { 0, 0, 0 } } }, - { { { 0, 0, 1 }, { 0, 1, 1 } } }, - { { { 0, 0, 2 }, { 0, 1, 0 } } }, - { { { 0, 0, 3 }, { 0, 1, 1 } } }, - { { { 0, 0, 4 }, { 0, 2, 1 } } }, - { { { 1, 0, 3 }, { 0, 2, 0 } } }, - { { { 1, 0, 2 }, { 0, 2, 1 } } }, - { { { 1, 0, 1 }, { 0, 3, 1 } } }, - { { { 1, 0, 0 }, { 0, 3, 0 } } }, - { { { 1, 0, 1 }, { 1, 2, 1 } } }, - { { { 1, 0, 2 }, { 1, 2, 0 } } }, - { { { 1, 0, 3 }, { 0, 4, 0 } } }, - { { { 1, 0, 4 }, { 0, 5, 1 } } }, - { { { 2, 0, 3 }, { 0, 5, 0 } } }, - { { { 2, 0, 2 }, { 0, 5, 1 } } }, - { { { 2, 0, 1 }, { 0, 6, 1 } } }, - { { { 2, 0, 0 }, { 0, 6, 0 } } }, - { { { 2, 0, 1 }, { 2, 3, 1 } } }, - { { { 2, 0, 2 }, { 2, 3, 0 } } }, - { { { 2, 0, 3 }, { 0, 7, 0 } } }, - { { { 2, 0, 4 }, { 1, 6, 1 } } }, - { { { 3, 0, 3 }, { 1, 6, 0 } } }, - { { { 3, 0, 2 }, { 0, 8, 0 } } }, - { { { 3, 0, 1 }, { 0, 9, 1 } } }, - { { { 3, 0, 0 }, { 0, 9, 0 } } }, - { { { 3, 0, 1 }, { 0, 9, 1 } } }, - { { { 3, 0, 2 }, { 0, 10, 1 } } }, - { { { 3, 0, 3 }, { 0, 10, 0 } } }, - { { { 3, 0, 4 }, { 2, 7, 1 } } }, - { { { 4, 0, 4 }, { 2, 7, 0 } } }, - { { { 4, 0, 3 }, { 0, 11, 0 } } }, - { { { 4, 0, 2 }, { 1, 10, 1 } } }, - { { { 4, 0, 1 }, { 1, 10, 0 } } }, - { { { 4, 0, 0 }, { 0, 12, 0 } } }, - { { { 4, 0, 1 }, { 0, 13, 1 } } }, - { { { 4, 0, 2 }, { 0, 13, 0 } } }, - { { { 4, 0, 3 }, { 0, 13, 1 } } }, - { { { 4, 0, 4 }, { 0, 14, 1 } } }, - { { { 5, 0, 3 }, { 0, 14, 0 } } }, - { { { 5, 0, 2 }, { 2, 11, 1 } } }, - { { { 5, 0, 1 }, { 2, 11, 0 } } }, - { { { 5, 0, 0 }, { 0, 15, 0 } } }, - { { { 5, 0, 1 }, { 1, 14, 1 } } }, - { { { 5, 0, 2 }, { 1, 14, 0 } } }, - { { { 5, 0, 3 }, { 0, 16, 0 } } }, - { { { 5, 0, 4 }, { 0, 17, 1 } } }, - { { { 6, 0, 3 }, { 0, 17, 0 } } }, - { { { 6, 0, 2 }, { 0, 17, 1 } } }, - { { { 6, 0, 1 }, { 0, 18, 1 } } }, - { { { 6, 0, 0 }, { 0, 18, 0 } } }, - { { { 6, 0, 1 }, { 2, 15, 1 } } }, - { { { 6, 0, 2 }, { 2, 15, 0 } } }, - { { { 6, 0, 3 }, { 0, 19, 0 } } }, - { { { 6, 0, 4 }, { 1, 18, 1 } } }, - { { { 7, 0, 3 }, { 1, 18, 0 } } }, - { { { 7, 0, 2 }, { 0, 20, 0 } } }, - { { { 7, 0, 1 }, { 0, 21, 1 } } }, - { { { 7, 0, 0 }, { 0, 21, 0 } } }, - { { { 7, 0, 1 }, { 0, 21, 1 } } }, - { { { 7, 0, 2 }, { 0, 22, 1 } } }, - { { { 7, 0, 3 }, { 0, 22, 0 } } }, - { { { 7, 0, 4 }, { 2, 19, 1 } } }, - { { { 8, 0, 4 }, { 2, 19, 0 } } }, - { { { 8, 0, 3 }, { 0, 23, 0 } } }, - { { { 8, 0, 2 }, { 1, 22, 1 } } }, - { { { 8, 0, 1 }, { 1, 22, 0 } } }, - { { { 8, 0, 0 }, { 0, 24, 0 } } }, - { { { 8, 0, 1 }, { 0, 25, 1 } } }, - { { { 8, 0, 2 }, { 0, 25, 0 } } }, - { { { 8, 0, 3 }, { 0, 25, 1 } } }, - { { { 8, 0, 4 }, { 0, 26, 1 } } }, - { { { 9, 0, 3 }, { 0, 26, 0 } } }, - { { { 9, 0, 2 }, { 2, 23, 1 } } }, - { { { 9, 0, 1 }, { 2, 23, 0 } } }, - { { { 9, 0, 0 }, { 0, 27, 0 } } }, - { { { 9, 0, 1 }, { 1, 26, 1 } } }, - { { { 9, 0, 2 }, { 1, 26, 0 } } }, - { { { 9, 0, 3 }, { 0, 28, 0 } } }, - { { { 9, 0, 4 }, { 0, 29, 1 } } }, - { { { 10, 0, 3 }, { 0, 29, 0 } } }, - { { { 10, 0, 2 }, { 0, 29, 1 } } }, - { { { 10, 0, 1 }, { 0, 30, 1 } } }, - { { { 10, 0, 0 }, { 0, 30, 0 } } }, - { { { 10, 0, 1 }, { 2, 27, 1 } } }, - { { { 10, 0, 2 }, { 2, 27, 0 } } }, - { { { 10, 0, 3 }, { 0, 31, 0 } } }, - { { { 10, 0, 4 }, { 1, 30, 1 } } }, - { { { 11, 0, 3 }, { 1, 30, 0 } } }, - { { { 11, 0, 2 }, { 4, 24, 0 } } }, - { { { 11, 0, 1 }, { 1, 31, 1 } } }, - { { { 11, 0, 0 }, { 1, 31, 0 } } }, - { { { 11, 0, 1 }, { 1, 31, 1 } } }, - { { { 11, 0, 2 }, { 2, 30, 1 } } }, - { { { 11, 0, 3 }, { 2, 30, 0 } } }, - { { { 11, 0, 4 }, { 2, 31, 1 } } }, - { { { 12, 0, 4 }, { 2, 31, 0 } } }, - { { { 12, 0, 3 }, { 4, 27, 0 } } }, - { { { 12, 0, 2 }, { 3, 30, 1 } } }, - { { { 12, 0, 1 }, { 3, 30, 0 } } }, - { { { 12, 0, 0 }, { 4, 28, 0 } } }, - { { { 12, 0, 1 }, { 3, 31, 1 } } }, - { { { 12, 0, 2 }, { 3, 31, 0 } } }, - { { { 12, 0, 3 }, { 3, 31, 1 } } }, - { { { 12, 0, 4 }, { 4, 30, 1 } } }, - { { { 13, 0, 3 }, { 4, 30, 0 } } }, - { { { 13, 0, 2 }, { 6, 27, 1 } } }, - { { { 13, 0, 1 }, { 6, 27, 0 } } }, - { { { 13, 0, 0 }, { 4, 31, 0 } } }, - { { { 13, 0, 1 }, { 5, 30, 1 } } }, - { { { 13, 0, 2 }, { 5, 30, 0 } } }, - { { { 13, 0, 3 }, { 8, 24, 0 } } }, - { { { 13, 0, 4 }, { 5, 31, 1 } } }, - { { { 14, 0, 3 }, { 5, 31, 0 } } }, - { { { 14, 0, 2 }, { 5, 31, 1 } } }, - { { { 14, 0, 1 }, { 6, 30, 1 } } }, - { { { 14, 0, 0 }, { 6, 30, 0 } } }, - { { { 14, 0, 1 }, { 6, 31, 1 } } }, - { { { 14, 0, 2 }, { 6, 31, 0 } } }, - { { { 14, 0, 3 }, { 8, 27, 0 } } }, - { { { 14, 0, 4 }, { 7, 30, 1 } } }, - { { { 15, 0, 3 }, { 7, 30, 0 } } }, - { { { 15, 0, 2 }, { 8, 28, 0 } } }, - { { { 15, 0, 1 }, { 7, 31, 1 } } }, - { { { 15, 0, 0 }, { 7, 31, 0 } } }, - { { { 15, 0, 1 }, { 7, 31, 1 } } }, - { { { 15, 0, 2 }, { 8, 30, 1 } } }, - { { { 15, 0, 3 }, { 8, 30, 0 } } }, - { { { 15, 0, 4 }, { 10, 27, 1 } } }, - { { { 16, 0, 4 }, { 10, 27, 0 } } }, - { { { 16, 0, 3 }, { 8, 31, 0 } } }, - { { { 16, 0, 2 }, { 9, 30, 1 } } }, - { { { 16, 0, 1 }, { 9, 30, 0 } } }, - { { { 16, 0, 0 }, { 12, 24, 0 } } }, - { { { 16, 0, 1 }, { 9, 31, 1 } } }, - { { { 16, 0, 2 }, { 9, 31, 0 } } }, - { { { 16, 0, 3 }, { 9, 31, 1 } } }, - { { { 16, 0, 4 }, { 10, 30, 1 } } }, - { { { 17, 0, 3 }, { 10, 30, 0 } } }, - { { { 17, 0, 2 }, { 10, 31, 1 } } }, - { { { 17, 0, 1 }, { 10, 31, 0 } } }, - { { { 17, 0, 0 }, { 12, 27, 0 } } }, - { { { 17, 0, 1 }, { 11, 30, 1 } } }, - { { { 17, 0, 2 }, { 11, 30, 0 } } }, - { { { 17, 0, 3 }, { 12, 28, 0 } } }, - { { { 17, 0, 4 }, { 11, 31, 1 } } }, - { { { 18, 0, 3 }, { 11, 31, 0 } } }, - { { { 18, 0, 2 }, { 11, 31, 1 } } }, - { { { 18, 0, 1 }, { 12, 30, 1 } } }, - { { { 18, 0, 0 }, { 12, 30, 0 } } }, - { { { 18, 0, 1 }, { 14, 27, 1 } } }, - { { { 18, 0, 2 }, { 14, 27, 0 } } }, - { { { 18, 0, 3 }, { 12, 31, 0 } } }, - { { { 18, 0, 4 }, { 13, 30, 1 } } }, - { { { 19, 0, 3 }, { 13, 30, 0 } } }, - { { { 19, 0, 2 }, { 16, 24, 0 } } }, - { { { 19, 0, 1 }, { 13, 31, 1 } } }, - { { { 19, 0, 0 }, { 13, 31, 0 } } }, - { { { 19, 0, 1 }, { 13, 31, 1 } } }, - { { { 19, 0, 2 }, { 14, 30, 1 } } }, - { { { 19, 0, 3 }, { 14, 30, 0 } } }, - { { { 19, 0, 4 }, { 14, 31, 1 } } }, - { { { 20, 0, 4 }, { 14, 31, 0 } } }, - { { { 20, 0, 3 }, { 16, 27, 0 } } }, - { { { 20, 0, 2 }, { 15, 30, 1 } } }, - { { { 20, 0, 1 }, { 15, 30, 0 } } }, - { { { 20, 0, 0 }, { 16, 28, 0 } } }, - { { { 20, 0, 1 }, { 15, 31, 1 } } }, - { { { 20, 0, 2 }, { 15, 31, 0 } } }, - { { { 20, 0, 3 }, { 15, 31, 1 } } }, - { { { 20, 0, 4 }, { 16, 30, 1 } } }, - { { { 21, 0, 3 }, { 16, 30, 0 } } }, - { { { 21, 0, 2 }, { 18, 27, 1 } } }, - { { { 21, 0, 1 }, { 18, 27, 0 } } }, - { { { 21, 0, 0 }, { 16, 31, 0 } } }, - { { { 21, 0, 1 }, { 17, 30, 1 } } }, - { { { 21, 0, 2 }, { 17, 30, 0 } } }, - { { { 21, 0, 3 }, { 20, 24, 0 } } }, - { { { 21, 0, 4 }, { 17, 31, 1 } } }, - { { { 22, 0, 3 }, { 17, 31, 0 } } }, - { { { 22, 0, 2 }, { 17, 31, 1 } } }, - { { { 22, 0, 1 }, { 18, 30, 1 } } }, - { { { 22, 0, 0 }, { 18, 30, 0 } } }, - { { { 22, 0, 1 }, { 18, 31, 1 } } }, - { { { 22, 0, 2 }, { 18, 31, 0 } } }, - { { { 22, 0, 3 }, { 20, 27, 0 } } }, - { { { 22, 0, 4 }, { 19, 30, 1 } } }, - { { { 23, 0, 3 }, { 19, 30, 0 } } }, - { { { 23, 0, 2 }, { 20, 28, 0 } } }, - { { { 23, 0, 1 }, { 19, 31, 1 } } }, - { { { 23, 0, 0 }, { 19, 31, 0 } } }, - { { { 23, 0, 1 }, { 19, 31, 1 } } }, - { { { 23, 0, 2 }, { 20, 30, 1 } } }, - { { { 23, 0, 3 }, { 20, 30, 0 } } }, - { { { 23, 0, 4 }, { 22, 27, 1 } } }, - { { { 24, 0, 4 }, { 22, 27, 0 } } }, - { { { 24, 0, 3 }, { 20, 31, 0 } } }, - { { { 24, 0, 2 }, { 21, 30, 1 } } }, - { { { 24, 0, 1 }, { 21, 30, 0 } } }, - { { { 24, 0, 0 }, { 24, 24, 0 } } }, - { { { 24, 0, 1 }, { 21, 31, 1 } } }, - { { { 24, 0, 2 }, { 21, 31, 0 } } }, - { { { 24, 0, 3 }, { 21, 31, 1 } } }, - { { { 24, 0, 4 }, { 22, 30, 1 } } }, - { { { 25, 0, 3 }, { 22, 30, 0 } } }, - { { { 25, 0, 2 }, { 22, 31, 1 } } }, - { { { 25, 0, 1 }, { 22, 31, 0 } } }, - { { { 25, 0, 0 }, { 24, 27, 0 } } }, - { { { 25, 0, 1 }, { 23, 30, 1 } } }, - { { { 25, 0, 2 }, { 23, 30, 0 } } }, - { { { 25, 0, 3 }, { 24, 28, 0 } } }, - { { { 25, 0, 4 }, { 23, 31, 1 } } }, - { { { 26, 0, 3 }, { 23, 31, 0 } } }, - { { { 26, 0, 2 }, { 23, 31, 1 } } }, - { { { 26, 0, 1 }, { 24, 30, 1 } } }, - { { { 26, 0, 0 }, { 24, 30, 0 } } }, - { { { 26, 0, 1 }, { 26, 27, 1 } } }, - { { { 26, 0, 2 }, { 26, 27, 0 } } }, - { { { 26, 0, 3 }, { 24, 31, 0 } } }, - { { { 26, 0, 4 }, { 25, 30, 1 } } }, - { { { 27, 0, 3 }, { 25, 30, 0 } } }, - { { { 27, 0, 2 }, { 28, 24, 0 } } }, - { { { 27, 0, 1 }, { 25, 31, 1 } } }, - { { { 27, 0, 0 }, { 25, 31, 0 } } }, - { { { 27, 0, 1 }, { 25, 31, 1 } } }, - { { { 27, 0, 2 }, { 26, 30, 1 } } }, - { { { 27, 0, 3 }, { 26, 30, 0 } } }, - { { { 27, 0, 4 }, { 26, 31, 1 } } }, - { { { 28, 0, 4 }, { 26, 31, 0 } } }, - { { { 28, 0, 3 }, { 28, 27, 0 } } }, - { { { 28, 0, 2 }, { 27, 30, 1 } } }, - { { { 28, 0, 1 }, { 27, 30, 0 } } }, - { { { 28, 0, 0 }, { 28, 28, 0 } } }, - { { { 28, 0, 1 }, { 27, 31, 1 } } }, - { { { 28, 0, 2 }, { 27, 31, 0 } } }, - { { { 28, 0, 3 }, { 27, 31, 1 } } }, - { { { 28, 0, 4 }, { 28, 30, 1 } } }, - { { { 29, 0, 3 }, { 28, 30, 0 } } }, - { { { 29, 0, 2 }, { 30, 27, 1 } } }, - { { { 29, 0, 1 }, { 30, 27, 0 } } }, - { { { 29, 0, 0 }, { 28, 31, 0 } } }, - { { { 29, 0, 1 }, { 29, 30, 1 } } }, - { { { 29, 0, 2 }, { 29, 30, 0 } } }, - { { { 29, 0, 3 }, { 29, 30, 1 } } }, - { { { 29, 0, 4 }, { 29, 31, 1 } } }, - { { { 30, 0, 3 }, { 29, 31, 0 } } }, - { { { 30, 0, 2 }, { 29, 31, 1 } } }, - { { { 30, 0, 1 }, { 30, 30, 1 } } }, - { { { 30, 0, 0 }, { 30, 30, 0 } } }, - { { { 30, 0, 1 }, { 30, 31, 1 } } }, - { { { 30, 0, 2 }, { 30, 31, 0 } } }, - { { { 30, 0, 3 }, { 30, 31, 1 } } }, - { { { 30, 0, 4 }, { 31, 30, 1 } } }, - { { { 31, 0, 3 }, { 31, 30, 0 } } }, - { { { 31, 0, 2 }, { 31, 30, 1 } } }, - { { { 31, 0, 1 }, { 31, 31, 1 } } }, - { { { 31, 0, 0 }, { 31, 31, 0 } } } + { { { 0, 0, 0 }, { 0, 0, 0 } } }, + { { { 0, 0, 1 }, { 0, 1, 1 } } }, + { { { 0, 0, 2 }, { 0, 1, 0 } } }, + { { { 0, 0, 3 }, { 0, 1, 1 } } }, + { { { 0, 0, 4 }, { 0, 2, 1 } } }, + { { { 1, 0, 3 }, { 0, 2, 0 } } }, + { { { 1, 0, 2 }, { 0, 2, 1 } } }, + { { { 1, 0, 1 }, { 0, 3, 1 } } }, + { { { 1, 0, 0 }, { 0, 3, 0 } } }, + { { { 1, 0, 1 }, { 1, 2, 1 } } }, + { { { 1, 0, 2 }, { 1, 2, 0 } } }, + { { { 1, 0, 3 }, { 0, 4, 0 } } }, + { { { 1, 0, 4 }, { 0, 5, 1 } } }, + { { { 2, 0, 3 }, { 0, 5, 0 } } }, + { { { 2, 0, 2 }, { 0, 5, 1 } } }, + { { { 2, 0, 1 }, { 0, 6, 1 } } }, + { { { 2, 0, 0 }, { 0, 6, 0 } } }, + { { { 2, 0, 1 }, { 2, 3, 1 } } }, + { { { 2, 0, 2 }, { 2, 3, 0 } } }, + { { { 2, 0, 3 }, { 0, 7, 0 } } }, + { { { 2, 0, 4 }, { 1, 6, 1 } } }, + { { { 3, 0, 3 }, { 1, 6, 0 } } }, + { { { 3, 0, 2 }, { 0, 8, 0 } } }, + { { { 3, 0, 1 }, { 0, 9, 1 } } }, + { { { 3, 0, 0 }, { 0, 9, 0 } } }, + { { { 3, 0, 1 }, { 0, 9, 1 } } }, + { { { 3, 0, 2 }, { 0, 10, 1 } } }, + { { { 3, 0, 3 }, { 0, 10, 0 } } }, + { { { 3, 0, 4 }, { 2, 7, 1 } } }, + { { { 4, 0, 4 }, { 2, 7, 0 } } }, + { { { 4, 0, 3 }, { 0, 11, 0 } } }, + { { { 4, 0, 2 }, { 1, 10, 1 } } }, + { { { 4, 0, 1 }, { 1, 10, 0 } } }, + { { { 4, 0, 0 }, { 0, 12, 0 } } }, + { { { 4, 0, 1 }, { 0, 13, 1 } } }, + { { { 4, 0, 2 }, { 0, 13, 0 } } }, + { { { 4, 0, 3 }, { 0, 13, 1 } } }, + { { { 4, 0, 4 }, { 0, 14, 1 } } }, + { { { 5, 0, 3 }, { 0, 14, 0 } } }, + { { { 5, 0, 2 }, { 2, 11, 1 } } }, + { { { 5, 0, 1 }, { 2, 11, 0 } } }, + { { { 5, 0, 0 }, { 0, 15, 0 } } }, + { { { 5, 0, 1 }, { 1, 14, 1 } } }, + { { { 5, 0, 2 }, { 1, 14, 0 } } }, + { { { 5, 0, 3 }, { 0, 16, 0 } } }, + { { { 5, 0, 4 }, { 0, 17, 1 } } }, + { { { 6, 0, 3 }, { 0, 17, 0 } } }, + { { { 6, 0, 2 }, { 0, 17, 1 } } }, + { { { 6, 0, 1 }, { 0, 18, 1 } } }, + { { { 6, 0, 0 }, { 0, 18, 0 } } }, + { { { 6, 0, 1 }, { 2, 15, 1 } } }, + { { { 6, 0, 2 }, { 2, 15, 0 } } }, + { { { 6, 0, 3 }, { 0, 19, 0 } } }, + { { { 6, 0, 4 }, { 1, 18, 1 } } }, + { { { 7, 0, 3 }, { 1, 18, 0 } } }, + { { { 7, 0, 2 }, { 0, 20, 0 } } }, + { { { 7, 0, 1 }, { 0, 21, 1 } } }, + { { { 7, 0, 0 }, { 0, 21, 0 } } }, + { { { 7, 0, 1 }, { 0, 21, 1 } } }, + { { { 7, 0, 2 }, { 0, 22, 1 } } }, + { { { 7, 0, 3 }, { 0, 22, 0 } } }, + { { { 7, 0, 4 }, { 2, 19, 1 } } }, + { { { 8, 0, 4 }, { 2, 19, 0 } } }, + { { { 8, 0, 3 }, { 0, 23, 0 } } }, + { { { 8, 0, 2 }, { 1, 22, 1 } } }, + { { { 8, 0, 1 }, { 1, 22, 0 } } }, + { { { 8, 0, 0 }, { 0, 24, 0 } } }, + { { { 8, 0, 1 }, { 0, 25, 1 } } }, + { { { 8, 0, 2 }, { 0, 25, 0 } } }, + { { { 8, 0, 3 }, { 0, 25, 1 } } }, + { { { 8, 0, 4 }, { 0, 26, 1 } } }, + { { { 9, 0, 3 }, { 0, 26, 0 } } }, + { { { 9, 0, 2 }, { 2, 23, 1 } } }, + { { { 9, 0, 1 }, { 2, 23, 0 } } }, + { { { 9, 0, 0 }, { 0, 27, 0 } } }, + { { { 9, 0, 1 }, { 1, 26, 1 } } }, + { { { 9, 0, 2 }, { 1, 26, 0 } } }, + { { { 9, 0, 3 }, { 0, 28, 0 } } }, + { { { 9, 0, 4 }, { 0, 29, 1 } } }, + { { { 10, 0, 3 }, { 0, 29, 0 } } }, + { { { 10, 0, 2 }, { 0, 29, 1 } } }, + { { { 10, 0, 1 }, { 0, 30, 1 } } }, + { { { 10, 0, 0 }, { 0, 30, 0 } } }, + { { { 10, 0, 1 }, { 2, 27, 1 } } }, + { { { 10, 0, 2 }, { 2, 27, 0 } } }, + { { { 10, 0, 3 }, { 0, 31, 0 } } }, + { { { 10, 0, 4 }, { 1, 30, 1 } } }, + { { { 11, 0, 3 }, { 1, 30, 0 } } }, + { { { 11, 0, 2 }, { 4, 24, 0 } } }, + { { { 11, 0, 1 }, { 1, 31, 1 } } }, + { { { 11, 0, 0 }, { 1, 31, 0 } } }, + { { { 11, 0, 1 }, { 1, 31, 1 } } }, + { { { 11, 0, 2 }, { 2, 30, 1 } } }, + { { { 11, 0, 3 }, { 2, 30, 0 } } }, + { { { 11, 0, 4 }, { 2, 31, 1 } } }, + { { { 12, 0, 4 }, { 2, 31, 0 } } }, + { { { 12, 0, 3 }, { 4, 27, 0 } } }, + { { { 12, 0, 2 }, { 3, 30, 1 } } }, + { { { 12, 0, 1 }, { 3, 30, 0 } } }, + { { { 12, 0, 0 }, { 4, 28, 0 } } }, + { { { 12, 0, 1 }, { 3, 31, 1 } } }, + { { { 12, 0, 2 }, { 3, 31, 0 } } }, + { { { 12, 0, 3 }, { 3, 31, 1 } } }, + { { { 12, 0, 4 }, { 4, 30, 1 } } }, + { { { 13, 0, 3 }, { 4, 30, 0 } } }, + { { { 13, 0, 2 }, { 6, 27, 1 } } }, + { { { 13, 0, 1 }, { 6, 27, 0 } } }, + { { { 13, 0, 0 }, { 4, 31, 0 } } }, + { { { 13, 0, 1 }, { 5, 30, 1 } } }, + { { { 13, 0, 2 }, { 5, 30, 0 } } }, + { { { 13, 0, 3 }, { 8, 24, 0 } } }, + { { { 13, 0, 4 }, { 5, 31, 1 } } }, + { { { 14, 0, 3 }, { 5, 31, 0 } } }, + { { { 14, 0, 2 }, { 5, 31, 1 } } }, + { { { 14, 0, 1 }, { 6, 30, 1 } } }, + { { { 14, 0, 0 }, { 6, 30, 0 } } }, + { { { 14, 0, 1 }, { 6, 31, 1 } } }, + { { { 14, 0, 2 }, { 6, 31, 0 } } }, + { { { 14, 0, 3 }, { 8, 27, 0 } } }, + { { { 14, 0, 4 }, { 7, 30, 1 } } }, + { { { 15, 0, 3 }, { 7, 30, 0 } } }, + { { { 15, 0, 2 }, { 8, 28, 0 } } }, + { { { 15, 0, 1 }, { 7, 31, 1 } } }, + { { { 15, 0, 0 }, { 7, 31, 0 } } }, + { { { 15, 0, 1 }, { 7, 31, 1 } } }, + { { { 15, 0, 2 }, { 8, 30, 1 } } }, + { { { 15, 0, 3 }, { 8, 30, 0 } } }, + { { { 15, 0, 4 }, { 10, 27, 1 } } }, + { { { 16, 0, 4 }, { 10, 27, 0 } } }, + { { { 16, 0, 3 }, { 8, 31, 0 } } }, + { { { 16, 0, 2 }, { 9, 30, 1 } } }, + { { { 16, 0, 1 }, { 9, 30, 0 } } }, + { { { 16, 0, 0 }, { 12, 24, 0 } } }, + { { { 16, 0, 1 }, { 9, 31, 1 } } }, + { { { 16, 0, 2 }, { 9, 31, 0 } } }, + { { { 16, 0, 3 }, { 9, 31, 1 } } }, + { { { 16, 0, 4 }, { 10, 30, 1 } } }, + { { { 17, 0, 3 }, { 10, 30, 0 } } }, + { { { 17, 0, 2 }, { 10, 31, 1 } } }, + { { { 17, 0, 1 }, { 10, 31, 0 } } }, + { { { 17, 0, 0 }, { 12, 27, 0 } } }, + { { { 17, 0, 1 }, { 11, 30, 1 } } }, + { { { 17, 0, 2 }, { 11, 30, 0 } } }, + { { { 17, 0, 3 }, { 12, 28, 0 } } }, + { { { 17, 0, 4 }, { 11, 31, 1 } } }, + { { { 18, 0, 3 }, { 11, 31, 0 } } }, + { { { 18, 0, 2 }, { 11, 31, 1 } } }, + { { { 18, 0, 1 }, { 12, 30, 1 } } }, + { { { 18, 0, 0 }, { 12, 30, 0 } } }, + { { { 18, 0, 1 }, { 14, 27, 1 } } }, + { { { 18, 0, 2 }, { 14, 27, 0 } } }, + { { { 18, 0, 3 }, { 12, 31, 0 } } }, + { { { 18, 0, 4 }, { 13, 30, 1 } } }, + { { { 19, 0, 3 }, { 13, 30, 0 } } }, + { { { 19, 0, 2 }, { 16, 24, 0 } } }, + { { { 19, 0, 1 }, { 13, 31, 1 } } }, + { { { 19, 0, 0 }, { 13, 31, 0 } } }, + { { { 19, 0, 1 }, { 13, 31, 1 } } }, + { { { 19, 0, 2 }, { 14, 30, 1 } } }, + { { { 19, 0, 3 }, { 14, 30, 0 } } }, + { { { 19, 0, 4 }, { 14, 31, 1 } } }, + { { { 20, 0, 4 }, { 14, 31, 0 } } }, + { { { 20, 0, 3 }, { 16, 27, 0 } } }, + { { { 20, 0, 2 }, { 15, 30, 1 } } }, + { { { 20, 0, 1 }, { 15, 30, 0 } } }, + { { { 20, 0, 0 }, { 16, 28, 0 } } }, + { { { 20, 0, 1 }, { 15, 31, 1 } } }, + { { { 20, 0, 2 }, { 15, 31, 0 } } }, + { { { 20, 0, 3 }, { 15, 31, 1 } } }, + { { { 20, 0, 4 }, { 16, 30, 1 } } }, + { { { 21, 0, 3 }, { 16, 30, 0 } } }, + { { { 21, 0, 2 }, { 18, 27, 1 } } }, + { { { 21, 0, 1 }, { 18, 27, 0 } } }, + { { { 21, 0, 0 }, { 16, 31, 0 } } }, + { { { 21, 0, 1 }, { 17, 30, 1 } } }, + { { { 21, 0, 2 }, { 17, 30, 0 } } }, + { { { 21, 0, 3 }, { 20, 24, 0 } } }, + { { { 21, 0, 4 }, { 17, 31, 1 } } }, + { { { 22, 0, 3 }, { 17, 31, 0 } } }, + { { { 22, 0, 2 }, { 17, 31, 1 } } }, + { { { 22, 0, 1 }, { 18, 30, 1 } } }, + { { { 22, 0, 0 }, { 18, 30, 0 } } }, + { { { 22, 0, 1 }, { 18, 31, 1 } } }, + { { { 22, 0, 2 }, { 18, 31, 0 } } }, + { { { 22, 0, 3 }, { 20, 27, 0 } } }, + { { { 22, 0, 4 }, { 19, 30, 1 } } }, + { { { 23, 0, 3 }, { 19, 30, 0 } } }, + { { { 23, 0, 2 }, { 20, 28, 0 } } }, + { { { 23, 0, 1 }, { 19, 31, 1 } } }, + { { { 23, 0, 0 }, { 19, 31, 0 } } }, + { { { 23, 0, 1 }, { 19, 31, 1 } } }, + { { { 23, 0, 2 }, { 20, 30, 1 } } }, + { { { 23, 0, 3 }, { 20, 30, 0 } } }, + { { { 23, 0, 4 }, { 22, 27, 1 } } }, + { { { 24, 0, 4 }, { 22, 27, 0 } } }, + { { { 24, 0, 3 }, { 20, 31, 0 } } }, + { { { 24, 0, 2 }, { 21, 30, 1 } } }, + { { { 24, 0, 1 }, { 21, 30, 0 } } }, + { { { 24, 0, 0 }, { 24, 24, 0 } } }, + { { { 24, 0, 1 }, { 21, 31, 1 } } }, + { { { 24, 0, 2 }, { 21, 31, 0 } } }, + { { { 24, 0, 3 }, { 21, 31, 1 } } }, + { { { 24, 0, 4 }, { 22, 30, 1 } } }, + { { { 25, 0, 3 }, { 22, 30, 0 } } }, + { { { 25, 0, 2 }, { 22, 31, 1 } } }, + { { { 25, 0, 1 }, { 22, 31, 0 } } }, + { { { 25, 0, 0 }, { 24, 27, 0 } } }, + { { { 25, 0, 1 }, { 23, 30, 1 } } }, + { { { 25, 0, 2 }, { 23, 30, 0 } } }, + { { { 25, 0, 3 }, { 24, 28, 0 } } }, + { { { 25, 0, 4 }, { 23, 31, 1 } } }, + { { { 26, 0, 3 }, { 23, 31, 0 } } }, + { { { 26, 0, 2 }, { 23, 31, 1 } } }, + { { { 26, 0, 1 }, { 24, 30, 1 } } }, + { { { 26, 0, 0 }, { 24, 30, 0 } } }, + { { { 26, 0, 1 }, { 26, 27, 1 } } }, + { { { 26, 0, 2 }, { 26, 27, 0 } } }, + { { { 26, 0, 3 }, { 24, 31, 0 } } }, + { { { 26, 0, 4 }, { 25, 30, 1 } } }, + { { { 27, 0, 3 }, { 25, 30, 0 } } }, + { { { 27, 0, 2 }, { 28, 24, 0 } } }, + { { { 27, 0, 1 }, { 25, 31, 1 } } }, + { { { 27, 0, 0 }, { 25, 31, 0 } } }, + { { { 27, 0, 1 }, { 25, 31, 1 } } }, + { { { 27, 0, 2 }, { 26, 30, 1 } } }, + { { { 27, 0, 3 }, { 26, 30, 0 } } }, + { { { 27, 0, 4 }, { 26, 31, 1 } } }, + { { { 28, 0, 4 }, { 26, 31, 0 } } }, + { { { 28, 0, 3 }, { 28, 27, 0 } } }, + { { { 28, 0, 2 }, { 27, 30, 1 } } }, + { { { 28, 0, 1 }, { 27, 30, 0 } } }, + { { { 28, 0, 0 }, { 28, 28, 0 } } }, + { { { 28, 0, 1 }, { 27, 31, 1 } } }, + { { { 28, 0, 2 }, { 27, 31, 0 } } }, + { { { 28, 0, 3 }, { 27, 31, 1 } } }, + { { { 28, 0, 4 }, { 28, 30, 1 } } }, + { { { 29, 0, 3 }, { 28, 30, 0 } } }, + { { { 29, 0, 2 }, { 30, 27, 1 } } }, + { { { 29, 0, 1 }, { 30, 27, 0 } } }, + { { { 29, 0, 0 }, { 28, 31, 0 } } }, + { { { 29, 0, 1 }, { 29, 30, 1 } } }, + { { { 29, 0, 2 }, { 29, 30, 0 } } }, + { { { 29, 0, 3 }, { 29, 30, 1 } } }, + { { { 29, 0, 4 }, { 29, 31, 1 } } }, + { { { 30, 0, 3 }, { 29, 31, 0 } } }, + { { { 30, 0, 2 }, { 29, 31, 1 } } }, + { { { 30, 0, 1 }, { 30, 30, 1 } } }, + { { { 30, 0, 0 }, { 30, 30, 0 } } }, + { { { 30, 0, 1 }, { 30, 31, 1 } } }, + { { { 30, 0, 2 }, { 30, 31, 0 } } }, + { { { 30, 0, 3 }, { 30, 31, 1 } } }, + { { { 30, 0, 4 }, { 31, 30, 1 } } }, + { { { 31, 0, 3 }, { 31, 30, 0 } } }, + { { { 31, 0, 2 }, { 31, 30, 1 } } }, + { { { 31, 0, 1 }, { 31, 31, 1 } } }, + { { { 31, 0, 0 }, { 31, 31, 0 } } } }; -static SingleColourLookup const lookup_6_4[] = +static SingleColourLookup const lookup_6_4[] = { - { { { 0, 0, 0 }, { 0, 0, 0 } } }, - { { { 0, 0, 1 }, { 0, 1, 0 } } }, - { { { 0, 0, 2 }, { 0, 2, 0 } } }, - { { { 1, 0, 1 }, { 0, 3, 1 } } }, - { { { 1, 0, 0 }, { 0, 3, 0 } } }, - { { { 1, 0, 1 }, { 0, 4, 0 } } }, - { { { 1, 0, 2 }, { 0, 5, 0 } } }, - { { { 2, 0, 1 }, { 0, 6, 1 } } }, - { { { 2, 0, 0 }, { 0, 6, 0 } } }, - { { { 2, 0, 1 }, { 0, 7, 0 } } }, - { { { 2, 0, 2 }, { 0, 8, 0 } } }, - { { { 3, 0, 1 }, { 0, 9, 1 } } }, - { { { 3, 0, 0 }, { 0, 9, 0 } } }, - { { { 3, 0, 1 }, { 0, 10, 0 } } }, - { { { 3, 0, 2 }, { 0, 11, 0 } } }, - { { { 4, 0, 1 }, { 0, 12, 1 } } }, - { { { 4, 0, 0 }, { 0, 12, 0 } } }, - { { { 4, 0, 1 }, { 0, 13, 0 } } }, - { { { 4, 0, 2 }, { 0, 14, 0 } } }, - { { { 5, 0, 1 }, { 0, 15, 1 } } }, - { { { 5, 0, 0 }, { 0, 15, 0 } } }, - { { { 5, 0, 1 }, { 0, 16, 0 } } }, - { { { 5, 0, 2 }, { 1, 15, 0 } } }, - { { { 6, 0, 1 }, { 0, 17, 0 } } }, - { { { 6, 0, 0 }, { 0, 18, 0 } } }, - { { { 6, 0, 1 }, { 0, 19, 0 } } }, - { { { 6, 0, 2 }, { 3, 14, 0 } } }, - { { { 7, 0, 1 }, { 0, 20, 0 } } }, - { { { 7, 0, 0 }, { 0, 21, 0 } } }, - { { { 7, 0, 1 }, { 0, 22, 0 } } }, - { { { 7, 0, 2 }, { 4, 15, 0 } } }, - { { { 8, 0, 1 }, { 0, 23, 0 } } }, - { { { 8, 0, 0 }, { 0, 24, 0 } } }, - { { { 8, 0, 1 }, { 0, 25, 0 } } }, - { { { 8, 0, 2 }, { 6, 14, 0 } } }, - { { { 9, 0, 1 }, { 0, 26, 0 } } }, - { { { 9, 0, 0 }, { 0, 27, 0 } } }, - { { { 9, 0, 1 }, { 0, 28, 0 } } }, - { { { 9, 0, 2 }, { 7, 15, 0 } } }, - { { { 10, 0, 1 }, { 0, 29, 0 } } }, - { { { 10, 0, 0 }, { 0, 30, 0 } } }, - { { { 10, 0, 1 }, { 0, 31, 0 } } }, - { { { 10, 0, 2 }, { 9, 14, 0 } } }, - { { { 11, 0, 1 }, { 0, 32, 0 } } }, - { { { 11, 0, 0 }, { 0, 33, 0 } } }, - { { { 11, 0, 1 }, { 2, 30, 0 } } }, - { { { 11, 0, 2 }, { 0, 34, 0 } } }, - { { { 12, 0, 1 }, { 0, 35, 0 } } }, - { { { 12, 0, 0 }, { 0, 36, 0 } } }, - { { { 12, 0, 1 }, { 3, 31, 0 } } }, - { { { 12, 0, 2 }, { 0, 37, 0 } } }, - { { { 13, 0, 1 }, { 0, 38, 0 } } }, - { { { 13, 0, 0 }, { 0, 39, 0 } } }, - { { { 13, 0, 1 }, { 5, 30, 0 } } }, - { { { 13, 0, 2 }, { 0, 40, 0 } } }, - { { { 14, 0, 1 }, { 0, 41, 0 } } }, - { { { 14, 0, 0 }, { 0, 42, 0 } } }, - { { { 14, 0, 1 }, { 6, 31, 0 } } }, - { { { 14, 0, 2 }, { 0, 43, 0 } } }, - { { { 15, 0, 1 }, { 0, 44, 0 } } }, - { { { 15, 0, 0 }, { 0, 45, 0 } } }, - { { { 15, 0, 1 }, { 8, 30, 0 } } }, - { { { 15, 0, 2 }, { 0, 46, 0 } } }, - { { { 16, 0, 2 }, { 0, 47, 0 } } }, - { { { 16, 0, 1 }, { 1, 46, 0 } } }, - { { { 16, 0, 0 }, { 0, 48, 0 } } }, - { { { 16, 0, 1 }, { 0, 49, 0 } } }, - { { { 16, 0, 2 }, { 0, 50, 0 } } }, - { { { 17, 0, 1 }, { 2, 47, 0 } } }, - { { { 17, 0, 0 }, { 0, 51, 0 } } }, - { { { 17, 0, 1 }, { 0, 52, 0 } } }, - { { { 17, 0, 2 }, { 0, 53, 0 } } }, - { { { 18, 0, 1 }, { 4, 46, 0 } } }, - { { { 18, 0, 0 }, { 0, 54, 0 } } }, - { { { 18, 0, 1 }, { 0, 55, 0 } } }, - { { { 18, 0, 2 }, { 0, 56, 0 } } }, - { { { 19, 0, 1 }, { 5, 47, 0 } } }, - { { { 19, 0, 0 }, { 0, 57, 0 } } }, - { { { 19, 0, 1 }, { 0, 58, 0 } } }, - { { { 19, 0, 2 }, { 0, 59, 0 } } }, - { { { 20, 0, 1 }, { 7, 46, 0 } } }, - { { { 20, 0, 0 }, { 0, 60, 0 } } }, - { { { 20, 0, 1 }, { 0, 61, 0 } } }, - { { { 20, 0, 2 }, { 0, 62, 0 } } }, - { { { 21, 0, 1 }, { 8, 47, 0 } } }, - { { { 21, 0, 0 }, { 0, 63, 0 } } }, - { { { 21, 0, 1 }, { 1, 62, 0 } } }, - { { { 21, 0, 2 }, { 1, 63, 0 } } }, - { { { 22, 0, 1 }, { 10, 46, 0 } } }, - { { { 22, 0, 0 }, { 2, 62, 0 } } }, - { { { 22, 0, 1 }, { 2, 63, 0 } } }, - { { { 22, 0, 2 }, { 3, 62, 0 } } }, - { { { 23, 0, 1 }, { 11, 47, 0 } } }, - { { { 23, 0, 0 }, { 3, 63, 0 } } }, - { { { 23, 0, 1 }, { 4, 62, 0 } } }, - { { { 23, 0, 2 }, { 4, 63, 0 } } }, - { { { 24, 0, 1 }, { 13, 46, 0 } } }, - { { { 24, 0, 0 }, { 5, 62, 0 } } }, - { { { 24, 0, 1 }, { 5, 63, 0 } } }, - { { { 24, 0, 2 }, { 6, 62, 0 } } }, - { { { 25, 0, 1 }, { 14, 47, 0 } } }, - { { { 25, 0, 0 }, { 6, 63, 0 } } }, - { { { 25, 0, 1 }, { 7, 62, 0 } } }, - { { { 25, 0, 2 }, { 7, 63, 0 } } }, - { { { 26, 0, 1 }, { 16, 45, 0 } } }, - { { { 26, 0, 0 }, { 8, 62, 0 } } }, - { { { 26, 0, 1 }, { 8, 63, 0 } } }, - { { { 26, 0, 2 }, { 9, 62, 0 } } }, - { { { 27, 0, 1 }, { 16, 48, 0 } } }, - { { { 27, 0, 0 }, { 9, 63, 0 } } }, - { { { 27, 0, 1 }, { 10, 62, 0 } } }, - { { { 27, 0, 2 }, { 10, 63, 0 } } }, - { { { 28, 0, 1 }, { 16, 51, 0 } } }, - { { { 28, 0, 0 }, { 11, 62, 0 } } }, - { { { 28, 0, 1 }, { 11, 63, 0 } } }, - { { { 28, 0, 2 }, { 12, 62, 0 } } }, - { { { 29, 0, 1 }, { 16, 54, 0 } } }, - { { { 29, 0, 0 }, { 12, 63, 0 } } }, - { { { 29, 0, 1 }, { 13, 62, 0 } } }, - { { { 29, 0, 2 }, { 13, 63, 0 } } }, - { { { 30, 0, 1 }, { 16, 57, 0 } } }, - { { { 30, 0, 0 }, { 14, 62, 0 } } }, - { { { 30, 0, 1 }, { 14, 63, 0 } } }, - { { { 30, 0, 2 }, { 15, 62, 0 } } }, - { { { 31, 0, 1 }, { 16, 60, 0 } } }, - { { { 31, 0, 0 }, { 15, 63, 0 } } }, - { { { 31, 0, 1 }, { 24, 46, 0 } } }, - { { { 31, 0, 2 }, { 16, 62, 0 } } }, - { { { 32, 0, 2 }, { 16, 63, 0 } } }, - { { { 32, 0, 1 }, { 17, 62, 0 } } }, - { { { 32, 0, 0 }, { 25, 47, 0 } } }, - { { { 32, 0, 1 }, { 17, 63, 0 } } }, - { { { 32, 0, 2 }, { 18, 62, 0 } } }, - { { { 33, 0, 1 }, { 18, 63, 0 } } }, - { { { 33, 0, 0 }, { 27, 46, 0 } } }, - { { { 33, 0, 1 }, { 19, 62, 0 } } }, - { { { 33, 0, 2 }, { 19, 63, 0 } } }, - { { { 34, 0, 1 }, { 20, 62, 0 } } }, - { { { 34, 0, 0 }, { 28, 47, 0 } } }, - { { { 34, 0, 1 }, { 20, 63, 0 } } }, - { { { 34, 0, 2 }, { 21, 62, 0 } } }, - { { { 35, 0, 1 }, { 21, 63, 0 } } }, - { { { 35, 0, 0 }, { 30, 46, 0 } } }, - { { { 35, 0, 1 }, { 22, 62, 0 } } }, - { { { 35, 0, 2 }, { 22, 63, 0 } } }, - { { { 36, 0, 1 }, { 23, 62, 0 } } }, - { { { 36, 0, 0 }, { 31, 47, 0 } } }, - { { { 36, 0, 1 }, { 23, 63, 0 } } }, - { { { 36, 0, 2 }, { 24, 62, 0 } } }, - { { { 37, 0, 1 }, { 24, 63, 0 } } }, - { { { 37, 0, 0 }, { 32, 47, 0 } } }, - { { { 37, 0, 1 }, { 25, 62, 0 } } }, - { { { 37, 0, 2 }, { 25, 63, 0 } } }, - { { { 38, 0, 1 }, { 26, 62, 0 } } }, - { { { 38, 0, 0 }, { 32, 50, 0 } } }, - { { { 38, 0, 1 }, { 26, 63, 0 } } }, - { { { 38, 0, 2 }, { 27, 62, 0 } } }, - { { { 39, 0, 1 }, { 27, 63, 0 } } }, - { { { 39, 0, 0 }, { 32, 53, 0 } } }, - { { { 39, 0, 1 }, { 28, 62, 0 } } }, - { { { 39, 0, 2 }, { 28, 63, 0 } } }, - { { { 40, 0, 1 }, { 29, 62, 0 } } }, - { { { 40, 0, 0 }, { 32, 56, 0 } } }, - { { { 40, 0, 1 }, { 29, 63, 0 } } }, - { { { 40, 0, 2 }, { 30, 62, 0 } } }, - { { { 41, 0, 1 }, { 30, 63, 0 } } }, - { { { 41, 0, 0 }, { 32, 59, 0 } } }, - { { { 41, 0, 1 }, { 31, 62, 0 } } }, - { { { 41, 0, 2 }, { 31, 63, 0 } } }, - { { { 42, 0, 1 }, { 32, 61, 0 } } }, - { { { 42, 0, 0 }, { 32, 62, 0 } } }, - { { { 42, 0, 1 }, { 32, 63, 0 } } }, - { { { 42, 0, 2 }, { 41, 46, 0 } } }, - { { { 43, 0, 1 }, { 33, 62, 0 } } }, - { { { 43, 0, 0 }, { 33, 63, 0 } } }, - { { { 43, 0, 1 }, { 34, 62, 0 } } }, - { { { 43, 0, 2 }, { 42, 47, 0 } } }, - { { { 44, 0, 1 }, { 34, 63, 0 } } }, - { { { 44, 0, 0 }, { 35, 62, 0 } } }, - { { { 44, 0, 1 }, { 35, 63, 0 } } }, - { { { 44, 0, 2 }, { 44, 46, 0 } } }, - { { { 45, 0, 1 }, { 36, 62, 0 } } }, - { { { 45, 0, 0 }, { 36, 63, 0 } } }, - { { { 45, 0, 1 }, { 37, 62, 0 } } }, - { { { 45, 0, 2 }, { 45, 47, 0 } } }, - { { { 46, 0, 1 }, { 37, 63, 0 } } }, - { { { 46, 0, 0 }, { 38, 62, 0 } } }, - { { { 46, 0, 1 }, { 38, 63, 0 } } }, - { { { 46, 0, 2 }, { 47, 46, 0 } } }, - { { { 47, 0, 1 }, { 39, 62, 0 } } }, - { { { 47, 0, 0 }, { 39, 63, 0 } } }, - { { { 47, 0, 1 }, { 40, 62, 0 } } }, - { { { 47, 0, 2 }, { 48, 46, 0 } } }, - { { { 48, 0, 2 }, { 40, 63, 0 } } }, - { { { 48, 0, 1 }, { 41, 62, 0 } } }, - { { { 48, 0, 0 }, { 41, 63, 0 } } }, - { { { 48, 0, 1 }, { 48, 49, 0 } } }, - { { { 48, 0, 2 }, { 42, 62, 0 } } }, - { { { 49, 0, 1 }, { 42, 63, 0 } } }, - { { { 49, 0, 0 }, { 43, 62, 0 } } }, - { { { 49, 0, 1 }, { 48, 52, 0 } } }, - { { { 49, 0, 2 }, { 43, 63, 0 } } }, - { { { 50, 0, 1 }, { 44, 62, 0 } } }, - { { { 50, 0, 0 }, { 44, 63, 0 } } }, - { { { 50, 0, 1 }, { 48, 55, 0 } } }, - { { { 50, 0, 2 }, { 45, 62, 0 } } }, - { { { 51, 0, 1 }, { 45, 63, 0 } } }, - { { { 51, 0, 0 }, { 46, 62, 0 } } }, - { { { 51, 0, 1 }, { 48, 58, 0 } } }, - { { { 51, 0, 2 }, { 46, 63, 0 } } }, - { { { 52, 0, 1 }, { 47, 62, 0 } } }, - { { { 52, 0, 0 }, { 47, 63, 0 } } }, - { { { 52, 0, 1 }, { 48, 61, 0 } } }, - { { { 52, 0, 2 }, { 48, 62, 0 } } }, - { { { 53, 0, 1 }, { 56, 47, 0 } } }, - { { { 53, 0, 0 }, { 48, 63, 0 } } }, - { { { 53, 0, 1 }, { 49, 62, 0 } } }, - { { { 53, 0, 2 }, { 49, 63, 0 } } }, - { { { 54, 0, 1 }, { 58, 46, 0 } } }, - { { { 54, 0, 0 }, { 50, 62, 0 } } }, - { { { 54, 0, 1 }, { 50, 63, 0 } } }, - { { { 54, 0, 2 }, { 51, 62, 0 } } }, - { { { 55, 0, 1 }, { 59, 47, 0 } } }, - { { { 55, 0, 0 }, { 51, 63, 0 } } }, - { { { 55, 0, 1 }, { 52, 62, 0 } } }, - { { { 55, 0, 2 }, { 52, 63, 0 } } }, - { { { 56, 0, 1 }, { 61, 46, 0 } } }, - { { { 56, 0, 0 }, { 53, 62, 0 } } }, - { { { 56, 0, 1 }, { 53, 63, 0 } } }, - { { { 56, 0, 2 }, { 54, 62, 0 } } }, - { { { 57, 0, 1 }, { 62, 47, 0 } } }, - { { { 57, 0, 0 }, { 54, 63, 0 } } }, - { { { 57, 0, 1 }, { 55, 62, 0 } } }, - { { { 57, 0, 2 }, { 55, 63, 0 } } }, - { { { 58, 0, 1 }, { 56, 62, 1 } } }, - { { { 58, 0, 0 }, { 56, 62, 0 } } }, - { { { 58, 0, 1 }, { 56, 63, 0 } } }, - { { { 58, 0, 2 }, { 57, 62, 0 } } }, - { { { 59, 0, 1 }, { 57, 63, 1 } } }, - { { { 59, 0, 0 }, { 57, 63, 0 } } }, - { { { 59, 0, 1 }, { 58, 62, 0 } } }, - { { { 59, 0, 2 }, { 58, 63, 0 } } }, - { { { 60, 0, 1 }, { 59, 62, 1 } } }, - { { { 60, 0, 0 }, { 59, 62, 0 } } }, - { { { 60, 0, 1 }, { 59, 63, 0 } } }, - { { { 60, 0, 2 }, { 60, 62, 0 } } }, - { { { 61, 0, 1 }, { 60, 63, 1 } } }, - { { { 61, 0, 0 }, { 60, 63, 0 } } }, - { { { 61, 0, 1 }, { 61, 62, 0 } } }, - { { { 61, 0, 2 }, { 61, 63, 0 } } }, - { { { 62, 0, 1 }, { 62, 62, 1 } } }, - { { { 62, 0, 0 }, { 62, 62, 0 } } }, - { { { 62, 0, 1 }, { 62, 63, 0 } } }, - { { { 62, 0, 2 }, { 63, 62, 0 } } }, - { { { 63, 0, 1 }, { 63, 63, 1 } } }, - { { { 63, 0, 0 }, { 63, 63, 0 } } } + { { { 0, 0, 0 }, { 0, 0, 0 } } }, + { { { 0, 0, 1 }, { 0, 1, 0 } } }, + { { { 0, 0, 2 }, { 0, 2, 0 } } }, + { { { 1, 0, 1 }, { 0, 3, 1 } } }, + { { { 1, 0, 0 }, { 0, 3, 0 } } }, + { { { 1, 0, 1 }, { 0, 4, 0 } } }, + { { { 1, 0, 2 }, { 0, 5, 0 } } }, + { { { 2, 0, 1 }, { 0, 6, 1 } } }, + { { { 2, 0, 0 }, { 0, 6, 0 } } }, + { { { 2, 0, 1 }, { 0, 7, 0 } } }, + { { { 2, 0, 2 }, { 0, 8, 0 } } }, + { { { 3, 0, 1 }, { 0, 9, 1 } } }, + { { { 3, 0, 0 }, { 0, 9, 0 } } }, + { { { 3, 0, 1 }, { 0, 10, 0 } } }, + { { { 3, 0, 2 }, { 0, 11, 0 } } }, + { { { 4, 0, 1 }, { 0, 12, 1 } } }, + { { { 4, 0, 0 }, { 0, 12, 0 } } }, + { { { 4, 0, 1 }, { 0, 13, 0 } } }, + { { { 4, 0, 2 }, { 0, 14, 0 } } }, + { { { 5, 0, 1 }, { 0, 15, 1 } } }, + { { { 5, 0, 0 }, { 0, 15, 0 } } }, + { { { 5, 0, 1 }, { 0, 16, 0 } } }, + { { { 5, 0, 2 }, { 1, 15, 0 } } }, + { { { 6, 0, 1 }, { 0, 17, 0 } } }, + { { { 6, 0, 0 }, { 0, 18, 0 } } }, + { { { 6, 0, 1 }, { 0, 19, 0 } } }, + { { { 6, 0, 2 }, { 3, 14, 0 } } }, + { { { 7, 0, 1 }, { 0, 20, 0 } } }, + { { { 7, 0, 0 }, { 0, 21, 0 } } }, + { { { 7, 0, 1 }, { 0, 22, 0 } } }, + { { { 7, 0, 2 }, { 4, 15, 0 } } }, + { { { 8, 0, 1 }, { 0, 23, 0 } } }, + { { { 8, 0, 0 }, { 0, 24, 0 } } }, + { { { 8, 0, 1 }, { 0, 25, 0 } } }, + { { { 8, 0, 2 }, { 6, 14, 0 } } }, + { { { 9, 0, 1 }, { 0, 26, 0 } } }, + { { { 9, 0, 0 }, { 0, 27, 0 } } }, + { { { 9, 0, 1 }, { 0, 28, 0 } } }, + { { { 9, 0, 2 }, { 7, 15, 0 } } }, + { { { 10, 0, 1 }, { 0, 29, 0 } } }, + { { { 10, 0, 0 }, { 0, 30, 0 } } }, + { { { 10, 0, 1 }, { 0, 31, 0 } } }, + { { { 10, 0, 2 }, { 9, 14, 0 } } }, + { { { 11, 0, 1 }, { 0, 32, 0 } } }, + { { { 11, 0, 0 }, { 0, 33, 0 } } }, + { { { 11, 0, 1 }, { 2, 30, 0 } } }, + { { { 11, 0, 2 }, { 0, 34, 0 } } }, + { { { 12, 0, 1 }, { 0, 35, 0 } } }, + { { { 12, 0, 0 }, { 0, 36, 0 } } }, + { { { 12, 0, 1 }, { 3, 31, 0 } } }, + { { { 12, 0, 2 }, { 0, 37, 0 } } }, + { { { 13, 0, 1 }, { 0, 38, 0 } } }, + { { { 13, 0, 0 }, { 0, 39, 0 } } }, + { { { 13, 0, 1 }, { 5, 30, 0 } } }, + { { { 13, 0, 2 }, { 0, 40, 0 } } }, + { { { 14, 0, 1 }, { 0, 41, 0 } } }, + { { { 14, 0, 0 }, { 0, 42, 0 } } }, + { { { 14, 0, 1 }, { 6, 31, 0 } } }, + { { { 14, 0, 2 }, { 0, 43, 0 } } }, + { { { 15, 0, 1 }, { 0, 44, 0 } } }, + { { { 15, 0, 0 }, { 0, 45, 0 } } }, + { { { 15, 0, 1 }, { 8, 30, 0 } } }, + { { { 15, 0, 2 }, { 0, 46, 0 } } }, + { { { 16, 0, 2 }, { 0, 47, 0 } } }, + { { { 16, 0, 1 }, { 1, 46, 0 } } }, + { { { 16, 0, 0 }, { 0, 48, 0 } } }, + { { { 16, 0, 1 }, { 0, 49, 0 } } }, + { { { 16, 0, 2 }, { 0, 50, 0 } } }, + { { { 17, 0, 1 }, { 2, 47, 0 } } }, + { { { 17, 0, 0 }, { 0, 51, 0 } } }, + { { { 17, 0, 1 }, { 0, 52, 0 } } }, + { { { 17, 0, 2 }, { 0, 53, 0 } } }, + { { { 18, 0, 1 }, { 4, 46, 0 } } }, + { { { 18, 0, 0 }, { 0, 54, 0 } } }, + { { { 18, 0, 1 }, { 0, 55, 0 } } }, + { { { 18, 0, 2 }, { 0, 56, 0 } } }, + { { { 19, 0, 1 }, { 5, 47, 0 } } }, + { { { 19, 0, 0 }, { 0, 57, 0 } } }, + { { { 19, 0, 1 }, { 0, 58, 0 } } }, + { { { 19, 0, 2 }, { 0, 59, 0 } } }, + { { { 20, 0, 1 }, { 7, 46, 0 } } }, + { { { 20, 0, 0 }, { 0, 60, 0 } } }, + { { { 20, 0, 1 }, { 0, 61, 0 } } }, + { { { 20, 0, 2 }, { 0, 62, 0 } } }, + { { { 21, 0, 1 }, { 8, 47, 0 } } }, + { { { 21, 0, 0 }, { 0, 63, 0 } } }, + { { { 21, 0, 1 }, { 1, 62, 0 } } }, + { { { 21, 0, 2 }, { 1, 63, 0 } } }, + { { { 22, 0, 1 }, { 10, 46, 0 } } }, + { { { 22, 0, 0 }, { 2, 62, 0 } } }, + { { { 22, 0, 1 }, { 2, 63, 0 } } }, + { { { 22, 0, 2 }, { 3, 62, 0 } } }, + { { { 23, 0, 1 }, { 11, 47, 0 } } }, + { { { 23, 0, 0 }, { 3, 63, 0 } } }, + { { { 23, 0, 1 }, { 4, 62, 0 } } }, + { { { 23, 0, 2 }, { 4, 63, 0 } } }, + { { { 24, 0, 1 }, { 13, 46, 0 } } }, + { { { 24, 0, 0 }, { 5, 62, 0 } } }, + { { { 24, 0, 1 }, { 5, 63, 0 } } }, + { { { 24, 0, 2 }, { 6, 62, 0 } } }, + { { { 25, 0, 1 }, { 14, 47, 0 } } }, + { { { 25, 0, 0 }, { 6, 63, 0 } } }, + { { { 25, 0, 1 }, { 7, 62, 0 } } }, + { { { 25, 0, 2 }, { 7, 63, 0 } } }, + { { { 26, 0, 1 }, { 16, 45, 0 } } }, + { { { 26, 0, 0 }, { 8, 62, 0 } } }, + { { { 26, 0, 1 }, { 8, 63, 0 } } }, + { { { 26, 0, 2 }, { 9, 62, 0 } } }, + { { { 27, 0, 1 }, { 16, 48, 0 } } }, + { { { 27, 0, 0 }, { 9, 63, 0 } } }, + { { { 27, 0, 1 }, { 10, 62, 0 } } }, + { { { 27, 0, 2 }, { 10, 63, 0 } } }, + { { { 28, 0, 1 }, { 16, 51, 0 } } }, + { { { 28, 0, 0 }, { 11, 62, 0 } } }, + { { { 28, 0, 1 }, { 11, 63, 0 } } }, + { { { 28, 0, 2 }, { 12, 62, 0 } } }, + { { { 29, 0, 1 }, { 16, 54, 0 } } }, + { { { 29, 0, 0 }, { 12, 63, 0 } } }, + { { { 29, 0, 1 }, { 13, 62, 0 } } }, + { { { 29, 0, 2 }, { 13, 63, 0 } } }, + { { { 30, 0, 1 }, { 16, 57, 0 } } }, + { { { 30, 0, 0 }, { 14, 62, 0 } } }, + { { { 30, 0, 1 }, { 14, 63, 0 } } }, + { { { 30, 0, 2 }, { 15, 62, 0 } } }, + { { { 31, 0, 1 }, { 16, 60, 0 } } }, + { { { 31, 0, 0 }, { 15, 63, 0 } } }, + { { { 31, 0, 1 }, { 24, 46, 0 } } }, + { { { 31, 0, 2 }, { 16, 62, 0 } } }, + { { { 32, 0, 2 }, { 16, 63, 0 } } }, + { { { 32, 0, 1 }, { 17, 62, 0 } } }, + { { { 32, 0, 0 }, { 25, 47, 0 } } }, + { { { 32, 0, 1 }, { 17, 63, 0 } } }, + { { { 32, 0, 2 }, { 18, 62, 0 } } }, + { { { 33, 0, 1 }, { 18, 63, 0 } } }, + { { { 33, 0, 0 }, { 27, 46, 0 } } }, + { { { 33, 0, 1 }, { 19, 62, 0 } } }, + { { { 33, 0, 2 }, { 19, 63, 0 } } }, + { { { 34, 0, 1 }, { 20, 62, 0 } } }, + { { { 34, 0, 0 }, { 28, 47, 0 } } }, + { { { 34, 0, 1 }, { 20, 63, 0 } } }, + { { { 34, 0, 2 }, { 21, 62, 0 } } }, + { { { 35, 0, 1 }, { 21, 63, 0 } } }, + { { { 35, 0, 0 }, { 30, 46, 0 } } }, + { { { 35, 0, 1 }, { 22, 62, 0 } } }, + { { { 35, 0, 2 }, { 22, 63, 0 } } }, + { { { 36, 0, 1 }, { 23, 62, 0 } } }, + { { { 36, 0, 0 }, { 31, 47, 0 } } }, + { { { 36, 0, 1 }, { 23, 63, 0 } } }, + { { { 36, 0, 2 }, { 24, 62, 0 } } }, + { { { 37, 0, 1 }, { 24, 63, 0 } } }, + { { { 37, 0, 0 }, { 32, 47, 0 } } }, + { { { 37, 0, 1 }, { 25, 62, 0 } } }, + { { { 37, 0, 2 }, { 25, 63, 0 } } }, + { { { 38, 0, 1 }, { 26, 62, 0 } } }, + { { { 38, 0, 0 }, { 32, 50, 0 } } }, + { { { 38, 0, 1 }, { 26, 63, 0 } } }, + { { { 38, 0, 2 }, { 27, 62, 0 } } }, + { { { 39, 0, 1 }, { 27, 63, 0 } } }, + { { { 39, 0, 0 }, { 32, 53, 0 } } }, + { { { 39, 0, 1 }, { 28, 62, 0 } } }, + { { { 39, 0, 2 }, { 28, 63, 0 } } }, + { { { 40, 0, 1 }, { 29, 62, 0 } } }, + { { { 40, 0, 0 }, { 32, 56, 0 } } }, + { { { 40, 0, 1 }, { 29, 63, 0 } } }, + { { { 40, 0, 2 }, { 30, 62, 0 } } }, + { { { 41, 0, 1 }, { 30, 63, 0 } } }, + { { { 41, 0, 0 }, { 32, 59, 0 } } }, + { { { 41, 0, 1 }, { 31, 62, 0 } } }, + { { { 41, 0, 2 }, { 31, 63, 0 } } }, + { { { 42, 0, 1 }, { 32, 61, 0 } } }, + { { { 42, 0, 0 }, { 32, 62, 0 } } }, + { { { 42, 0, 1 }, { 32, 63, 0 } } }, + { { { 42, 0, 2 }, { 41, 46, 0 } } }, + { { { 43, 0, 1 }, { 33, 62, 0 } } }, + { { { 43, 0, 0 }, { 33, 63, 0 } } }, + { { { 43, 0, 1 }, { 34, 62, 0 } } }, + { { { 43, 0, 2 }, { 42, 47, 0 } } }, + { { { 44, 0, 1 }, { 34, 63, 0 } } }, + { { { 44, 0, 0 }, { 35, 62, 0 } } }, + { { { 44, 0, 1 }, { 35, 63, 0 } } }, + { { { 44, 0, 2 }, { 44, 46, 0 } } }, + { { { 45, 0, 1 }, { 36, 62, 0 } } }, + { { { 45, 0, 0 }, { 36, 63, 0 } } }, + { { { 45, 0, 1 }, { 37, 62, 0 } } }, + { { { 45, 0, 2 }, { 45, 47, 0 } } }, + { { { 46, 0, 1 }, { 37, 63, 0 } } }, + { { { 46, 0, 0 }, { 38, 62, 0 } } }, + { { { 46, 0, 1 }, { 38, 63, 0 } } }, + { { { 46, 0, 2 }, { 47, 46, 0 } } }, + { { { 47, 0, 1 }, { 39, 62, 0 } } }, + { { { 47, 0, 0 }, { 39, 63, 0 } } }, + { { { 47, 0, 1 }, { 40, 62, 0 } } }, + { { { 47, 0, 2 }, { 48, 46, 0 } } }, + { { { 48, 0, 2 }, { 40, 63, 0 } } }, + { { { 48, 0, 1 }, { 41, 62, 0 } } }, + { { { 48, 0, 0 }, { 41, 63, 0 } } }, + { { { 48, 0, 1 }, { 48, 49, 0 } } }, + { { { 48, 0, 2 }, { 42, 62, 0 } } }, + { { { 49, 0, 1 }, { 42, 63, 0 } } }, + { { { 49, 0, 0 }, { 43, 62, 0 } } }, + { { { 49, 0, 1 }, { 48, 52, 0 } } }, + { { { 49, 0, 2 }, { 43, 63, 0 } } }, + { { { 50, 0, 1 }, { 44, 62, 0 } } }, + { { { 50, 0, 0 }, { 44, 63, 0 } } }, + { { { 50, 0, 1 }, { 48, 55, 0 } } }, + { { { 50, 0, 2 }, { 45, 62, 0 } } }, + { { { 51, 0, 1 }, { 45, 63, 0 } } }, + { { { 51, 0, 0 }, { 46, 62, 0 } } }, + { { { 51, 0, 1 }, { 48, 58, 0 } } }, + { { { 51, 0, 2 }, { 46, 63, 0 } } }, + { { { 52, 0, 1 }, { 47, 62, 0 } } }, + { { { 52, 0, 0 }, { 47, 63, 0 } } }, + { { { 52, 0, 1 }, { 48, 61, 0 } } }, + { { { 52, 0, 2 }, { 48, 62, 0 } } }, + { { { 53, 0, 1 }, { 56, 47, 0 } } }, + { { { 53, 0, 0 }, { 48, 63, 0 } } }, + { { { 53, 0, 1 }, { 49, 62, 0 } } }, + { { { 53, 0, 2 }, { 49, 63, 0 } } }, + { { { 54, 0, 1 }, { 58, 46, 0 } } }, + { { { 54, 0, 0 }, { 50, 62, 0 } } }, + { { { 54, 0, 1 }, { 50, 63, 0 } } }, + { { { 54, 0, 2 }, { 51, 62, 0 } } }, + { { { 55, 0, 1 }, { 59, 47, 0 } } }, + { { { 55, 0, 0 }, { 51, 63, 0 } } }, + { { { 55, 0, 1 }, { 52, 62, 0 } } }, + { { { 55, 0, 2 }, { 52, 63, 0 } } }, + { { { 56, 0, 1 }, { 61, 46, 0 } } }, + { { { 56, 0, 0 }, { 53, 62, 0 } } }, + { { { 56, 0, 1 }, { 53, 63, 0 } } }, + { { { 56, 0, 2 }, { 54, 62, 0 } } }, + { { { 57, 0, 1 }, { 62, 47, 0 } } }, + { { { 57, 0, 0 }, { 54, 63, 0 } } }, + { { { 57, 0, 1 }, { 55, 62, 0 } } }, + { { { 57, 0, 2 }, { 55, 63, 0 } } }, + { { { 58, 0, 1 }, { 56, 62, 1 } } }, + { { { 58, 0, 0 }, { 56, 62, 0 } } }, + { { { 58, 0, 1 }, { 56, 63, 0 } } }, + { { { 58, 0, 2 }, { 57, 62, 0 } } }, + { { { 59, 0, 1 }, { 57, 63, 1 } } }, + { { { 59, 0, 0 }, { 57, 63, 0 } } }, + { { { 59, 0, 1 }, { 58, 62, 0 } } }, + { { { 59, 0, 2 }, { 58, 63, 0 } } }, + { { { 60, 0, 1 }, { 59, 62, 1 } } }, + { { { 60, 0, 0 }, { 59, 62, 0 } } }, + { { { 60, 0, 1 }, { 59, 63, 0 } } }, + { { { 60, 0, 2 }, { 60, 62, 0 } } }, + { { { 61, 0, 1 }, { 60, 63, 1 } } }, + { { { 61, 0, 0 }, { 60, 63, 0 } } }, + { { { 61, 0, 1 }, { 61, 62, 0 } } }, + { { { 61, 0, 2 }, { 61, 63, 0 } } }, + { { { 62, 0, 1 }, { 62, 62, 1 } } }, + { { { 62, 0, 0 }, { 62, 62, 0 } } }, + { { { 62, 0, 1 }, { 62, 63, 0 } } }, + { { { 62, 0, 2 }, { 63, 62, 0 } } }, + { { { 63, 0, 1 }, { 63, 63, 1 } } }, + { { { 63, 0, 0 }, { 63, 63, 0 } } } }; diff --git a/thirdparty/squish/squish.cpp b/thirdparty/squish/squish.cpp index bbe89bfcfe5..d3cbabbafd8 100644 --- a/thirdparty/squish/squish.cpp +++ b/thirdparty/squish/squish.cpp @@ -1,29 +1,30 @@ /* ----------------------------------------------------------------------------- - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------- */ - -#include + +#include +#include "squish.h" #include "colourset.h" #include "maths.h" #include "rangefit.h" @@ -36,204 +37,359 @@ namespace squish { static int FixFlags( int flags ) { - // grab the flag bits - int method = flags & ( kDxt1 | kDxt3 | kDxt5 ); - int fit = flags & ( kColourIterativeClusterFit | kColourClusterFit | kColourRangeFit ); - int metric = flags & ( kColourMetricPerceptual | kColourMetricUniform ); - int extra = flags & kWeightColourByAlpha; - - // set defaults - if( method != kDxt3 && method != kDxt5 ) - method = kDxt1; - if( fit != kColourRangeFit ) - fit = kColourClusterFit; - if( metric != kColourMetricUniform ) - metric = kColourMetricPerceptual; - - // done - return method | fit | metric | extra; + // grab the flag bits + int method = flags & ( kDxt1 | kDxt3 | kDxt5 | kBc4 | kBc5 ); + int fit = flags & ( kColourIterativeClusterFit | kColourClusterFit | kColourRangeFit ); + int extra = flags & kWeightColourByAlpha; + + // set defaults + if ( method != kDxt3 + && method != kDxt5 + && method != kBc4 + && method != kBc5 ) + { + method = kDxt1; + } + if( fit != kColourRangeFit && fit != kColourIterativeClusterFit ) + fit = kColourClusterFit; + + // done + return method | fit | extra; } -void Compress( u8 const* rgba, void* block, int flags ) +void CompressMasked( u8 const* rgba, int mask, void* block, int flags, float* metric ) { - // compress with full mask - CompressMasked( rgba, 0xffff, block, flags ); -} + // fix any bad flags + flags = FixFlags( flags ); -void CompressMasked( u8 const* rgba, int mask, void* block, int flags ) -{ - // fix any bad flags - flags = FixFlags( flags ); + if ( ( flags & ( kBc4 | kBc5 ) ) != 0 ) + { + u8 alpha[16*4]; + for( int i = 0; i < 16; ++i ) + { + alpha[i*4 + 3] = rgba[i*4 + 0]; // copy R to A + } - // get the block locations - void* colourBlock = block; - void* alphaBock = block; - if( ( flags & ( kDxt3 | kDxt5 ) ) != 0 ) - colourBlock = reinterpret_cast< u8* >( block ) + 8; + u8* rBlock = reinterpret_cast< u8* >( block ); + CompressAlphaDxt5( alpha, mask, rBlock ); - // create the minimal point set - ColourSet colours( rgba, mask, flags ); - - // check the compression type and compress colour - if( colours.GetCount() == 1 ) - { - // always do a single colour fit - SingleColourFit fit( &colours, flags ); - fit.Compress( colourBlock ); - } - else if( ( flags & kColourRangeFit ) != 0 || colours.GetCount() == 0 ) - { - // do a range fit - RangeFit fit( &colours, flags ); - fit.Compress( colourBlock ); - } - else - { - // default to a cluster fit (could be iterative or not) - ClusterFit fit( &colours, flags ); - fit.Compress( colourBlock ); - } - - // compress alpha separately if necessary - if( ( flags & kDxt3 ) != 0 ) - CompressAlphaDxt3( rgba, mask, alphaBock ); - else if( ( flags & kDxt5 ) != 0 ) - CompressAlphaDxt5( rgba, mask, alphaBock ); + if ( ( flags & ( kBc5 ) ) != 0 ) + { + for( int i = 0; i < 16; ++i ) + { + alpha[i*4 + 3] = rgba[i*4 + 1]; // copy G to A + } + + u8* gBlock = reinterpret_cast< u8* >( block ) + 8; + CompressAlphaDxt5( alpha, mask, gBlock ); + } + + return; + } + + // get the block locations + void* colourBlock = block; + void* alphaBlock = block; + if( ( flags & ( kDxt3 | kDxt5 ) ) != 0 ) + colourBlock = reinterpret_cast< u8* >( block ) + 8; + + // create the minimal point set + ColourSet colours( rgba, mask, flags ); + + // check the compression type and compress colour + if( colours.GetCount() == 1 ) + { + // always do a single colour fit + SingleColourFit fit( &colours, flags ); + fit.Compress( colourBlock ); + } + else if( ( flags & kColourRangeFit ) != 0 || colours.GetCount() == 0 ) + { + // do a range fit + RangeFit fit( &colours, flags, metric ); + fit.Compress( colourBlock ); + } + else + { + // default to a cluster fit (could be iterative or not) + ClusterFit fit( &colours, flags, metric ); + fit.Compress( colourBlock ); + } + + // compress alpha separately if necessary + if( ( flags & kDxt3 ) != 0 ) + CompressAlphaDxt3( rgba, mask, alphaBlock ); + else if( ( flags & kDxt5 ) != 0 ) + CompressAlphaDxt5( rgba, mask, alphaBlock ); } void Decompress( u8* rgba, void const* block, int flags ) { - // fix any bad flags - flags = FixFlags( flags ); + // fix any bad flags + flags = FixFlags( flags ); - // get the block locations - void const* colourBlock = block; - void const* alphaBock = block; - if( ( flags & ( kDxt3 | kDxt5 ) ) != 0 ) - colourBlock = reinterpret_cast< u8 const* >( block ) + 8; + // get the block locations + void const* colourBlock = block; + void const* alphaBlock = block; + if( ( flags & ( kDxt3 | kDxt5 ) ) != 0 ) + colourBlock = reinterpret_cast< u8 const* >( block ) + 8; - // decompress colour - DecompressColour( rgba, colourBlock, ( flags & kDxt1 ) != 0 ); + // decompress colour + DecompressColour( rgba, colourBlock, ( flags & kDxt1 ) != 0 ); - // decompress alpha separately if necessary - if( ( flags & kDxt3 ) != 0 ) - DecompressAlphaDxt3( rgba, alphaBock ); - else if( ( flags & kDxt5 ) != 0 ) - DecompressAlphaDxt5( rgba, alphaBock ); + // decompress alpha separately if necessary + if( ( flags & kDxt3 ) != 0 ) + DecompressAlphaDxt3( rgba, alphaBlock ); + else if( ( flags & kDxt5 ) != 0 ) + DecompressAlphaDxt5( rgba, alphaBlock ); } int GetStorageRequirements( int width, int height, int flags ) { - // fix any bad flags - flags = FixFlags( flags ); - - // compute the storage requirements - int blockcount = ( ( width + 3 )/4 ) * ( ( height + 3 )/4 ); - int blocksize = ( ( flags & kDxt1 ) != 0 ) ? 8 : 16; - return blockcount*blocksize; + // fix any bad flags + flags = FixFlags( flags ); + + // compute the storage requirements + int blockcount = ( ( width + 3 )/4 ) * ( ( height + 3 )/4 ); + int blocksize = ( ( flags & ( kDxt1 | kBc4 ) ) != 0 ) ? 8 : 16; + return blockcount*blocksize; } -void CompressImage( u8 const* rgba, int width, int height, void* blocks, int flags ) +void CopyRGBA( u8 const* source, u8* dest, int flags ) { - // fix any bad flags - flags = FixFlags( flags ); + if (flags & kSourceBGRA) + { + // convert from bgra to rgba + dest[0] = source[2]; + dest[1] = source[1]; + dest[2] = source[0]; + dest[3] = source[3]; + } + else + { + for( int i = 0; i < 4; ++i ) + *dest++ = *source++; + } +} - // initialise the block output - u8* targetBlock = reinterpret_cast< u8* >( blocks ); - int bytesPerBlock = ( ( flags & kDxt1 ) != 0 ) ? 8 : 16; +void CompressImage( u8 const* rgba, int width, int height, int pitch, void* blocks, int flags, float* metric ) +{ + // fix any bad flags + flags = FixFlags( flags ); - // loop over blocks - for( int y = 0; y < height; y += 4 ) - { - for( int x = 0; x < width; x += 4 ) - { - // build the 4x4 block of pixels - u8 sourceRgba[16*4]; - u8* targetPixel = sourceRgba; - int mask = 0; - for( int py = 0; py < 4; ++py ) - { - for( int px = 0; px < 4; ++px ) - { - // get the source pixel in the image - int sx = x + px; - int sy = y + py; - - // enable if we're in the image - if( sx < width && sy < height ) - { - // copy the rgba value - u8 const* sourcePixel = rgba + 4*( width*sy + sx ); - for( int i = 0; i < 4; ++i ) - *targetPixel++ = *sourcePixel++; - - // enable this pixel - mask |= ( 1 << ( 4*py + px ) ); - } - else - { - // skip this pixel as its outside the image - targetPixel += 4; - } - } - } - - // compress it into the output - CompressMasked( sourceRgba, mask, targetBlock, flags ); - - // advance - targetBlock += bytesPerBlock; - } - } + // initialise the block output + u8* targetBlock = reinterpret_cast< u8* >( blocks ); + int bytesPerBlock = ( ( flags & ( kDxt1 | kBc4 ) ) != 0 ) ? 8 : 16; + + // loop over blocks + for( int y = 0; y < height; y += 4 ) + { + for( int x = 0; x < width; x += 4 ) + { + // build the 4x4 block of pixels + u8 sourceRgba[16*4]; + u8* targetPixel = sourceRgba; + int mask = 0; + for( int py = 0; py < 4; ++py ) + { + for( int px = 0; px < 4; ++px ) + { + // get the source pixel in the image + int sx = x + px; + int sy = y + py; + + // enable if we're in the image + if( sx < width && sy < height ) + { + // copy the rgba value + u8 const* sourcePixel = rgba + pitch*sy + 4*sx; + CopyRGBA(sourcePixel, targetPixel, flags); + // enable this pixel + mask |= ( 1 << ( 4*py + px ) ); + } + + // advance to the next pixel + targetPixel += 4; + } + } + + // compress it into the output + CompressMasked( sourceRgba, mask, targetBlock, flags, metric ); + + // advance + targetBlock += bytesPerBlock; + } + } +} + +void CompressImage( u8 const* rgba, int width, int height, void* blocks, int flags, float* metric ) +{ + CompressImage(rgba, width, height, width*4, blocks, flags, metric); +} + +void DecompressImage( u8* rgba, int width, int height, int pitch, void const* blocks, int flags ) +{ + // fix any bad flags + flags = FixFlags( flags ); + + // initialise the block input + u8 const* sourceBlock = reinterpret_cast< u8 const* >( blocks ); + int bytesPerBlock = ( ( flags & ( kDxt1 | kBc4 ) ) != 0 ) ? 8 : 16; + + // loop over blocks + for( int y = 0; y < height; y += 4 ) + { + for( int x = 0; x < width; x += 4 ) + { + // decompress the block + u8 targetRgba[4*16]; + Decompress( targetRgba, sourceBlock, flags ); + + // write the decompressed pixels to the correct image locations + u8 const* sourcePixel = targetRgba; + for( int py = 0; py < 4; ++py ) + { + for( int px = 0; px < 4; ++px ) + { + // get the target location + int sx = x + px; + int sy = y + py; + + // write if we're in the image + if( sx < width && sy < height ) + { + // copy the rgba value + u8* targetPixel = rgba + pitch*sy + 4*sx; + CopyRGBA(sourcePixel, targetPixel, flags); + } + + // advance to the next pixel + sourcePixel += 4; + } + } + + // advance + sourceBlock += bytesPerBlock; + } + } } void DecompressImage( u8* rgba, int width, int height, void const* blocks, int flags ) { - // fix any bad flags - flags = FixFlags( flags ); + DecompressImage( rgba, width, height, width*4, blocks, flags ); +} - // initialise the block input - u8 const* sourceBlock = reinterpret_cast< u8 const* >( blocks ); - int bytesPerBlock = ( ( flags & kDxt1 ) != 0 ) ? 8 : 16; +static double ErrorSq(double x, double y) +{ + return (x - y) * (x - y); +} - // loop over blocks - for( int y = 0; y < height; y += 4 ) - { - for( int x = 0; x < width; x += 4 ) - { - // decompress the block - u8 targetRgba[4*16]; - Decompress( targetRgba, sourceBlock, flags ); - - // write the decompressed pixels to the correct image locations - u8 const* sourcePixel = targetRgba; - for( int py = 0; py < 4; ++py ) - { - for( int px = 0; px < 4; ++px ) - { - // get the target location - int sx = x + px; - int sy = y + py; - if( sx < width && sy < height ) - { - u8* targetPixel = rgba + 4*( width*sy + sx ); - - // copy the rgba value - for( int i = 0; i < 4; ++i ) - *targetPixel++ = *sourcePixel++; - } - else - { - // skip this pixel as its outside the image - sourcePixel += 4; - } - } - } - - // advance - sourceBlock += bytesPerBlock; - } - } +static void ComputeBlockWMSE(u8 const *original, u8 const *compressed, unsigned int w, unsigned int h, double &cmse, double &amse) +{ + // Computes the MSE for the block and weights it by the variance of the original block. + // If the variance of the original block is less than 4 (i.e. a standard deviation of 1 per channel) + // then the block is close to being a single colour. Quantisation errors in single colour blocks + // are easier to see than similar errors in blocks that contain more colours, particularly when there + // are many such blocks in a large area (eg a blue sky background) as they cause banding. Given that + // banding is easier to see than small errors in "complex" blocks, we weight the errors by a factor + // of 5. This implies that images with large, single colour areas will have a higher potential WMSE + // than images with lots of detail. + + cmse = amse = 0; + unsigned int sum_p[4]; // per channel sum of pixels + unsigned int sum_p2[4]; // per channel sum of pixels squared + memset(sum_p, 0, sizeof(sum_p)); + memset(sum_p2, 0, sizeof(sum_p2)); + for( unsigned int py = 0; py < 4; ++py ) + { + for( unsigned int px = 0; px < 4; ++px ) + { + if( px < w && py < h ) + { + double pixelCMSE = 0; + for( int i = 0; i < 3; ++i ) + { + pixelCMSE += ErrorSq(original[i], compressed[i]); + sum_p[i] += original[i]; + sum_p2[i] += (unsigned int)original[i]*original[i]; + } + if( original[3] == 0 && compressed[3] == 0 ) + pixelCMSE = 0; // transparent in both, so colour is inconsequential + amse += ErrorSq(original[3], compressed[3]); + cmse += pixelCMSE; + sum_p[3] += original[3]; + sum_p2[3] += (unsigned int)original[3]*original[3]; + } + original += 4; + compressed += 4; + } + } + unsigned int variance = 0; + for( int i = 0; i < 4; ++i ) + variance += w*h*sum_p2[i] - sum_p[i]*sum_p[i]; + if( variance < 4 * w * w * h * h ) + { + amse *= 5; + cmse *= 5; + } +} + +void ComputeMSE( u8 const *rgba, int width, int height, int pitch, u8 const *dxt, int flags, double &colourMSE, double &alphaMSE ) +{ + // fix any bad flags + flags = FixFlags( flags ); + colourMSE = alphaMSE = 0; + + // initialise the block input + squish::u8 const* sourceBlock = dxt; + int bytesPerBlock = ( ( flags & squish::kDxt1 ) != 0 ) ? 8 : 16; + + // loop over blocks + for( int y = 0; y < height; y += 4 ) + { + for( int x = 0; x < width; x += 4 ) + { + // decompress the block + u8 targetRgba[4*16]; + Decompress( targetRgba, sourceBlock, flags ); + u8 const* sourcePixel = targetRgba; + + // copy across to a similar pixel block + u8 originalRgba[4*16]; + u8* originalPixel = originalRgba; + + for( int py = 0; py < 4; ++py ) + { + for( int px = 0; px < 4; ++px ) + { + int sx = x + px; + int sy = y + py; + if( sx < width && sy < height ) + { + u8 const* targetPixel = rgba + pitch*sy + 4*sx; + CopyRGBA(targetPixel, originalPixel, flags); + } + sourcePixel += 4; + originalPixel += 4; + } + } + + // compute the weighted MSE of the block + double blockCMSE, blockAMSE; + ComputeBlockWMSE(originalRgba, targetRgba, std::min(4, width - x), std::min(4, height - y), blockCMSE, blockAMSE); + colourMSE += blockCMSE; + alphaMSE += blockAMSE; + // advance + sourceBlock += bytesPerBlock; + } + } + colourMSE /= (width * height * 3); + alphaMSE /= (width * height); +} + +void ComputeMSE( u8 const *rgba, int width, int height, u8 const *dxt, int flags, double &colourMSE, double &alphaMSE ) +{ + ComputeMSE(rgba, width, height, width*4, dxt, flags, colourMSE, alphaMSE); } } // namespace squish diff --git a/thirdparty/squish/squish.h b/thirdparty/squish/squish.h index 5f5ac149d77..7c46e37ff1c 100644 --- a/thirdparty/squish/squish.h +++ b/thirdparty/squish/squish.h @@ -1,28 +1,28 @@ /* ----------------------------------------------------------------------------- - Copyright (c) 2006 Simon Brown si@sjbrown.co.uk + Copyright (c) 2006 Simon Brown si@sjbrown.co.uk - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -------------------------------------------------------------------------- */ - + #ifndef SQUISH_H #define SQUISH_H @@ -38,124 +38,143 @@ typedef unsigned char u8; enum { - //! Use DXT1 compression. - kDxt1 = ( 1 << 0 ), - - //! Use DXT3 compression. - kDxt3 = ( 1 << 1 ), - - //! Use DXT5 compression. - kDxt5 = ( 1 << 2 ), - - //! Use a very slow but very high quality colour compressor. - kColourIterativeClusterFit = ( 1 << 8 ), - - //! Use a slow but high quality colour compressor (the default). - kColourClusterFit = ( 1 << 3 ), - - //! Use a fast but low quality colour compressor. - kColourRangeFit = ( 1 << 4 ), - - //! Use a perceptual metric for colour error (the default). - kColourMetricPerceptual = ( 1 << 5 ), + //! Use DXT1 compression. + kDxt1 = ( 1 << 0 ), - //! Use a uniform metric for colour error. - kColourMetricUniform = ( 1 << 6 ), - - //! Weight the colour by alpha during cluster fit (disabled by default). - kWeightColourByAlpha = ( 1 << 7 ) + //! Use DXT3 compression. + kDxt3 = ( 1 << 1 ), + + //! Use DXT5 compression. + kDxt5 = ( 1 << 2 ), + + //! Use BC4 compression. + kBc4 = ( 1 << 3 ), + + //! Use BC5 compression. + kBc5 = ( 1 << 4 ), + + //! Use a slow but high quality colour compressor (the default). + kColourClusterFit = ( 1 << 5 ), + + //! Use a fast but low quality colour compressor. + kColourRangeFit = ( 1 << 6 ), + + //! Weight the colour by alpha during cluster fit (disabled by default). + kWeightColourByAlpha = ( 1 << 7 ), + + //! Use a very slow but very high quality colour compressor. + kColourIterativeClusterFit = ( 1 << 8 ), + + //! Source is BGRA rather than RGBA + kSourceBGRA = ( 1 << 9 ) }; // ----------------------------------------------------------------------------- /*! @brief Compresses a 4x4 block of pixels. - @param rgba The rgba values of the 16 source pixels. - @param block Storage for the compressed DXT block. - @param flags Compression flags. - - The source pixels should be presented as a contiguous array of 16 rgba - values, with each component as 1 byte each. In memory this should be: - - { r1, g1, b1, a1, .... , r16, g16, b16, a16 } - - The flags parameter should specify either kDxt1, kDxt3 or kDxt5 compression, - however, DXT1 will be used by default if none is specified. When using DXT1 - compression, 8 bytes of storage are required for the compressed DXT block. - DXT3 and DXT5 compression require 16 bytes of storage per block. - - The flags parameter can also specify a preferred colour compressor and - colour error metric to use when fitting the RGB components of the data. - Possible colour compressors are: kColourClusterFit (the default), - kColourRangeFit or kColourIterativeClusterFit. Possible colour error metrics - are: kColourMetricPerceptual (the default) or kColourMetricUniform. If no - flags are specified in any particular category then the default will be - used. Unknown flags are ignored. - - When using kColourClusterFit, an additional flag can be specified to - weight the colour of each pixel by its alpha value. For images that are - rendered using alpha blending, this can significantly increase the - perceived quality. + @param rgba The rgba values of the 16 source pixels. + @param mask The valid pixel mask. + @param block Storage for the compressed DXT block. + @param flags Compression flags. + @param metric An optional perceptual metric. + + The source pixels should be presented as a contiguous array of 16 rgba + values, with each component as 1 byte each. In memory this should be: + + { r1, g1, b1, a1, .... , r16, g16, b16, a16 } + + The mask parameter enables only certain pixels within the block. The lowest + bit enables the first pixel and so on up to the 16th bit. Bits beyond the + 16th bit are ignored. Pixels that are not enabled are allowed to take + arbitrary colours in the output block. An example of how this can be used + is in the CompressImage function to disable pixels outside the bounds of + the image when the width or height is not divisible by 4. + + The flags parameter should specify kDxt1, kDxt3, kDxt5, kBc4, or kBc5 compression, + however, DXT1 will be used by default if none is specified. When using DXT1 + compression, 8 bytes of storage are required for the compressed DXT block. + DXT3 and DXT5 compression require 16 bytes of storage per block. + + The flags parameter can also specify a preferred colour compressor to use + when fitting the RGB components of the data. Possible colour compressors + are: kColourClusterFit (the default), kColourRangeFit (very fast, low + quality) or kColourIterativeClusterFit (slowest, best quality). + + When using kColourClusterFit or kColourIterativeClusterFit, an additional + flag can be specified to weight the importance of each pixel by its alpha + value. For images that are rendered using alpha blending, this can + significantly increase the perceived quality. + + The metric parameter can be used to weight the relative importance of each + colour channel, or pass NULL to use the default uniform weight of + { 1.0f, 1.0f, 1.0f }. This replaces the previous flag-based control that + allowed either uniform or "perceptual" weights with the fixed values + { 0.2126f, 0.7152f, 0.0722f }. If non-NULL, the metric should point to a + contiguous array of 3 floats. */ -void Compress( u8 const* rgba, void* block, int flags ); +void CompressMasked( u8 const* rgba, int mask, void* block, int flags, float* metric = 0 ); // ----------------------------------------------------------------------------- /*! @brief Compresses a 4x4 block of pixels. - @param rgba The rgba values of the 16 source pixels. - @param mask The valid pixel mask. - @param block Storage for the compressed DXT block. - @param flags Compression flags. - - The source pixels should be presented as a contiguous array of 16 rgba - values, with each component as 1 byte each. In memory this should be: - - { r1, g1, b1, a1, .... , r16, g16, b16, a16 } - - The mask parameter enables only certain pixels within the block. The lowest - bit enables the first pixel and so on up to the 16th bit. Bits beyond the - 16th bit are ignored. Pixels that are not enabled are allowed to take - arbitrary colours in the output block. An example of how this can be used - is in the CompressImage function to disable pixels outside the bounds of - the image when the width or height is not divisible by 4. - - The flags parameter should specify either kDxt1, kDxt3 or kDxt5 compression, - however, DXT1 will be used by default if none is specified. When using DXT1 - compression, 8 bytes of storage are required for the compressed DXT block. - DXT3 and DXT5 compression require 16 bytes of storage per block. - - The flags parameter can also specify a preferred colour compressor and - colour error metric to use when fitting the RGB components of the data. - Possible colour compressors are: kColourClusterFit (the default), - kColourRangeFit or kColourIterativeClusterFit. Possible colour error metrics - are: kColourMetricPerceptual (the default) or kColourMetricUniform. If no - flags are specified in any particular category then the default will be - used. Unknown flags are ignored. - - When using kColourClusterFit, an additional flag can be specified to - weight the colour of each pixel by its alpha value. For images that are - rendered using alpha blending, this can significantly increase the - perceived quality. + @param rgba The rgba values of the 16 source pixels. + @param block Storage for the compressed DXT block. + @param flags Compression flags. + @param metric An optional perceptual metric. + + The source pixels should be presented as a contiguous array of 16 rgba + values, with each component as 1 byte each. In memory this should be: + + { r1, g1, b1, a1, .... , r16, g16, b16, a16 } + + The flags parameter should specify kDxt1, kDxt3, kDxt5, kBc4, or kBc5 compression, + however, DXT1 will be used by default if none is specified. When using DXT1 + compression, 8 bytes of storage are required for the compressed DXT block. + DXT3 and DXT5 compression require 16 bytes of storage per block. + + The flags parameter can also specify a preferred colour compressor to use + when fitting the RGB components of the data. Possible colour compressors + are: kColourClusterFit (the default), kColourRangeFit (very fast, low + quality) or kColourIterativeClusterFit (slowest, best quality). + + When using kColourClusterFit or kColourIterativeClusterFit, an additional + flag can be specified to weight the importance of each pixel by its alpha + value. For images that are rendered using alpha blending, this can + significantly increase the perceived quality. + + The metric parameter can be used to weight the relative importance of each + colour channel, or pass NULL to use the default uniform weight of + { 1.0f, 1.0f, 1.0f }. This replaces the previous flag-based control that + allowed either uniform or "perceptual" weights with the fixed values + { 0.2126f, 0.7152f, 0.0722f }. If non-NULL, the metric should point to a + contiguous array of 3 floats. + + This method is an inline that calls CompressMasked with a mask of 0xffff, + provided for compatibility with older versions of squish. */ -void CompressMasked( u8 const* rgba, int mask, void* block, int flags ); +inline void Compress( u8 const* rgba, void* block, int flags, float* metric = 0 ) +{ + CompressMasked( rgba, 0xffff, block, flags, metric ); +} // ----------------------------------------------------------------------------- /*! @brief Decompresses a 4x4 block of pixels. - @param rgba Storage for the 16 decompressed pixels. - @param block The compressed DXT block. - @param flags Compression flags. + @param rgba Storage for the 16 decompressed pixels. + @param block The compressed DXT block. + @param flags Compression flags. - The decompressed pixels will be written as a contiguous array of 16 rgba - values, with each component as 1 byte each. In memory this is: - - { r1, g1, b1, a1, .... , r16, g16, b16, a16 } - - The flags parameter should specify either kDxt1, kDxt3 or kDxt5 compression, - however, DXT1 will be used by default if none is specified. All other flags - are ignored. + The decompressed pixels will be written as a contiguous array of 16 rgba + values, with each component as 1 byte each. In memory this is: + + { r1, g1, b1, a1, .... , r16, g16, b16, a16 } + + The flags parameter should specify kDxt1, kDxt3, kDxt5, kBc4, or kBc5 compression, + however, DXT1 will be used by default if none is specified. All other flags + are ignored. */ void Decompress( u8* rgba, void const* block, int flags ); @@ -163,17 +182,17 @@ void Decompress( u8* rgba, void const* block, int flags ); /*! @brief Computes the amount of compressed storage required. - @param width The width of the image. - @param height The height of the image. - @param flags Compression flags. - - The flags parameter should specify either kDxt1, kDxt3 or kDxt5 compression, - however, DXT1 will be used by default if none is specified. All other flags - are ignored. - - Most DXT images will be a multiple of 4 in each dimension, but this - function supports arbitrary size images by allowing the outer blocks to - be only partially used. + @param width The width of the image. + @param height The height of the image. + @param flags Compression flags. + + The flags parameter should specify kDxt1, kDxt3, kDxt5, kBc4, or kBc5 compression, + however, DXT1 will be used by default if none is specified. All other flags + are ignored. + + Most DXT images will be a multiple of 4 in each dimension, but this + function supports arbitrary size images by allowing the outer blocks to + be only partially used. */ int GetStorageRequirements( int width, int height, int flags ); @@ -181,67 +200,101 @@ int GetStorageRequirements( int width, int height, int flags ); /*! @brief Compresses an image in memory. - @param rgba The pixels of the source. - @param width The width of the source image. - @param height The height of the source image. - @param blocks Storage for the compressed output. - @param flags Compression flags. - - The source pixels should be presented as a contiguous array of width*height - rgba values, with each component as 1 byte each. In memory this should be: - - { r1, g1, b1, a1, .... , rn, gn, bn, an } for n = width*height - - The flags parameter should specify either kDxt1, kDxt3 or kDxt5 compression, - however, DXT1 will be used by default if none is specified. When using DXT1 - compression, 8 bytes of storage are required for each compressed DXT block. - DXT3 and DXT5 compression require 16 bytes of storage per block. - - The flags parameter can also specify a preferred colour compressor and - colour error metric to use when fitting the RGB components of the data. - Possible colour compressors are: kColourClusterFit (the default), - kColourRangeFit or kColourIterativeClusterFit. Possible colour error metrics - are: kColourMetricPerceptual (the default) or kColourMetricUniform. If no - flags are specified in any particular category then the default will be - used. Unknown flags are ignored. - - When using kColourClusterFit, an additional flag can be specified to - weight the colour of each pixel by its alpha value. For images that are - rendered using alpha blending, this can significantly increase the - perceived quality. - - Internally this function calls squish::Compress for each block. To see how - much memory is required in the compressed image, use - squish::GetStorageRequirements. + @param rgba The pixels of the source. + @param width The width of the source image. + @param height The height of the source image. + @param pitch The pitch of the source image. + @param blocks Storage for the compressed output. + @param flags Compression flags. + @param metric An optional perceptual metric. + + The source pixels should be presented as a contiguous array of width*height + rgba values, with each component as 1 byte each. In memory this should be: + + { r1, g1, b1, a1, .... , rn, gn, bn, an } for n = width*height + + The flags parameter should specify kDxt1, kDxt3, kDxt5, kBc4, or kBc5 compression, + however, DXT1 will be used by default if none is specified. When using DXT1 + compression, 8 bytes of storage are required for each compressed DXT block. + DXT3 and DXT5 compression require 16 bytes of storage per block. + + The flags parameter can also specify a preferred colour compressor to use + when fitting the RGB components of the data. Possible colour compressors + are: kColourClusterFit (the default), kColourRangeFit (very fast, low + quality) or kColourIterativeClusterFit (slowest, best quality). + + When using kColourClusterFit or kColourIterativeClusterFit, an additional + flag can be specified to weight the importance of each pixel by its alpha + value. For images that are rendered using alpha blending, this can + significantly increase the perceived quality. + + The metric parameter can be used to weight the relative importance of each + colour channel, or pass NULL to use the default uniform weight of + { 1.0f, 1.0f, 1.0f }. This replaces the previous flag-based control that + allowed either uniform or "perceptual" weights with the fixed values + { 0.2126f, 0.7152f, 0.0722f }. If non-NULL, the metric should point to a + contiguous array of 3 floats. + + Internally this function calls squish::CompressMasked for each block, which + allows for pixels outside the image to take arbitrary values. The function + squish::GetStorageRequirements can be called to compute the amount of memory + to allocate for the compressed output. */ -void CompressImage( u8 const* rgba, int width, int height, void* blocks, int flags ); +void CompressImage( u8 const* rgba, int width, int height, int pitch, void* blocks, int flags, float* metric = 0 ); +void CompressImage( u8 const* rgba, int width, int height, void* blocks, int flags, float* metric = 0 ); // ----------------------------------------------------------------------------- /*! @brief Decompresses an image in memory. - @param rgba Storage for the decompressed pixels. - @param width The width of the source image. - @param height The height of the source image. - @param blocks The compressed DXT blocks. - @param flags Compression flags. - - The decompressed pixels will be written as a contiguous array of width*height - 16 rgba values, with each component as 1 byte each. In memory this is: - - { r1, g1, b1, a1, .... , rn, gn, bn, an } for n = width*height - - The flags parameter should specify either kDxt1, kDxt3 or kDxt5 compression, - however, DXT1 will be used by default if none is specified. All other flags - are ignored. + @param rgba Storage for the decompressed pixels. + @param width The width of the source image. + @param height The height of the source image. + @param pitch The pitch of the decompressed pixels. + @param blocks The compressed DXT blocks. + @param flags Compression flags. - Internally this function calls squish::Decompress for each block. + The decompressed pixels will be written as a contiguous array of width*height + 16 rgba values, with each component as 1 byte each. In memory this is: + + { r1, g1, b1, a1, .... , rn, gn, bn, an } for n = width*height + + The flags parameter should specify kDxt1, kDxt3, kDxt5, kBc4, or kBc5 compression, + however, DXT1 will be used by default if none is specified. All other flags + are ignored. + + Internally this function calls squish::Decompress for each block. */ +void DecompressImage( u8* rgba, int width, int height, int pitch, void const* blocks, int flags ); void DecompressImage( u8* rgba, int width, int height, void const* blocks, int flags ); // ----------------------------------------------------------------------------- +/*! @brief Computes MSE of an compressed image in memory. + + @param rgba The original image pixels. + @param width The width of the source image. + @param height The height of the source image. + @param pitch The pitch of the source image. + @param dxt The compressed dxt blocks + @param flags Compression flags. + @param colourMSE The MSE of the colour values. + @param alphaMSE The MSE of the alpha values. + + The colour MSE and alpha MSE are computed across all pixels. The colour MSE is + averaged across all rgb values (i.e. colourMSE = sum sum_k ||dxt.k - rgba.k||/3) + + The flags parameter should specify kDxt1, kDxt3, kDxt5, kBc4, or kBc5 compression, + however, DXT1 will be used by default if none is specified. All other flags + are ignored. + + Internally this function calls squish::Decompress for each block. +*/ +void ComputeMSE(u8 const *rgba, int width, int height, int pitch, u8 const *dxt, int flags, double &colourMSE, double &alphaMSE); +void ComputeMSE(u8 const *rgba, int width, int height, u8 const *dxt, int flags, double &colourMSE, double &alphaMSE); + +// ----------------------------------------------------------------------------- + } // namespace squish #endif // ndef SQUISH_H - From 36738ddda4f732fff7bbfb7b4605a47a0bd7c045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 14 Oct 2016 08:27:59 +0200 Subject: [PATCH 14/19] glew: Split thirdparty files and isolate env Not fully happy about the way this one interacts with the various platforms. Maybe the platform_config.h should be generated by the SCsub instead of passing a define just to know where is the header. --- SConstruct | 1 + drivers/gl_context/SCsub | 25 +++++-- platform/haiku/detect.py | 1 - platform/osx/detect.py | 4 +- platform/osx/platform_config.h | 2 +- platform/server/detect.py | 2 +- platform/windows/detect.py | 1 - platform/windows/platform_config.h | 4 +- platform/x11/detect.py | 4 +- platform/x11/platform_config.h | 4 +- thirdparty/README.md | 13 ++++ .../gl_context => thirdparty/glew}/GL/glew.h | 0 .../gl_context => thirdparty/glew}/GL/glxew.h | 0 .../gl_context => thirdparty/glew}/GL/wglew.h | 0 thirdparty/glew/LICENSE.txt | 73 +++++++++++++++++++ .../gl_context => thirdparty/glew}/glew.c | 0 16 files changed, 115 insertions(+), 19 deletions(-) rename {drivers/gl_context => thirdparty/glew}/GL/glew.h (100%) rename {drivers/gl_context => thirdparty/glew}/GL/glxew.h (100%) rename {drivers/gl_context => thirdparty/glew}/GL/wglew.h (100%) create mode 100644 thirdparty/glew/LICENSE.txt rename {drivers/gl_context => thirdparty/glew}/glew.c (100%) diff --git a/SConstruct b/SConstruct index c2fba48f919..872b30738c1 100644 --- a/SConstruct +++ b/SConstruct @@ -133,6 +133,7 @@ opts.Add('builtin_zlib','Use built-in zlib (yes/no)','yes') opts.Add('openssl','OpenSSL library for openssl module (system/builtin)','builtin') opts.Add('libmpcdec','libmpcdec library for mpc module (system/builtin)','builtin') opts.Add('enet','ENet library (system/builtin)','builtin') +opts.Add('glew','GLEW library for the gl_context (system/builtin)','builtin') opts.Add("CXX", "C++ Compiler") opts.Add("CC", "C Compiler") opts.Add("CCFLAGS", "Custom flags for the C++ compiler"); diff --git a/drivers/gl_context/SCsub b/drivers/gl_context/SCsub index dac27c01250..9a158f08213 100644 --- a/drivers/gl_context/SCsub +++ b/drivers/gl_context/SCsub @@ -1,11 +1,26 @@ Import('env') +Import('env_drivers') -env.add_source_files(env.drivers_sources,"*.cpp") +env_glew = env_drivers.Clone() + +if (env["platform"] in ["haiku","osx","windows","x11"]): + # Thirdparty source files + if (env["glew"] != "system"): # builtin + thirdparty_dir = "#thirdparty/glew/" + thirdparty_sources = [ + "glew.c", + ] + thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] + + env_glew.add_source_files(env.drivers_sources, thirdparty_sources) + env_glew.Append(CPPFLAGS = ['-DGLEW_STATIC']) + env_glew.Append(CPPPATH = [thirdparty_dir]) + # Also pass to global env, used by platform code + env.Append(CPPPATH = [thirdparty_dir]) -if (env.get('glew') == 'yes'): - env.add_source_files(env.drivers_sources,"glew.c") env.Append(CPPFLAGS = ['-DGLEW_ENABLED']) - env.Append(CPPFLAGS = ['-DGLEW_STATIC']) - env.Append(CPPPATH = ['.']) + +# Godot source files +env_glew.add_source_files(env.drivers_sources, "*.cpp") Export('env') diff --git a/platform/haiku/detect.py b/platform/haiku/detect.py index f36b0c567eb..8aa810e18d8 100644 --- a/platform/haiku/detect.py +++ b/platform/haiku/detect.py @@ -24,7 +24,6 @@ def get_opts(): def get_flags(): return [ ('builtin_zlib', 'no'), - ('glew', 'yes'), ] def configure(env): diff --git a/platform/osx/detect.py b/platform/osx/detect.py index 01ea09fa21b..43ddfa0d1a6 100644 --- a/platform/osx/detect.py +++ b/platform/osx/detect.py @@ -28,9 +28,7 @@ def get_opts(): def get_flags(): return [ - ('legacygl', 'yes'), - ('builtin_zlib', 'no'), - ('glew', 'yes'), + ('builtin_zlib', 'no'), ] diff --git a/platform/osx/platform_config.h b/platform/osx/platform_config.h index 86505206aea..f02a4bc4440 100644 --- a/platform/osx/platform_config.h +++ b/platform/osx/platform_config.h @@ -27,5 +27,5 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ #include -#define GLES2_INCLUDE_H "gl_context/GL/glew.h" +#define GLES2_INCLUDE_H "GL/glew.h" #define PTHREAD_RENAME_SELF diff --git a/platform/server/detect.py b/platform/server/detect.py index e6fab2043b0..543c88c5c24 100644 --- a/platform/server/detect.py +++ b/platform/server/detect.py @@ -27,7 +27,7 @@ def get_opts(): def get_flags(): return [ - ('builtin_zlib', 'no'), + ('builtin_zlib', 'no'), ] diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 12ea5a93ee0..ce308a49c92 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -176,7 +176,6 @@ def get_opts(): def get_flags(): return [ - ('glew','yes'), ('openssl','builtin'), #use builtin openssl ] diff --git a/platform/windows/platform_config.h b/platform/windows/platform_config.h index 9e207508161..31512a10543 100644 --- a/platform/windows/platform_config.h +++ b/platform/windows/platform_config.h @@ -30,6 +30,4 @@ //#else //#include //#endif -#define GLES2_INCLUDE_H "gl_context/GL/glew.h" - - +#define GLES2_INCLUDE_H "GL/glew.h" diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 90122eef4af..3ebefb640c8 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -69,7 +69,6 @@ def get_flags(): return [ ('builtin_zlib', 'no'), - ('glew', 'yes'), ("openssl", "system"), ('freetype','yes'), # use system freetype ('libpng', 'system'), @@ -179,6 +178,9 @@ def configure(env): env.Append(CPPFLAGS=['-DOPENGL_ENABLED']) + if (env["glew"] == "system"): + env.ParseConfig('pkg-config glew --cflags --libs') + if os.system("pkg-config --exists alsa")==0: print("Enabling ALSA") env.Append(CPPFLAGS=["-DALSA_ENABLED"]) diff --git a/platform/x11/platform_config.h b/platform/x11/platform_config.h index 3b47b2c92d7..015953157d9 100644 --- a/platform/x11/platform_config.h +++ b/platform/x11/platform_config.h @@ -34,6 +34,4 @@ #define PTHREAD_BSD_SET_NAME #endif -#define GLES2_INCLUDE_H "gl_context/GL/glew.h" - - +#define GLES2_INCLUDE_H "GL/glew.h" diff --git a/thirdparty/README.md b/thirdparty/README.md index f5a70e85b37..841435b56ef 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -18,6 +18,19 @@ for all platforms (especially WinRT). Check the diff with the 1.3.13 tarball before the next update. +## glew + +- Upstream: http://glew.sourceforge.net +- Version: 1.13.0 +- License: BSD-3-Clause + +Files extracted from upstream source: + +- src/glew.c +- include/GL/ as GL/ +- LICENSE.txt + + ## jpeg-compressor - Upstream: https://github.com/richgel999/jpeg-compressor diff --git a/drivers/gl_context/GL/glew.h b/thirdparty/glew/GL/glew.h similarity index 100% rename from drivers/gl_context/GL/glew.h rename to thirdparty/glew/GL/glew.h diff --git a/drivers/gl_context/GL/glxew.h b/thirdparty/glew/GL/glxew.h similarity index 100% rename from drivers/gl_context/GL/glxew.h rename to thirdparty/glew/GL/glxew.h diff --git a/drivers/gl_context/GL/wglew.h b/thirdparty/glew/GL/wglew.h similarity index 100% rename from drivers/gl_context/GL/wglew.h rename to thirdparty/glew/GL/wglew.h diff --git a/thirdparty/glew/LICENSE.txt b/thirdparty/glew/LICENSE.txt new file mode 100644 index 00000000000..f7078042e95 --- /dev/null +++ b/thirdparty/glew/LICENSE.txt @@ -0,0 +1,73 @@ +The OpenGL Extension Wrangler Library +Copyright (C) 2002-2007, Milan Ikits +Copyright (C) 2002-2007, Marcelo E. Magallon +Copyright (C) 2002, Lev Povalahev +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +* The name of the author may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. + + +Mesa 3-D graphics library +Version: 7.0 + +Copyright (C) 1999-2007 Brian Paul All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +Copyright (c) 2007 The Khronos Group Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and/or associated documentation files (the +"Materials"), to deal in the Materials without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Materials, and to +permit persons to whom the Materials are furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Materials. + +THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. diff --git a/drivers/gl_context/glew.c b/thirdparty/glew/glew.c similarity index 100% rename from drivers/gl_context/glew.c rename to thirdparty/glew/glew.c From cbf52606f4928df46fc89d37d781bad782f0616e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 14 Oct 2016 18:58:24 +0200 Subject: [PATCH 15/19] zlib: Split thirdparty files, simplify scons option --- SConstruct | 4 -- drivers/SCsub | 4 +- drivers/builtin_zlib/SCsub | 22 ---------- drivers/zlib/SCsub | 24 +++++++++++ platform/android/detect.py | 1 - platform/bb10/detect.py | 1 + platform/haiku/detect.py | 1 - platform/iphone/detect.py | 1 + platform/javascript/detect.py | 1 + platform/osx/detect.py | 1 - platform/server/detect.py | 1 - platform/windows/detect.py | 1 + platform/winrt/detect.py | 1 + platform/x11/detect.py | 1 - thirdparty/README.md | 42 ++++++++++++------- .../zlib/adler32.c | 0 .../zlib/compress.c | 0 .../builtin_zlib => thirdparty}/zlib/crc32.c | 0 .../builtin_zlib => thirdparty}/zlib/crc32.h | 0 .../zlib/deflate.c | 0 .../zlib/deflate.h | 0 .../zlib/infback.c | 0 .../zlib/inffast.c | 0 .../zlib/inffast.h | 0 .../zlib/inffixed.h | 0 .../zlib/inflate.c | 0 .../zlib/inflate.h | 0 .../zlib/inftrees.c | 0 .../zlib/inftrees.h | 0 .../builtin_zlib => thirdparty}/zlib/trees.c | 0 .../builtin_zlib => thirdparty}/zlib/trees.h | 0 .../zlib/uncompr.c | 0 .../builtin_zlib => thirdparty}/zlib/zconf.h | 0 .../builtin_zlib => thirdparty}/zlib/zlib.h | 0 .../builtin_zlib => thirdparty}/zlib/zutil.c | 0 .../builtin_zlib => thirdparty}/zlib/zutil.h | 0 36 files changed, 57 insertions(+), 49 deletions(-) delete mode 100644 drivers/builtin_zlib/SCsub create mode 100644 drivers/zlib/SCsub rename {drivers/builtin_zlib => thirdparty}/zlib/adler32.c (100%) rename {drivers/builtin_zlib => thirdparty}/zlib/compress.c (100%) rename {drivers/builtin_zlib => thirdparty}/zlib/crc32.c (100%) rename {drivers/builtin_zlib => thirdparty}/zlib/crc32.h (100%) rename {drivers/builtin_zlib => thirdparty}/zlib/deflate.c (100%) rename {drivers/builtin_zlib => thirdparty}/zlib/deflate.h (100%) rename {drivers/builtin_zlib => thirdparty}/zlib/infback.c (100%) rename {drivers/builtin_zlib => thirdparty}/zlib/inffast.c (100%) rename {drivers/builtin_zlib => thirdparty}/zlib/inffast.h (100%) rename {drivers/builtin_zlib => thirdparty}/zlib/inffixed.h (100%) rename {drivers/builtin_zlib => thirdparty}/zlib/inflate.c (100%) rename {drivers/builtin_zlib => thirdparty}/zlib/inflate.h (100%) rename {drivers/builtin_zlib => thirdparty}/zlib/inftrees.c (100%) rename {drivers/builtin_zlib => thirdparty}/zlib/inftrees.h (100%) rename {drivers/builtin_zlib => thirdparty}/zlib/trees.c (100%) rename {drivers/builtin_zlib => thirdparty}/zlib/trees.h (100%) rename {drivers/builtin_zlib => thirdparty}/zlib/uncompr.c (100%) rename {drivers/builtin_zlib => thirdparty}/zlib/zconf.h (100%) rename {drivers/builtin_zlib => thirdparty}/zlib/zlib.h (100%) rename {drivers/builtin_zlib => thirdparty}/zlib/zutil.c (100%) rename {drivers/builtin_zlib => thirdparty}/zlib/zutil.h (100%) diff --git a/SConstruct b/SConstruct index 872b30738c1..dd780409d53 100644 --- a/SConstruct +++ b/SConstruct @@ -129,7 +129,6 @@ opts.Add('freetype','Freetype support in editor','builtin') opts.Add('xml','XML Save/Load support (yes/no)','yes') opts.Add('libpng','libpng library for image loader support (system/builtin)','builtin') opts.Add('libwebp','libwebp library for webp module (system/builtin)','builtin') -opts.Add('builtin_zlib','Use built-in zlib (yes/no)','yes') opts.Add('openssl','OpenSSL library for openssl module (system/builtin)','builtin') opts.Add('libmpcdec','libmpcdec library for mpc module (system/builtin)','builtin') opts.Add('enet','ENet library (system/builtin)','builtin') @@ -319,9 +318,6 @@ if selected_platform in platform_list: if (env.use_ptrcall): env.Append(CPPFLAGS=['-DPTRCALL_ENABLED']); - if (env["builtin_zlib"]=='yes'): - env.Append(CPPPATH=['#drivers/builtin_zlib/zlib']) - # to test 64 bits compiltion # env.Append(CPPFLAGS=['-m64']) diff --git a/drivers/SCsub b/drivers/SCsub index bc0d948f41b..edab83cd869 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -15,8 +15,8 @@ SConscript('gles2/SCsub'); SConscript('gl_context/SCsub'); SConscript("png/SCsub"); -if (env["builtin_zlib"]=="yes"): - SConscript("builtin_zlib/SCsub"); +if ("builtin_zlib" in env and env["builtin_zlib"] == "yes"): + SConscript("zlib/SCsub"); if (env["platform"] == "windows"): SConscript("rtaudio/SCsub"); diff --git a/drivers/builtin_zlib/SCsub b/drivers/builtin_zlib/SCsub deleted file mode 100644 index e5c81c0b3b1..00000000000 --- a/drivers/builtin_zlib/SCsub +++ /dev/null @@ -1,22 +0,0 @@ -Import('env') - -zlib_sources = [ - - "builtin_zlib/zlib/adler32.c", - "builtin_zlib/zlib/compress.c", - "builtin_zlib/zlib/crc32.c", - "builtin_zlib/zlib/deflate.c", - "builtin_zlib/zlib/infback.c", - "builtin_zlib/zlib/inffast.c", - "builtin_zlib/zlib/inflate.c", - "builtin_zlib/zlib/inftrees.c", - "builtin_zlib/zlib/trees.c", - "builtin_zlib/zlib/uncompr.c", - "builtin_zlib/zlib/zutil.c", - ] - - -env.drivers_sources+=zlib_sources - -#env.add_source_files("core", png_sources) -Export('env') diff --git a/drivers/zlib/SCsub b/drivers/zlib/SCsub new file mode 100644 index 00000000000..d0bbcd452ba --- /dev/null +++ b/drivers/zlib/SCsub @@ -0,0 +1,24 @@ +Import('env') + +# Not cloning the env, the includes need to be accessible for core/ + +# Thirdparty source files +# No check here as already done in drivers/SCsub +thirdparty_dir = "#thirdparty/zlib/" +thirdparty_sources = [ + "adler32.c", + "compress.c", + "crc32.c", + "deflate.c", + "infback.c", + "inffast.c", + "inflate.c", + "inftrees.c", + "trees.c", + "uncompr.c", + "zutil.c", +] +thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] + +env.add_source_files(env.drivers_sources, thirdparty_sources) +env.Append(CPPPATH = [thirdparty_dir]) diff --git a/platform/android/detect.py b/platform/android/detect.py index 9087d5343e1..8d56dbcdaa1 100644 --- a/platform/android/detect.py +++ b/platform/android/detect.py @@ -34,7 +34,6 @@ def get_flags(): return [ ('tools', 'no'), - ('builtin_zlib', 'no'), ('openssl', 'builtin'), #use builtin openssl ] diff --git a/platform/bb10/detect.py b/platform/bb10/detect.py index 5aa68b36dcb..2b76aa34967 100644 --- a/platform/bb10/detect.py +++ b/platform/bb10/detect.py @@ -33,6 +33,7 @@ def get_flags(): return [ ('tools', 'no'), + ('builtin_zlib', 'yes'), ('module_theora_enabled', 'no'), ] diff --git a/platform/haiku/detect.py b/platform/haiku/detect.py index 8aa810e18d8..af997a57372 100644 --- a/platform/haiku/detect.py +++ b/platform/haiku/detect.py @@ -23,7 +23,6 @@ def get_opts(): def get_flags(): return [ - ('builtin_zlib', 'no'), ] def configure(env): diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py index 3de0ba0db9d..1be63891b16 100644 --- a/platform/iphone/detect.py +++ b/platform/iphone/detect.py @@ -38,6 +38,7 @@ def get_flags(): return [ ('tools', 'no'), ('webp', 'yes'), + ('builtin_zlib', 'yes'), ('openssl','builtin'), #use builtin openssl ] diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index 19427eff148..e1f91cf948c 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -26,6 +26,7 @@ def get_flags(): return [ ('tools', 'no'), + ('builtin_zlib', 'yes'), ('module_etc1_enabled', 'no'), ('module_mpc_enabled', 'no'), ('module_theora_enabled', 'no'), diff --git a/platform/osx/detect.py b/platform/osx/detect.py index 43ddfa0d1a6..2ade0978930 100644 --- a/platform/osx/detect.py +++ b/platform/osx/detect.py @@ -28,7 +28,6 @@ def get_opts(): def get_flags(): return [ - ('builtin_zlib', 'no'), ] diff --git a/platform/server/detect.py b/platform/server/detect.py index 543c88c5c24..2f6fb00e0d2 100644 --- a/platform/server/detect.py +++ b/platform/server/detect.py @@ -27,7 +27,6 @@ def get_opts(): def get_flags(): return [ - ('builtin_zlib', 'no'), ] diff --git a/platform/windows/detect.py b/platform/windows/detect.py index ce308a49c92..af9a0aca418 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -176,6 +176,7 @@ def get_opts(): def get_flags(): return [ + ('builtin_zlib', 'yes'), ('openssl','builtin'), #use builtin openssl ] diff --git a/platform/winrt/detect.py b/platform/winrt/detect.py index 7f220736d73..79fc3651e9c 100644 --- a/platform/winrt/detect.py +++ b/platform/winrt/detect.py @@ -29,6 +29,7 @@ def get_flags(): return [ ('tools', 'no'), + ('builtin_zlib', 'yes'), ('openssl', 'builtin'), ] diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 3ebefb640c8..0c14c29361f 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -68,7 +68,6 @@ def get_opts(): def get_flags(): return [ - ('builtin_zlib', 'no'), ("openssl", "system"), ('freetype','yes'), # use system freetype ('libpng', 'system'), diff --git a/thirdparty/README.md b/thirdparty/README.md index 841435b56ef..6ed346299b5 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -9,7 +9,7 @@ Files extracted from upstream source: -- all *.c files in the main directory +- all .c files in the main directory - the include/enet/ folder as enet/ - LICENSE file @@ -26,7 +26,7 @@ before the next update. Files extracted from upstream source: -- src/glew.c +- `src/glew.c` - include/GL/ as GL/ - LICENSE.txt @@ -39,7 +39,7 @@ Files extracted from upstream source: Files extracted from upstream source: -- jpgd.{c,h} +- `jpgd.{c,h}` ## libmpcdec @@ -63,8 +63,8 @@ Files extracted from upstream source: Files extracted from upstream source: -- src/\*.c -- include/ogg/\*.h in ogg/ +- `src/*.c` +- `include/ogg/*.h` in ogg/ - COPYING @@ -76,11 +76,10 @@ Files extracted from upstream source: Files extracted from upstream source: -- all .c and .h files of the main directory, except from: - * example.c - * pngtest.c +- all .c and .h files of the main directory, except from + `example.c` and `pngtest.c` - the arm/ folder -- scripts/pnglibconf.h.prebuilt as pnglibconf.h +- `scripts/pnglibconf.h.prebuilt` as `pnglibconf.h` ## libvorbis @@ -91,8 +90,8 @@ Files extracted from upstream source: Files extracted from upstream source: -- src/\* except from: lookups.pl, Makefile.\* -- include/vorbis/\*.h as vorbis/ +- `src/*` except from: `lookups.pl`, `Makefile.*` +- `include/vorbis/*.h` as vorbis/ - COPYING @@ -104,7 +103,7 @@ Files extracted from upstream source: Files extracted from the upstream source: -- src/\* except from: \*.am, \*.in, extras/, webp/extras.h +- `src/*` except from: .am and .in, files, extras/, `webp/extras.h` - AUTHORS, COPYING, PATENTS Important: The files `utils/bit_reader.{c,h}` have Godot-made @@ -132,7 +131,7 @@ TODO. Files extracted from upstream source: - all .c and .h files in src/ (both opus and opusfile), - except opus_demo.c + except `opus_demo.c` - all .h files in include/ (both opus and opusfile) - COPYING @@ -145,7 +144,7 @@ Files extracted from upstream source: Files extracted from upstream source: -- all .cpp and .h files apart from main.cpp +- all .cpp and .h files apart from `main.cpp` - LICENSE.TXT @@ -157,7 +156,7 @@ Files extracted from upstream source: Files extracted from upstream source: -- all of them: rg_etc1.{cpp,h} +- `rg_etc1.{cpp,h}` ## rtaudio @@ -168,7 +167,7 @@ Files extracted from upstream source: Files extracted from upstream source: -- RtAudio.{cpp,h} +- `RtAudio.{cpp,h}` ## squish @@ -193,3 +192,14 @@ Files extracted from upstream source: - all .c, .h in lib/ - all .h files in include/theora/ as theora/ - COPYING and LICENSE + + +## zlib + +- Upstream: http://www.zlib.net/ +- Version: 1.2.8 +- License: zlib + +Files extracted from upstream source: + +- all .c and .h files apart from `gz*` diff --git a/drivers/builtin_zlib/zlib/adler32.c b/thirdparty/zlib/adler32.c similarity index 100% rename from drivers/builtin_zlib/zlib/adler32.c rename to thirdparty/zlib/adler32.c diff --git a/drivers/builtin_zlib/zlib/compress.c b/thirdparty/zlib/compress.c similarity index 100% rename from drivers/builtin_zlib/zlib/compress.c rename to thirdparty/zlib/compress.c diff --git a/drivers/builtin_zlib/zlib/crc32.c b/thirdparty/zlib/crc32.c similarity index 100% rename from drivers/builtin_zlib/zlib/crc32.c rename to thirdparty/zlib/crc32.c diff --git a/drivers/builtin_zlib/zlib/crc32.h b/thirdparty/zlib/crc32.h similarity index 100% rename from drivers/builtin_zlib/zlib/crc32.h rename to thirdparty/zlib/crc32.h diff --git a/drivers/builtin_zlib/zlib/deflate.c b/thirdparty/zlib/deflate.c similarity index 100% rename from drivers/builtin_zlib/zlib/deflate.c rename to thirdparty/zlib/deflate.c diff --git a/drivers/builtin_zlib/zlib/deflate.h b/thirdparty/zlib/deflate.h similarity index 100% rename from drivers/builtin_zlib/zlib/deflate.h rename to thirdparty/zlib/deflate.h diff --git a/drivers/builtin_zlib/zlib/infback.c b/thirdparty/zlib/infback.c similarity index 100% rename from drivers/builtin_zlib/zlib/infback.c rename to thirdparty/zlib/infback.c diff --git a/drivers/builtin_zlib/zlib/inffast.c b/thirdparty/zlib/inffast.c similarity index 100% rename from drivers/builtin_zlib/zlib/inffast.c rename to thirdparty/zlib/inffast.c diff --git a/drivers/builtin_zlib/zlib/inffast.h b/thirdparty/zlib/inffast.h similarity index 100% rename from drivers/builtin_zlib/zlib/inffast.h rename to thirdparty/zlib/inffast.h diff --git a/drivers/builtin_zlib/zlib/inffixed.h b/thirdparty/zlib/inffixed.h similarity index 100% rename from drivers/builtin_zlib/zlib/inffixed.h rename to thirdparty/zlib/inffixed.h diff --git a/drivers/builtin_zlib/zlib/inflate.c b/thirdparty/zlib/inflate.c similarity index 100% rename from drivers/builtin_zlib/zlib/inflate.c rename to thirdparty/zlib/inflate.c diff --git a/drivers/builtin_zlib/zlib/inflate.h b/thirdparty/zlib/inflate.h similarity index 100% rename from drivers/builtin_zlib/zlib/inflate.h rename to thirdparty/zlib/inflate.h diff --git a/drivers/builtin_zlib/zlib/inftrees.c b/thirdparty/zlib/inftrees.c similarity index 100% rename from drivers/builtin_zlib/zlib/inftrees.c rename to thirdparty/zlib/inftrees.c diff --git a/drivers/builtin_zlib/zlib/inftrees.h b/thirdparty/zlib/inftrees.h similarity index 100% rename from drivers/builtin_zlib/zlib/inftrees.h rename to thirdparty/zlib/inftrees.h diff --git a/drivers/builtin_zlib/zlib/trees.c b/thirdparty/zlib/trees.c similarity index 100% rename from drivers/builtin_zlib/zlib/trees.c rename to thirdparty/zlib/trees.c diff --git a/drivers/builtin_zlib/zlib/trees.h b/thirdparty/zlib/trees.h similarity index 100% rename from drivers/builtin_zlib/zlib/trees.h rename to thirdparty/zlib/trees.h diff --git a/drivers/builtin_zlib/zlib/uncompr.c b/thirdparty/zlib/uncompr.c similarity index 100% rename from drivers/builtin_zlib/zlib/uncompr.c rename to thirdparty/zlib/uncompr.c diff --git a/drivers/builtin_zlib/zlib/zconf.h b/thirdparty/zlib/zconf.h similarity index 100% rename from drivers/builtin_zlib/zlib/zconf.h rename to thirdparty/zlib/zconf.h diff --git a/drivers/builtin_zlib/zlib/zlib.h b/thirdparty/zlib/zlib.h similarity index 100% rename from drivers/builtin_zlib/zlib/zlib.h rename to thirdparty/zlib/zlib.h diff --git a/drivers/builtin_zlib/zlib/zutil.c b/thirdparty/zlib/zutil.c similarity index 100% rename from drivers/builtin_zlib/zlib/zutil.c rename to thirdparty/zlib/zutil.c diff --git a/drivers/builtin_zlib/zlib/zutil.h b/thirdparty/zlib/zutil.h similarity index 100% rename from drivers/builtin_zlib/zlib/zutil.h rename to thirdparty/zlib/zutil.h From e6dc51a0f764dcd7cd07482c022c1e92e6a4da3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 14 Oct 2016 19:14:40 +0200 Subject: [PATCH 16/19] chibi: Move to a module --- drivers/SCsub | 1 - drivers/chibi/SCsub | 5 --- drivers/register_driver_types.cpp | 6 --- modules/chibi/SCsub | 7 ++++ modules/chibi/config.py | 6 +++ {drivers => modules}/chibi/cp_config.h | 0 {drivers => modules}/chibi/cp_envelope.cpp | 0 {drivers => modules}/chibi/cp_envelope.h | 0 .../chibi/cp_file_access_wrapper.h | 0 {drivers => modules}/chibi/cp_instrument.cpp | 0 {drivers => modules}/chibi/cp_instrument.h | 0 {drivers => modules}/chibi/cp_loader.h | 0 {drivers => modules}/chibi/cp_loader_it.cpp | 0 {drivers => modules}/chibi/cp_loader_it.h | 0 .../chibi/cp_loader_it_info.cpp | 0 .../chibi/cp_loader_it_instruments.cpp | 0 .../chibi/cp_loader_it_patterns.cpp | 0 .../chibi/cp_loader_it_samples.cpp | 0 {drivers => modules}/chibi/cp_loader_mod.cpp | 0 {drivers => modules}/chibi/cp_loader_mod.h | 0 {drivers => modules}/chibi/cp_loader_s3m.cpp | 0 {drivers => modules}/chibi/cp_loader_s3m.h | 0 {drivers => modules}/chibi/cp_loader_xm.cpp | 0 {drivers => modules}/chibi/cp_loader_xm.h | 0 {drivers => modules}/chibi/cp_mixer.h | 0 {drivers => modules}/chibi/cp_note.h | 0 {drivers => modules}/chibi/cp_order.h | 0 {drivers => modules}/chibi/cp_pattern.cpp | 0 {drivers => modules}/chibi/cp_pattern.h | 0 {drivers => modules}/chibi/cp_player_data.cpp | 0 {drivers => modules}/chibi/cp_player_data.h | 0 .../chibi/cp_player_data_control.cpp | 0 .../chibi/cp_player_data_effects.cpp | 0 .../chibi/cp_player_data_envelopes.cpp | 0 .../chibi/cp_player_data_events.cpp | 0 .../chibi/cp_player_data_filter.cpp | 0 .../chibi/cp_player_data_nna.cpp | 0 .../chibi/cp_player_data_notes.cpp | 0 .../chibi/cp_player_data_utils.cpp | 0 {drivers => modules}/chibi/cp_sample.cpp | 0 {drivers => modules}/chibi/cp_sample.h | 0 {drivers => modules}/chibi/cp_sample_defs.h | 0 .../chibi/cp_sample_manager.cpp | 0 .../chibi/cp_sample_manager.h | 0 {drivers => modules}/chibi/cp_song.cpp | 0 {drivers => modules}/chibi/cp_song.h | 0 {drivers => modules}/chibi/cp_tables.cpp | 0 {drivers => modules}/chibi/cp_tables.h | 0 .../chibi/event_stream_chibi.cpp | 0 .../chibi/event_stream_chibi.h | 0 modules/chibi/register_types.cpp | 41 +++++++++++++++++++ modules/chibi/register_types.h | 30 ++++++++++++++ 52 files changed, 84 insertions(+), 12 deletions(-) delete mode 100644 drivers/chibi/SCsub create mode 100644 modules/chibi/SCsub create mode 100644 modules/chibi/config.py rename {drivers => modules}/chibi/cp_config.h (100%) rename {drivers => modules}/chibi/cp_envelope.cpp (100%) rename {drivers => modules}/chibi/cp_envelope.h (100%) rename {drivers => modules}/chibi/cp_file_access_wrapper.h (100%) rename {drivers => modules}/chibi/cp_instrument.cpp (100%) rename {drivers => modules}/chibi/cp_instrument.h (100%) rename {drivers => modules}/chibi/cp_loader.h (100%) rename {drivers => modules}/chibi/cp_loader_it.cpp (100%) rename {drivers => modules}/chibi/cp_loader_it.h (100%) rename {drivers => modules}/chibi/cp_loader_it_info.cpp (100%) rename {drivers => modules}/chibi/cp_loader_it_instruments.cpp (100%) rename {drivers => modules}/chibi/cp_loader_it_patterns.cpp (100%) rename {drivers => modules}/chibi/cp_loader_it_samples.cpp (100%) rename {drivers => modules}/chibi/cp_loader_mod.cpp (100%) rename {drivers => modules}/chibi/cp_loader_mod.h (100%) rename {drivers => modules}/chibi/cp_loader_s3m.cpp (100%) rename {drivers => modules}/chibi/cp_loader_s3m.h (100%) rename {drivers => modules}/chibi/cp_loader_xm.cpp (100%) rename {drivers => modules}/chibi/cp_loader_xm.h (100%) rename {drivers => modules}/chibi/cp_mixer.h (100%) rename {drivers => modules}/chibi/cp_note.h (100%) rename {drivers => modules}/chibi/cp_order.h (100%) rename {drivers => modules}/chibi/cp_pattern.cpp (100%) rename {drivers => modules}/chibi/cp_pattern.h (100%) rename {drivers => modules}/chibi/cp_player_data.cpp (100%) rename {drivers => modules}/chibi/cp_player_data.h (100%) rename {drivers => modules}/chibi/cp_player_data_control.cpp (100%) rename {drivers => modules}/chibi/cp_player_data_effects.cpp (100%) rename {drivers => modules}/chibi/cp_player_data_envelopes.cpp (100%) rename {drivers => modules}/chibi/cp_player_data_events.cpp (100%) rename {drivers => modules}/chibi/cp_player_data_filter.cpp (100%) rename {drivers => modules}/chibi/cp_player_data_nna.cpp (100%) rename {drivers => modules}/chibi/cp_player_data_notes.cpp (100%) rename {drivers => modules}/chibi/cp_player_data_utils.cpp (100%) rename {drivers => modules}/chibi/cp_sample.cpp (100%) rename {drivers => modules}/chibi/cp_sample.h (100%) rename {drivers => modules}/chibi/cp_sample_defs.h (100%) rename {drivers => modules}/chibi/cp_sample_manager.cpp (100%) rename {drivers => modules}/chibi/cp_sample_manager.h (100%) rename {drivers => modules}/chibi/cp_song.cpp (100%) rename {drivers => modules}/chibi/cp_song.h (100%) rename {drivers => modules}/chibi/cp_tables.cpp (100%) rename {drivers => modules}/chibi/cp_tables.h (100%) rename {drivers => modules}/chibi/event_stream_chibi.cpp (100%) rename {drivers => modules}/chibi/event_stream_chibi.h (100%) create mode 100644 modules/chibi/register_types.cpp create mode 100644 modules/chibi/register_types.h diff --git a/drivers/SCsub b/drivers/SCsub index edab83cd869..4ae42a33d5d 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -21,7 +21,6 @@ if ("builtin_zlib" in env and env["builtin_zlib"] == "yes"): if (env["platform"] == "windows"): SConscript("rtaudio/SCsub"); SConscript("nrex/SCsub"); -SConscript("chibi/SCsub"); if (env["tools"]=="yes"): SConscript("convex_decomp/SCsub"); diff --git a/drivers/chibi/SCsub b/drivers/chibi/SCsub deleted file mode 100644 index 9fbb467baa1..00000000000 --- a/drivers/chibi/SCsub +++ /dev/null @@ -1,5 +0,0 @@ -Import('env') - -env.add_source_files(env.drivers_sources,"*.cpp") - -Export('env') diff --git a/drivers/register_driver_types.cpp b/drivers/register_driver_types.cpp index 31d53e0185a..7486d4f217d 100644 --- a/drivers/register_driver_types.cpp +++ b/drivers/register_driver_types.cpp @@ -31,7 +31,6 @@ #include "core/math/geometry.h" #include "png/image_loader_png.h" #include "png/resource_saver_png.h" -#include "chibi/event_stream_chibi.h" #ifdef TOOLS_ENABLED #include "convex_decomp/b2d_decompose.h" @@ -70,14 +69,9 @@ void unregister_core_driver_types() { void register_driver_types() { #ifdef TOOLS_ENABLED - Geometry::_decompose_func=b2d_decompose; #endif - - initialize_chibi(); } void unregister_driver_types() { - - finalize_chibi(); } diff --git a/modules/chibi/SCsub b/modules/chibi/SCsub new file mode 100644 index 00000000000..e39554977ab --- /dev/null +++ b/modules/chibi/SCsub @@ -0,0 +1,7 @@ +Import('env') +Import('env_modules') + +env_chibi = env_modules.Clone() + +# Godot source files +env_chibi.add_source_files(env.modules_sources, "*.cpp") diff --git a/modules/chibi/config.py b/modules/chibi/config.py new file mode 100644 index 00000000000..368e97e152c --- /dev/null +++ b/modules/chibi/config.py @@ -0,0 +1,6 @@ + +def can_build(platform): + return True + +def configure(env): + pass diff --git a/drivers/chibi/cp_config.h b/modules/chibi/cp_config.h similarity index 100% rename from drivers/chibi/cp_config.h rename to modules/chibi/cp_config.h diff --git a/drivers/chibi/cp_envelope.cpp b/modules/chibi/cp_envelope.cpp similarity index 100% rename from drivers/chibi/cp_envelope.cpp rename to modules/chibi/cp_envelope.cpp diff --git a/drivers/chibi/cp_envelope.h b/modules/chibi/cp_envelope.h similarity index 100% rename from drivers/chibi/cp_envelope.h rename to modules/chibi/cp_envelope.h diff --git a/drivers/chibi/cp_file_access_wrapper.h b/modules/chibi/cp_file_access_wrapper.h similarity index 100% rename from drivers/chibi/cp_file_access_wrapper.h rename to modules/chibi/cp_file_access_wrapper.h diff --git a/drivers/chibi/cp_instrument.cpp b/modules/chibi/cp_instrument.cpp similarity index 100% rename from drivers/chibi/cp_instrument.cpp rename to modules/chibi/cp_instrument.cpp diff --git a/drivers/chibi/cp_instrument.h b/modules/chibi/cp_instrument.h similarity index 100% rename from drivers/chibi/cp_instrument.h rename to modules/chibi/cp_instrument.h diff --git a/drivers/chibi/cp_loader.h b/modules/chibi/cp_loader.h similarity index 100% rename from drivers/chibi/cp_loader.h rename to modules/chibi/cp_loader.h diff --git a/drivers/chibi/cp_loader_it.cpp b/modules/chibi/cp_loader_it.cpp similarity index 100% rename from drivers/chibi/cp_loader_it.cpp rename to modules/chibi/cp_loader_it.cpp diff --git a/drivers/chibi/cp_loader_it.h b/modules/chibi/cp_loader_it.h similarity index 100% rename from drivers/chibi/cp_loader_it.h rename to modules/chibi/cp_loader_it.h diff --git a/drivers/chibi/cp_loader_it_info.cpp b/modules/chibi/cp_loader_it_info.cpp similarity index 100% rename from drivers/chibi/cp_loader_it_info.cpp rename to modules/chibi/cp_loader_it_info.cpp diff --git a/drivers/chibi/cp_loader_it_instruments.cpp b/modules/chibi/cp_loader_it_instruments.cpp similarity index 100% rename from drivers/chibi/cp_loader_it_instruments.cpp rename to modules/chibi/cp_loader_it_instruments.cpp diff --git a/drivers/chibi/cp_loader_it_patterns.cpp b/modules/chibi/cp_loader_it_patterns.cpp similarity index 100% rename from drivers/chibi/cp_loader_it_patterns.cpp rename to modules/chibi/cp_loader_it_patterns.cpp diff --git a/drivers/chibi/cp_loader_it_samples.cpp b/modules/chibi/cp_loader_it_samples.cpp similarity index 100% rename from drivers/chibi/cp_loader_it_samples.cpp rename to modules/chibi/cp_loader_it_samples.cpp diff --git a/drivers/chibi/cp_loader_mod.cpp b/modules/chibi/cp_loader_mod.cpp similarity index 100% rename from drivers/chibi/cp_loader_mod.cpp rename to modules/chibi/cp_loader_mod.cpp diff --git a/drivers/chibi/cp_loader_mod.h b/modules/chibi/cp_loader_mod.h similarity index 100% rename from drivers/chibi/cp_loader_mod.h rename to modules/chibi/cp_loader_mod.h diff --git a/drivers/chibi/cp_loader_s3m.cpp b/modules/chibi/cp_loader_s3m.cpp similarity index 100% rename from drivers/chibi/cp_loader_s3m.cpp rename to modules/chibi/cp_loader_s3m.cpp diff --git a/drivers/chibi/cp_loader_s3m.h b/modules/chibi/cp_loader_s3m.h similarity index 100% rename from drivers/chibi/cp_loader_s3m.h rename to modules/chibi/cp_loader_s3m.h diff --git a/drivers/chibi/cp_loader_xm.cpp b/modules/chibi/cp_loader_xm.cpp similarity index 100% rename from drivers/chibi/cp_loader_xm.cpp rename to modules/chibi/cp_loader_xm.cpp diff --git a/drivers/chibi/cp_loader_xm.h b/modules/chibi/cp_loader_xm.h similarity index 100% rename from drivers/chibi/cp_loader_xm.h rename to modules/chibi/cp_loader_xm.h diff --git a/drivers/chibi/cp_mixer.h b/modules/chibi/cp_mixer.h similarity index 100% rename from drivers/chibi/cp_mixer.h rename to modules/chibi/cp_mixer.h diff --git a/drivers/chibi/cp_note.h b/modules/chibi/cp_note.h similarity index 100% rename from drivers/chibi/cp_note.h rename to modules/chibi/cp_note.h diff --git a/drivers/chibi/cp_order.h b/modules/chibi/cp_order.h similarity index 100% rename from drivers/chibi/cp_order.h rename to modules/chibi/cp_order.h diff --git a/drivers/chibi/cp_pattern.cpp b/modules/chibi/cp_pattern.cpp similarity index 100% rename from drivers/chibi/cp_pattern.cpp rename to modules/chibi/cp_pattern.cpp diff --git a/drivers/chibi/cp_pattern.h b/modules/chibi/cp_pattern.h similarity index 100% rename from drivers/chibi/cp_pattern.h rename to modules/chibi/cp_pattern.h diff --git a/drivers/chibi/cp_player_data.cpp b/modules/chibi/cp_player_data.cpp similarity index 100% rename from drivers/chibi/cp_player_data.cpp rename to modules/chibi/cp_player_data.cpp diff --git a/drivers/chibi/cp_player_data.h b/modules/chibi/cp_player_data.h similarity index 100% rename from drivers/chibi/cp_player_data.h rename to modules/chibi/cp_player_data.h diff --git a/drivers/chibi/cp_player_data_control.cpp b/modules/chibi/cp_player_data_control.cpp similarity index 100% rename from drivers/chibi/cp_player_data_control.cpp rename to modules/chibi/cp_player_data_control.cpp diff --git a/drivers/chibi/cp_player_data_effects.cpp b/modules/chibi/cp_player_data_effects.cpp similarity index 100% rename from drivers/chibi/cp_player_data_effects.cpp rename to modules/chibi/cp_player_data_effects.cpp diff --git a/drivers/chibi/cp_player_data_envelopes.cpp b/modules/chibi/cp_player_data_envelopes.cpp similarity index 100% rename from drivers/chibi/cp_player_data_envelopes.cpp rename to modules/chibi/cp_player_data_envelopes.cpp diff --git a/drivers/chibi/cp_player_data_events.cpp b/modules/chibi/cp_player_data_events.cpp similarity index 100% rename from drivers/chibi/cp_player_data_events.cpp rename to modules/chibi/cp_player_data_events.cpp diff --git a/drivers/chibi/cp_player_data_filter.cpp b/modules/chibi/cp_player_data_filter.cpp similarity index 100% rename from drivers/chibi/cp_player_data_filter.cpp rename to modules/chibi/cp_player_data_filter.cpp diff --git a/drivers/chibi/cp_player_data_nna.cpp b/modules/chibi/cp_player_data_nna.cpp similarity index 100% rename from drivers/chibi/cp_player_data_nna.cpp rename to modules/chibi/cp_player_data_nna.cpp diff --git a/drivers/chibi/cp_player_data_notes.cpp b/modules/chibi/cp_player_data_notes.cpp similarity index 100% rename from drivers/chibi/cp_player_data_notes.cpp rename to modules/chibi/cp_player_data_notes.cpp diff --git a/drivers/chibi/cp_player_data_utils.cpp b/modules/chibi/cp_player_data_utils.cpp similarity index 100% rename from drivers/chibi/cp_player_data_utils.cpp rename to modules/chibi/cp_player_data_utils.cpp diff --git a/drivers/chibi/cp_sample.cpp b/modules/chibi/cp_sample.cpp similarity index 100% rename from drivers/chibi/cp_sample.cpp rename to modules/chibi/cp_sample.cpp diff --git a/drivers/chibi/cp_sample.h b/modules/chibi/cp_sample.h similarity index 100% rename from drivers/chibi/cp_sample.h rename to modules/chibi/cp_sample.h diff --git a/drivers/chibi/cp_sample_defs.h b/modules/chibi/cp_sample_defs.h similarity index 100% rename from drivers/chibi/cp_sample_defs.h rename to modules/chibi/cp_sample_defs.h diff --git a/drivers/chibi/cp_sample_manager.cpp b/modules/chibi/cp_sample_manager.cpp similarity index 100% rename from drivers/chibi/cp_sample_manager.cpp rename to modules/chibi/cp_sample_manager.cpp diff --git a/drivers/chibi/cp_sample_manager.h b/modules/chibi/cp_sample_manager.h similarity index 100% rename from drivers/chibi/cp_sample_manager.h rename to modules/chibi/cp_sample_manager.h diff --git a/drivers/chibi/cp_song.cpp b/modules/chibi/cp_song.cpp similarity index 100% rename from drivers/chibi/cp_song.cpp rename to modules/chibi/cp_song.cpp diff --git a/drivers/chibi/cp_song.h b/modules/chibi/cp_song.h similarity index 100% rename from drivers/chibi/cp_song.h rename to modules/chibi/cp_song.h diff --git a/drivers/chibi/cp_tables.cpp b/modules/chibi/cp_tables.cpp similarity index 100% rename from drivers/chibi/cp_tables.cpp rename to modules/chibi/cp_tables.cpp diff --git a/drivers/chibi/cp_tables.h b/modules/chibi/cp_tables.h similarity index 100% rename from drivers/chibi/cp_tables.h rename to modules/chibi/cp_tables.h diff --git a/drivers/chibi/event_stream_chibi.cpp b/modules/chibi/event_stream_chibi.cpp similarity index 100% rename from drivers/chibi/event_stream_chibi.cpp rename to modules/chibi/event_stream_chibi.cpp diff --git a/drivers/chibi/event_stream_chibi.h b/modules/chibi/event_stream_chibi.h similarity index 100% rename from drivers/chibi/event_stream_chibi.h rename to modules/chibi/event_stream_chibi.h diff --git a/modules/chibi/register_types.cpp b/modules/chibi/register_types.cpp new file mode 100644 index 00000000000..b2ba16fa03a --- /dev/null +++ b/modules/chibi/register_types.cpp @@ -0,0 +1,41 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "register_types.h" + +#include "event_stream_chibi.h" + +void register_chibi_types() { + + initialize_chibi(); +} + +void unregister_chibi_types() { + + finalize_chibi(); +} diff --git a/modules/chibi/register_types.h b/modules/chibi/register_types.h new file mode 100644 index 00000000000..159823b85d1 --- /dev/null +++ b/modules/chibi/register_types.h @@ -0,0 +1,30 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_chibi_types(); +void unregister_chibi_types(); From edbc0c0d0bed169b3c07ef0f504b97936f0dab37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 14 Oct 2016 21:57:43 +0200 Subject: [PATCH 17/19] freetype: Make it a module and split thirdparty library Comment out the weird workaround for building on Windows at it might not be needed anymore. Testing needed to confirm. --- SConstruct | 10 +-- drivers/SCsub | 3 - drivers/freetype/SCsub | 73 --------------- drivers/freetype/src/Jamfile | 19 ---- drivers/freetype/src/autofit/Jamfile | 53 ----------- drivers/freetype/src/base/Jamfile | 88 ------------------- drivers/freetype/src/bdf/Jamfile | 31 ------- drivers/freetype/src/cache/Jamfile | 37 -------- drivers/freetype/src/cff/Jamfile | 45 ---------- drivers/freetype/src/cid/Jamfile | 34 ------- drivers/freetype/src/gxvalid/Jamfile | 52 ----------- drivers/freetype/src/otvalid/Jamfile | 37 -------- drivers/freetype/src/pcf/Jamfile | 32 ------- drivers/freetype/src/pfr/Jamfile | 35 -------- drivers/freetype/src/psaux/Jamfile | 35 -------- drivers/freetype/src/pshinter/Jamfile | 34 ------- drivers/freetype/src/psnames/Jamfile | 31 ------- drivers/freetype/src/raster/Jamfile | 32 ------- drivers/freetype/src/sfnt/Jamfile | 40 --------- drivers/freetype/src/smooth/Jamfile | 32 ------- drivers/freetype/src/truetype/Jamfile | 37 -------- drivers/freetype/src/type1/Jamfile | 35 -------- drivers/freetype/src/type42/Jamfile | 32 ------- drivers/freetype/src/winfonts/Jamfile | 16 ---- modules/freetype/SCsub | 88 +++++++++++++++++++ modules/freetype/config.py | 6 ++ modules/freetype/register_types.cpp | 33 +++++++ modules/freetype/register_types.h | 30 +++++++ {drivers => modules}/freetype/winrtdef.h | 0 platform/osx/detect.py | 4 - platform/x11/detect.py | 11 +-- thirdparty/README.md | 15 +++- {drivers => thirdparty}/freetype/FTL.TXT | 0 {drivers => thirdparty}/freetype/LICENSE.TXT | 0 .../include/freetype/config/ftconfig.h | 0 .../include/freetype/config/ftheader.h | 0 .../include/freetype/config/ftmodule.h | 0 .../include/freetype/config/ftoption.h | 0 .../include/freetype/config/ftstdlib.h | 0 .../freetype/include/freetype/freetype.h | 0 .../freetype/include/freetype/ftadvanc.h | 0 .../freetype/include/freetype/ftautoh.h | 0 .../freetype/include/freetype/ftbbox.h | 0 .../freetype/include/freetype/ftbdf.h | 0 .../freetype/include/freetype/ftbitmap.h | 0 .../freetype/include/freetype/ftbzip2.h | 0 .../freetype/include/freetype/ftcache.h | 0 .../freetype/include/freetype/ftcffdrv.h | 0 .../freetype/include/freetype/ftchapters.h | 0 .../freetype/include/freetype/ftcid.h | 0 .../freetype/include/freetype/fterrdef.h | 0 .../freetype/include/freetype/fterrors.h | 0 .../freetype/include/freetype/ftfntfmt.h | 0 .../freetype/include/freetype/ftgasp.h | 0 .../freetype/include/freetype/ftglyph.h | 0 .../freetype/include/freetype/ftgxval.h | 0 .../freetype/include/freetype/ftgzip.h | 0 .../freetype/include/freetype/ftimage.h | 0 .../freetype/include/freetype/ftincrem.h | 0 .../freetype/include/freetype/ftlcdfil.h | 0 .../freetype/include/freetype/ftlist.h | 0 .../freetype/include/freetype/ftlzw.h | 0 .../freetype/include/freetype/ftmac.h | 0 .../freetype/include/freetype/ftmm.h | 0 .../freetype/include/freetype/ftmodapi.h | 0 .../freetype/include/freetype/ftmoderr.h | 0 .../freetype/include/freetype/ftotval.h | 0 .../freetype/include/freetype/ftoutln.h | 0 .../freetype/include/freetype/ftpfr.h | 0 .../freetype/include/freetype/ftrender.h | 0 .../freetype/include/freetype/ftsizes.h | 0 .../freetype/include/freetype/ftsnames.h | 0 .../freetype/include/freetype/ftstroke.h | 0 .../freetype/include/freetype/ftsynth.h | 0 .../freetype/include/freetype/ftsystem.h | 0 .../freetype/include/freetype/fttrigon.h | 0 .../freetype/include/freetype/ftttdrv.h | 0 .../freetype/include/freetype/fttypes.h | 0 .../freetype/include/freetype/ftwinfnt.h | 0 .../include/freetype/internal/autohint.h | 0 .../include/freetype/internal/ftcalc.h | 0 .../include/freetype/internal/ftdebug.h | 0 .../include/freetype/internal/ftdriver.h | 0 .../include/freetype/internal/ftgloadr.h | 0 .../include/freetype/internal/fthash.h | 0 .../include/freetype/internal/ftmemory.h | 0 .../include/freetype/internal/ftobjs.h | 0 .../include/freetype/internal/ftpic.h | 0 .../include/freetype/internal/ftrfork.h | 0 .../include/freetype/internal/ftserv.h | 0 .../include/freetype/internal/ftstream.h | 0 .../include/freetype/internal/fttrace.h | 0 .../include/freetype/internal/ftvalid.h | 0 .../include/freetype/internal/internal.h | 0 .../include/freetype/internal/psaux.h | 0 .../include/freetype/internal/pshints.h | 0 .../freetype/internal/services/svbdf.h | 0 .../freetype/internal/services/svcid.h | 0 .../freetype/internal/services/svfntfmt.h | 0 .../freetype/internal/services/svgldict.h | 0 .../freetype/internal/services/svgxval.h | 0 .../freetype/internal/services/svkern.h | 0 .../include/freetype/internal/services/svmm.h | 0 .../freetype/internal/services/svotval.h | 0 .../freetype/internal/services/svpfr.h | 0 .../freetype/internal/services/svpostnm.h | 0 .../freetype/internal/services/svprop.h | 0 .../freetype/internal/services/svpscmap.h | 0 .../freetype/internal/services/svpsinfo.h | 0 .../freetype/internal/services/svsfnt.h | 0 .../freetype/internal/services/svttcmap.h | 0 .../freetype/internal/services/svtteng.h | 0 .../freetype/internal/services/svttglyf.h | 0 .../freetype/internal/services/svwinfnt.h | 0 .../freetype/include/freetype/internal/sfnt.h | 0 .../include/freetype/internal/t1types.h | 0 .../include/freetype/internal/tttypes.h | 0 .../freetype/include/freetype/t1tables.h | 0 .../freetype/include/freetype/ttnameid.h | 0 .../freetype/include/freetype/tttables.h | 0 .../freetype/include/freetype/tttags.h | 0 .../freetype/include/freetype/ttunpat.h | 0 .../freetype/include/ft2build.h | 0 .../freetype/src/autofit/afangles.c | 0 .../freetype/src/autofit/afangles.h | 0 .../freetype/src/autofit/afblue.c | 0 .../freetype/src/autofit/afblue.cin | 0 .../freetype/src/autofit/afblue.dat | 0 .../freetype/src/autofit/afblue.h | 0 .../freetype/src/autofit/afblue.hin | 0 .../freetype/src/autofit/afcjk.c | 0 .../freetype/src/autofit/afcjk.h | 0 .../freetype/src/autofit/afcover.h | 0 .../freetype/src/autofit/afdummy.c | 0 .../freetype/src/autofit/afdummy.h | 0 .../freetype/src/autofit/aferrors.h | 0 .../freetype/src/autofit/afglobal.c | 0 .../freetype/src/autofit/afglobal.h | 0 .../freetype/src/autofit/afhints.c | 0 .../freetype/src/autofit/afhints.h | 0 .../freetype/src/autofit/afindic.c | 0 .../freetype/src/autofit/afindic.h | 0 .../freetype/src/autofit/aflatin.c | 0 .../freetype/src/autofit/aflatin.h | 0 .../freetype/src/autofit/aflatin2.c | 0 .../freetype/src/autofit/aflatin2.h | 0 .../freetype/src/autofit/afloader.c | 0 .../freetype/src/autofit/afloader.h | 0 .../freetype/src/autofit/afmodule.c | 0 .../freetype/src/autofit/afmodule.h | 0 .../freetype/src/autofit/afpic.c | 0 .../freetype/src/autofit/afpic.h | 0 .../freetype/src/autofit/afranges.c | 0 .../freetype/src/autofit/afranges.h | 0 .../freetype/src/autofit/afscript.h | 0 .../freetype/src/autofit/afshaper.c | 0 .../freetype/src/autofit/afshaper.h | 0 .../freetype/src/autofit/afstyles.h | 0 .../freetype/src/autofit/aftypes.h | 0 .../freetype/src/autofit/afwarp.c | 0 .../freetype/src/autofit/afwarp.h | 0 .../freetype/src/autofit/afwrtsys.h | 0 .../freetype/src/autofit/autofit.c | 0 .../freetype/src/autofit/module.mk | 0 .../freetype/src/autofit/rules.mk | 0 .../freetype/src/base/basepic.c | 0 .../freetype/src/base/basepic.h | 0 .../freetype/src/base/ftadvanc.c | 0 .../freetype/src/base/ftapi.c | 0 .../freetype/src/base/ftbase.c | 0 .../freetype/src/base/ftbase.h | 0 .../freetype/src/base/ftbbox.c | 0 .../freetype/src/base/ftbdf.c | 0 .../freetype/src/base/ftbitmap.c | 0 .../freetype/src/base/ftcalc.c | 0 .../freetype/src/base/ftcid.c | 0 .../freetype/src/base/ftdbgmem.c | 0 .../freetype/src/base/ftdebug.c | 0 .../freetype/src/base/ftfntfmt.c | 0 .../freetype/src/base/ftfstype.c | 0 .../freetype/src/base/ftgasp.c | 0 .../freetype/src/base/ftgloadr.c | 0 .../freetype/src/base/ftglyph.c | 0 .../freetype/src/base/ftgxval.c | 0 .../freetype/src/base/fthash.c | 0 .../freetype/src/base/ftinit.c | 0 .../freetype/src/base/ftlcdfil.c | 0 .../freetype/src/base/ftmac.c | 0 .../freetype/src/base/ftmm.c | 0 .../freetype/src/base/ftobjs.c | 0 .../freetype/src/base/ftotval.c | 0 .../freetype/src/base/ftoutln.c | 0 .../freetype/src/base/ftpatent.c | 0 .../freetype/src/base/ftpfr.c | 0 .../freetype/src/base/ftpic.c | 0 .../freetype/src/base/ftrfork.c | 0 .../freetype/src/base/ftsnames.c | 0 .../freetype/src/base/ftstream.c | 0 .../freetype/src/base/ftstroke.c | 0 .../freetype/src/base/ftsynth.c | 0 .../freetype/src/base/ftsystem.c | 0 .../freetype/src/base/fttrigon.c | 0 .../freetype/src/base/fttype1.c | 0 .../freetype/src/base/ftutil.c | 0 .../freetype/src/base/ftwinfnt.c | 0 .../freetype/src/base/md5.c | 0 .../freetype/src/base/md5.h | 0 .../freetype/src/base/rules.mk | 0 .../freetype/src/bdf/README | 0 .../freetype/src/bdf/bdf.c | 0 .../freetype/src/bdf/bdf.h | 0 .../freetype/src/bdf/bdfdrivr.c | 0 .../freetype/src/bdf/bdfdrivr.h | 0 .../freetype/src/bdf/bdferror.h | 0 .../freetype/src/bdf/bdflib.c | 0 .../freetype/src/bdf/module.mk | 0 .../freetype/src/bdf/rules.mk | 0 .../freetype/src/cache/ftcache.c | 0 .../freetype/src/cache/ftcbasic.c | 0 .../freetype/src/cache/ftccache.c | 0 .../freetype/src/cache/ftccache.h | 0 .../freetype/src/cache/ftccback.h | 0 .../freetype/src/cache/ftccmap.c | 0 .../freetype/src/cache/ftcerror.h | 0 .../freetype/src/cache/ftcglyph.c | 0 .../freetype/src/cache/ftcglyph.h | 0 .../freetype/src/cache/ftcimage.c | 0 .../freetype/src/cache/ftcimage.h | 0 .../freetype/src/cache/ftcmanag.c | 0 .../freetype/src/cache/ftcmanag.h | 0 .../freetype/src/cache/ftcmru.c | 0 .../freetype/src/cache/ftcmru.h | 0 .../freetype/src/cache/ftcsbits.c | 0 .../freetype/src/cache/ftcsbits.h | 0 .../freetype/src/cache/rules.mk | 0 .../freetype/src/cff/cf2arrst.c | 0 .../freetype/src/cff/cf2arrst.h | 0 .../freetype/src/cff/cf2blues.c | 0 .../freetype/src/cff/cf2blues.h | 0 .../freetype/src/cff/cf2error.c | 0 .../freetype/src/cff/cf2error.h | 0 .../freetype/src/cff/cf2fixed.h | 0 .../freetype/src/cff/cf2font.c | 0 .../freetype/src/cff/cf2font.h | 0 .../freetype/src/cff/cf2ft.c | 0 .../freetype/src/cff/cf2ft.h | 0 .../freetype/src/cff/cf2glue.h | 0 .../freetype/src/cff/cf2hints.c | 0 .../freetype/src/cff/cf2hints.h | 0 .../freetype/src/cff/cf2intrp.c | 0 .../freetype/src/cff/cf2intrp.h | 0 .../freetype/src/cff/cf2read.c | 0 .../freetype/src/cff/cf2read.h | 0 .../freetype/src/cff/cf2stack.c | 0 .../freetype/src/cff/cf2stack.h | 0 .../freetype/src/cff/cf2types.h | 0 .../freetype/src/cff/cff.c | 0 .../freetype/src/cff/cffcmap.c | 0 .../freetype/src/cff/cffcmap.h | 0 .../freetype/src/cff/cffdrivr.c | 0 .../freetype/src/cff/cffdrivr.h | 0 .../freetype/src/cff/cfferrs.h | 0 .../freetype/src/cff/cffgload.c | 0 .../freetype/src/cff/cffgload.h | 0 .../freetype/src/cff/cffload.c | 0 .../freetype/src/cff/cffload.h | 0 .../freetype/src/cff/cffobjs.c | 0 .../freetype/src/cff/cffobjs.h | 0 .../freetype/src/cff/cffparse.c | 0 .../freetype/src/cff/cffparse.h | 0 .../freetype/src/cff/cffpic.c | 0 .../freetype/src/cff/cffpic.h | 0 .../freetype/src/cff/cfftoken.h | 0 .../freetype/src/cff/cfftypes.h | 0 .../freetype/src/cff/module.mk | 0 .../freetype/src/cff/rules.mk | 0 .../freetype/src/cid/ciderrs.h | 0 .../freetype/src/cid/cidgload.c | 0 .../freetype/src/cid/cidgload.h | 0 .../freetype/src/cid/cidload.c | 0 .../freetype/src/cid/cidload.h | 0 .../freetype/src/cid/cidobjs.c | 0 .../freetype/src/cid/cidobjs.h | 0 .../freetype/src/cid/cidparse.c | 0 .../freetype/src/cid/cidparse.h | 0 .../freetype/src/cid/cidriver.c | 0 .../freetype/src/cid/cidriver.h | 0 .../freetype/src/cid/cidtoken.h | 0 .../freetype/src/cid/module.mk | 0 .../freetype/src/cid/rules.mk | 0 .../freetype/src/cid/type1cid.c | 0 .../freetype/src/gxvalid/README | 0 .../freetype/src/gxvalid/gxvalid.c | 0 .../freetype/src/gxvalid/gxvalid.h | 0 .../freetype/src/gxvalid/gxvbsln.c | 0 .../freetype/src/gxvalid/gxvcommn.c | 0 .../freetype/src/gxvalid/gxvcommn.h | 0 .../freetype/src/gxvalid/gxverror.h | 0 .../freetype/src/gxvalid/gxvfeat.c | 0 .../freetype/src/gxvalid/gxvfeat.h | 0 .../freetype/src/gxvalid/gxvfgen.c | 0 .../freetype/src/gxvalid/gxvjust.c | 0 .../freetype/src/gxvalid/gxvkern.c | 0 .../freetype/src/gxvalid/gxvlcar.c | 0 .../freetype/src/gxvalid/gxvmod.c | 0 .../freetype/src/gxvalid/gxvmod.h | 0 .../freetype/src/gxvalid/gxvmort.c | 0 .../freetype/src/gxvalid/gxvmort.h | 0 .../freetype/src/gxvalid/gxvmort0.c | 0 .../freetype/src/gxvalid/gxvmort1.c | 0 .../freetype/src/gxvalid/gxvmort2.c | 0 .../freetype/src/gxvalid/gxvmort4.c | 0 .../freetype/src/gxvalid/gxvmort5.c | 0 .../freetype/src/gxvalid/gxvmorx.c | 0 .../freetype/src/gxvalid/gxvmorx.h | 0 .../freetype/src/gxvalid/gxvmorx0.c | 0 .../freetype/src/gxvalid/gxvmorx1.c | 0 .../freetype/src/gxvalid/gxvmorx2.c | 0 .../freetype/src/gxvalid/gxvmorx4.c | 0 .../freetype/src/gxvalid/gxvmorx5.c | 0 .../freetype/src/gxvalid/gxvopbd.c | 0 .../freetype/src/gxvalid/gxvprop.c | 0 .../freetype/src/gxvalid/gxvtrak.c | 0 .../freetype/src/gxvalid/module.mk | 0 .../freetype/src/gxvalid/rules.mk | 0 .../freetype/src/otvalid/module.mk | 0 .../freetype/src/otvalid/otvalid.c | 0 .../freetype/src/otvalid/otvalid.h | 0 .../freetype/src/otvalid/otvbase.c | 0 .../freetype/src/otvalid/otvcommn.c | 0 .../freetype/src/otvalid/otvcommn.h | 0 .../freetype/src/otvalid/otverror.h | 0 .../freetype/src/otvalid/otvgdef.c | 0 .../freetype/src/otvalid/otvgpos.c | 0 .../freetype/src/otvalid/otvgpos.h | 0 .../freetype/src/otvalid/otvgsub.c | 0 .../freetype/src/otvalid/otvjstf.c | 0 .../freetype/src/otvalid/otvmath.c | 0 .../freetype/src/otvalid/otvmod.c | 0 .../freetype/src/otvalid/otvmod.h | 0 .../freetype/src/otvalid/rules.mk | 0 .../freetype/src/pcf/README | 0 .../freetype/src/pcf/module.mk | 0 .../freetype/src/pcf/pcf.c | 0 .../freetype/src/pcf/pcf.h | 0 .../freetype/src/pcf/pcfdrivr.c | 0 .../freetype/src/pcf/pcfdrivr.h | 0 .../freetype/src/pcf/pcferror.h | 0 .../freetype/src/pcf/pcfread.c | 0 .../freetype/src/pcf/pcfread.h | 0 .../freetype/src/pcf/pcfutil.c | 0 .../freetype/src/pcf/pcfutil.h | 0 .../freetype/src/pcf/rules.mk | 0 .../freetype/src/pfr/module.mk | 0 .../freetype/src/pfr/pfr.c | 0 .../freetype/src/pfr/pfrcmap.c | 0 .../freetype/src/pfr/pfrcmap.h | 0 .../freetype/src/pfr/pfrdrivr.c | 0 .../freetype/src/pfr/pfrdrivr.h | 0 .../freetype/src/pfr/pfrerror.h | 0 .../freetype/src/pfr/pfrgload.c | 0 .../freetype/src/pfr/pfrgload.h | 0 .../freetype/src/pfr/pfrload.c | 0 .../freetype/src/pfr/pfrload.h | 0 .../freetype/src/pfr/pfrobjs.c | 0 .../freetype/src/pfr/pfrobjs.h | 0 .../freetype/src/pfr/pfrsbit.c | 0 .../freetype/src/pfr/pfrsbit.h | 0 .../freetype/src/pfr/pfrtypes.h | 0 .../freetype/src/pfr/rules.mk | 0 .../freetype/src/psaux/afmparse.c | 0 .../freetype/src/psaux/afmparse.h | 0 .../freetype/src/psaux/module.mk | 0 .../freetype/src/psaux/psaux.c | 0 .../freetype/src/psaux/psauxerr.h | 0 .../freetype/src/psaux/psauxmod.c | 0 .../freetype/src/psaux/psauxmod.h | 0 .../freetype/src/psaux/psconv.c | 0 .../freetype/src/psaux/psconv.h | 0 .../freetype/src/psaux/psobjs.c | 0 .../freetype/src/psaux/psobjs.h | 0 .../freetype/src/psaux/rules.mk | 0 .../freetype/src/psaux/t1cmap.c | 0 .../freetype/src/psaux/t1cmap.h | 0 .../freetype/src/psaux/t1decode.c | 0 .../freetype/src/psaux/t1decode.h | 0 .../freetype/src/pshinter/module.mk | 0 .../freetype/src/pshinter/pshalgo.c | 0 .../freetype/src/pshinter/pshalgo.h | 0 .../freetype/src/pshinter/pshglob.c | 0 .../freetype/src/pshinter/pshglob.h | 0 .../freetype/src/pshinter/pshinter.c | 0 .../freetype/src/pshinter/pshmod.c | 0 .../freetype/src/pshinter/pshmod.h | 0 .../freetype/src/pshinter/pshnterr.h | 0 .../freetype/src/pshinter/pshpic.c | 0 .../freetype/src/pshinter/pshpic.h | 0 .../freetype/src/pshinter/pshrec.c | 0 .../freetype/src/pshinter/pshrec.h | 0 .../freetype/src/pshinter/rules.mk | 0 .../freetype/src/psnames/module.mk | 0 .../freetype/src/psnames/psmodule.c | 0 .../freetype/src/psnames/psmodule.h | 0 .../freetype/src/psnames/psnamerr.h | 0 .../freetype/src/psnames/psnames.c | 0 .../freetype/src/psnames/pspic.c | 0 .../freetype/src/psnames/pspic.h | 0 .../freetype/src/psnames/pstables.h | 0 .../freetype/src/psnames/rules.mk | 0 .../freetype/src/raster/ftmisc.h | 0 .../freetype/src/raster/ftraster.c | 0 .../freetype/src/raster/ftraster.h | 0 .../freetype/src/raster/ftrend1.c | 0 .../freetype/src/raster/ftrend1.h | 0 .../freetype/src/raster/module.mk | 0 .../freetype/src/raster/raster.c | 0 .../freetype/src/raster/rasterrs.h | 0 .../freetype/src/raster/rastpic.c | 0 .../freetype/src/raster/rastpic.h | 0 .../freetype/src/raster/rules.mk | 0 .../freetype/src/sfnt/module.mk | 0 .../freetype/src/sfnt/pngshim.c | 0 .../freetype/src/sfnt/pngshim.h | 0 .../freetype/src/sfnt/rules.mk | 0 .../freetype/src/sfnt/sfdriver.c | 0 .../freetype/src/sfnt/sfdriver.h | 0 .../freetype/src/sfnt/sferrors.h | 0 .../freetype/src/sfnt/sfnt.c | 0 .../freetype/src/sfnt/sfntpic.c | 0 .../freetype/src/sfnt/sfntpic.h | 0 .../freetype/src/sfnt/sfobjs.c | 0 .../freetype/src/sfnt/sfobjs.h | 0 .../freetype/src/sfnt/ttbdf.c | 0 .../freetype/src/sfnt/ttbdf.h | 0 .../freetype/src/sfnt/ttcmap.c | 0 .../freetype/src/sfnt/ttcmap.h | 0 .../freetype/src/sfnt/ttcmapc.h | 0 .../freetype/src/sfnt/ttkern.c | 0 .../freetype/src/sfnt/ttkern.h | 0 .../freetype/src/sfnt/ttload.c | 0 .../freetype/src/sfnt/ttload.h | 0 .../freetype/src/sfnt/ttmtx.c | 0 .../freetype/src/sfnt/ttmtx.h | 0 .../freetype/src/sfnt/ttpost.c | 0 .../freetype/src/sfnt/ttpost.h | 0 .../freetype/src/sfnt/ttsbit.c | 0 .../freetype/src/sfnt/ttsbit.h | 0 .../freetype/src/smooth/ftgrays.c | 0 .../freetype/src/smooth/ftgrays.h | 0 .../freetype/src/smooth/ftsmerrs.h | 0 .../freetype/src/smooth/ftsmooth.c | 0 .../freetype/src/smooth/ftsmooth.h | 0 .../freetype/src/smooth/ftspic.c | 0 .../freetype/src/smooth/ftspic.h | 0 .../freetype/src/smooth/module.mk | 0 .../freetype/src/smooth/rules.mk | 0 .../freetype/src/smooth/smooth.c | 0 .../freetype/src/truetype/module.mk | 0 .../freetype/src/truetype/rules.mk | 0 .../freetype/src/truetype/truetype.c | 0 .../freetype/src/truetype/ttdriver.c | 0 .../freetype/src/truetype/ttdriver.h | 0 .../freetype/src/truetype/tterrors.h | 0 .../freetype/src/truetype/ttgload.c | 0 .../freetype/src/truetype/ttgload.h | 0 .../freetype/src/truetype/ttgxvar.c | 0 .../freetype/src/truetype/ttgxvar.h | 0 .../freetype/src/truetype/ttinterp.c | 0 .../freetype/src/truetype/ttinterp.h | 0 .../freetype/src/truetype/ttobjs.c | 0 .../freetype/src/truetype/ttobjs.h | 0 .../freetype/src/truetype/ttpic.c | 0 .../freetype/src/truetype/ttpic.h | 0 .../freetype/src/truetype/ttpload.c | 0 .../freetype/src/truetype/ttpload.h | 0 .../freetype/src/truetype/ttsubpix.c | 0 .../freetype/src/truetype/ttsubpix.h | 0 .../freetype/src/type1/module.mk | 0 .../freetype/src/type1/rules.mk | 0 .../freetype/src/type1/t1afm.c | 0 .../freetype/src/type1/t1afm.h | 0 .../freetype/src/type1/t1driver.c | 0 .../freetype/src/type1/t1driver.h | 0 .../freetype/src/type1/t1errors.h | 0 .../freetype/src/type1/t1gload.c | 0 .../freetype/src/type1/t1gload.h | 0 .../freetype/src/type1/t1load.c | 0 .../freetype/src/type1/t1load.h | 0 .../freetype/src/type1/t1objs.c | 0 .../freetype/src/type1/t1objs.h | 0 .../freetype/src/type1/t1parse.c | 0 .../freetype/src/type1/t1parse.h | 0 .../freetype/src/type1/t1tokens.h | 0 .../freetype/src/type1/type1.c | 0 .../freetype/src/type42/module.mk | 0 .../freetype/src/type42/rules.mk | 0 .../freetype/src/type42/t42drivr.c | 0 .../freetype/src/type42/t42drivr.h | 0 .../freetype/src/type42/t42error.h | 0 .../freetype/src/type42/t42objs.c | 0 .../freetype/src/type42/t42objs.h | 0 .../freetype/src/type42/t42parse.c | 0 .../freetype/src/type42/t42parse.h | 0 .../freetype/src/type42/t42types.h | 0 .../freetype/src/type42/type42.c | 0 .../freetype/src/winfonts/fnterrs.h | 0 .../freetype/src/winfonts/module.mk | 0 .../freetype/src/winfonts/rules.mk | 0 .../freetype/src/winfonts/winfnt.c | 0 .../freetype/src/winfonts/winfnt.h | 0 510 files changed, 178 insertions(+), 882 deletions(-) delete mode 100644 drivers/freetype/SCsub delete mode 100644 drivers/freetype/src/Jamfile delete mode 100644 drivers/freetype/src/autofit/Jamfile delete mode 100644 drivers/freetype/src/base/Jamfile delete mode 100644 drivers/freetype/src/bdf/Jamfile delete mode 100644 drivers/freetype/src/cache/Jamfile delete mode 100644 drivers/freetype/src/cff/Jamfile delete mode 100644 drivers/freetype/src/cid/Jamfile delete mode 100644 drivers/freetype/src/gxvalid/Jamfile delete mode 100644 drivers/freetype/src/otvalid/Jamfile delete mode 100644 drivers/freetype/src/pcf/Jamfile delete mode 100644 drivers/freetype/src/pfr/Jamfile delete mode 100644 drivers/freetype/src/psaux/Jamfile delete mode 100644 drivers/freetype/src/pshinter/Jamfile delete mode 100644 drivers/freetype/src/psnames/Jamfile delete mode 100644 drivers/freetype/src/raster/Jamfile delete mode 100644 drivers/freetype/src/sfnt/Jamfile delete mode 100644 drivers/freetype/src/smooth/Jamfile delete mode 100644 drivers/freetype/src/truetype/Jamfile delete mode 100644 drivers/freetype/src/type1/Jamfile delete mode 100644 drivers/freetype/src/type42/Jamfile delete mode 100644 drivers/freetype/src/winfonts/Jamfile create mode 100644 modules/freetype/SCsub create mode 100644 modules/freetype/config.py create mode 100644 modules/freetype/register_types.cpp create mode 100644 modules/freetype/register_types.h rename {drivers => modules}/freetype/winrtdef.h (100%) rename {drivers => thirdparty}/freetype/FTL.TXT (100%) rename {drivers => thirdparty}/freetype/LICENSE.TXT (100%) rename {drivers => thirdparty}/freetype/include/freetype/config/ftconfig.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/config/ftheader.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/config/ftmodule.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/config/ftoption.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/config/ftstdlib.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/freetype.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftadvanc.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftautoh.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftbbox.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftbdf.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftbitmap.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftbzip2.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftcache.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftcffdrv.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftchapters.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftcid.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/fterrdef.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/fterrors.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftfntfmt.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftgasp.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftglyph.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftgxval.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftgzip.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftimage.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftincrem.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftlcdfil.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftlist.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftlzw.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftmac.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftmm.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftmodapi.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftmoderr.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftotval.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftoutln.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftpfr.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftrender.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftsizes.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftsnames.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftstroke.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftsynth.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftsystem.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/fttrigon.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftttdrv.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/fttypes.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ftwinfnt.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/autohint.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/ftcalc.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/ftdebug.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/ftdriver.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/ftgloadr.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/fthash.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/ftmemory.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/ftobjs.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/ftpic.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/ftrfork.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/ftserv.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/ftstream.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/fttrace.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/ftvalid.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/internal.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/psaux.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/pshints.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/services/svbdf.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/services/svcid.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/services/svfntfmt.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/services/svgldict.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/services/svgxval.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/services/svkern.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/services/svmm.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/services/svotval.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/services/svpfr.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/services/svpostnm.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/services/svprop.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/services/svpscmap.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/services/svpsinfo.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/services/svsfnt.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/services/svttcmap.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/services/svtteng.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/services/svttglyf.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/services/svwinfnt.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/sfnt.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/t1types.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/internal/tttypes.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/t1tables.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ttnameid.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/tttables.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/tttags.h (100%) rename {drivers => thirdparty}/freetype/include/freetype/ttunpat.h (100%) rename {drivers => thirdparty}/freetype/include/ft2build.h (100%) rename {drivers => thirdparty}/freetype/src/autofit/afangles.c (100%) rename {drivers => thirdparty}/freetype/src/autofit/afangles.h (100%) rename {drivers => thirdparty}/freetype/src/autofit/afblue.c (100%) rename {drivers => thirdparty}/freetype/src/autofit/afblue.cin (100%) rename {drivers => thirdparty}/freetype/src/autofit/afblue.dat (100%) rename {drivers => thirdparty}/freetype/src/autofit/afblue.h (100%) rename {drivers => thirdparty}/freetype/src/autofit/afblue.hin (100%) rename {drivers => thirdparty}/freetype/src/autofit/afcjk.c (100%) rename {drivers => thirdparty}/freetype/src/autofit/afcjk.h (100%) rename {drivers => thirdparty}/freetype/src/autofit/afcover.h (100%) rename {drivers => thirdparty}/freetype/src/autofit/afdummy.c (100%) rename {drivers => thirdparty}/freetype/src/autofit/afdummy.h (100%) rename {drivers => thirdparty}/freetype/src/autofit/aferrors.h (100%) rename {drivers => thirdparty}/freetype/src/autofit/afglobal.c (100%) rename {drivers => thirdparty}/freetype/src/autofit/afglobal.h (100%) rename {drivers => thirdparty}/freetype/src/autofit/afhints.c (100%) rename {drivers => thirdparty}/freetype/src/autofit/afhints.h (100%) rename {drivers => thirdparty}/freetype/src/autofit/afindic.c (100%) rename {drivers => thirdparty}/freetype/src/autofit/afindic.h (100%) rename {drivers => thirdparty}/freetype/src/autofit/aflatin.c (100%) rename {drivers => thirdparty}/freetype/src/autofit/aflatin.h (100%) rename {drivers => thirdparty}/freetype/src/autofit/aflatin2.c (100%) rename {drivers => thirdparty}/freetype/src/autofit/aflatin2.h (100%) rename {drivers => thirdparty}/freetype/src/autofit/afloader.c (100%) rename {drivers => thirdparty}/freetype/src/autofit/afloader.h (100%) rename {drivers => thirdparty}/freetype/src/autofit/afmodule.c (100%) rename {drivers => thirdparty}/freetype/src/autofit/afmodule.h (100%) rename {drivers => thirdparty}/freetype/src/autofit/afpic.c (100%) rename {drivers => thirdparty}/freetype/src/autofit/afpic.h (100%) rename {drivers => thirdparty}/freetype/src/autofit/afranges.c (100%) rename {drivers => thirdparty}/freetype/src/autofit/afranges.h (100%) rename {drivers => thirdparty}/freetype/src/autofit/afscript.h (100%) rename {drivers => thirdparty}/freetype/src/autofit/afshaper.c (100%) rename {drivers => thirdparty}/freetype/src/autofit/afshaper.h (100%) rename {drivers => thirdparty}/freetype/src/autofit/afstyles.h (100%) rename {drivers => thirdparty}/freetype/src/autofit/aftypes.h (100%) rename {drivers => thirdparty}/freetype/src/autofit/afwarp.c (100%) rename {drivers => thirdparty}/freetype/src/autofit/afwarp.h (100%) rename {drivers => thirdparty}/freetype/src/autofit/afwrtsys.h (100%) rename {drivers => thirdparty}/freetype/src/autofit/autofit.c (100%) rename {drivers => thirdparty}/freetype/src/autofit/module.mk (100%) rename {drivers => thirdparty}/freetype/src/autofit/rules.mk (100%) rename {drivers => thirdparty}/freetype/src/base/basepic.c (100%) rename {drivers => thirdparty}/freetype/src/base/basepic.h (100%) rename {drivers => thirdparty}/freetype/src/base/ftadvanc.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftapi.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftbase.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftbase.h (100%) rename {drivers => thirdparty}/freetype/src/base/ftbbox.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftbdf.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftbitmap.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftcalc.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftcid.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftdbgmem.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftdebug.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftfntfmt.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftfstype.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftgasp.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftgloadr.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftglyph.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftgxval.c (100%) rename {drivers => thirdparty}/freetype/src/base/fthash.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftinit.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftlcdfil.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftmac.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftmm.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftobjs.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftotval.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftoutln.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftpatent.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftpfr.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftpic.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftrfork.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftsnames.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftstream.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftstroke.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftsynth.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftsystem.c (100%) rename {drivers => thirdparty}/freetype/src/base/fttrigon.c (100%) rename {drivers => thirdparty}/freetype/src/base/fttype1.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftutil.c (100%) rename {drivers => thirdparty}/freetype/src/base/ftwinfnt.c (100%) rename {drivers => thirdparty}/freetype/src/base/md5.c (100%) rename {drivers => thirdparty}/freetype/src/base/md5.h (100%) rename {drivers => thirdparty}/freetype/src/base/rules.mk (100%) rename {drivers => thirdparty}/freetype/src/bdf/README (100%) rename {drivers => thirdparty}/freetype/src/bdf/bdf.c (100%) rename {drivers => thirdparty}/freetype/src/bdf/bdf.h (100%) rename {drivers => thirdparty}/freetype/src/bdf/bdfdrivr.c (100%) rename {drivers => thirdparty}/freetype/src/bdf/bdfdrivr.h (100%) rename {drivers => thirdparty}/freetype/src/bdf/bdferror.h (100%) rename {drivers => thirdparty}/freetype/src/bdf/bdflib.c (100%) rename {drivers => thirdparty}/freetype/src/bdf/module.mk (100%) rename {drivers => thirdparty}/freetype/src/bdf/rules.mk (100%) rename {drivers => thirdparty}/freetype/src/cache/ftcache.c (100%) rename {drivers => thirdparty}/freetype/src/cache/ftcbasic.c (100%) rename {drivers => thirdparty}/freetype/src/cache/ftccache.c (100%) rename {drivers => thirdparty}/freetype/src/cache/ftccache.h (100%) rename {drivers => thirdparty}/freetype/src/cache/ftccback.h (100%) rename {drivers => thirdparty}/freetype/src/cache/ftccmap.c (100%) rename {drivers => thirdparty}/freetype/src/cache/ftcerror.h (100%) rename {drivers => thirdparty}/freetype/src/cache/ftcglyph.c (100%) rename {drivers => thirdparty}/freetype/src/cache/ftcglyph.h (100%) rename {drivers => thirdparty}/freetype/src/cache/ftcimage.c (100%) rename {drivers => thirdparty}/freetype/src/cache/ftcimage.h (100%) rename {drivers => thirdparty}/freetype/src/cache/ftcmanag.c (100%) rename {drivers => thirdparty}/freetype/src/cache/ftcmanag.h (100%) rename {drivers => thirdparty}/freetype/src/cache/ftcmru.c (100%) rename {drivers => thirdparty}/freetype/src/cache/ftcmru.h (100%) rename {drivers => thirdparty}/freetype/src/cache/ftcsbits.c (100%) rename {drivers => thirdparty}/freetype/src/cache/ftcsbits.h (100%) rename {drivers => thirdparty}/freetype/src/cache/rules.mk (100%) rename {drivers => thirdparty}/freetype/src/cff/cf2arrst.c (100%) rename {drivers => thirdparty}/freetype/src/cff/cf2arrst.h (100%) rename {drivers => thirdparty}/freetype/src/cff/cf2blues.c (100%) rename {drivers => thirdparty}/freetype/src/cff/cf2blues.h (100%) rename {drivers => thirdparty}/freetype/src/cff/cf2error.c (100%) rename {drivers => thirdparty}/freetype/src/cff/cf2error.h (100%) rename {drivers => thirdparty}/freetype/src/cff/cf2fixed.h (100%) rename {drivers => thirdparty}/freetype/src/cff/cf2font.c (100%) rename {drivers => thirdparty}/freetype/src/cff/cf2font.h (100%) rename {drivers => thirdparty}/freetype/src/cff/cf2ft.c (100%) rename {drivers => thirdparty}/freetype/src/cff/cf2ft.h (100%) rename {drivers => thirdparty}/freetype/src/cff/cf2glue.h (100%) rename {drivers => thirdparty}/freetype/src/cff/cf2hints.c (100%) rename {drivers => thirdparty}/freetype/src/cff/cf2hints.h (100%) rename {drivers => thirdparty}/freetype/src/cff/cf2intrp.c (100%) rename {drivers => thirdparty}/freetype/src/cff/cf2intrp.h (100%) rename {drivers => thirdparty}/freetype/src/cff/cf2read.c (100%) rename {drivers => thirdparty}/freetype/src/cff/cf2read.h (100%) rename {drivers => thirdparty}/freetype/src/cff/cf2stack.c (100%) rename {drivers => thirdparty}/freetype/src/cff/cf2stack.h (100%) rename {drivers => thirdparty}/freetype/src/cff/cf2types.h (100%) rename {drivers => thirdparty}/freetype/src/cff/cff.c (100%) rename {drivers => thirdparty}/freetype/src/cff/cffcmap.c (100%) rename {drivers => thirdparty}/freetype/src/cff/cffcmap.h (100%) rename {drivers => thirdparty}/freetype/src/cff/cffdrivr.c (100%) rename {drivers => thirdparty}/freetype/src/cff/cffdrivr.h (100%) rename {drivers => thirdparty}/freetype/src/cff/cfferrs.h (100%) rename {drivers => thirdparty}/freetype/src/cff/cffgload.c (100%) rename {drivers => thirdparty}/freetype/src/cff/cffgload.h (100%) rename {drivers => thirdparty}/freetype/src/cff/cffload.c (100%) rename {drivers => thirdparty}/freetype/src/cff/cffload.h (100%) rename {drivers => thirdparty}/freetype/src/cff/cffobjs.c (100%) rename {drivers => thirdparty}/freetype/src/cff/cffobjs.h (100%) rename {drivers => thirdparty}/freetype/src/cff/cffparse.c (100%) rename {drivers => thirdparty}/freetype/src/cff/cffparse.h (100%) rename {drivers => thirdparty}/freetype/src/cff/cffpic.c (100%) rename {drivers => thirdparty}/freetype/src/cff/cffpic.h (100%) rename {drivers => thirdparty}/freetype/src/cff/cfftoken.h (100%) rename {drivers => thirdparty}/freetype/src/cff/cfftypes.h (100%) rename {drivers => thirdparty}/freetype/src/cff/module.mk (100%) rename {drivers => thirdparty}/freetype/src/cff/rules.mk (100%) rename {drivers => thirdparty}/freetype/src/cid/ciderrs.h (100%) rename {drivers => thirdparty}/freetype/src/cid/cidgload.c (100%) rename {drivers => thirdparty}/freetype/src/cid/cidgload.h (100%) rename {drivers => thirdparty}/freetype/src/cid/cidload.c (100%) rename {drivers => thirdparty}/freetype/src/cid/cidload.h (100%) rename {drivers => thirdparty}/freetype/src/cid/cidobjs.c (100%) rename {drivers => thirdparty}/freetype/src/cid/cidobjs.h (100%) rename {drivers => thirdparty}/freetype/src/cid/cidparse.c (100%) rename {drivers => thirdparty}/freetype/src/cid/cidparse.h (100%) rename {drivers => thirdparty}/freetype/src/cid/cidriver.c (100%) rename {drivers => thirdparty}/freetype/src/cid/cidriver.h (100%) rename {drivers => thirdparty}/freetype/src/cid/cidtoken.h (100%) rename {drivers => thirdparty}/freetype/src/cid/module.mk (100%) rename {drivers => thirdparty}/freetype/src/cid/rules.mk (100%) rename {drivers => thirdparty}/freetype/src/cid/type1cid.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/README (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvalid.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvalid.h (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvbsln.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvcommn.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvcommn.h (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxverror.h (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvfeat.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvfeat.h (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvfgen.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvjust.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvkern.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvlcar.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvmod.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvmod.h (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvmort.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvmort.h (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvmort0.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvmort1.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvmort2.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvmort4.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvmort5.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvmorx.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvmorx.h (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvmorx0.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvmorx1.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvmorx2.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvmorx4.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvmorx5.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvopbd.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvprop.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/gxvtrak.c (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/module.mk (100%) rename {drivers => thirdparty}/freetype/src/gxvalid/rules.mk (100%) rename {drivers => thirdparty}/freetype/src/otvalid/module.mk (100%) rename {drivers => thirdparty}/freetype/src/otvalid/otvalid.c (100%) rename {drivers => thirdparty}/freetype/src/otvalid/otvalid.h (100%) rename {drivers => thirdparty}/freetype/src/otvalid/otvbase.c (100%) rename {drivers => thirdparty}/freetype/src/otvalid/otvcommn.c (100%) rename {drivers => thirdparty}/freetype/src/otvalid/otvcommn.h (100%) rename {drivers => thirdparty}/freetype/src/otvalid/otverror.h (100%) rename {drivers => thirdparty}/freetype/src/otvalid/otvgdef.c (100%) rename {drivers => thirdparty}/freetype/src/otvalid/otvgpos.c (100%) rename {drivers => thirdparty}/freetype/src/otvalid/otvgpos.h (100%) rename {drivers => thirdparty}/freetype/src/otvalid/otvgsub.c (100%) rename {drivers => thirdparty}/freetype/src/otvalid/otvjstf.c (100%) rename {drivers => thirdparty}/freetype/src/otvalid/otvmath.c (100%) rename {drivers => thirdparty}/freetype/src/otvalid/otvmod.c (100%) rename {drivers => thirdparty}/freetype/src/otvalid/otvmod.h (100%) rename {drivers => thirdparty}/freetype/src/otvalid/rules.mk (100%) rename {drivers => thirdparty}/freetype/src/pcf/README (100%) rename {drivers => thirdparty}/freetype/src/pcf/module.mk (100%) rename {drivers => thirdparty}/freetype/src/pcf/pcf.c (100%) rename {drivers => thirdparty}/freetype/src/pcf/pcf.h (100%) rename {drivers => thirdparty}/freetype/src/pcf/pcfdrivr.c (100%) rename {drivers => thirdparty}/freetype/src/pcf/pcfdrivr.h (100%) rename {drivers => thirdparty}/freetype/src/pcf/pcferror.h (100%) rename {drivers => thirdparty}/freetype/src/pcf/pcfread.c (100%) rename {drivers => thirdparty}/freetype/src/pcf/pcfread.h (100%) rename {drivers => thirdparty}/freetype/src/pcf/pcfutil.c (100%) rename {drivers => thirdparty}/freetype/src/pcf/pcfutil.h (100%) rename {drivers => thirdparty}/freetype/src/pcf/rules.mk (100%) rename {drivers => thirdparty}/freetype/src/pfr/module.mk (100%) rename {drivers => thirdparty}/freetype/src/pfr/pfr.c (100%) rename {drivers => thirdparty}/freetype/src/pfr/pfrcmap.c (100%) rename {drivers => thirdparty}/freetype/src/pfr/pfrcmap.h (100%) rename {drivers => thirdparty}/freetype/src/pfr/pfrdrivr.c (100%) rename {drivers => thirdparty}/freetype/src/pfr/pfrdrivr.h (100%) rename {drivers => thirdparty}/freetype/src/pfr/pfrerror.h (100%) rename {drivers => thirdparty}/freetype/src/pfr/pfrgload.c (100%) rename {drivers => thirdparty}/freetype/src/pfr/pfrgload.h (100%) rename {drivers => thirdparty}/freetype/src/pfr/pfrload.c (100%) rename {drivers => thirdparty}/freetype/src/pfr/pfrload.h (100%) rename {drivers => thirdparty}/freetype/src/pfr/pfrobjs.c (100%) rename {drivers => thirdparty}/freetype/src/pfr/pfrobjs.h (100%) rename {drivers => thirdparty}/freetype/src/pfr/pfrsbit.c (100%) rename {drivers => thirdparty}/freetype/src/pfr/pfrsbit.h (100%) rename {drivers => thirdparty}/freetype/src/pfr/pfrtypes.h (100%) rename {drivers => thirdparty}/freetype/src/pfr/rules.mk (100%) rename {drivers => thirdparty}/freetype/src/psaux/afmparse.c (100%) rename {drivers => thirdparty}/freetype/src/psaux/afmparse.h (100%) rename {drivers => thirdparty}/freetype/src/psaux/module.mk (100%) rename {drivers => thirdparty}/freetype/src/psaux/psaux.c (100%) rename {drivers => thirdparty}/freetype/src/psaux/psauxerr.h (100%) rename {drivers => thirdparty}/freetype/src/psaux/psauxmod.c (100%) rename {drivers => thirdparty}/freetype/src/psaux/psauxmod.h (100%) rename {drivers => thirdparty}/freetype/src/psaux/psconv.c (100%) rename {drivers => thirdparty}/freetype/src/psaux/psconv.h (100%) rename {drivers => thirdparty}/freetype/src/psaux/psobjs.c (100%) rename {drivers => thirdparty}/freetype/src/psaux/psobjs.h (100%) rename {drivers => thirdparty}/freetype/src/psaux/rules.mk (100%) rename {drivers => thirdparty}/freetype/src/psaux/t1cmap.c (100%) rename {drivers => thirdparty}/freetype/src/psaux/t1cmap.h (100%) rename {drivers => thirdparty}/freetype/src/psaux/t1decode.c (100%) rename {drivers => thirdparty}/freetype/src/psaux/t1decode.h (100%) rename {drivers => thirdparty}/freetype/src/pshinter/module.mk (100%) rename {drivers => thirdparty}/freetype/src/pshinter/pshalgo.c (100%) rename {drivers => thirdparty}/freetype/src/pshinter/pshalgo.h (100%) rename {drivers => thirdparty}/freetype/src/pshinter/pshglob.c (100%) rename {drivers => thirdparty}/freetype/src/pshinter/pshglob.h (100%) rename {drivers => thirdparty}/freetype/src/pshinter/pshinter.c (100%) rename {drivers => thirdparty}/freetype/src/pshinter/pshmod.c (100%) rename {drivers => thirdparty}/freetype/src/pshinter/pshmod.h (100%) rename {drivers => thirdparty}/freetype/src/pshinter/pshnterr.h (100%) rename {drivers => thirdparty}/freetype/src/pshinter/pshpic.c (100%) rename {drivers => thirdparty}/freetype/src/pshinter/pshpic.h (100%) rename {drivers => thirdparty}/freetype/src/pshinter/pshrec.c (100%) rename {drivers => thirdparty}/freetype/src/pshinter/pshrec.h (100%) rename {drivers => thirdparty}/freetype/src/pshinter/rules.mk (100%) rename {drivers => thirdparty}/freetype/src/psnames/module.mk (100%) rename {drivers => thirdparty}/freetype/src/psnames/psmodule.c (100%) rename {drivers => thirdparty}/freetype/src/psnames/psmodule.h (100%) rename {drivers => thirdparty}/freetype/src/psnames/psnamerr.h (100%) rename {drivers => thirdparty}/freetype/src/psnames/psnames.c (100%) rename {drivers => thirdparty}/freetype/src/psnames/pspic.c (100%) rename {drivers => thirdparty}/freetype/src/psnames/pspic.h (100%) rename {drivers => thirdparty}/freetype/src/psnames/pstables.h (100%) rename {drivers => thirdparty}/freetype/src/psnames/rules.mk (100%) rename {drivers => thirdparty}/freetype/src/raster/ftmisc.h (100%) rename {drivers => thirdparty}/freetype/src/raster/ftraster.c (100%) rename {drivers => thirdparty}/freetype/src/raster/ftraster.h (100%) rename {drivers => thirdparty}/freetype/src/raster/ftrend1.c (100%) rename {drivers => thirdparty}/freetype/src/raster/ftrend1.h (100%) rename {drivers => thirdparty}/freetype/src/raster/module.mk (100%) rename {drivers => thirdparty}/freetype/src/raster/raster.c (100%) rename {drivers => thirdparty}/freetype/src/raster/rasterrs.h (100%) rename {drivers => thirdparty}/freetype/src/raster/rastpic.c (100%) rename {drivers => thirdparty}/freetype/src/raster/rastpic.h (100%) rename {drivers => thirdparty}/freetype/src/raster/rules.mk (100%) rename {drivers => thirdparty}/freetype/src/sfnt/module.mk (100%) rename {drivers => thirdparty}/freetype/src/sfnt/pngshim.c (100%) rename {drivers => thirdparty}/freetype/src/sfnt/pngshim.h (100%) rename {drivers => thirdparty}/freetype/src/sfnt/rules.mk (100%) rename {drivers => thirdparty}/freetype/src/sfnt/sfdriver.c (100%) rename {drivers => thirdparty}/freetype/src/sfnt/sfdriver.h (100%) rename {drivers => thirdparty}/freetype/src/sfnt/sferrors.h (100%) rename {drivers => thirdparty}/freetype/src/sfnt/sfnt.c (100%) rename {drivers => thirdparty}/freetype/src/sfnt/sfntpic.c (100%) rename {drivers => thirdparty}/freetype/src/sfnt/sfntpic.h (100%) rename {drivers => thirdparty}/freetype/src/sfnt/sfobjs.c (100%) rename {drivers => thirdparty}/freetype/src/sfnt/sfobjs.h (100%) rename {drivers => thirdparty}/freetype/src/sfnt/ttbdf.c (100%) rename {drivers => thirdparty}/freetype/src/sfnt/ttbdf.h (100%) rename {drivers => thirdparty}/freetype/src/sfnt/ttcmap.c (100%) rename {drivers => thirdparty}/freetype/src/sfnt/ttcmap.h (100%) rename {drivers => thirdparty}/freetype/src/sfnt/ttcmapc.h (100%) rename {drivers => thirdparty}/freetype/src/sfnt/ttkern.c (100%) rename {drivers => thirdparty}/freetype/src/sfnt/ttkern.h (100%) rename {drivers => thirdparty}/freetype/src/sfnt/ttload.c (100%) rename {drivers => thirdparty}/freetype/src/sfnt/ttload.h (100%) rename {drivers => thirdparty}/freetype/src/sfnt/ttmtx.c (100%) rename {drivers => thirdparty}/freetype/src/sfnt/ttmtx.h (100%) rename {drivers => thirdparty}/freetype/src/sfnt/ttpost.c (100%) rename {drivers => thirdparty}/freetype/src/sfnt/ttpost.h (100%) rename {drivers => thirdparty}/freetype/src/sfnt/ttsbit.c (100%) rename {drivers => thirdparty}/freetype/src/sfnt/ttsbit.h (100%) rename {drivers => thirdparty}/freetype/src/smooth/ftgrays.c (100%) rename {drivers => thirdparty}/freetype/src/smooth/ftgrays.h (100%) rename {drivers => thirdparty}/freetype/src/smooth/ftsmerrs.h (100%) rename {drivers => thirdparty}/freetype/src/smooth/ftsmooth.c (100%) rename {drivers => thirdparty}/freetype/src/smooth/ftsmooth.h (100%) rename {drivers => thirdparty}/freetype/src/smooth/ftspic.c (100%) rename {drivers => thirdparty}/freetype/src/smooth/ftspic.h (100%) rename {drivers => thirdparty}/freetype/src/smooth/module.mk (100%) rename {drivers => thirdparty}/freetype/src/smooth/rules.mk (100%) rename {drivers => thirdparty}/freetype/src/smooth/smooth.c (100%) rename {drivers => thirdparty}/freetype/src/truetype/module.mk (100%) rename {drivers => thirdparty}/freetype/src/truetype/rules.mk (100%) rename {drivers => thirdparty}/freetype/src/truetype/truetype.c (100%) rename {drivers => thirdparty}/freetype/src/truetype/ttdriver.c (100%) rename {drivers => thirdparty}/freetype/src/truetype/ttdriver.h (100%) rename {drivers => thirdparty}/freetype/src/truetype/tterrors.h (100%) rename {drivers => thirdparty}/freetype/src/truetype/ttgload.c (100%) rename {drivers => thirdparty}/freetype/src/truetype/ttgload.h (100%) rename {drivers => thirdparty}/freetype/src/truetype/ttgxvar.c (100%) rename {drivers => thirdparty}/freetype/src/truetype/ttgxvar.h (100%) rename {drivers => thirdparty}/freetype/src/truetype/ttinterp.c (100%) rename {drivers => thirdparty}/freetype/src/truetype/ttinterp.h (100%) rename {drivers => thirdparty}/freetype/src/truetype/ttobjs.c (100%) rename {drivers => thirdparty}/freetype/src/truetype/ttobjs.h (100%) rename {drivers => thirdparty}/freetype/src/truetype/ttpic.c (100%) rename {drivers => thirdparty}/freetype/src/truetype/ttpic.h (100%) rename {drivers => thirdparty}/freetype/src/truetype/ttpload.c (100%) rename {drivers => thirdparty}/freetype/src/truetype/ttpload.h (100%) rename {drivers => thirdparty}/freetype/src/truetype/ttsubpix.c (100%) rename {drivers => thirdparty}/freetype/src/truetype/ttsubpix.h (100%) rename {drivers => thirdparty}/freetype/src/type1/module.mk (100%) rename {drivers => thirdparty}/freetype/src/type1/rules.mk (100%) rename {drivers => thirdparty}/freetype/src/type1/t1afm.c (100%) rename {drivers => thirdparty}/freetype/src/type1/t1afm.h (100%) rename {drivers => thirdparty}/freetype/src/type1/t1driver.c (100%) rename {drivers => thirdparty}/freetype/src/type1/t1driver.h (100%) rename {drivers => thirdparty}/freetype/src/type1/t1errors.h (100%) rename {drivers => thirdparty}/freetype/src/type1/t1gload.c (100%) rename {drivers => thirdparty}/freetype/src/type1/t1gload.h (100%) rename {drivers => thirdparty}/freetype/src/type1/t1load.c (100%) rename {drivers => thirdparty}/freetype/src/type1/t1load.h (100%) rename {drivers => thirdparty}/freetype/src/type1/t1objs.c (100%) rename {drivers => thirdparty}/freetype/src/type1/t1objs.h (100%) rename {drivers => thirdparty}/freetype/src/type1/t1parse.c (100%) rename {drivers => thirdparty}/freetype/src/type1/t1parse.h (100%) rename {drivers => thirdparty}/freetype/src/type1/t1tokens.h (100%) rename {drivers => thirdparty}/freetype/src/type1/type1.c (100%) rename {drivers => thirdparty}/freetype/src/type42/module.mk (100%) rename {drivers => thirdparty}/freetype/src/type42/rules.mk (100%) rename {drivers => thirdparty}/freetype/src/type42/t42drivr.c (100%) rename {drivers => thirdparty}/freetype/src/type42/t42drivr.h (100%) rename {drivers => thirdparty}/freetype/src/type42/t42error.h (100%) rename {drivers => thirdparty}/freetype/src/type42/t42objs.c (100%) rename {drivers => thirdparty}/freetype/src/type42/t42objs.h (100%) rename {drivers => thirdparty}/freetype/src/type42/t42parse.c (100%) rename {drivers => thirdparty}/freetype/src/type42/t42parse.h (100%) rename {drivers => thirdparty}/freetype/src/type42/t42types.h (100%) rename {drivers => thirdparty}/freetype/src/type42/type42.c (100%) rename {drivers => thirdparty}/freetype/src/winfonts/fnterrs.h (100%) rename {drivers => thirdparty}/freetype/src/winfonts/module.mk (100%) rename {drivers => thirdparty}/freetype/src/winfonts/rules.mk (100%) rename {drivers => thirdparty}/freetype/src/winfonts/winfnt.c (100%) rename {drivers => thirdparty}/freetype/src/winfonts/winfnt.h (100%) diff --git a/SConstruct b/SConstruct index dd780409d53..10bf3b36257 100644 --- a/SConstruct +++ b/SConstruct @@ -125,7 +125,7 @@ opts.Add('libtheora','Theora library for theora module (system/builtin)','builti opts.Add('opus','Opus and opusfile library for Opus format support: (system/builtin)','builtin') opts.Add('minizip','Build Minizip Archive Support: (yes/no)','yes') opts.Add('squish','Squish library for BC Texture Compression in editor (system/builtin)','builtin') -opts.Add('freetype','Freetype support in editor','builtin') +opts.Add('freetype','Freetype library for TTF support via freetype module (system/builtin)','builtin') opts.Add('xml','XML Save/Load support (yes/no)','yes') opts.Add('libpng','libpng library for image loader support (system/builtin)','builtin') opts.Add('libwebp','libwebp library for webp module (system/builtin)','builtin') @@ -250,14 +250,6 @@ if selected_platform in platform_list: #must happen after the flags, so when flags are used by configure, stuff happens (ie, ssl on x11) detect.configure(env) - - if (env["freetype"]!="no"): - env.Append(CCFLAGS=['-DFREETYPE_ENABLED']) - if (env["freetype"]=="builtin"): - env.Append(CPPPATH=['#drivers/freetype']) - env.Append(CPPPATH=['#drivers/freetype/freetype/include']) - - #env['platform_libsuffix'] = env['LIBSUFFIX'] suffix="."+selected_platform diff --git a/drivers/SCsub b/drivers/SCsub index 4ae42a33d5d..2ad924ad1d8 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -24,9 +24,6 @@ SConscript("nrex/SCsub"); if (env["tools"]=="yes"): SConscript("convex_decomp/SCsub"); -if (env["freetype"]!="no"): - SConscript("freetype/SCsub"); - num = 0 cur_base = "" total = len(env.drivers_sources) diff --git a/drivers/freetype/SCsub b/drivers/freetype/SCsub deleted file mode 100644 index 4ddc7850888..00000000000 --- a/drivers/freetype/SCsub +++ /dev/null @@ -1,73 +0,0 @@ -Import('env') - -ft_sources=[\ -"src/autofit/autofit.c",\ -"src/base/ftapi.c",\ -"src/base/ftbase.c",\ -"src/base/ftbbox.c",\ -"src/base/ftbdf.c",\ -"src/base/ftbitmap.c",\ -"src/base/ftcid.c",\ -"src/base/ftdebug.c",\ -"src/base/ftfntfmt.c",\ -"src/base/ftfstype.c",\ -"src/base/ftgasp.c",\ -"src/base/ftglyph.c",\ -"src/base/ftgxval.c",\ -"src/base/ftinit.c",\ -"src/base/ftlcdfil.c",\ -"src/base/ftmm.c",\ -"src/base/ftotval.c",\ -"src/base/ftpatent.c",\ -"src/base/ftpfr.c",\ -"src/base/ftpic.c",\ -"src/base/ftstroke.c",\ -"src/base/ftsynth.c",\ -"src/base/ftsystem.c",\ -"src/base/fttype1.c",\ -"src/base/ftwinfnt.c",\ -"src/bdf/bdf.c",\ -"src/cache/ftcache.c",\ -"src/cff/cff.c",\ -"src/cid/type1cid.c",\ -"src/gxvalid/gxvalid.c",\ -"src/otvalid/otvalid.c",\ -"src/pcf/pcf.c",\ -"src/pfr/pfr.c",\ -"src/psaux/psaux.c",\ -"src/pshinter/pshinter.c",\ -"src/psnames/psnames.c",\ -"src/raster/raster.c",\ -"src/sfnt/sfnt.c",\ -"src/smooth/smooth.c",\ -"src/truetype/truetype.c",\ -"src/type1/type1.c",\ -"src/type42/type42.c",\ -"src/winfonts/winfnt.c",\ -] - - -if (env["freetype"]=="builtin"): - - # Include header for WinRT to fix build issues - if "platform" in env and env["platform"] == "winrt": - env.Append(CCFLAGS=['/FI', '"drivers/freetype/winrtdef.h"']) - - # fix for Windows' shell miserably failing on long lines, split in two libraries - half1=[] - half2=[] - for x in ft_sources: - if (x.find("src/base")==0 or x.find("src/sfnt")==0): - half2.append(x) - else: - half1.append(x) - - lib = env.Library("freetype_builtin1",half2) - env.Append(LIBS=[lib]) - lib = env.Library("freetype_builtin2",half1) - env.Append(LIBS=[lib]) - - env.Append(CPPPATH=["#drivers/freetype/include"]) - - -Export('env') diff --git a/drivers/freetype/src/Jamfile b/drivers/freetype/src/Jamfile deleted file mode 100644 index ebc036983e0..00000000000 --- a/drivers/freetype/src/Jamfile +++ /dev/null @@ -1,19 +0,0 @@ -# FreeType 2 src Jamfile -# -# Copyright 2001-2016 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - -SubDir FT2_TOP $(FT2_SRC_DIR) ; - -for xx in $(FT2_COMPONENTS) -{ - SubInclude FT2_TOP $(FT2_SRC_DIR) $(xx) ; -} - -# end of src Jamfile diff --git a/drivers/freetype/src/autofit/Jamfile b/drivers/freetype/src/autofit/Jamfile deleted file mode 100644 index 638b2297249..00000000000 --- a/drivers/freetype/src/autofit/Jamfile +++ /dev/null @@ -1,53 +0,0 @@ -# FreeType 2 src/autofit Jamfile -# -# Copyright 2003-2016 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - -SubDir FT2_TOP src autofit ; - -{ - local _sources ; - - # define FT2_AUTOFIT2 to enable experimental latin hinter replacement - if $(FT2_AUTOFIT2) - { - CCFLAGS += FT_OPTION_AUTOFIT2 ; - } - if $(FT2_MULTI) - { - _sources = afangles - afblue - afcjk - afdummy - afglobal - afhints - afindic - aflatin - afloader - afmodule - afpic - afranges - afshaper - afwarp - ; - - if $(FT2_AUTOFIT2) - { - _sources += aflatin2 ; - } - } - else - { - _sources = autofit ; - } - - Library $(FT2_LIB) : $(_sources).c ; -} - -# end of src/autofit Jamfile diff --git a/drivers/freetype/src/base/Jamfile b/drivers/freetype/src/base/Jamfile deleted file mode 100644 index cfc69657fe9..00000000000 --- a/drivers/freetype/src/base/Jamfile +++ /dev/null @@ -1,88 +0,0 @@ -# FreeType 2 src/base Jamfile -# -# Copyright 2001-2016 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - -SubDir FT2_TOP $(FT2_SRC_DIR) base ; - - -{ - local _sources ; - - if $(FT2_MULTI) - { - _sources = basepic - ftadvanc - ftcalc - ftdbgmem - ftgloadr - fthash - ftobjs - ftoutln - ftpic - ftrfork - ftsnames - ftstream - fttrigon - ftutil - ; - } - else - { - _sources = ftbase ; - } - - Library $(FT2_LIB) : $(_sources).c ; -} - -# Add the optional/replaceable files. -# -{ - local _sources = ftapi - ftbbox - ftbdf - ftbitmap - ftcid - ftdebug - ftfntfmt - ftfstype - ftgasp - ftglyph - ftgxval - ftinit - ftlcdfil - ftmm - ftotval - ftpatent - ftpfr - ftstroke - ftsynth - ftsystem - fttype1 - ftwinfnt - ; - - Library $(FT2_LIB) : $(_sources).c ; -} - -# Add Macintosh-specific file to the library when necessary. -# -if $(MAC) -{ - Library $(FT2_LIB) : ftmac.c ; -} -else if $(OS) = MACOSX -{ - if $(FT2_MULTI) - { - Library $(FT2_LIB) : ftmac.c ; - } -} - -# end of src/base Jamfile diff --git a/drivers/freetype/src/bdf/Jamfile b/drivers/freetype/src/bdf/Jamfile deleted file mode 100644 index 2f0147bbbaa..00000000000 --- a/drivers/freetype/src/bdf/Jamfile +++ /dev/null @@ -1,31 +0,0 @@ -# FreeType 2 src/bdf Jamfile -# -# Copyright 2002-2016 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - -SubDir FT2_TOP $(FT2_SRC_DIR) bdf ; - -{ - local _sources ; - - if $(FT2_MULTI) - { - _sources = bdfdrivr - bdflib - ; - } - else - { - _sources = bdf ; - } - - Library $(FT2_LIB) : $(_sources).c ; -} - -# end of src/bdf Jamfile diff --git a/drivers/freetype/src/cache/Jamfile b/drivers/freetype/src/cache/Jamfile deleted file mode 100644 index da6551015b8..00000000000 --- a/drivers/freetype/src/cache/Jamfile +++ /dev/null @@ -1,37 +0,0 @@ -# FreeType 2 src/cache Jamfile -# -# Copyright 2001-2016 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - -SubDir FT2_TOP $(FT2_SRC_DIR) cache ; - -{ - local _sources ; - - if $(FT2_MULTI) - { - _sources = ftcbasic - ftccache - ftcglyph - ftcimage - ftcmanag - ftccmap - ftcmru - ftcsbits - ; - } - else - { - _sources = ftcache ; - } - - Library $(FT2_LIB) : $(_sources).c ; -} - -# end of src/cache Jamfile diff --git a/drivers/freetype/src/cff/Jamfile b/drivers/freetype/src/cff/Jamfile deleted file mode 100644 index 8067e6b29cb..00000000000 --- a/drivers/freetype/src/cff/Jamfile +++ /dev/null @@ -1,45 +0,0 @@ -# FreeType 2 src/cff Jamfile -# -# Copyright 2001-2016 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - -SubDir FT2_TOP $(FT2_SRC_DIR) cff ; - -{ - local _sources ; - - if $(FT2_MULTI) - { - _sources = cffcmap - cffdrivr - cffgload - cffload - cffobjs - cffparse - cffpic - cf2arrst - cf2blues - cf2error - cf2font - cf2ft - cf2hints - cf2intrp - cf2read - cf2stack - ; - } - else - { - _sources = cff ; - } - - Library $(FT2_LIB) : $(_sources).c ; -} - -# end of src/cff Jamfile diff --git a/drivers/freetype/src/cid/Jamfile b/drivers/freetype/src/cid/Jamfile deleted file mode 100644 index 4b4eea17d98..00000000000 --- a/drivers/freetype/src/cid/Jamfile +++ /dev/null @@ -1,34 +0,0 @@ -# FreeType 2 src/cid Jamfile -# -# Copyright 2001-2016 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - -SubDir FT2_TOP $(FT2_SRC_DIR) cid ; - -{ - local _sources ; - - if $(FT2_MULTI) - { - _sources = cidgload - cidload - cidobjs - cidparse - cidriver - ; - } - else - { - _sources = type1cid ; - } - - Library $(FT2_LIB) : $(_sources).c ; -} - -# end of src/cid Jamfile diff --git a/drivers/freetype/src/gxvalid/Jamfile b/drivers/freetype/src/gxvalid/Jamfile deleted file mode 100644 index 9738677e05e..00000000000 --- a/drivers/freetype/src/gxvalid/Jamfile +++ /dev/null @@ -1,52 +0,0 @@ -# FreeType 2 src/gxvalid Jamfile -# -# Copyright 2005-2016 by -# suzuki toshiya, Masatake YAMATO and Red Hat K.K. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - -SubDir FT2_TOP $(FT2_SRC_DIR) gxvalid ; - - -{ - local _sources ; - - if $(FT2_MULTI) - { - _sources = gxvbsln - gxvcommn - gxvfeat - gxvjust - gxvkern - gxvlcar - gxvmod - gxvmort - gxvmort0 - gxvmort1 - gxvmort2 - gxvmort4 - gxvmort5 - gxvmorx - gxvmorx0 - gxvmorx1 - gxvmorx2 - gxvmorx4 - gxvmorx5 - gxvopbd - gxvprop - gxvtrak - ; - } - else - { - _sources = gxvalid ; - } - - Library $(FT2_LIB) : $(_sources).c ; -} - -# end of src/gxvalid Jamfile diff --git a/drivers/freetype/src/otvalid/Jamfile b/drivers/freetype/src/otvalid/Jamfile deleted file mode 100644 index eded89ab9fc..00000000000 --- a/drivers/freetype/src/otvalid/Jamfile +++ /dev/null @@ -1,37 +0,0 @@ -# FreeType 2 src/otvalid Jamfile -# -# Copyright 2004-2016 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - -SubDir FT2_TOP $(FT2_SRC_DIR) otvalid ; - -{ - local _sources ; - - if $(FT2_MULTI) - { - _sources = otvbase - otvcommn - otvgdef - otvgpos - otvgsub - otvjstf - otvmath - otvmod - ; - } - else - { - _sources = otvalid ; - } - - Library $(FT2_LIB) : $(_sources).c ; -} - -# end of src/otvalid Jamfile diff --git a/drivers/freetype/src/pcf/Jamfile b/drivers/freetype/src/pcf/Jamfile deleted file mode 100644 index 9ebe6a2cbd4..00000000000 --- a/drivers/freetype/src/pcf/Jamfile +++ /dev/null @@ -1,32 +0,0 @@ -# FreeType 2 src/pcf Jamfile -# -# Copyright 2001-2016 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - -SubDir FT2_TOP $(FT2_SRC_DIR) pcf ; - -{ - local _sources ; - - if $(FT2_MULTI) - { - _sources = pcfdrivr - pcfread - pcfutil - ; - } - else - { - _sources = pcf ; - } - - Library $(FT2_LIB) : $(_sources).c ; -} - -# end of src/pcf Jamfile diff --git a/drivers/freetype/src/pfr/Jamfile b/drivers/freetype/src/pfr/Jamfile deleted file mode 100644 index a5b294b79a7..00000000000 --- a/drivers/freetype/src/pfr/Jamfile +++ /dev/null @@ -1,35 +0,0 @@ -# FreeType 2 src/pfr Jamfile -# -# Copyright 2002-2016 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - -SubDir FT2_TOP $(FT2_SRC_DIR) pfr ; - -{ - local _sources ; - - if $(FT2_MULTI) - { - _sources = pfrcmap - pfrdrivr - pfrgload - pfrload - pfrobjs - pfrsbit - ; - } - else - { - _sources = pfr ; - } - - Library $(FT2_LIB) : $(_sources).c ; -} - -# end of src/pfr Jamfile diff --git a/drivers/freetype/src/psaux/Jamfile b/drivers/freetype/src/psaux/Jamfile deleted file mode 100644 index 9270eec6876..00000000000 --- a/drivers/freetype/src/psaux/Jamfile +++ /dev/null @@ -1,35 +0,0 @@ -# FreeType 2 src/psaux Jamfile -# -# Copyright 2001-2016 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - -SubDir FT2_TOP $(FT2_SRC_DIR) psaux ; - -{ - local _sources ; - - if $(FT2_MULTI) - { - _sources = afmparse - psauxmod - psconv - psobjs - t1cmap - t1decode - ; - } - else - { - _sources = psaux ; - } - - Library $(FT2_LIB) : $(_sources).c ; -} - -# end of src/psaux Jamfile diff --git a/drivers/freetype/src/pshinter/Jamfile b/drivers/freetype/src/pshinter/Jamfile deleted file mode 100644 index fcb225811ec..00000000000 --- a/drivers/freetype/src/pshinter/Jamfile +++ /dev/null @@ -1,34 +0,0 @@ -# FreeType 2 src/pshinter Jamfile -# -# Copyright 2001-2016 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - -SubDir FT2_TOP $(FT2_SRC_DIR) pshinter ; - -{ - local _sources ; - - if $(FT2_MULTI) - { - _sources = pshalgo - pshglob - pshmod - pshpic - pshrec - ; - } - else - { - _sources = pshinter ; - } - - Library $(FT2_LIB) : $(_sources).c ; -} - -# end of src/pshinter Jamfile diff --git a/drivers/freetype/src/psnames/Jamfile b/drivers/freetype/src/psnames/Jamfile deleted file mode 100644 index 35b8a99c8fb..00000000000 --- a/drivers/freetype/src/psnames/Jamfile +++ /dev/null @@ -1,31 +0,0 @@ -# FreeType 2 src/psnames Jamfile -# -# Copyright 2001-2016 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - -SubDir FT2_TOP $(FT2_SRC_DIR) psnames ; - -{ - local _sources ; - - if $(FT2_MULTI) - { - _sources = psmodule - pspic - ; - } - else - { - _sources = psnames ; - } - - Library $(FT2_LIB) : $(_sources).c ; -} - -# end of src/psnames Jamfile diff --git a/drivers/freetype/src/raster/Jamfile b/drivers/freetype/src/raster/Jamfile deleted file mode 100644 index 2ec88f56014..00000000000 --- a/drivers/freetype/src/raster/Jamfile +++ /dev/null @@ -1,32 +0,0 @@ -# FreeType 2 src/raster Jamfile -# -# Copyright 2001-2016 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - -SubDir FT2_TOP $(FT2_SRC_DIR) raster ; - -{ - local _sources ; - - if $(FT2_MULTI) - { - _sources = ftraster - ftrend1 - rastpic - ; - } - else - { - _sources = raster ; - } - - Library $(FT2_LIB) : $(_sources).c ; -} - -# end of src/raster Jamfile diff --git a/drivers/freetype/src/sfnt/Jamfile b/drivers/freetype/src/sfnt/Jamfile deleted file mode 100644 index 089cc269ba3..00000000000 --- a/drivers/freetype/src/sfnt/Jamfile +++ /dev/null @@ -1,40 +0,0 @@ -# FreeType 2 src/sfnt Jamfile -# -# Copyright 2001-2016 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - -SubDir FT2_TOP $(FT2_SRC_DIR) sfnt ; - -{ - local _sources ; - - if $(FT2_MULTI) - { - _sources = pngshim - sfdriver - sfntpic - sfobjs - ttbdf - ttcmap - ttkern - ttload - ttmtx - ttpost - ttsbit - ; - } - else - { - _sources = sfnt ; - } - - Library $(FT2_LIB) : $(_sources).c ; -} - -# end of src/sfnt Jamfile diff --git a/drivers/freetype/src/smooth/Jamfile b/drivers/freetype/src/smooth/Jamfile deleted file mode 100644 index a388c11d919..00000000000 --- a/drivers/freetype/src/smooth/Jamfile +++ /dev/null @@ -1,32 +0,0 @@ -# FreeType 2 src/smooth Jamfile -# -# Copyright 2001-2016 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - -SubDir FT2_TOP $(FT2_SRC_DIR) smooth ; - -{ - local _sources ; - - if $(FT2_MULTI) - { - _sources = ftgrays - ftsmooth - ftspic - ; - } - else - { - _sources = smooth ; - } - - Library $(FT2_LIB) : $(_sources).c ; -} - -# end of src/smooth Jamfile diff --git a/drivers/freetype/src/truetype/Jamfile b/drivers/freetype/src/truetype/Jamfile deleted file mode 100644 index ecbb2dbdd21..00000000000 --- a/drivers/freetype/src/truetype/Jamfile +++ /dev/null @@ -1,37 +0,0 @@ -# FreeType 2 src/truetype Jamfile -# -# Copyright 2001-2016 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - -SubDir FT2_TOP $(FT2_SRC_DIR) truetype ; - -{ - local _sources ; - - if $(FT2_MULTI) - { - _sources = ttdriver - ttgload - ttgxvar - ttinterp - ttobjs - ttpic - ttpload - ttsubpix - ; - } - else - { - _sources = truetype ; - } - - Library $(FT2_LIB) : $(_sources).c ; -} - -# end of src/truetype Jamfile diff --git a/drivers/freetype/src/type1/Jamfile b/drivers/freetype/src/type1/Jamfile deleted file mode 100644 index 948b40854a5..00000000000 --- a/drivers/freetype/src/type1/Jamfile +++ /dev/null @@ -1,35 +0,0 @@ -# FreeType 2 src/type1 Jamfile -# -# Copyright 2001-2016 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - -SubDir FT2_TOP $(FT2_SRC_DIR) type1 ; - -{ - local _sources ; - - if $(FT2_MULTI) - { - _sources = t1afm - t1driver - t1gload - t1load - t1objs - t1parse - ; - } - else - { - _sources = type1 ; - } - - Library $(FT2_LIB) : $(_sources).c ; -} - -# end of src/type1 Jamfile diff --git a/drivers/freetype/src/type42/Jamfile b/drivers/freetype/src/type42/Jamfile deleted file mode 100644 index a504ad17d36..00000000000 --- a/drivers/freetype/src/type42/Jamfile +++ /dev/null @@ -1,32 +0,0 @@ -# FreeType 2 src/type42 Jamfile -# -# Copyright 2002-2016 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - -SubDir FT2_TOP $(FT2_SRC_DIR) type42 ; - -{ - local _sources ; - - if $(FT2_MULTI) - { - _sources = t42drivr - t42objs - t42parse - ; - } - else - { - _sources = type42 ; - } - - Library $(FT2_LIB) : $(_sources).c ; -} - -# end of src/type42 Jamfile diff --git a/drivers/freetype/src/winfonts/Jamfile b/drivers/freetype/src/winfonts/Jamfile deleted file mode 100644 index d81165e9211..00000000000 --- a/drivers/freetype/src/winfonts/Jamfile +++ /dev/null @@ -1,16 +0,0 @@ -# FreeType 2 src/winfonts Jamfile -# -# Copyright 2001-2016 by -# David Turner, Robert Wilhelm, and Werner Lemberg. -# -# This file is part of the FreeType project, and may only be used, modified, -# and distributed under the terms of the FreeType project license, -# LICENSE.TXT. By continuing to use, modify, or distribute this file you -# indicate that you have read the license and understand and accept it -# fully. - -SubDir FT2_TOP $(FT2_SRC_DIR) winfonts ; - -Library $(FT2_LIB) : winfnt.c ; - -# end of src/winfonts Jamfile diff --git a/modules/freetype/SCsub b/modules/freetype/SCsub new file mode 100644 index 00000000000..10c58558a57 --- /dev/null +++ b/modules/freetype/SCsub @@ -0,0 +1,88 @@ +Import('env') + +# Not building in a separate env as core needs it + +# Thirdparty source files +if (env["freetype"] != "system"): # builtin + thirdparty_dir = "#thirdparty/freetype/" + thirdparty_sources = [ + "src/autofit/autofit.c", + "src/base/ftapi.c", + "src/base/ftbase.c", + "src/base/ftbbox.c", + "src/base/ftbdf.c", + "src/base/ftbitmap.c", + "src/base/ftcid.c", + "src/base/ftdebug.c", + "src/base/ftfntfmt.c", + "src/base/ftfstype.c", + "src/base/ftgasp.c", + "src/base/ftglyph.c", + "src/base/ftgxval.c", + "src/base/ftinit.c", + "src/base/ftlcdfil.c", + "src/base/ftmm.c", + "src/base/ftotval.c", + "src/base/ftpatent.c", + "src/base/ftpfr.c", + "src/base/ftpic.c", + "src/base/ftstroke.c", + "src/base/ftsynth.c", + "src/base/ftsystem.c", + "src/base/fttype1.c", + "src/base/ftwinfnt.c", + "src/bdf/bdf.c", + "src/cache/ftcache.c", + "src/cff/cff.c", + "src/cid/type1cid.c", + "src/gxvalid/gxvalid.c", + "src/otvalid/otvalid.c", + "src/pcf/pcf.c", + "src/pfr/pfr.c", + "src/psaux/psaux.c", + "src/pshinter/pshinter.c", + "src/psnames/psnames.c", + "src/raster/raster.c", + "src/sfnt/sfnt.c", + "src/smooth/smooth.c", + "src/truetype/truetype.c", + "src/type1/type1.c", + "src/type42/type42.c", + "src/winfonts/winfnt.c", + ] + thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] + + # Include header for WinRT to fix build issues + if "platform" in env and env["platform"] == "winrt": + env.Append(CCFLAGS = ['/FI', '"modules/freetype/winrtdef.h"']) + + env.Append(CPPPATH = [thirdparty_dir, thirdparty_dir + "/include"]) + + # also requires libpng headers + if (env["libpng"] != "system"): # builtin + env.Append(CPPPATH = ["#thirdparty/libpng"]) + + """ FIXME: Remove this commented code if Windows can handle the monolithic lib + # fix for Windows' shell miserably failing on long lines, split in two libraries + half1 = [] + half2 = [] + for x in thirdparty_sources: + if (x.find("src/base") != -1 and x.find("src/sfnt") != -1): + half1.append(x) + else: + half2.append(x) + + lib = env.Library("freetype_builtin1", half2) + env.Append(LIBS = [lib]) + lib = env.Library("freetype_builtin2", half1) + env.Append(LIBS = [lib]) + """ + + lib = env.Library("freetype_builtin", thirdparty_sources) + env.Append(LIBS = [lib]) + +# Godot source files +env.add_source_files(env.modules_sources, "*.cpp") +env.Append(CCFLAGS = ['-DFREETYPE_ENABLED']) + +Export('env') diff --git a/modules/freetype/config.py b/modules/freetype/config.py new file mode 100644 index 00000000000..368e97e152c --- /dev/null +++ b/modules/freetype/config.py @@ -0,0 +1,6 @@ + +def can_build(platform): + return True + +def configure(env): + pass diff --git a/modules/freetype/register_types.cpp b/modules/freetype/register_types.cpp new file mode 100644 index 00000000000..2b9f47f54cf --- /dev/null +++ b/modules/freetype/register_types.cpp @@ -0,0 +1,33 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +#include "register_types.h" + +void register_freetype_types() {} + +void unregister_freetype_types() {} diff --git a/modules/freetype/register_types.h b/modules/freetype/register_types.h new file mode 100644 index 00000000000..326cd2e6eaa --- /dev/null +++ b/modules/freetype/register_types.h @@ -0,0 +1,30 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */ +/* */ +/* Permission is hereby granted, free of charge, to any person obtaining */ +/* a copy of this software and associated documentation files (the */ +/* "Software"), to deal in the Software without restriction, including */ +/* without limitation the rights to use, copy, modify, merge, publish, */ +/* distribute, sublicense, and/or sell copies of the Software, and to */ +/* permit persons to whom the Software is furnished to do so, subject to */ +/* the following conditions: */ +/* */ +/* The above copyright notice and this permission notice shall be */ +/* included in all copies or substantial portions of the Software. */ +/* */ +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ +/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ +/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ +/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ +/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ +/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ +/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/*************************************************************************/ +void register_freetype_types(); +void unregister_freetype_types(); diff --git a/drivers/freetype/winrtdef.h b/modules/freetype/winrtdef.h similarity index 100% rename from drivers/freetype/winrtdef.h rename to modules/freetype/winrtdef.h diff --git a/platform/osx/detect.py b/platform/osx/detect.py index 2ade0978930..8d8e882527b 100644 --- a/platform/osx/detect.py +++ b/platform/osx/detect.py @@ -80,10 +80,6 @@ def configure(env): env['AS'] = basecmd+"as" -# env.Append(CPPPATH=['#platform/osx/include/freetype2', '#platform/osx/include']) -# env.Append(LIBPATH=['#platform/osx/lib']) - - env.Append(CPPFLAGS=["-DAPPLE_STYLE_KEYS"]) env.Append(CPPFLAGS=['-DUNIX_ENABLED','-DGLES2_ENABLED','-DOSX_ENABLED']) env.Append(LIBS=['pthread']) diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 0c14c29361f..92bc58d7b0a 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -69,7 +69,7 @@ def get_flags(): return [ ("openssl", "system"), - ('freetype','yes'), # use system freetype + ('freetype', 'system'), ('libpng', 'system'), ] @@ -140,15 +140,16 @@ def configure(env): if (env["openssl"] == "system"): env.ParseConfig('pkg-config openssl --cflags --libs') - if (env["libpng"] == "system"): - env.ParseConfig('pkg-config libpng --cflags --libs') - if (env["libwebp"] == "system"): env.ParseConfig('pkg-config libwebp --cflags --libs') - if (env["freetype"]=="yes"): + if (env["freetype"] == "system"): + env["libpng"] = "system" # Freetype links against libpng env.ParseConfig('pkg-config freetype2 --cflags --libs') + if (env["libpng"] == "system"): + env.ParseConfig('pkg-config libpng --cflags --libs') + if (env["enet"] == "system"): env.ParseConfig('pkg-config libenet --cflags --libs') diff --git a/thirdparty/README.md b/thirdparty/README.md index 6ed346299b5..f073bef8ec5 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -18,6 +18,19 @@ for all platforms (especially WinRT). Check the diff with the 1.3.13 tarball before the next update. +## freetype + +- Upstream: https://www.freetype.org +- Version: 2.6.5 +- License: FreeType License (BSD-like) + +Files extracted from upstream source: + +- the src/ folder, stripped of the `Jamfile` files +- the include/ folder +- `docs/{FTL.TXT,LICENSE.TXT}` + + ## glew - Upstream: http://glew.sourceforge.net @@ -101,7 +114,7 @@ Files extracted from upstream source: - Version: 0.5.1 - License: BSD-3-Clause -Files extracted from the upstream source: +Files extracted from upstream source: - `src/*` except from: .am and .in, files, extras/, `webp/extras.h` - AUTHORS, COPYING, PATENTS diff --git a/drivers/freetype/FTL.TXT b/thirdparty/freetype/FTL.TXT similarity index 100% rename from drivers/freetype/FTL.TXT rename to thirdparty/freetype/FTL.TXT diff --git a/drivers/freetype/LICENSE.TXT b/thirdparty/freetype/LICENSE.TXT similarity index 100% rename from drivers/freetype/LICENSE.TXT rename to thirdparty/freetype/LICENSE.TXT diff --git a/drivers/freetype/include/freetype/config/ftconfig.h b/thirdparty/freetype/include/freetype/config/ftconfig.h similarity index 100% rename from drivers/freetype/include/freetype/config/ftconfig.h rename to thirdparty/freetype/include/freetype/config/ftconfig.h diff --git a/drivers/freetype/include/freetype/config/ftheader.h b/thirdparty/freetype/include/freetype/config/ftheader.h similarity index 100% rename from drivers/freetype/include/freetype/config/ftheader.h rename to thirdparty/freetype/include/freetype/config/ftheader.h diff --git a/drivers/freetype/include/freetype/config/ftmodule.h b/thirdparty/freetype/include/freetype/config/ftmodule.h similarity index 100% rename from drivers/freetype/include/freetype/config/ftmodule.h rename to thirdparty/freetype/include/freetype/config/ftmodule.h diff --git a/drivers/freetype/include/freetype/config/ftoption.h b/thirdparty/freetype/include/freetype/config/ftoption.h similarity index 100% rename from drivers/freetype/include/freetype/config/ftoption.h rename to thirdparty/freetype/include/freetype/config/ftoption.h diff --git a/drivers/freetype/include/freetype/config/ftstdlib.h b/thirdparty/freetype/include/freetype/config/ftstdlib.h similarity index 100% rename from drivers/freetype/include/freetype/config/ftstdlib.h rename to thirdparty/freetype/include/freetype/config/ftstdlib.h diff --git a/drivers/freetype/include/freetype/freetype.h b/thirdparty/freetype/include/freetype/freetype.h similarity index 100% rename from drivers/freetype/include/freetype/freetype.h rename to thirdparty/freetype/include/freetype/freetype.h diff --git a/drivers/freetype/include/freetype/ftadvanc.h b/thirdparty/freetype/include/freetype/ftadvanc.h similarity index 100% rename from drivers/freetype/include/freetype/ftadvanc.h rename to thirdparty/freetype/include/freetype/ftadvanc.h diff --git a/drivers/freetype/include/freetype/ftautoh.h b/thirdparty/freetype/include/freetype/ftautoh.h similarity index 100% rename from drivers/freetype/include/freetype/ftautoh.h rename to thirdparty/freetype/include/freetype/ftautoh.h diff --git a/drivers/freetype/include/freetype/ftbbox.h b/thirdparty/freetype/include/freetype/ftbbox.h similarity index 100% rename from drivers/freetype/include/freetype/ftbbox.h rename to thirdparty/freetype/include/freetype/ftbbox.h diff --git a/drivers/freetype/include/freetype/ftbdf.h b/thirdparty/freetype/include/freetype/ftbdf.h similarity index 100% rename from drivers/freetype/include/freetype/ftbdf.h rename to thirdparty/freetype/include/freetype/ftbdf.h diff --git a/drivers/freetype/include/freetype/ftbitmap.h b/thirdparty/freetype/include/freetype/ftbitmap.h similarity index 100% rename from drivers/freetype/include/freetype/ftbitmap.h rename to thirdparty/freetype/include/freetype/ftbitmap.h diff --git a/drivers/freetype/include/freetype/ftbzip2.h b/thirdparty/freetype/include/freetype/ftbzip2.h similarity index 100% rename from drivers/freetype/include/freetype/ftbzip2.h rename to thirdparty/freetype/include/freetype/ftbzip2.h diff --git a/drivers/freetype/include/freetype/ftcache.h b/thirdparty/freetype/include/freetype/ftcache.h similarity index 100% rename from drivers/freetype/include/freetype/ftcache.h rename to thirdparty/freetype/include/freetype/ftcache.h diff --git a/drivers/freetype/include/freetype/ftcffdrv.h b/thirdparty/freetype/include/freetype/ftcffdrv.h similarity index 100% rename from drivers/freetype/include/freetype/ftcffdrv.h rename to thirdparty/freetype/include/freetype/ftcffdrv.h diff --git a/drivers/freetype/include/freetype/ftchapters.h b/thirdparty/freetype/include/freetype/ftchapters.h similarity index 100% rename from drivers/freetype/include/freetype/ftchapters.h rename to thirdparty/freetype/include/freetype/ftchapters.h diff --git a/drivers/freetype/include/freetype/ftcid.h b/thirdparty/freetype/include/freetype/ftcid.h similarity index 100% rename from drivers/freetype/include/freetype/ftcid.h rename to thirdparty/freetype/include/freetype/ftcid.h diff --git a/drivers/freetype/include/freetype/fterrdef.h b/thirdparty/freetype/include/freetype/fterrdef.h similarity index 100% rename from drivers/freetype/include/freetype/fterrdef.h rename to thirdparty/freetype/include/freetype/fterrdef.h diff --git a/drivers/freetype/include/freetype/fterrors.h b/thirdparty/freetype/include/freetype/fterrors.h similarity index 100% rename from drivers/freetype/include/freetype/fterrors.h rename to thirdparty/freetype/include/freetype/fterrors.h diff --git a/drivers/freetype/include/freetype/ftfntfmt.h b/thirdparty/freetype/include/freetype/ftfntfmt.h similarity index 100% rename from drivers/freetype/include/freetype/ftfntfmt.h rename to thirdparty/freetype/include/freetype/ftfntfmt.h diff --git a/drivers/freetype/include/freetype/ftgasp.h b/thirdparty/freetype/include/freetype/ftgasp.h similarity index 100% rename from drivers/freetype/include/freetype/ftgasp.h rename to thirdparty/freetype/include/freetype/ftgasp.h diff --git a/drivers/freetype/include/freetype/ftglyph.h b/thirdparty/freetype/include/freetype/ftglyph.h similarity index 100% rename from drivers/freetype/include/freetype/ftglyph.h rename to thirdparty/freetype/include/freetype/ftglyph.h diff --git a/drivers/freetype/include/freetype/ftgxval.h b/thirdparty/freetype/include/freetype/ftgxval.h similarity index 100% rename from drivers/freetype/include/freetype/ftgxval.h rename to thirdparty/freetype/include/freetype/ftgxval.h diff --git a/drivers/freetype/include/freetype/ftgzip.h b/thirdparty/freetype/include/freetype/ftgzip.h similarity index 100% rename from drivers/freetype/include/freetype/ftgzip.h rename to thirdparty/freetype/include/freetype/ftgzip.h diff --git a/drivers/freetype/include/freetype/ftimage.h b/thirdparty/freetype/include/freetype/ftimage.h similarity index 100% rename from drivers/freetype/include/freetype/ftimage.h rename to thirdparty/freetype/include/freetype/ftimage.h diff --git a/drivers/freetype/include/freetype/ftincrem.h b/thirdparty/freetype/include/freetype/ftincrem.h similarity index 100% rename from drivers/freetype/include/freetype/ftincrem.h rename to thirdparty/freetype/include/freetype/ftincrem.h diff --git a/drivers/freetype/include/freetype/ftlcdfil.h b/thirdparty/freetype/include/freetype/ftlcdfil.h similarity index 100% rename from drivers/freetype/include/freetype/ftlcdfil.h rename to thirdparty/freetype/include/freetype/ftlcdfil.h diff --git a/drivers/freetype/include/freetype/ftlist.h b/thirdparty/freetype/include/freetype/ftlist.h similarity index 100% rename from drivers/freetype/include/freetype/ftlist.h rename to thirdparty/freetype/include/freetype/ftlist.h diff --git a/drivers/freetype/include/freetype/ftlzw.h b/thirdparty/freetype/include/freetype/ftlzw.h similarity index 100% rename from drivers/freetype/include/freetype/ftlzw.h rename to thirdparty/freetype/include/freetype/ftlzw.h diff --git a/drivers/freetype/include/freetype/ftmac.h b/thirdparty/freetype/include/freetype/ftmac.h similarity index 100% rename from drivers/freetype/include/freetype/ftmac.h rename to thirdparty/freetype/include/freetype/ftmac.h diff --git a/drivers/freetype/include/freetype/ftmm.h b/thirdparty/freetype/include/freetype/ftmm.h similarity index 100% rename from drivers/freetype/include/freetype/ftmm.h rename to thirdparty/freetype/include/freetype/ftmm.h diff --git a/drivers/freetype/include/freetype/ftmodapi.h b/thirdparty/freetype/include/freetype/ftmodapi.h similarity index 100% rename from drivers/freetype/include/freetype/ftmodapi.h rename to thirdparty/freetype/include/freetype/ftmodapi.h diff --git a/drivers/freetype/include/freetype/ftmoderr.h b/thirdparty/freetype/include/freetype/ftmoderr.h similarity index 100% rename from drivers/freetype/include/freetype/ftmoderr.h rename to thirdparty/freetype/include/freetype/ftmoderr.h diff --git a/drivers/freetype/include/freetype/ftotval.h b/thirdparty/freetype/include/freetype/ftotval.h similarity index 100% rename from drivers/freetype/include/freetype/ftotval.h rename to thirdparty/freetype/include/freetype/ftotval.h diff --git a/drivers/freetype/include/freetype/ftoutln.h b/thirdparty/freetype/include/freetype/ftoutln.h similarity index 100% rename from drivers/freetype/include/freetype/ftoutln.h rename to thirdparty/freetype/include/freetype/ftoutln.h diff --git a/drivers/freetype/include/freetype/ftpfr.h b/thirdparty/freetype/include/freetype/ftpfr.h similarity index 100% rename from drivers/freetype/include/freetype/ftpfr.h rename to thirdparty/freetype/include/freetype/ftpfr.h diff --git a/drivers/freetype/include/freetype/ftrender.h b/thirdparty/freetype/include/freetype/ftrender.h similarity index 100% rename from drivers/freetype/include/freetype/ftrender.h rename to thirdparty/freetype/include/freetype/ftrender.h diff --git a/drivers/freetype/include/freetype/ftsizes.h b/thirdparty/freetype/include/freetype/ftsizes.h similarity index 100% rename from drivers/freetype/include/freetype/ftsizes.h rename to thirdparty/freetype/include/freetype/ftsizes.h diff --git a/drivers/freetype/include/freetype/ftsnames.h b/thirdparty/freetype/include/freetype/ftsnames.h similarity index 100% rename from drivers/freetype/include/freetype/ftsnames.h rename to thirdparty/freetype/include/freetype/ftsnames.h diff --git a/drivers/freetype/include/freetype/ftstroke.h b/thirdparty/freetype/include/freetype/ftstroke.h similarity index 100% rename from drivers/freetype/include/freetype/ftstroke.h rename to thirdparty/freetype/include/freetype/ftstroke.h diff --git a/drivers/freetype/include/freetype/ftsynth.h b/thirdparty/freetype/include/freetype/ftsynth.h similarity index 100% rename from drivers/freetype/include/freetype/ftsynth.h rename to thirdparty/freetype/include/freetype/ftsynth.h diff --git a/drivers/freetype/include/freetype/ftsystem.h b/thirdparty/freetype/include/freetype/ftsystem.h similarity index 100% rename from drivers/freetype/include/freetype/ftsystem.h rename to thirdparty/freetype/include/freetype/ftsystem.h diff --git a/drivers/freetype/include/freetype/fttrigon.h b/thirdparty/freetype/include/freetype/fttrigon.h similarity index 100% rename from drivers/freetype/include/freetype/fttrigon.h rename to thirdparty/freetype/include/freetype/fttrigon.h diff --git a/drivers/freetype/include/freetype/ftttdrv.h b/thirdparty/freetype/include/freetype/ftttdrv.h similarity index 100% rename from drivers/freetype/include/freetype/ftttdrv.h rename to thirdparty/freetype/include/freetype/ftttdrv.h diff --git a/drivers/freetype/include/freetype/fttypes.h b/thirdparty/freetype/include/freetype/fttypes.h similarity index 100% rename from drivers/freetype/include/freetype/fttypes.h rename to thirdparty/freetype/include/freetype/fttypes.h diff --git a/drivers/freetype/include/freetype/ftwinfnt.h b/thirdparty/freetype/include/freetype/ftwinfnt.h similarity index 100% rename from drivers/freetype/include/freetype/ftwinfnt.h rename to thirdparty/freetype/include/freetype/ftwinfnt.h diff --git a/drivers/freetype/include/freetype/internal/autohint.h b/thirdparty/freetype/include/freetype/internal/autohint.h similarity index 100% rename from drivers/freetype/include/freetype/internal/autohint.h rename to thirdparty/freetype/include/freetype/internal/autohint.h diff --git a/drivers/freetype/include/freetype/internal/ftcalc.h b/thirdparty/freetype/include/freetype/internal/ftcalc.h similarity index 100% rename from drivers/freetype/include/freetype/internal/ftcalc.h rename to thirdparty/freetype/include/freetype/internal/ftcalc.h diff --git a/drivers/freetype/include/freetype/internal/ftdebug.h b/thirdparty/freetype/include/freetype/internal/ftdebug.h similarity index 100% rename from drivers/freetype/include/freetype/internal/ftdebug.h rename to thirdparty/freetype/include/freetype/internal/ftdebug.h diff --git a/drivers/freetype/include/freetype/internal/ftdriver.h b/thirdparty/freetype/include/freetype/internal/ftdriver.h similarity index 100% rename from drivers/freetype/include/freetype/internal/ftdriver.h rename to thirdparty/freetype/include/freetype/internal/ftdriver.h diff --git a/drivers/freetype/include/freetype/internal/ftgloadr.h b/thirdparty/freetype/include/freetype/internal/ftgloadr.h similarity index 100% rename from drivers/freetype/include/freetype/internal/ftgloadr.h rename to thirdparty/freetype/include/freetype/internal/ftgloadr.h diff --git a/drivers/freetype/include/freetype/internal/fthash.h b/thirdparty/freetype/include/freetype/internal/fthash.h similarity index 100% rename from drivers/freetype/include/freetype/internal/fthash.h rename to thirdparty/freetype/include/freetype/internal/fthash.h diff --git a/drivers/freetype/include/freetype/internal/ftmemory.h b/thirdparty/freetype/include/freetype/internal/ftmemory.h similarity index 100% rename from drivers/freetype/include/freetype/internal/ftmemory.h rename to thirdparty/freetype/include/freetype/internal/ftmemory.h diff --git a/drivers/freetype/include/freetype/internal/ftobjs.h b/thirdparty/freetype/include/freetype/internal/ftobjs.h similarity index 100% rename from drivers/freetype/include/freetype/internal/ftobjs.h rename to thirdparty/freetype/include/freetype/internal/ftobjs.h diff --git a/drivers/freetype/include/freetype/internal/ftpic.h b/thirdparty/freetype/include/freetype/internal/ftpic.h similarity index 100% rename from drivers/freetype/include/freetype/internal/ftpic.h rename to thirdparty/freetype/include/freetype/internal/ftpic.h diff --git a/drivers/freetype/include/freetype/internal/ftrfork.h b/thirdparty/freetype/include/freetype/internal/ftrfork.h similarity index 100% rename from drivers/freetype/include/freetype/internal/ftrfork.h rename to thirdparty/freetype/include/freetype/internal/ftrfork.h diff --git a/drivers/freetype/include/freetype/internal/ftserv.h b/thirdparty/freetype/include/freetype/internal/ftserv.h similarity index 100% rename from drivers/freetype/include/freetype/internal/ftserv.h rename to thirdparty/freetype/include/freetype/internal/ftserv.h diff --git a/drivers/freetype/include/freetype/internal/ftstream.h b/thirdparty/freetype/include/freetype/internal/ftstream.h similarity index 100% rename from drivers/freetype/include/freetype/internal/ftstream.h rename to thirdparty/freetype/include/freetype/internal/ftstream.h diff --git a/drivers/freetype/include/freetype/internal/fttrace.h b/thirdparty/freetype/include/freetype/internal/fttrace.h similarity index 100% rename from drivers/freetype/include/freetype/internal/fttrace.h rename to thirdparty/freetype/include/freetype/internal/fttrace.h diff --git a/drivers/freetype/include/freetype/internal/ftvalid.h b/thirdparty/freetype/include/freetype/internal/ftvalid.h similarity index 100% rename from drivers/freetype/include/freetype/internal/ftvalid.h rename to thirdparty/freetype/include/freetype/internal/ftvalid.h diff --git a/drivers/freetype/include/freetype/internal/internal.h b/thirdparty/freetype/include/freetype/internal/internal.h similarity index 100% rename from drivers/freetype/include/freetype/internal/internal.h rename to thirdparty/freetype/include/freetype/internal/internal.h diff --git a/drivers/freetype/include/freetype/internal/psaux.h b/thirdparty/freetype/include/freetype/internal/psaux.h similarity index 100% rename from drivers/freetype/include/freetype/internal/psaux.h rename to thirdparty/freetype/include/freetype/internal/psaux.h diff --git a/drivers/freetype/include/freetype/internal/pshints.h b/thirdparty/freetype/include/freetype/internal/pshints.h similarity index 100% rename from drivers/freetype/include/freetype/internal/pshints.h rename to thirdparty/freetype/include/freetype/internal/pshints.h diff --git a/drivers/freetype/include/freetype/internal/services/svbdf.h b/thirdparty/freetype/include/freetype/internal/services/svbdf.h similarity index 100% rename from drivers/freetype/include/freetype/internal/services/svbdf.h rename to thirdparty/freetype/include/freetype/internal/services/svbdf.h diff --git a/drivers/freetype/include/freetype/internal/services/svcid.h b/thirdparty/freetype/include/freetype/internal/services/svcid.h similarity index 100% rename from drivers/freetype/include/freetype/internal/services/svcid.h rename to thirdparty/freetype/include/freetype/internal/services/svcid.h diff --git a/drivers/freetype/include/freetype/internal/services/svfntfmt.h b/thirdparty/freetype/include/freetype/internal/services/svfntfmt.h similarity index 100% rename from drivers/freetype/include/freetype/internal/services/svfntfmt.h rename to thirdparty/freetype/include/freetype/internal/services/svfntfmt.h diff --git a/drivers/freetype/include/freetype/internal/services/svgldict.h b/thirdparty/freetype/include/freetype/internal/services/svgldict.h similarity index 100% rename from drivers/freetype/include/freetype/internal/services/svgldict.h rename to thirdparty/freetype/include/freetype/internal/services/svgldict.h diff --git a/drivers/freetype/include/freetype/internal/services/svgxval.h b/thirdparty/freetype/include/freetype/internal/services/svgxval.h similarity index 100% rename from drivers/freetype/include/freetype/internal/services/svgxval.h rename to thirdparty/freetype/include/freetype/internal/services/svgxval.h diff --git a/drivers/freetype/include/freetype/internal/services/svkern.h b/thirdparty/freetype/include/freetype/internal/services/svkern.h similarity index 100% rename from drivers/freetype/include/freetype/internal/services/svkern.h rename to thirdparty/freetype/include/freetype/internal/services/svkern.h diff --git a/drivers/freetype/include/freetype/internal/services/svmm.h b/thirdparty/freetype/include/freetype/internal/services/svmm.h similarity index 100% rename from drivers/freetype/include/freetype/internal/services/svmm.h rename to thirdparty/freetype/include/freetype/internal/services/svmm.h diff --git a/drivers/freetype/include/freetype/internal/services/svotval.h b/thirdparty/freetype/include/freetype/internal/services/svotval.h similarity index 100% rename from drivers/freetype/include/freetype/internal/services/svotval.h rename to thirdparty/freetype/include/freetype/internal/services/svotval.h diff --git a/drivers/freetype/include/freetype/internal/services/svpfr.h b/thirdparty/freetype/include/freetype/internal/services/svpfr.h similarity index 100% rename from drivers/freetype/include/freetype/internal/services/svpfr.h rename to thirdparty/freetype/include/freetype/internal/services/svpfr.h diff --git a/drivers/freetype/include/freetype/internal/services/svpostnm.h b/thirdparty/freetype/include/freetype/internal/services/svpostnm.h similarity index 100% rename from drivers/freetype/include/freetype/internal/services/svpostnm.h rename to thirdparty/freetype/include/freetype/internal/services/svpostnm.h diff --git a/drivers/freetype/include/freetype/internal/services/svprop.h b/thirdparty/freetype/include/freetype/internal/services/svprop.h similarity index 100% rename from drivers/freetype/include/freetype/internal/services/svprop.h rename to thirdparty/freetype/include/freetype/internal/services/svprop.h diff --git a/drivers/freetype/include/freetype/internal/services/svpscmap.h b/thirdparty/freetype/include/freetype/internal/services/svpscmap.h similarity index 100% rename from drivers/freetype/include/freetype/internal/services/svpscmap.h rename to thirdparty/freetype/include/freetype/internal/services/svpscmap.h diff --git a/drivers/freetype/include/freetype/internal/services/svpsinfo.h b/thirdparty/freetype/include/freetype/internal/services/svpsinfo.h similarity index 100% rename from drivers/freetype/include/freetype/internal/services/svpsinfo.h rename to thirdparty/freetype/include/freetype/internal/services/svpsinfo.h diff --git a/drivers/freetype/include/freetype/internal/services/svsfnt.h b/thirdparty/freetype/include/freetype/internal/services/svsfnt.h similarity index 100% rename from drivers/freetype/include/freetype/internal/services/svsfnt.h rename to thirdparty/freetype/include/freetype/internal/services/svsfnt.h diff --git a/drivers/freetype/include/freetype/internal/services/svttcmap.h b/thirdparty/freetype/include/freetype/internal/services/svttcmap.h similarity index 100% rename from drivers/freetype/include/freetype/internal/services/svttcmap.h rename to thirdparty/freetype/include/freetype/internal/services/svttcmap.h diff --git a/drivers/freetype/include/freetype/internal/services/svtteng.h b/thirdparty/freetype/include/freetype/internal/services/svtteng.h similarity index 100% rename from drivers/freetype/include/freetype/internal/services/svtteng.h rename to thirdparty/freetype/include/freetype/internal/services/svtteng.h diff --git a/drivers/freetype/include/freetype/internal/services/svttglyf.h b/thirdparty/freetype/include/freetype/internal/services/svttglyf.h similarity index 100% rename from drivers/freetype/include/freetype/internal/services/svttglyf.h rename to thirdparty/freetype/include/freetype/internal/services/svttglyf.h diff --git a/drivers/freetype/include/freetype/internal/services/svwinfnt.h b/thirdparty/freetype/include/freetype/internal/services/svwinfnt.h similarity index 100% rename from drivers/freetype/include/freetype/internal/services/svwinfnt.h rename to thirdparty/freetype/include/freetype/internal/services/svwinfnt.h diff --git a/drivers/freetype/include/freetype/internal/sfnt.h b/thirdparty/freetype/include/freetype/internal/sfnt.h similarity index 100% rename from drivers/freetype/include/freetype/internal/sfnt.h rename to thirdparty/freetype/include/freetype/internal/sfnt.h diff --git a/drivers/freetype/include/freetype/internal/t1types.h b/thirdparty/freetype/include/freetype/internal/t1types.h similarity index 100% rename from drivers/freetype/include/freetype/internal/t1types.h rename to thirdparty/freetype/include/freetype/internal/t1types.h diff --git a/drivers/freetype/include/freetype/internal/tttypes.h b/thirdparty/freetype/include/freetype/internal/tttypes.h similarity index 100% rename from drivers/freetype/include/freetype/internal/tttypes.h rename to thirdparty/freetype/include/freetype/internal/tttypes.h diff --git a/drivers/freetype/include/freetype/t1tables.h b/thirdparty/freetype/include/freetype/t1tables.h similarity index 100% rename from drivers/freetype/include/freetype/t1tables.h rename to thirdparty/freetype/include/freetype/t1tables.h diff --git a/drivers/freetype/include/freetype/ttnameid.h b/thirdparty/freetype/include/freetype/ttnameid.h similarity index 100% rename from drivers/freetype/include/freetype/ttnameid.h rename to thirdparty/freetype/include/freetype/ttnameid.h diff --git a/drivers/freetype/include/freetype/tttables.h b/thirdparty/freetype/include/freetype/tttables.h similarity index 100% rename from drivers/freetype/include/freetype/tttables.h rename to thirdparty/freetype/include/freetype/tttables.h diff --git a/drivers/freetype/include/freetype/tttags.h b/thirdparty/freetype/include/freetype/tttags.h similarity index 100% rename from drivers/freetype/include/freetype/tttags.h rename to thirdparty/freetype/include/freetype/tttags.h diff --git a/drivers/freetype/include/freetype/ttunpat.h b/thirdparty/freetype/include/freetype/ttunpat.h similarity index 100% rename from drivers/freetype/include/freetype/ttunpat.h rename to thirdparty/freetype/include/freetype/ttunpat.h diff --git a/drivers/freetype/include/ft2build.h b/thirdparty/freetype/include/ft2build.h similarity index 100% rename from drivers/freetype/include/ft2build.h rename to thirdparty/freetype/include/ft2build.h diff --git a/drivers/freetype/src/autofit/afangles.c b/thirdparty/freetype/src/autofit/afangles.c similarity index 100% rename from drivers/freetype/src/autofit/afangles.c rename to thirdparty/freetype/src/autofit/afangles.c diff --git a/drivers/freetype/src/autofit/afangles.h b/thirdparty/freetype/src/autofit/afangles.h similarity index 100% rename from drivers/freetype/src/autofit/afangles.h rename to thirdparty/freetype/src/autofit/afangles.h diff --git a/drivers/freetype/src/autofit/afblue.c b/thirdparty/freetype/src/autofit/afblue.c similarity index 100% rename from drivers/freetype/src/autofit/afblue.c rename to thirdparty/freetype/src/autofit/afblue.c diff --git a/drivers/freetype/src/autofit/afblue.cin b/thirdparty/freetype/src/autofit/afblue.cin similarity index 100% rename from drivers/freetype/src/autofit/afblue.cin rename to thirdparty/freetype/src/autofit/afblue.cin diff --git a/drivers/freetype/src/autofit/afblue.dat b/thirdparty/freetype/src/autofit/afblue.dat similarity index 100% rename from drivers/freetype/src/autofit/afblue.dat rename to thirdparty/freetype/src/autofit/afblue.dat diff --git a/drivers/freetype/src/autofit/afblue.h b/thirdparty/freetype/src/autofit/afblue.h similarity index 100% rename from drivers/freetype/src/autofit/afblue.h rename to thirdparty/freetype/src/autofit/afblue.h diff --git a/drivers/freetype/src/autofit/afblue.hin b/thirdparty/freetype/src/autofit/afblue.hin similarity index 100% rename from drivers/freetype/src/autofit/afblue.hin rename to thirdparty/freetype/src/autofit/afblue.hin diff --git a/drivers/freetype/src/autofit/afcjk.c b/thirdparty/freetype/src/autofit/afcjk.c similarity index 100% rename from drivers/freetype/src/autofit/afcjk.c rename to thirdparty/freetype/src/autofit/afcjk.c diff --git a/drivers/freetype/src/autofit/afcjk.h b/thirdparty/freetype/src/autofit/afcjk.h similarity index 100% rename from drivers/freetype/src/autofit/afcjk.h rename to thirdparty/freetype/src/autofit/afcjk.h diff --git a/drivers/freetype/src/autofit/afcover.h b/thirdparty/freetype/src/autofit/afcover.h similarity index 100% rename from drivers/freetype/src/autofit/afcover.h rename to thirdparty/freetype/src/autofit/afcover.h diff --git a/drivers/freetype/src/autofit/afdummy.c b/thirdparty/freetype/src/autofit/afdummy.c similarity index 100% rename from drivers/freetype/src/autofit/afdummy.c rename to thirdparty/freetype/src/autofit/afdummy.c diff --git a/drivers/freetype/src/autofit/afdummy.h b/thirdparty/freetype/src/autofit/afdummy.h similarity index 100% rename from drivers/freetype/src/autofit/afdummy.h rename to thirdparty/freetype/src/autofit/afdummy.h diff --git a/drivers/freetype/src/autofit/aferrors.h b/thirdparty/freetype/src/autofit/aferrors.h similarity index 100% rename from drivers/freetype/src/autofit/aferrors.h rename to thirdparty/freetype/src/autofit/aferrors.h diff --git a/drivers/freetype/src/autofit/afglobal.c b/thirdparty/freetype/src/autofit/afglobal.c similarity index 100% rename from drivers/freetype/src/autofit/afglobal.c rename to thirdparty/freetype/src/autofit/afglobal.c diff --git a/drivers/freetype/src/autofit/afglobal.h b/thirdparty/freetype/src/autofit/afglobal.h similarity index 100% rename from drivers/freetype/src/autofit/afglobal.h rename to thirdparty/freetype/src/autofit/afglobal.h diff --git a/drivers/freetype/src/autofit/afhints.c b/thirdparty/freetype/src/autofit/afhints.c similarity index 100% rename from drivers/freetype/src/autofit/afhints.c rename to thirdparty/freetype/src/autofit/afhints.c diff --git a/drivers/freetype/src/autofit/afhints.h b/thirdparty/freetype/src/autofit/afhints.h similarity index 100% rename from drivers/freetype/src/autofit/afhints.h rename to thirdparty/freetype/src/autofit/afhints.h diff --git a/drivers/freetype/src/autofit/afindic.c b/thirdparty/freetype/src/autofit/afindic.c similarity index 100% rename from drivers/freetype/src/autofit/afindic.c rename to thirdparty/freetype/src/autofit/afindic.c diff --git a/drivers/freetype/src/autofit/afindic.h b/thirdparty/freetype/src/autofit/afindic.h similarity index 100% rename from drivers/freetype/src/autofit/afindic.h rename to thirdparty/freetype/src/autofit/afindic.h diff --git a/drivers/freetype/src/autofit/aflatin.c b/thirdparty/freetype/src/autofit/aflatin.c similarity index 100% rename from drivers/freetype/src/autofit/aflatin.c rename to thirdparty/freetype/src/autofit/aflatin.c diff --git a/drivers/freetype/src/autofit/aflatin.h b/thirdparty/freetype/src/autofit/aflatin.h similarity index 100% rename from drivers/freetype/src/autofit/aflatin.h rename to thirdparty/freetype/src/autofit/aflatin.h diff --git a/drivers/freetype/src/autofit/aflatin2.c b/thirdparty/freetype/src/autofit/aflatin2.c similarity index 100% rename from drivers/freetype/src/autofit/aflatin2.c rename to thirdparty/freetype/src/autofit/aflatin2.c diff --git a/drivers/freetype/src/autofit/aflatin2.h b/thirdparty/freetype/src/autofit/aflatin2.h similarity index 100% rename from drivers/freetype/src/autofit/aflatin2.h rename to thirdparty/freetype/src/autofit/aflatin2.h diff --git a/drivers/freetype/src/autofit/afloader.c b/thirdparty/freetype/src/autofit/afloader.c similarity index 100% rename from drivers/freetype/src/autofit/afloader.c rename to thirdparty/freetype/src/autofit/afloader.c diff --git a/drivers/freetype/src/autofit/afloader.h b/thirdparty/freetype/src/autofit/afloader.h similarity index 100% rename from drivers/freetype/src/autofit/afloader.h rename to thirdparty/freetype/src/autofit/afloader.h diff --git a/drivers/freetype/src/autofit/afmodule.c b/thirdparty/freetype/src/autofit/afmodule.c similarity index 100% rename from drivers/freetype/src/autofit/afmodule.c rename to thirdparty/freetype/src/autofit/afmodule.c diff --git a/drivers/freetype/src/autofit/afmodule.h b/thirdparty/freetype/src/autofit/afmodule.h similarity index 100% rename from drivers/freetype/src/autofit/afmodule.h rename to thirdparty/freetype/src/autofit/afmodule.h diff --git a/drivers/freetype/src/autofit/afpic.c b/thirdparty/freetype/src/autofit/afpic.c similarity index 100% rename from drivers/freetype/src/autofit/afpic.c rename to thirdparty/freetype/src/autofit/afpic.c diff --git a/drivers/freetype/src/autofit/afpic.h b/thirdparty/freetype/src/autofit/afpic.h similarity index 100% rename from drivers/freetype/src/autofit/afpic.h rename to thirdparty/freetype/src/autofit/afpic.h diff --git a/drivers/freetype/src/autofit/afranges.c b/thirdparty/freetype/src/autofit/afranges.c similarity index 100% rename from drivers/freetype/src/autofit/afranges.c rename to thirdparty/freetype/src/autofit/afranges.c diff --git a/drivers/freetype/src/autofit/afranges.h b/thirdparty/freetype/src/autofit/afranges.h similarity index 100% rename from drivers/freetype/src/autofit/afranges.h rename to thirdparty/freetype/src/autofit/afranges.h diff --git a/drivers/freetype/src/autofit/afscript.h b/thirdparty/freetype/src/autofit/afscript.h similarity index 100% rename from drivers/freetype/src/autofit/afscript.h rename to thirdparty/freetype/src/autofit/afscript.h diff --git a/drivers/freetype/src/autofit/afshaper.c b/thirdparty/freetype/src/autofit/afshaper.c similarity index 100% rename from drivers/freetype/src/autofit/afshaper.c rename to thirdparty/freetype/src/autofit/afshaper.c diff --git a/drivers/freetype/src/autofit/afshaper.h b/thirdparty/freetype/src/autofit/afshaper.h similarity index 100% rename from drivers/freetype/src/autofit/afshaper.h rename to thirdparty/freetype/src/autofit/afshaper.h diff --git a/drivers/freetype/src/autofit/afstyles.h b/thirdparty/freetype/src/autofit/afstyles.h similarity index 100% rename from drivers/freetype/src/autofit/afstyles.h rename to thirdparty/freetype/src/autofit/afstyles.h diff --git a/drivers/freetype/src/autofit/aftypes.h b/thirdparty/freetype/src/autofit/aftypes.h similarity index 100% rename from drivers/freetype/src/autofit/aftypes.h rename to thirdparty/freetype/src/autofit/aftypes.h diff --git a/drivers/freetype/src/autofit/afwarp.c b/thirdparty/freetype/src/autofit/afwarp.c similarity index 100% rename from drivers/freetype/src/autofit/afwarp.c rename to thirdparty/freetype/src/autofit/afwarp.c diff --git a/drivers/freetype/src/autofit/afwarp.h b/thirdparty/freetype/src/autofit/afwarp.h similarity index 100% rename from drivers/freetype/src/autofit/afwarp.h rename to thirdparty/freetype/src/autofit/afwarp.h diff --git a/drivers/freetype/src/autofit/afwrtsys.h b/thirdparty/freetype/src/autofit/afwrtsys.h similarity index 100% rename from drivers/freetype/src/autofit/afwrtsys.h rename to thirdparty/freetype/src/autofit/afwrtsys.h diff --git a/drivers/freetype/src/autofit/autofit.c b/thirdparty/freetype/src/autofit/autofit.c similarity index 100% rename from drivers/freetype/src/autofit/autofit.c rename to thirdparty/freetype/src/autofit/autofit.c diff --git a/drivers/freetype/src/autofit/module.mk b/thirdparty/freetype/src/autofit/module.mk similarity index 100% rename from drivers/freetype/src/autofit/module.mk rename to thirdparty/freetype/src/autofit/module.mk diff --git a/drivers/freetype/src/autofit/rules.mk b/thirdparty/freetype/src/autofit/rules.mk similarity index 100% rename from drivers/freetype/src/autofit/rules.mk rename to thirdparty/freetype/src/autofit/rules.mk diff --git a/drivers/freetype/src/base/basepic.c b/thirdparty/freetype/src/base/basepic.c similarity index 100% rename from drivers/freetype/src/base/basepic.c rename to thirdparty/freetype/src/base/basepic.c diff --git a/drivers/freetype/src/base/basepic.h b/thirdparty/freetype/src/base/basepic.h similarity index 100% rename from drivers/freetype/src/base/basepic.h rename to thirdparty/freetype/src/base/basepic.h diff --git a/drivers/freetype/src/base/ftadvanc.c b/thirdparty/freetype/src/base/ftadvanc.c similarity index 100% rename from drivers/freetype/src/base/ftadvanc.c rename to thirdparty/freetype/src/base/ftadvanc.c diff --git a/drivers/freetype/src/base/ftapi.c b/thirdparty/freetype/src/base/ftapi.c similarity index 100% rename from drivers/freetype/src/base/ftapi.c rename to thirdparty/freetype/src/base/ftapi.c diff --git a/drivers/freetype/src/base/ftbase.c b/thirdparty/freetype/src/base/ftbase.c similarity index 100% rename from drivers/freetype/src/base/ftbase.c rename to thirdparty/freetype/src/base/ftbase.c diff --git a/drivers/freetype/src/base/ftbase.h b/thirdparty/freetype/src/base/ftbase.h similarity index 100% rename from drivers/freetype/src/base/ftbase.h rename to thirdparty/freetype/src/base/ftbase.h diff --git a/drivers/freetype/src/base/ftbbox.c b/thirdparty/freetype/src/base/ftbbox.c similarity index 100% rename from drivers/freetype/src/base/ftbbox.c rename to thirdparty/freetype/src/base/ftbbox.c diff --git a/drivers/freetype/src/base/ftbdf.c b/thirdparty/freetype/src/base/ftbdf.c similarity index 100% rename from drivers/freetype/src/base/ftbdf.c rename to thirdparty/freetype/src/base/ftbdf.c diff --git a/drivers/freetype/src/base/ftbitmap.c b/thirdparty/freetype/src/base/ftbitmap.c similarity index 100% rename from drivers/freetype/src/base/ftbitmap.c rename to thirdparty/freetype/src/base/ftbitmap.c diff --git a/drivers/freetype/src/base/ftcalc.c b/thirdparty/freetype/src/base/ftcalc.c similarity index 100% rename from drivers/freetype/src/base/ftcalc.c rename to thirdparty/freetype/src/base/ftcalc.c diff --git a/drivers/freetype/src/base/ftcid.c b/thirdparty/freetype/src/base/ftcid.c similarity index 100% rename from drivers/freetype/src/base/ftcid.c rename to thirdparty/freetype/src/base/ftcid.c diff --git a/drivers/freetype/src/base/ftdbgmem.c b/thirdparty/freetype/src/base/ftdbgmem.c similarity index 100% rename from drivers/freetype/src/base/ftdbgmem.c rename to thirdparty/freetype/src/base/ftdbgmem.c diff --git a/drivers/freetype/src/base/ftdebug.c b/thirdparty/freetype/src/base/ftdebug.c similarity index 100% rename from drivers/freetype/src/base/ftdebug.c rename to thirdparty/freetype/src/base/ftdebug.c diff --git a/drivers/freetype/src/base/ftfntfmt.c b/thirdparty/freetype/src/base/ftfntfmt.c similarity index 100% rename from drivers/freetype/src/base/ftfntfmt.c rename to thirdparty/freetype/src/base/ftfntfmt.c diff --git a/drivers/freetype/src/base/ftfstype.c b/thirdparty/freetype/src/base/ftfstype.c similarity index 100% rename from drivers/freetype/src/base/ftfstype.c rename to thirdparty/freetype/src/base/ftfstype.c diff --git a/drivers/freetype/src/base/ftgasp.c b/thirdparty/freetype/src/base/ftgasp.c similarity index 100% rename from drivers/freetype/src/base/ftgasp.c rename to thirdparty/freetype/src/base/ftgasp.c diff --git a/drivers/freetype/src/base/ftgloadr.c b/thirdparty/freetype/src/base/ftgloadr.c similarity index 100% rename from drivers/freetype/src/base/ftgloadr.c rename to thirdparty/freetype/src/base/ftgloadr.c diff --git a/drivers/freetype/src/base/ftglyph.c b/thirdparty/freetype/src/base/ftglyph.c similarity index 100% rename from drivers/freetype/src/base/ftglyph.c rename to thirdparty/freetype/src/base/ftglyph.c diff --git a/drivers/freetype/src/base/ftgxval.c b/thirdparty/freetype/src/base/ftgxval.c similarity index 100% rename from drivers/freetype/src/base/ftgxval.c rename to thirdparty/freetype/src/base/ftgxval.c diff --git a/drivers/freetype/src/base/fthash.c b/thirdparty/freetype/src/base/fthash.c similarity index 100% rename from drivers/freetype/src/base/fthash.c rename to thirdparty/freetype/src/base/fthash.c diff --git a/drivers/freetype/src/base/ftinit.c b/thirdparty/freetype/src/base/ftinit.c similarity index 100% rename from drivers/freetype/src/base/ftinit.c rename to thirdparty/freetype/src/base/ftinit.c diff --git a/drivers/freetype/src/base/ftlcdfil.c b/thirdparty/freetype/src/base/ftlcdfil.c similarity index 100% rename from drivers/freetype/src/base/ftlcdfil.c rename to thirdparty/freetype/src/base/ftlcdfil.c diff --git a/drivers/freetype/src/base/ftmac.c b/thirdparty/freetype/src/base/ftmac.c similarity index 100% rename from drivers/freetype/src/base/ftmac.c rename to thirdparty/freetype/src/base/ftmac.c diff --git a/drivers/freetype/src/base/ftmm.c b/thirdparty/freetype/src/base/ftmm.c similarity index 100% rename from drivers/freetype/src/base/ftmm.c rename to thirdparty/freetype/src/base/ftmm.c diff --git a/drivers/freetype/src/base/ftobjs.c b/thirdparty/freetype/src/base/ftobjs.c similarity index 100% rename from drivers/freetype/src/base/ftobjs.c rename to thirdparty/freetype/src/base/ftobjs.c diff --git a/drivers/freetype/src/base/ftotval.c b/thirdparty/freetype/src/base/ftotval.c similarity index 100% rename from drivers/freetype/src/base/ftotval.c rename to thirdparty/freetype/src/base/ftotval.c diff --git a/drivers/freetype/src/base/ftoutln.c b/thirdparty/freetype/src/base/ftoutln.c similarity index 100% rename from drivers/freetype/src/base/ftoutln.c rename to thirdparty/freetype/src/base/ftoutln.c diff --git a/drivers/freetype/src/base/ftpatent.c b/thirdparty/freetype/src/base/ftpatent.c similarity index 100% rename from drivers/freetype/src/base/ftpatent.c rename to thirdparty/freetype/src/base/ftpatent.c diff --git a/drivers/freetype/src/base/ftpfr.c b/thirdparty/freetype/src/base/ftpfr.c similarity index 100% rename from drivers/freetype/src/base/ftpfr.c rename to thirdparty/freetype/src/base/ftpfr.c diff --git a/drivers/freetype/src/base/ftpic.c b/thirdparty/freetype/src/base/ftpic.c similarity index 100% rename from drivers/freetype/src/base/ftpic.c rename to thirdparty/freetype/src/base/ftpic.c diff --git a/drivers/freetype/src/base/ftrfork.c b/thirdparty/freetype/src/base/ftrfork.c similarity index 100% rename from drivers/freetype/src/base/ftrfork.c rename to thirdparty/freetype/src/base/ftrfork.c diff --git a/drivers/freetype/src/base/ftsnames.c b/thirdparty/freetype/src/base/ftsnames.c similarity index 100% rename from drivers/freetype/src/base/ftsnames.c rename to thirdparty/freetype/src/base/ftsnames.c diff --git a/drivers/freetype/src/base/ftstream.c b/thirdparty/freetype/src/base/ftstream.c similarity index 100% rename from drivers/freetype/src/base/ftstream.c rename to thirdparty/freetype/src/base/ftstream.c diff --git a/drivers/freetype/src/base/ftstroke.c b/thirdparty/freetype/src/base/ftstroke.c similarity index 100% rename from drivers/freetype/src/base/ftstroke.c rename to thirdparty/freetype/src/base/ftstroke.c diff --git a/drivers/freetype/src/base/ftsynth.c b/thirdparty/freetype/src/base/ftsynth.c similarity index 100% rename from drivers/freetype/src/base/ftsynth.c rename to thirdparty/freetype/src/base/ftsynth.c diff --git a/drivers/freetype/src/base/ftsystem.c b/thirdparty/freetype/src/base/ftsystem.c similarity index 100% rename from drivers/freetype/src/base/ftsystem.c rename to thirdparty/freetype/src/base/ftsystem.c diff --git a/drivers/freetype/src/base/fttrigon.c b/thirdparty/freetype/src/base/fttrigon.c similarity index 100% rename from drivers/freetype/src/base/fttrigon.c rename to thirdparty/freetype/src/base/fttrigon.c diff --git a/drivers/freetype/src/base/fttype1.c b/thirdparty/freetype/src/base/fttype1.c similarity index 100% rename from drivers/freetype/src/base/fttype1.c rename to thirdparty/freetype/src/base/fttype1.c diff --git a/drivers/freetype/src/base/ftutil.c b/thirdparty/freetype/src/base/ftutil.c similarity index 100% rename from drivers/freetype/src/base/ftutil.c rename to thirdparty/freetype/src/base/ftutil.c diff --git a/drivers/freetype/src/base/ftwinfnt.c b/thirdparty/freetype/src/base/ftwinfnt.c similarity index 100% rename from drivers/freetype/src/base/ftwinfnt.c rename to thirdparty/freetype/src/base/ftwinfnt.c diff --git a/drivers/freetype/src/base/md5.c b/thirdparty/freetype/src/base/md5.c similarity index 100% rename from drivers/freetype/src/base/md5.c rename to thirdparty/freetype/src/base/md5.c diff --git a/drivers/freetype/src/base/md5.h b/thirdparty/freetype/src/base/md5.h similarity index 100% rename from drivers/freetype/src/base/md5.h rename to thirdparty/freetype/src/base/md5.h diff --git a/drivers/freetype/src/base/rules.mk b/thirdparty/freetype/src/base/rules.mk similarity index 100% rename from drivers/freetype/src/base/rules.mk rename to thirdparty/freetype/src/base/rules.mk diff --git a/drivers/freetype/src/bdf/README b/thirdparty/freetype/src/bdf/README similarity index 100% rename from drivers/freetype/src/bdf/README rename to thirdparty/freetype/src/bdf/README diff --git a/drivers/freetype/src/bdf/bdf.c b/thirdparty/freetype/src/bdf/bdf.c similarity index 100% rename from drivers/freetype/src/bdf/bdf.c rename to thirdparty/freetype/src/bdf/bdf.c diff --git a/drivers/freetype/src/bdf/bdf.h b/thirdparty/freetype/src/bdf/bdf.h similarity index 100% rename from drivers/freetype/src/bdf/bdf.h rename to thirdparty/freetype/src/bdf/bdf.h diff --git a/drivers/freetype/src/bdf/bdfdrivr.c b/thirdparty/freetype/src/bdf/bdfdrivr.c similarity index 100% rename from drivers/freetype/src/bdf/bdfdrivr.c rename to thirdparty/freetype/src/bdf/bdfdrivr.c diff --git a/drivers/freetype/src/bdf/bdfdrivr.h b/thirdparty/freetype/src/bdf/bdfdrivr.h similarity index 100% rename from drivers/freetype/src/bdf/bdfdrivr.h rename to thirdparty/freetype/src/bdf/bdfdrivr.h diff --git a/drivers/freetype/src/bdf/bdferror.h b/thirdparty/freetype/src/bdf/bdferror.h similarity index 100% rename from drivers/freetype/src/bdf/bdferror.h rename to thirdparty/freetype/src/bdf/bdferror.h diff --git a/drivers/freetype/src/bdf/bdflib.c b/thirdparty/freetype/src/bdf/bdflib.c similarity index 100% rename from drivers/freetype/src/bdf/bdflib.c rename to thirdparty/freetype/src/bdf/bdflib.c diff --git a/drivers/freetype/src/bdf/module.mk b/thirdparty/freetype/src/bdf/module.mk similarity index 100% rename from drivers/freetype/src/bdf/module.mk rename to thirdparty/freetype/src/bdf/module.mk diff --git a/drivers/freetype/src/bdf/rules.mk b/thirdparty/freetype/src/bdf/rules.mk similarity index 100% rename from drivers/freetype/src/bdf/rules.mk rename to thirdparty/freetype/src/bdf/rules.mk diff --git a/drivers/freetype/src/cache/ftcache.c b/thirdparty/freetype/src/cache/ftcache.c similarity index 100% rename from drivers/freetype/src/cache/ftcache.c rename to thirdparty/freetype/src/cache/ftcache.c diff --git a/drivers/freetype/src/cache/ftcbasic.c b/thirdparty/freetype/src/cache/ftcbasic.c similarity index 100% rename from drivers/freetype/src/cache/ftcbasic.c rename to thirdparty/freetype/src/cache/ftcbasic.c diff --git a/drivers/freetype/src/cache/ftccache.c b/thirdparty/freetype/src/cache/ftccache.c similarity index 100% rename from drivers/freetype/src/cache/ftccache.c rename to thirdparty/freetype/src/cache/ftccache.c diff --git a/drivers/freetype/src/cache/ftccache.h b/thirdparty/freetype/src/cache/ftccache.h similarity index 100% rename from drivers/freetype/src/cache/ftccache.h rename to thirdparty/freetype/src/cache/ftccache.h diff --git a/drivers/freetype/src/cache/ftccback.h b/thirdparty/freetype/src/cache/ftccback.h similarity index 100% rename from drivers/freetype/src/cache/ftccback.h rename to thirdparty/freetype/src/cache/ftccback.h diff --git a/drivers/freetype/src/cache/ftccmap.c b/thirdparty/freetype/src/cache/ftccmap.c similarity index 100% rename from drivers/freetype/src/cache/ftccmap.c rename to thirdparty/freetype/src/cache/ftccmap.c diff --git a/drivers/freetype/src/cache/ftcerror.h b/thirdparty/freetype/src/cache/ftcerror.h similarity index 100% rename from drivers/freetype/src/cache/ftcerror.h rename to thirdparty/freetype/src/cache/ftcerror.h diff --git a/drivers/freetype/src/cache/ftcglyph.c b/thirdparty/freetype/src/cache/ftcglyph.c similarity index 100% rename from drivers/freetype/src/cache/ftcglyph.c rename to thirdparty/freetype/src/cache/ftcglyph.c diff --git a/drivers/freetype/src/cache/ftcglyph.h b/thirdparty/freetype/src/cache/ftcglyph.h similarity index 100% rename from drivers/freetype/src/cache/ftcglyph.h rename to thirdparty/freetype/src/cache/ftcglyph.h diff --git a/drivers/freetype/src/cache/ftcimage.c b/thirdparty/freetype/src/cache/ftcimage.c similarity index 100% rename from drivers/freetype/src/cache/ftcimage.c rename to thirdparty/freetype/src/cache/ftcimage.c diff --git a/drivers/freetype/src/cache/ftcimage.h b/thirdparty/freetype/src/cache/ftcimage.h similarity index 100% rename from drivers/freetype/src/cache/ftcimage.h rename to thirdparty/freetype/src/cache/ftcimage.h diff --git a/drivers/freetype/src/cache/ftcmanag.c b/thirdparty/freetype/src/cache/ftcmanag.c similarity index 100% rename from drivers/freetype/src/cache/ftcmanag.c rename to thirdparty/freetype/src/cache/ftcmanag.c diff --git a/drivers/freetype/src/cache/ftcmanag.h b/thirdparty/freetype/src/cache/ftcmanag.h similarity index 100% rename from drivers/freetype/src/cache/ftcmanag.h rename to thirdparty/freetype/src/cache/ftcmanag.h diff --git a/drivers/freetype/src/cache/ftcmru.c b/thirdparty/freetype/src/cache/ftcmru.c similarity index 100% rename from drivers/freetype/src/cache/ftcmru.c rename to thirdparty/freetype/src/cache/ftcmru.c diff --git a/drivers/freetype/src/cache/ftcmru.h b/thirdparty/freetype/src/cache/ftcmru.h similarity index 100% rename from drivers/freetype/src/cache/ftcmru.h rename to thirdparty/freetype/src/cache/ftcmru.h diff --git a/drivers/freetype/src/cache/ftcsbits.c b/thirdparty/freetype/src/cache/ftcsbits.c similarity index 100% rename from drivers/freetype/src/cache/ftcsbits.c rename to thirdparty/freetype/src/cache/ftcsbits.c diff --git a/drivers/freetype/src/cache/ftcsbits.h b/thirdparty/freetype/src/cache/ftcsbits.h similarity index 100% rename from drivers/freetype/src/cache/ftcsbits.h rename to thirdparty/freetype/src/cache/ftcsbits.h diff --git a/drivers/freetype/src/cache/rules.mk b/thirdparty/freetype/src/cache/rules.mk similarity index 100% rename from drivers/freetype/src/cache/rules.mk rename to thirdparty/freetype/src/cache/rules.mk diff --git a/drivers/freetype/src/cff/cf2arrst.c b/thirdparty/freetype/src/cff/cf2arrst.c similarity index 100% rename from drivers/freetype/src/cff/cf2arrst.c rename to thirdparty/freetype/src/cff/cf2arrst.c diff --git a/drivers/freetype/src/cff/cf2arrst.h b/thirdparty/freetype/src/cff/cf2arrst.h similarity index 100% rename from drivers/freetype/src/cff/cf2arrst.h rename to thirdparty/freetype/src/cff/cf2arrst.h diff --git a/drivers/freetype/src/cff/cf2blues.c b/thirdparty/freetype/src/cff/cf2blues.c similarity index 100% rename from drivers/freetype/src/cff/cf2blues.c rename to thirdparty/freetype/src/cff/cf2blues.c diff --git a/drivers/freetype/src/cff/cf2blues.h b/thirdparty/freetype/src/cff/cf2blues.h similarity index 100% rename from drivers/freetype/src/cff/cf2blues.h rename to thirdparty/freetype/src/cff/cf2blues.h diff --git a/drivers/freetype/src/cff/cf2error.c b/thirdparty/freetype/src/cff/cf2error.c similarity index 100% rename from drivers/freetype/src/cff/cf2error.c rename to thirdparty/freetype/src/cff/cf2error.c diff --git a/drivers/freetype/src/cff/cf2error.h b/thirdparty/freetype/src/cff/cf2error.h similarity index 100% rename from drivers/freetype/src/cff/cf2error.h rename to thirdparty/freetype/src/cff/cf2error.h diff --git a/drivers/freetype/src/cff/cf2fixed.h b/thirdparty/freetype/src/cff/cf2fixed.h similarity index 100% rename from drivers/freetype/src/cff/cf2fixed.h rename to thirdparty/freetype/src/cff/cf2fixed.h diff --git a/drivers/freetype/src/cff/cf2font.c b/thirdparty/freetype/src/cff/cf2font.c similarity index 100% rename from drivers/freetype/src/cff/cf2font.c rename to thirdparty/freetype/src/cff/cf2font.c diff --git a/drivers/freetype/src/cff/cf2font.h b/thirdparty/freetype/src/cff/cf2font.h similarity index 100% rename from drivers/freetype/src/cff/cf2font.h rename to thirdparty/freetype/src/cff/cf2font.h diff --git a/drivers/freetype/src/cff/cf2ft.c b/thirdparty/freetype/src/cff/cf2ft.c similarity index 100% rename from drivers/freetype/src/cff/cf2ft.c rename to thirdparty/freetype/src/cff/cf2ft.c diff --git a/drivers/freetype/src/cff/cf2ft.h b/thirdparty/freetype/src/cff/cf2ft.h similarity index 100% rename from drivers/freetype/src/cff/cf2ft.h rename to thirdparty/freetype/src/cff/cf2ft.h diff --git a/drivers/freetype/src/cff/cf2glue.h b/thirdparty/freetype/src/cff/cf2glue.h similarity index 100% rename from drivers/freetype/src/cff/cf2glue.h rename to thirdparty/freetype/src/cff/cf2glue.h diff --git a/drivers/freetype/src/cff/cf2hints.c b/thirdparty/freetype/src/cff/cf2hints.c similarity index 100% rename from drivers/freetype/src/cff/cf2hints.c rename to thirdparty/freetype/src/cff/cf2hints.c diff --git a/drivers/freetype/src/cff/cf2hints.h b/thirdparty/freetype/src/cff/cf2hints.h similarity index 100% rename from drivers/freetype/src/cff/cf2hints.h rename to thirdparty/freetype/src/cff/cf2hints.h diff --git a/drivers/freetype/src/cff/cf2intrp.c b/thirdparty/freetype/src/cff/cf2intrp.c similarity index 100% rename from drivers/freetype/src/cff/cf2intrp.c rename to thirdparty/freetype/src/cff/cf2intrp.c diff --git a/drivers/freetype/src/cff/cf2intrp.h b/thirdparty/freetype/src/cff/cf2intrp.h similarity index 100% rename from drivers/freetype/src/cff/cf2intrp.h rename to thirdparty/freetype/src/cff/cf2intrp.h diff --git a/drivers/freetype/src/cff/cf2read.c b/thirdparty/freetype/src/cff/cf2read.c similarity index 100% rename from drivers/freetype/src/cff/cf2read.c rename to thirdparty/freetype/src/cff/cf2read.c diff --git a/drivers/freetype/src/cff/cf2read.h b/thirdparty/freetype/src/cff/cf2read.h similarity index 100% rename from drivers/freetype/src/cff/cf2read.h rename to thirdparty/freetype/src/cff/cf2read.h diff --git a/drivers/freetype/src/cff/cf2stack.c b/thirdparty/freetype/src/cff/cf2stack.c similarity index 100% rename from drivers/freetype/src/cff/cf2stack.c rename to thirdparty/freetype/src/cff/cf2stack.c diff --git a/drivers/freetype/src/cff/cf2stack.h b/thirdparty/freetype/src/cff/cf2stack.h similarity index 100% rename from drivers/freetype/src/cff/cf2stack.h rename to thirdparty/freetype/src/cff/cf2stack.h diff --git a/drivers/freetype/src/cff/cf2types.h b/thirdparty/freetype/src/cff/cf2types.h similarity index 100% rename from drivers/freetype/src/cff/cf2types.h rename to thirdparty/freetype/src/cff/cf2types.h diff --git a/drivers/freetype/src/cff/cff.c b/thirdparty/freetype/src/cff/cff.c similarity index 100% rename from drivers/freetype/src/cff/cff.c rename to thirdparty/freetype/src/cff/cff.c diff --git a/drivers/freetype/src/cff/cffcmap.c b/thirdparty/freetype/src/cff/cffcmap.c similarity index 100% rename from drivers/freetype/src/cff/cffcmap.c rename to thirdparty/freetype/src/cff/cffcmap.c diff --git a/drivers/freetype/src/cff/cffcmap.h b/thirdparty/freetype/src/cff/cffcmap.h similarity index 100% rename from drivers/freetype/src/cff/cffcmap.h rename to thirdparty/freetype/src/cff/cffcmap.h diff --git a/drivers/freetype/src/cff/cffdrivr.c b/thirdparty/freetype/src/cff/cffdrivr.c similarity index 100% rename from drivers/freetype/src/cff/cffdrivr.c rename to thirdparty/freetype/src/cff/cffdrivr.c diff --git a/drivers/freetype/src/cff/cffdrivr.h b/thirdparty/freetype/src/cff/cffdrivr.h similarity index 100% rename from drivers/freetype/src/cff/cffdrivr.h rename to thirdparty/freetype/src/cff/cffdrivr.h diff --git a/drivers/freetype/src/cff/cfferrs.h b/thirdparty/freetype/src/cff/cfferrs.h similarity index 100% rename from drivers/freetype/src/cff/cfferrs.h rename to thirdparty/freetype/src/cff/cfferrs.h diff --git a/drivers/freetype/src/cff/cffgload.c b/thirdparty/freetype/src/cff/cffgload.c similarity index 100% rename from drivers/freetype/src/cff/cffgload.c rename to thirdparty/freetype/src/cff/cffgload.c diff --git a/drivers/freetype/src/cff/cffgload.h b/thirdparty/freetype/src/cff/cffgload.h similarity index 100% rename from drivers/freetype/src/cff/cffgload.h rename to thirdparty/freetype/src/cff/cffgload.h diff --git a/drivers/freetype/src/cff/cffload.c b/thirdparty/freetype/src/cff/cffload.c similarity index 100% rename from drivers/freetype/src/cff/cffload.c rename to thirdparty/freetype/src/cff/cffload.c diff --git a/drivers/freetype/src/cff/cffload.h b/thirdparty/freetype/src/cff/cffload.h similarity index 100% rename from drivers/freetype/src/cff/cffload.h rename to thirdparty/freetype/src/cff/cffload.h diff --git a/drivers/freetype/src/cff/cffobjs.c b/thirdparty/freetype/src/cff/cffobjs.c similarity index 100% rename from drivers/freetype/src/cff/cffobjs.c rename to thirdparty/freetype/src/cff/cffobjs.c diff --git a/drivers/freetype/src/cff/cffobjs.h b/thirdparty/freetype/src/cff/cffobjs.h similarity index 100% rename from drivers/freetype/src/cff/cffobjs.h rename to thirdparty/freetype/src/cff/cffobjs.h diff --git a/drivers/freetype/src/cff/cffparse.c b/thirdparty/freetype/src/cff/cffparse.c similarity index 100% rename from drivers/freetype/src/cff/cffparse.c rename to thirdparty/freetype/src/cff/cffparse.c diff --git a/drivers/freetype/src/cff/cffparse.h b/thirdparty/freetype/src/cff/cffparse.h similarity index 100% rename from drivers/freetype/src/cff/cffparse.h rename to thirdparty/freetype/src/cff/cffparse.h diff --git a/drivers/freetype/src/cff/cffpic.c b/thirdparty/freetype/src/cff/cffpic.c similarity index 100% rename from drivers/freetype/src/cff/cffpic.c rename to thirdparty/freetype/src/cff/cffpic.c diff --git a/drivers/freetype/src/cff/cffpic.h b/thirdparty/freetype/src/cff/cffpic.h similarity index 100% rename from drivers/freetype/src/cff/cffpic.h rename to thirdparty/freetype/src/cff/cffpic.h diff --git a/drivers/freetype/src/cff/cfftoken.h b/thirdparty/freetype/src/cff/cfftoken.h similarity index 100% rename from drivers/freetype/src/cff/cfftoken.h rename to thirdparty/freetype/src/cff/cfftoken.h diff --git a/drivers/freetype/src/cff/cfftypes.h b/thirdparty/freetype/src/cff/cfftypes.h similarity index 100% rename from drivers/freetype/src/cff/cfftypes.h rename to thirdparty/freetype/src/cff/cfftypes.h diff --git a/drivers/freetype/src/cff/module.mk b/thirdparty/freetype/src/cff/module.mk similarity index 100% rename from drivers/freetype/src/cff/module.mk rename to thirdparty/freetype/src/cff/module.mk diff --git a/drivers/freetype/src/cff/rules.mk b/thirdparty/freetype/src/cff/rules.mk similarity index 100% rename from drivers/freetype/src/cff/rules.mk rename to thirdparty/freetype/src/cff/rules.mk diff --git a/drivers/freetype/src/cid/ciderrs.h b/thirdparty/freetype/src/cid/ciderrs.h similarity index 100% rename from drivers/freetype/src/cid/ciderrs.h rename to thirdparty/freetype/src/cid/ciderrs.h diff --git a/drivers/freetype/src/cid/cidgload.c b/thirdparty/freetype/src/cid/cidgload.c similarity index 100% rename from drivers/freetype/src/cid/cidgload.c rename to thirdparty/freetype/src/cid/cidgload.c diff --git a/drivers/freetype/src/cid/cidgload.h b/thirdparty/freetype/src/cid/cidgload.h similarity index 100% rename from drivers/freetype/src/cid/cidgload.h rename to thirdparty/freetype/src/cid/cidgload.h diff --git a/drivers/freetype/src/cid/cidload.c b/thirdparty/freetype/src/cid/cidload.c similarity index 100% rename from drivers/freetype/src/cid/cidload.c rename to thirdparty/freetype/src/cid/cidload.c diff --git a/drivers/freetype/src/cid/cidload.h b/thirdparty/freetype/src/cid/cidload.h similarity index 100% rename from drivers/freetype/src/cid/cidload.h rename to thirdparty/freetype/src/cid/cidload.h diff --git a/drivers/freetype/src/cid/cidobjs.c b/thirdparty/freetype/src/cid/cidobjs.c similarity index 100% rename from drivers/freetype/src/cid/cidobjs.c rename to thirdparty/freetype/src/cid/cidobjs.c diff --git a/drivers/freetype/src/cid/cidobjs.h b/thirdparty/freetype/src/cid/cidobjs.h similarity index 100% rename from drivers/freetype/src/cid/cidobjs.h rename to thirdparty/freetype/src/cid/cidobjs.h diff --git a/drivers/freetype/src/cid/cidparse.c b/thirdparty/freetype/src/cid/cidparse.c similarity index 100% rename from drivers/freetype/src/cid/cidparse.c rename to thirdparty/freetype/src/cid/cidparse.c diff --git a/drivers/freetype/src/cid/cidparse.h b/thirdparty/freetype/src/cid/cidparse.h similarity index 100% rename from drivers/freetype/src/cid/cidparse.h rename to thirdparty/freetype/src/cid/cidparse.h diff --git a/drivers/freetype/src/cid/cidriver.c b/thirdparty/freetype/src/cid/cidriver.c similarity index 100% rename from drivers/freetype/src/cid/cidriver.c rename to thirdparty/freetype/src/cid/cidriver.c diff --git a/drivers/freetype/src/cid/cidriver.h b/thirdparty/freetype/src/cid/cidriver.h similarity index 100% rename from drivers/freetype/src/cid/cidriver.h rename to thirdparty/freetype/src/cid/cidriver.h diff --git a/drivers/freetype/src/cid/cidtoken.h b/thirdparty/freetype/src/cid/cidtoken.h similarity index 100% rename from drivers/freetype/src/cid/cidtoken.h rename to thirdparty/freetype/src/cid/cidtoken.h diff --git a/drivers/freetype/src/cid/module.mk b/thirdparty/freetype/src/cid/module.mk similarity index 100% rename from drivers/freetype/src/cid/module.mk rename to thirdparty/freetype/src/cid/module.mk diff --git a/drivers/freetype/src/cid/rules.mk b/thirdparty/freetype/src/cid/rules.mk similarity index 100% rename from drivers/freetype/src/cid/rules.mk rename to thirdparty/freetype/src/cid/rules.mk diff --git a/drivers/freetype/src/cid/type1cid.c b/thirdparty/freetype/src/cid/type1cid.c similarity index 100% rename from drivers/freetype/src/cid/type1cid.c rename to thirdparty/freetype/src/cid/type1cid.c diff --git a/drivers/freetype/src/gxvalid/README b/thirdparty/freetype/src/gxvalid/README similarity index 100% rename from drivers/freetype/src/gxvalid/README rename to thirdparty/freetype/src/gxvalid/README diff --git a/drivers/freetype/src/gxvalid/gxvalid.c b/thirdparty/freetype/src/gxvalid/gxvalid.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvalid.c rename to thirdparty/freetype/src/gxvalid/gxvalid.c diff --git a/drivers/freetype/src/gxvalid/gxvalid.h b/thirdparty/freetype/src/gxvalid/gxvalid.h similarity index 100% rename from drivers/freetype/src/gxvalid/gxvalid.h rename to thirdparty/freetype/src/gxvalid/gxvalid.h diff --git a/drivers/freetype/src/gxvalid/gxvbsln.c b/thirdparty/freetype/src/gxvalid/gxvbsln.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvbsln.c rename to thirdparty/freetype/src/gxvalid/gxvbsln.c diff --git a/drivers/freetype/src/gxvalid/gxvcommn.c b/thirdparty/freetype/src/gxvalid/gxvcommn.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvcommn.c rename to thirdparty/freetype/src/gxvalid/gxvcommn.c diff --git a/drivers/freetype/src/gxvalid/gxvcommn.h b/thirdparty/freetype/src/gxvalid/gxvcommn.h similarity index 100% rename from drivers/freetype/src/gxvalid/gxvcommn.h rename to thirdparty/freetype/src/gxvalid/gxvcommn.h diff --git a/drivers/freetype/src/gxvalid/gxverror.h b/thirdparty/freetype/src/gxvalid/gxverror.h similarity index 100% rename from drivers/freetype/src/gxvalid/gxverror.h rename to thirdparty/freetype/src/gxvalid/gxverror.h diff --git a/drivers/freetype/src/gxvalid/gxvfeat.c b/thirdparty/freetype/src/gxvalid/gxvfeat.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvfeat.c rename to thirdparty/freetype/src/gxvalid/gxvfeat.c diff --git a/drivers/freetype/src/gxvalid/gxvfeat.h b/thirdparty/freetype/src/gxvalid/gxvfeat.h similarity index 100% rename from drivers/freetype/src/gxvalid/gxvfeat.h rename to thirdparty/freetype/src/gxvalid/gxvfeat.h diff --git a/drivers/freetype/src/gxvalid/gxvfgen.c b/thirdparty/freetype/src/gxvalid/gxvfgen.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvfgen.c rename to thirdparty/freetype/src/gxvalid/gxvfgen.c diff --git a/drivers/freetype/src/gxvalid/gxvjust.c b/thirdparty/freetype/src/gxvalid/gxvjust.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvjust.c rename to thirdparty/freetype/src/gxvalid/gxvjust.c diff --git a/drivers/freetype/src/gxvalid/gxvkern.c b/thirdparty/freetype/src/gxvalid/gxvkern.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvkern.c rename to thirdparty/freetype/src/gxvalid/gxvkern.c diff --git a/drivers/freetype/src/gxvalid/gxvlcar.c b/thirdparty/freetype/src/gxvalid/gxvlcar.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvlcar.c rename to thirdparty/freetype/src/gxvalid/gxvlcar.c diff --git a/drivers/freetype/src/gxvalid/gxvmod.c b/thirdparty/freetype/src/gxvalid/gxvmod.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvmod.c rename to thirdparty/freetype/src/gxvalid/gxvmod.c diff --git a/drivers/freetype/src/gxvalid/gxvmod.h b/thirdparty/freetype/src/gxvalid/gxvmod.h similarity index 100% rename from drivers/freetype/src/gxvalid/gxvmod.h rename to thirdparty/freetype/src/gxvalid/gxvmod.h diff --git a/drivers/freetype/src/gxvalid/gxvmort.c b/thirdparty/freetype/src/gxvalid/gxvmort.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvmort.c rename to thirdparty/freetype/src/gxvalid/gxvmort.c diff --git a/drivers/freetype/src/gxvalid/gxvmort.h b/thirdparty/freetype/src/gxvalid/gxvmort.h similarity index 100% rename from drivers/freetype/src/gxvalid/gxvmort.h rename to thirdparty/freetype/src/gxvalid/gxvmort.h diff --git a/drivers/freetype/src/gxvalid/gxvmort0.c b/thirdparty/freetype/src/gxvalid/gxvmort0.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvmort0.c rename to thirdparty/freetype/src/gxvalid/gxvmort0.c diff --git a/drivers/freetype/src/gxvalid/gxvmort1.c b/thirdparty/freetype/src/gxvalid/gxvmort1.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvmort1.c rename to thirdparty/freetype/src/gxvalid/gxvmort1.c diff --git a/drivers/freetype/src/gxvalid/gxvmort2.c b/thirdparty/freetype/src/gxvalid/gxvmort2.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvmort2.c rename to thirdparty/freetype/src/gxvalid/gxvmort2.c diff --git a/drivers/freetype/src/gxvalid/gxvmort4.c b/thirdparty/freetype/src/gxvalid/gxvmort4.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvmort4.c rename to thirdparty/freetype/src/gxvalid/gxvmort4.c diff --git a/drivers/freetype/src/gxvalid/gxvmort5.c b/thirdparty/freetype/src/gxvalid/gxvmort5.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvmort5.c rename to thirdparty/freetype/src/gxvalid/gxvmort5.c diff --git a/drivers/freetype/src/gxvalid/gxvmorx.c b/thirdparty/freetype/src/gxvalid/gxvmorx.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvmorx.c rename to thirdparty/freetype/src/gxvalid/gxvmorx.c diff --git a/drivers/freetype/src/gxvalid/gxvmorx.h b/thirdparty/freetype/src/gxvalid/gxvmorx.h similarity index 100% rename from drivers/freetype/src/gxvalid/gxvmorx.h rename to thirdparty/freetype/src/gxvalid/gxvmorx.h diff --git a/drivers/freetype/src/gxvalid/gxvmorx0.c b/thirdparty/freetype/src/gxvalid/gxvmorx0.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvmorx0.c rename to thirdparty/freetype/src/gxvalid/gxvmorx0.c diff --git a/drivers/freetype/src/gxvalid/gxvmorx1.c b/thirdparty/freetype/src/gxvalid/gxvmorx1.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvmorx1.c rename to thirdparty/freetype/src/gxvalid/gxvmorx1.c diff --git a/drivers/freetype/src/gxvalid/gxvmorx2.c b/thirdparty/freetype/src/gxvalid/gxvmorx2.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvmorx2.c rename to thirdparty/freetype/src/gxvalid/gxvmorx2.c diff --git a/drivers/freetype/src/gxvalid/gxvmorx4.c b/thirdparty/freetype/src/gxvalid/gxvmorx4.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvmorx4.c rename to thirdparty/freetype/src/gxvalid/gxvmorx4.c diff --git a/drivers/freetype/src/gxvalid/gxvmorx5.c b/thirdparty/freetype/src/gxvalid/gxvmorx5.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvmorx5.c rename to thirdparty/freetype/src/gxvalid/gxvmorx5.c diff --git a/drivers/freetype/src/gxvalid/gxvopbd.c b/thirdparty/freetype/src/gxvalid/gxvopbd.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvopbd.c rename to thirdparty/freetype/src/gxvalid/gxvopbd.c diff --git a/drivers/freetype/src/gxvalid/gxvprop.c b/thirdparty/freetype/src/gxvalid/gxvprop.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvprop.c rename to thirdparty/freetype/src/gxvalid/gxvprop.c diff --git a/drivers/freetype/src/gxvalid/gxvtrak.c b/thirdparty/freetype/src/gxvalid/gxvtrak.c similarity index 100% rename from drivers/freetype/src/gxvalid/gxvtrak.c rename to thirdparty/freetype/src/gxvalid/gxvtrak.c diff --git a/drivers/freetype/src/gxvalid/module.mk b/thirdparty/freetype/src/gxvalid/module.mk similarity index 100% rename from drivers/freetype/src/gxvalid/module.mk rename to thirdparty/freetype/src/gxvalid/module.mk diff --git a/drivers/freetype/src/gxvalid/rules.mk b/thirdparty/freetype/src/gxvalid/rules.mk similarity index 100% rename from drivers/freetype/src/gxvalid/rules.mk rename to thirdparty/freetype/src/gxvalid/rules.mk diff --git a/drivers/freetype/src/otvalid/module.mk b/thirdparty/freetype/src/otvalid/module.mk similarity index 100% rename from drivers/freetype/src/otvalid/module.mk rename to thirdparty/freetype/src/otvalid/module.mk diff --git a/drivers/freetype/src/otvalid/otvalid.c b/thirdparty/freetype/src/otvalid/otvalid.c similarity index 100% rename from drivers/freetype/src/otvalid/otvalid.c rename to thirdparty/freetype/src/otvalid/otvalid.c diff --git a/drivers/freetype/src/otvalid/otvalid.h b/thirdparty/freetype/src/otvalid/otvalid.h similarity index 100% rename from drivers/freetype/src/otvalid/otvalid.h rename to thirdparty/freetype/src/otvalid/otvalid.h diff --git a/drivers/freetype/src/otvalid/otvbase.c b/thirdparty/freetype/src/otvalid/otvbase.c similarity index 100% rename from drivers/freetype/src/otvalid/otvbase.c rename to thirdparty/freetype/src/otvalid/otvbase.c diff --git a/drivers/freetype/src/otvalid/otvcommn.c b/thirdparty/freetype/src/otvalid/otvcommn.c similarity index 100% rename from drivers/freetype/src/otvalid/otvcommn.c rename to thirdparty/freetype/src/otvalid/otvcommn.c diff --git a/drivers/freetype/src/otvalid/otvcommn.h b/thirdparty/freetype/src/otvalid/otvcommn.h similarity index 100% rename from drivers/freetype/src/otvalid/otvcommn.h rename to thirdparty/freetype/src/otvalid/otvcommn.h diff --git a/drivers/freetype/src/otvalid/otverror.h b/thirdparty/freetype/src/otvalid/otverror.h similarity index 100% rename from drivers/freetype/src/otvalid/otverror.h rename to thirdparty/freetype/src/otvalid/otverror.h diff --git a/drivers/freetype/src/otvalid/otvgdef.c b/thirdparty/freetype/src/otvalid/otvgdef.c similarity index 100% rename from drivers/freetype/src/otvalid/otvgdef.c rename to thirdparty/freetype/src/otvalid/otvgdef.c diff --git a/drivers/freetype/src/otvalid/otvgpos.c b/thirdparty/freetype/src/otvalid/otvgpos.c similarity index 100% rename from drivers/freetype/src/otvalid/otvgpos.c rename to thirdparty/freetype/src/otvalid/otvgpos.c diff --git a/drivers/freetype/src/otvalid/otvgpos.h b/thirdparty/freetype/src/otvalid/otvgpos.h similarity index 100% rename from drivers/freetype/src/otvalid/otvgpos.h rename to thirdparty/freetype/src/otvalid/otvgpos.h diff --git a/drivers/freetype/src/otvalid/otvgsub.c b/thirdparty/freetype/src/otvalid/otvgsub.c similarity index 100% rename from drivers/freetype/src/otvalid/otvgsub.c rename to thirdparty/freetype/src/otvalid/otvgsub.c diff --git a/drivers/freetype/src/otvalid/otvjstf.c b/thirdparty/freetype/src/otvalid/otvjstf.c similarity index 100% rename from drivers/freetype/src/otvalid/otvjstf.c rename to thirdparty/freetype/src/otvalid/otvjstf.c diff --git a/drivers/freetype/src/otvalid/otvmath.c b/thirdparty/freetype/src/otvalid/otvmath.c similarity index 100% rename from drivers/freetype/src/otvalid/otvmath.c rename to thirdparty/freetype/src/otvalid/otvmath.c diff --git a/drivers/freetype/src/otvalid/otvmod.c b/thirdparty/freetype/src/otvalid/otvmod.c similarity index 100% rename from drivers/freetype/src/otvalid/otvmod.c rename to thirdparty/freetype/src/otvalid/otvmod.c diff --git a/drivers/freetype/src/otvalid/otvmod.h b/thirdparty/freetype/src/otvalid/otvmod.h similarity index 100% rename from drivers/freetype/src/otvalid/otvmod.h rename to thirdparty/freetype/src/otvalid/otvmod.h diff --git a/drivers/freetype/src/otvalid/rules.mk b/thirdparty/freetype/src/otvalid/rules.mk similarity index 100% rename from drivers/freetype/src/otvalid/rules.mk rename to thirdparty/freetype/src/otvalid/rules.mk diff --git a/drivers/freetype/src/pcf/README b/thirdparty/freetype/src/pcf/README similarity index 100% rename from drivers/freetype/src/pcf/README rename to thirdparty/freetype/src/pcf/README diff --git a/drivers/freetype/src/pcf/module.mk b/thirdparty/freetype/src/pcf/module.mk similarity index 100% rename from drivers/freetype/src/pcf/module.mk rename to thirdparty/freetype/src/pcf/module.mk diff --git a/drivers/freetype/src/pcf/pcf.c b/thirdparty/freetype/src/pcf/pcf.c similarity index 100% rename from drivers/freetype/src/pcf/pcf.c rename to thirdparty/freetype/src/pcf/pcf.c diff --git a/drivers/freetype/src/pcf/pcf.h b/thirdparty/freetype/src/pcf/pcf.h similarity index 100% rename from drivers/freetype/src/pcf/pcf.h rename to thirdparty/freetype/src/pcf/pcf.h diff --git a/drivers/freetype/src/pcf/pcfdrivr.c b/thirdparty/freetype/src/pcf/pcfdrivr.c similarity index 100% rename from drivers/freetype/src/pcf/pcfdrivr.c rename to thirdparty/freetype/src/pcf/pcfdrivr.c diff --git a/drivers/freetype/src/pcf/pcfdrivr.h b/thirdparty/freetype/src/pcf/pcfdrivr.h similarity index 100% rename from drivers/freetype/src/pcf/pcfdrivr.h rename to thirdparty/freetype/src/pcf/pcfdrivr.h diff --git a/drivers/freetype/src/pcf/pcferror.h b/thirdparty/freetype/src/pcf/pcferror.h similarity index 100% rename from drivers/freetype/src/pcf/pcferror.h rename to thirdparty/freetype/src/pcf/pcferror.h diff --git a/drivers/freetype/src/pcf/pcfread.c b/thirdparty/freetype/src/pcf/pcfread.c similarity index 100% rename from drivers/freetype/src/pcf/pcfread.c rename to thirdparty/freetype/src/pcf/pcfread.c diff --git a/drivers/freetype/src/pcf/pcfread.h b/thirdparty/freetype/src/pcf/pcfread.h similarity index 100% rename from drivers/freetype/src/pcf/pcfread.h rename to thirdparty/freetype/src/pcf/pcfread.h diff --git a/drivers/freetype/src/pcf/pcfutil.c b/thirdparty/freetype/src/pcf/pcfutil.c similarity index 100% rename from drivers/freetype/src/pcf/pcfutil.c rename to thirdparty/freetype/src/pcf/pcfutil.c diff --git a/drivers/freetype/src/pcf/pcfutil.h b/thirdparty/freetype/src/pcf/pcfutil.h similarity index 100% rename from drivers/freetype/src/pcf/pcfutil.h rename to thirdparty/freetype/src/pcf/pcfutil.h diff --git a/drivers/freetype/src/pcf/rules.mk b/thirdparty/freetype/src/pcf/rules.mk similarity index 100% rename from drivers/freetype/src/pcf/rules.mk rename to thirdparty/freetype/src/pcf/rules.mk diff --git a/drivers/freetype/src/pfr/module.mk b/thirdparty/freetype/src/pfr/module.mk similarity index 100% rename from drivers/freetype/src/pfr/module.mk rename to thirdparty/freetype/src/pfr/module.mk diff --git a/drivers/freetype/src/pfr/pfr.c b/thirdparty/freetype/src/pfr/pfr.c similarity index 100% rename from drivers/freetype/src/pfr/pfr.c rename to thirdparty/freetype/src/pfr/pfr.c diff --git a/drivers/freetype/src/pfr/pfrcmap.c b/thirdparty/freetype/src/pfr/pfrcmap.c similarity index 100% rename from drivers/freetype/src/pfr/pfrcmap.c rename to thirdparty/freetype/src/pfr/pfrcmap.c diff --git a/drivers/freetype/src/pfr/pfrcmap.h b/thirdparty/freetype/src/pfr/pfrcmap.h similarity index 100% rename from drivers/freetype/src/pfr/pfrcmap.h rename to thirdparty/freetype/src/pfr/pfrcmap.h diff --git a/drivers/freetype/src/pfr/pfrdrivr.c b/thirdparty/freetype/src/pfr/pfrdrivr.c similarity index 100% rename from drivers/freetype/src/pfr/pfrdrivr.c rename to thirdparty/freetype/src/pfr/pfrdrivr.c diff --git a/drivers/freetype/src/pfr/pfrdrivr.h b/thirdparty/freetype/src/pfr/pfrdrivr.h similarity index 100% rename from drivers/freetype/src/pfr/pfrdrivr.h rename to thirdparty/freetype/src/pfr/pfrdrivr.h diff --git a/drivers/freetype/src/pfr/pfrerror.h b/thirdparty/freetype/src/pfr/pfrerror.h similarity index 100% rename from drivers/freetype/src/pfr/pfrerror.h rename to thirdparty/freetype/src/pfr/pfrerror.h diff --git a/drivers/freetype/src/pfr/pfrgload.c b/thirdparty/freetype/src/pfr/pfrgload.c similarity index 100% rename from drivers/freetype/src/pfr/pfrgload.c rename to thirdparty/freetype/src/pfr/pfrgload.c diff --git a/drivers/freetype/src/pfr/pfrgload.h b/thirdparty/freetype/src/pfr/pfrgload.h similarity index 100% rename from drivers/freetype/src/pfr/pfrgload.h rename to thirdparty/freetype/src/pfr/pfrgload.h diff --git a/drivers/freetype/src/pfr/pfrload.c b/thirdparty/freetype/src/pfr/pfrload.c similarity index 100% rename from drivers/freetype/src/pfr/pfrload.c rename to thirdparty/freetype/src/pfr/pfrload.c diff --git a/drivers/freetype/src/pfr/pfrload.h b/thirdparty/freetype/src/pfr/pfrload.h similarity index 100% rename from drivers/freetype/src/pfr/pfrload.h rename to thirdparty/freetype/src/pfr/pfrload.h diff --git a/drivers/freetype/src/pfr/pfrobjs.c b/thirdparty/freetype/src/pfr/pfrobjs.c similarity index 100% rename from drivers/freetype/src/pfr/pfrobjs.c rename to thirdparty/freetype/src/pfr/pfrobjs.c diff --git a/drivers/freetype/src/pfr/pfrobjs.h b/thirdparty/freetype/src/pfr/pfrobjs.h similarity index 100% rename from drivers/freetype/src/pfr/pfrobjs.h rename to thirdparty/freetype/src/pfr/pfrobjs.h diff --git a/drivers/freetype/src/pfr/pfrsbit.c b/thirdparty/freetype/src/pfr/pfrsbit.c similarity index 100% rename from drivers/freetype/src/pfr/pfrsbit.c rename to thirdparty/freetype/src/pfr/pfrsbit.c diff --git a/drivers/freetype/src/pfr/pfrsbit.h b/thirdparty/freetype/src/pfr/pfrsbit.h similarity index 100% rename from drivers/freetype/src/pfr/pfrsbit.h rename to thirdparty/freetype/src/pfr/pfrsbit.h diff --git a/drivers/freetype/src/pfr/pfrtypes.h b/thirdparty/freetype/src/pfr/pfrtypes.h similarity index 100% rename from drivers/freetype/src/pfr/pfrtypes.h rename to thirdparty/freetype/src/pfr/pfrtypes.h diff --git a/drivers/freetype/src/pfr/rules.mk b/thirdparty/freetype/src/pfr/rules.mk similarity index 100% rename from drivers/freetype/src/pfr/rules.mk rename to thirdparty/freetype/src/pfr/rules.mk diff --git a/drivers/freetype/src/psaux/afmparse.c b/thirdparty/freetype/src/psaux/afmparse.c similarity index 100% rename from drivers/freetype/src/psaux/afmparse.c rename to thirdparty/freetype/src/psaux/afmparse.c diff --git a/drivers/freetype/src/psaux/afmparse.h b/thirdparty/freetype/src/psaux/afmparse.h similarity index 100% rename from drivers/freetype/src/psaux/afmparse.h rename to thirdparty/freetype/src/psaux/afmparse.h diff --git a/drivers/freetype/src/psaux/module.mk b/thirdparty/freetype/src/psaux/module.mk similarity index 100% rename from drivers/freetype/src/psaux/module.mk rename to thirdparty/freetype/src/psaux/module.mk diff --git a/drivers/freetype/src/psaux/psaux.c b/thirdparty/freetype/src/psaux/psaux.c similarity index 100% rename from drivers/freetype/src/psaux/psaux.c rename to thirdparty/freetype/src/psaux/psaux.c diff --git a/drivers/freetype/src/psaux/psauxerr.h b/thirdparty/freetype/src/psaux/psauxerr.h similarity index 100% rename from drivers/freetype/src/psaux/psauxerr.h rename to thirdparty/freetype/src/psaux/psauxerr.h diff --git a/drivers/freetype/src/psaux/psauxmod.c b/thirdparty/freetype/src/psaux/psauxmod.c similarity index 100% rename from drivers/freetype/src/psaux/psauxmod.c rename to thirdparty/freetype/src/psaux/psauxmod.c diff --git a/drivers/freetype/src/psaux/psauxmod.h b/thirdparty/freetype/src/psaux/psauxmod.h similarity index 100% rename from drivers/freetype/src/psaux/psauxmod.h rename to thirdparty/freetype/src/psaux/psauxmod.h diff --git a/drivers/freetype/src/psaux/psconv.c b/thirdparty/freetype/src/psaux/psconv.c similarity index 100% rename from drivers/freetype/src/psaux/psconv.c rename to thirdparty/freetype/src/psaux/psconv.c diff --git a/drivers/freetype/src/psaux/psconv.h b/thirdparty/freetype/src/psaux/psconv.h similarity index 100% rename from drivers/freetype/src/psaux/psconv.h rename to thirdparty/freetype/src/psaux/psconv.h diff --git a/drivers/freetype/src/psaux/psobjs.c b/thirdparty/freetype/src/psaux/psobjs.c similarity index 100% rename from drivers/freetype/src/psaux/psobjs.c rename to thirdparty/freetype/src/psaux/psobjs.c diff --git a/drivers/freetype/src/psaux/psobjs.h b/thirdparty/freetype/src/psaux/psobjs.h similarity index 100% rename from drivers/freetype/src/psaux/psobjs.h rename to thirdparty/freetype/src/psaux/psobjs.h diff --git a/drivers/freetype/src/psaux/rules.mk b/thirdparty/freetype/src/psaux/rules.mk similarity index 100% rename from drivers/freetype/src/psaux/rules.mk rename to thirdparty/freetype/src/psaux/rules.mk diff --git a/drivers/freetype/src/psaux/t1cmap.c b/thirdparty/freetype/src/psaux/t1cmap.c similarity index 100% rename from drivers/freetype/src/psaux/t1cmap.c rename to thirdparty/freetype/src/psaux/t1cmap.c diff --git a/drivers/freetype/src/psaux/t1cmap.h b/thirdparty/freetype/src/psaux/t1cmap.h similarity index 100% rename from drivers/freetype/src/psaux/t1cmap.h rename to thirdparty/freetype/src/psaux/t1cmap.h diff --git a/drivers/freetype/src/psaux/t1decode.c b/thirdparty/freetype/src/psaux/t1decode.c similarity index 100% rename from drivers/freetype/src/psaux/t1decode.c rename to thirdparty/freetype/src/psaux/t1decode.c diff --git a/drivers/freetype/src/psaux/t1decode.h b/thirdparty/freetype/src/psaux/t1decode.h similarity index 100% rename from drivers/freetype/src/psaux/t1decode.h rename to thirdparty/freetype/src/psaux/t1decode.h diff --git a/drivers/freetype/src/pshinter/module.mk b/thirdparty/freetype/src/pshinter/module.mk similarity index 100% rename from drivers/freetype/src/pshinter/module.mk rename to thirdparty/freetype/src/pshinter/module.mk diff --git a/drivers/freetype/src/pshinter/pshalgo.c b/thirdparty/freetype/src/pshinter/pshalgo.c similarity index 100% rename from drivers/freetype/src/pshinter/pshalgo.c rename to thirdparty/freetype/src/pshinter/pshalgo.c diff --git a/drivers/freetype/src/pshinter/pshalgo.h b/thirdparty/freetype/src/pshinter/pshalgo.h similarity index 100% rename from drivers/freetype/src/pshinter/pshalgo.h rename to thirdparty/freetype/src/pshinter/pshalgo.h diff --git a/drivers/freetype/src/pshinter/pshglob.c b/thirdparty/freetype/src/pshinter/pshglob.c similarity index 100% rename from drivers/freetype/src/pshinter/pshglob.c rename to thirdparty/freetype/src/pshinter/pshglob.c diff --git a/drivers/freetype/src/pshinter/pshglob.h b/thirdparty/freetype/src/pshinter/pshglob.h similarity index 100% rename from drivers/freetype/src/pshinter/pshglob.h rename to thirdparty/freetype/src/pshinter/pshglob.h diff --git a/drivers/freetype/src/pshinter/pshinter.c b/thirdparty/freetype/src/pshinter/pshinter.c similarity index 100% rename from drivers/freetype/src/pshinter/pshinter.c rename to thirdparty/freetype/src/pshinter/pshinter.c diff --git a/drivers/freetype/src/pshinter/pshmod.c b/thirdparty/freetype/src/pshinter/pshmod.c similarity index 100% rename from drivers/freetype/src/pshinter/pshmod.c rename to thirdparty/freetype/src/pshinter/pshmod.c diff --git a/drivers/freetype/src/pshinter/pshmod.h b/thirdparty/freetype/src/pshinter/pshmod.h similarity index 100% rename from drivers/freetype/src/pshinter/pshmod.h rename to thirdparty/freetype/src/pshinter/pshmod.h diff --git a/drivers/freetype/src/pshinter/pshnterr.h b/thirdparty/freetype/src/pshinter/pshnterr.h similarity index 100% rename from drivers/freetype/src/pshinter/pshnterr.h rename to thirdparty/freetype/src/pshinter/pshnterr.h diff --git a/drivers/freetype/src/pshinter/pshpic.c b/thirdparty/freetype/src/pshinter/pshpic.c similarity index 100% rename from drivers/freetype/src/pshinter/pshpic.c rename to thirdparty/freetype/src/pshinter/pshpic.c diff --git a/drivers/freetype/src/pshinter/pshpic.h b/thirdparty/freetype/src/pshinter/pshpic.h similarity index 100% rename from drivers/freetype/src/pshinter/pshpic.h rename to thirdparty/freetype/src/pshinter/pshpic.h diff --git a/drivers/freetype/src/pshinter/pshrec.c b/thirdparty/freetype/src/pshinter/pshrec.c similarity index 100% rename from drivers/freetype/src/pshinter/pshrec.c rename to thirdparty/freetype/src/pshinter/pshrec.c diff --git a/drivers/freetype/src/pshinter/pshrec.h b/thirdparty/freetype/src/pshinter/pshrec.h similarity index 100% rename from drivers/freetype/src/pshinter/pshrec.h rename to thirdparty/freetype/src/pshinter/pshrec.h diff --git a/drivers/freetype/src/pshinter/rules.mk b/thirdparty/freetype/src/pshinter/rules.mk similarity index 100% rename from drivers/freetype/src/pshinter/rules.mk rename to thirdparty/freetype/src/pshinter/rules.mk diff --git a/drivers/freetype/src/psnames/module.mk b/thirdparty/freetype/src/psnames/module.mk similarity index 100% rename from drivers/freetype/src/psnames/module.mk rename to thirdparty/freetype/src/psnames/module.mk diff --git a/drivers/freetype/src/psnames/psmodule.c b/thirdparty/freetype/src/psnames/psmodule.c similarity index 100% rename from drivers/freetype/src/psnames/psmodule.c rename to thirdparty/freetype/src/psnames/psmodule.c diff --git a/drivers/freetype/src/psnames/psmodule.h b/thirdparty/freetype/src/psnames/psmodule.h similarity index 100% rename from drivers/freetype/src/psnames/psmodule.h rename to thirdparty/freetype/src/psnames/psmodule.h diff --git a/drivers/freetype/src/psnames/psnamerr.h b/thirdparty/freetype/src/psnames/psnamerr.h similarity index 100% rename from drivers/freetype/src/psnames/psnamerr.h rename to thirdparty/freetype/src/psnames/psnamerr.h diff --git a/drivers/freetype/src/psnames/psnames.c b/thirdparty/freetype/src/psnames/psnames.c similarity index 100% rename from drivers/freetype/src/psnames/psnames.c rename to thirdparty/freetype/src/psnames/psnames.c diff --git a/drivers/freetype/src/psnames/pspic.c b/thirdparty/freetype/src/psnames/pspic.c similarity index 100% rename from drivers/freetype/src/psnames/pspic.c rename to thirdparty/freetype/src/psnames/pspic.c diff --git a/drivers/freetype/src/psnames/pspic.h b/thirdparty/freetype/src/psnames/pspic.h similarity index 100% rename from drivers/freetype/src/psnames/pspic.h rename to thirdparty/freetype/src/psnames/pspic.h diff --git a/drivers/freetype/src/psnames/pstables.h b/thirdparty/freetype/src/psnames/pstables.h similarity index 100% rename from drivers/freetype/src/psnames/pstables.h rename to thirdparty/freetype/src/psnames/pstables.h diff --git a/drivers/freetype/src/psnames/rules.mk b/thirdparty/freetype/src/psnames/rules.mk similarity index 100% rename from drivers/freetype/src/psnames/rules.mk rename to thirdparty/freetype/src/psnames/rules.mk diff --git a/drivers/freetype/src/raster/ftmisc.h b/thirdparty/freetype/src/raster/ftmisc.h similarity index 100% rename from drivers/freetype/src/raster/ftmisc.h rename to thirdparty/freetype/src/raster/ftmisc.h diff --git a/drivers/freetype/src/raster/ftraster.c b/thirdparty/freetype/src/raster/ftraster.c similarity index 100% rename from drivers/freetype/src/raster/ftraster.c rename to thirdparty/freetype/src/raster/ftraster.c diff --git a/drivers/freetype/src/raster/ftraster.h b/thirdparty/freetype/src/raster/ftraster.h similarity index 100% rename from drivers/freetype/src/raster/ftraster.h rename to thirdparty/freetype/src/raster/ftraster.h diff --git a/drivers/freetype/src/raster/ftrend1.c b/thirdparty/freetype/src/raster/ftrend1.c similarity index 100% rename from drivers/freetype/src/raster/ftrend1.c rename to thirdparty/freetype/src/raster/ftrend1.c diff --git a/drivers/freetype/src/raster/ftrend1.h b/thirdparty/freetype/src/raster/ftrend1.h similarity index 100% rename from drivers/freetype/src/raster/ftrend1.h rename to thirdparty/freetype/src/raster/ftrend1.h diff --git a/drivers/freetype/src/raster/module.mk b/thirdparty/freetype/src/raster/module.mk similarity index 100% rename from drivers/freetype/src/raster/module.mk rename to thirdparty/freetype/src/raster/module.mk diff --git a/drivers/freetype/src/raster/raster.c b/thirdparty/freetype/src/raster/raster.c similarity index 100% rename from drivers/freetype/src/raster/raster.c rename to thirdparty/freetype/src/raster/raster.c diff --git a/drivers/freetype/src/raster/rasterrs.h b/thirdparty/freetype/src/raster/rasterrs.h similarity index 100% rename from drivers/freetype/src/raster/rasterrs.h rename to thirdparty/freetype/src/raster/rasterrs.h diff --git a/drivers/freetype/src/raster/rastpic.c b/thirdparty/freetype/src/raster/rastpic.c similarity index 100% rename from drivers/freetype/src/raster/rastpic.c rename to thirdparty/freetype/src/raster/rastpic.c diff --git a/drivers/freetype/src/raster/rastpic.h b/thirdparty/freetype/src/raster/rastpic.h similarity index 100% rename from drivers/freetype/src/raster/rastpic.h rename to thirdparty/freetype/src/raster/rastpic.h diff --git a/drivers/freetype/src/raster/rules.mk b/thirdparty/freetype/src/raster/rules.mk similarity index 100% rename from drivers/freetype/src/raster/rules.mk rename to thirdparty/freetype/src/raster/rules.mk diff --git a/drivers/freetype/src/sfnt/module.mk b/thirdparty/freetype/src/sfnt/module.mk similarity index 100% rename from drivers/freetype/src/sfnt/module.mk rename to thirdparty/freetype/src/sfnt/module.mk diff --git a/drivers/freetype/src/sfnt/pngshim.c b/thirdparty/freetype/src/sfnt/pngshim.c similarity index 100% rename from drivers/freetype/src/sfnt/pngshim.c rename to thirdparty/freetype/src/sfnt/pngshim.c diff --git a/drivers/freetype/src/sfnt/pngshim.h b/thirdparty/freetype/src/sfnt/pngshim.h similarity index 100% rename from drivers/freetype/src/sfnt/pngshim.h rename to thirdparty/freetype/src/sfnt/pngshim.h diff --git a/drivers/freetype/src/sfnt/rules.mk b/thirdparty/freetype/src/sfnt/rules.mk similarity index 100% rename from drivers/freetype/src/sfnt/rules.mk rename to thirdparty/freetype/src/sfnt/rules.mk diff --git a/drivers/freetype/src/sfnt/sfdriver.c b/thirdparty/freetype/src/sfnt/sfdriver.c similarity index 100% rename from drivers/freetype/src/sfnt/sfdriver.c rename to thirdparty/freetype/src/sfnt/sfdriver.c diff --git a/drivers/freetype/src/sfnt/sfdriver.h b/thirdparty/freetype/src/sfnt/sfdriver.h similarity index 100% rename from drivers/freetype/src/sfnt/sfdriver.h rename to thirdparty/freetype/src/sfnt/sfdriver.h diff --git a/drivers/freetype/src/sfnt/sferrors.h b/thirdparty/freetype/src/sfnt/sferrors.h similarity index 100% rename from drivers/freetype/src/sfnt/sferrors.h rename to thirdparty/freetype/src/sfnt/sferrors.h diff --git a/drivers/freetype/src/sfnt/sfnt.c b/thirdparty/freetype/src/sfnt/sfnt.c similarity index 100% rename from drivers/freetype/src/sfnt/sfnt.c rename to thirdparty/freetype/src/sfnt/sfnt.c diff --git a/drivers/freetype/src/sfnt/sfntpic.c b/thirdparty/freetype/src/sfnt/sfntpic.c similarity index 100% rename from drivers/freetype/src/sfnt/sfntpic.c rename to thirdparty/freetype/src/sfnt/sfntpic.c diff --git a/drivers/freetype/src/sfnt/sfntpic.h b/thirdparty/freetype/src/sfnt/sfntpic.h similarity index 100% rename from drivers/freetype/src/sfnt/sfntpic.h rename to thirdparty/freetype/src/sfnt/sfntpic.h diff --git a/drivers/freetype/src/sfnt/sfobjs.c b/thirdparty/freetype/src/sfnt/sfobjs.c similarity index 100% rename from drivers/freetype/src/sfnt/sfobjs.c rename to thirdparty/freetype/src/sfnt/sfobjs.c diff --git a/drivers/freetype/src/sfnt/sfobjs.h b/thirdparty/freetype/src/sfnt/sfobjs.h similarity index 100% rename from drivers/freetype/src/sfnt/sfobjs.h rename to thirdparty/freetype/src/sfnt/sfobjs.h diff --git a/drivers/freetype/src/sfnt/ttbdf.c b/thirdparty/freetype/src/sfnt/ttbdf.c similarity index 100% rename from drivers/freetype/src/sfnt/ttbdf.c rename to thirdparty/freetype/src/sfnt/ttbdf.c diff --git a/drivers/freetype/src/sfnt/ttbdf.h b/thirdparty/freetype/src/sfnt/ttbdf.h similarity index 100% rename from drivers/freetype/src/sfnt/ttbdf.h rename to thirdparty/freetype/src/sfnt/ttbdf.h diff --git a/drivers/freetype/src/sfnt/ttcmap.c b/thirdparty/freetype/src/sfnt/ttcmap.c similarity index 100% rename from drivers/freetype/src/sfnt/ttcmap.c rename to thirdparty/freetype/src/sfnt/ttcmap.c diff --git a/drivers/freetype/src/sfnt/ttcmap.h b/thirdparty/freetype/src/sfnt/ttcmap.h similarity index 100% rename from drivers/freetype/src/sfnt/ttcmap.h rename to thirdparty/freetype/src/sfnt/ttcmap.h diff --git a/drivers/freetype/src/sfnt/ttcmapc.h b/thirdparty/freetype/src/sfnt/ttcmapc.h similarity index 100% rename from drivers/freetype/src/sfnt/ttcmapc.h rename to thirdparty/freetype/src/sfnt/ttcmapc.h diff --git a/drivers/freetype/src/sfnt/ttkern.c b/thirdparty/freetype/src/sfnt/ttkern.c similarity index 100% rename from drivers/freetype/src/sfnt/ttkern.c rename to thirdparty/freetype/src/sfnt/ttkern.c diff --git a/drivers/freetype/src/sfnt/ttkern.h b/thirdparty/freetype/src/sfnt/ttkern.h similarity index 100% rename from drivers/freetype/src/sfnt/ttkern.h rename to thirdparty/freetype/src/sfnt/ttkern.h diff --git a/drivers/freetype/src/sfnt/ttload.c b/thirdparty/freetype/src/sfnt/ttload.c similarity index 100% rename from drivers/freetype/src/sfnt/ttload.c rename to thirdparty/freetype/src/sfnt/ttload.c diff --git a/drivers/freetype/src/sfnt/ttload.h b/thirdparty/freetype/src/sfnt/ttload.h similarity index 100% rename from drivers/freetype/src/sfnt/ttload.h rename to thirdparty/freetype/src/sfnt/ttload.h diff --git a/drivers/freetype/src/sfnt/ttmtx.c b/thirdparty/freetype/src/sfnt/ttmtx.c similarity index 100% rename from drivers/freetype/src/sfnt/ttmtx.c rename to thirdparty/freetype/src/sfnt/ttmtx.c diff --git a/drivers/freetype/src/sfnt/ttmtx.h b/thirdparty/freetype/src/sfnt/ttmtx.h similarity index 100% rename from drivers/freetype/src/sfnt/ttmtx.h rename to thirdparty/freetype/src/sfnt/ttmtx.h diff --git a/drivers/freetype/src/sfnt/ttpost.c b/thirdparty/freetype/src/sfnt/ttpost.c similarity index 100% rename from drivers/freetype/src/sfnt/ttpost.c rename to thirdparty/freetype/src/sfnt/ttpost.c diff --git a/drivers/freetype/src/sfnt/ttpost.h b/thirdparty/freetype/src/sfnt/ttpost.h similarity index 100% rename from drivers/freetype/src/sfnt/ttpost.h rename to thirdparty/freetype/src/sfnt/ttpost.h diff --git a/drivers/freetype/src/sfnt/ttsbit.c b/thirdparty/freetype/src/sfnt/ttsbit.c similarity index 100% rename from drivers/freetype/src/sfnt/ttsbit.c rename to thirdparty/freetype/src/sfnt/ttsbit.c diff --git a/drivers/freetype/src/sfnt/ttsbit.h b/thirdparty/freetype/src/sfnt/ttsbit.h similarity index 100% rename from drivers/freetype/src/sfnt/ttsbit.h rename to thirdparty/freetype/src/sfnt/ttsbit.h diff --git a/drivers/freetype/src/smooth/ftgrays.c b/thirdparty/freetype/src/smooth/ftgrays.c similarity index 100% rename from drivers/freetype/src/smooth/ftgrays.c rename to thirdparty/freetype/src/smooth/ftgrays.c diff --git a/drivers/freetype/src/smooth/ftgrays.h b/thirdparty/freetype/src/smooth/ftgrays.h similarity index 100% rename from drivers/freetype/src/smooth/ftgrays.h rename to thirdparty/freetype/src/smooth/ftgrays.h diff --git a/drivers/freetype/src/smooth/ftsmerrs.h b/thirdparty/freetype/src/smooth/ftsmerrs.h similarity index 100% rename from drivers/freetype/src/smooth/ftsmerrs.h rename to thirdparty/freetype/src/smooth/ftsmerrs.h diff --git a/drivers/freetype/src/smooth/ftsmooth.c b/thirdparty/freetype/src/smooth/ftsmooth.c similarity index 100% rename from drivers/freetype/src/smooth/ftsmooth.c rename to thirdparty/freetype/src/smooth/ftsmooth.c diff --git a/drivers/freetype/src/smooth/ftsmooth.h b/thirdparty/freetype/src/smooth/ftsmooth.h similarity index 100% rename from drivers/freetype/src/smooth/ftsmooth.h rename to thirdparty/freetype/src/smooth/ftsmooth.h diff --git a/drivers/freetype/src/smooth/ftspic.c b/thirdparty/freetype/src/smooth/ftspic.c similarity index 100% rename from drivers/freetype/src/smooth/ftspic.c rename to thirdparty/freetype/src/smooth/ftspic.c diff --git a/drivers/freetype/src/smooth/ftspic.h b/thirdparty/freetype/src/smooth/ftspic.h similarity index 100% rename from drivers/freetype/src/smooth/ftspic.h rename to thirdparty/freetype/src/smooth/ftspic.h diff --git a/drivers/freetype/src/smooth/module.mk b/thirdparty/freetype/src/smooth/module.mk similarity index 100% rename from drivers/freetype/src/smooth/module.mk rename to thirdparty/freetype/src/smooth/module.mk diff --git a/drivers/freetype/src/smooth/rules.mk b/thirdparty/freetype/src/smooth/rules.mk similarity index 100% rename from drivers/freetype/src/smooth/rules.mk rename to thirdparty/freetype/src/smooth/rules.mk diff --git a/drivers/freetype/src/smooth/smooth.c b/thirdparty/freetype/src/smooth/smooth.c similarity index 100% rename from drivers/freetype/src/smooth/smooth.c rename to thirdparty/freetype/src/smooth/smooth.c diff --git a/drivers/freetype/src/truetype/module.mk b/thirdparty/freetype/src/truetype/module.mk similarity index 100% rename from drivers/freetype/src/truetype/module.mk rename to thirdparty/freetype/src/truetype/module.mk diff --git a/drivers/freetype/src/truetype/rules.mk b/thirdparty/freetype/src/truetype/rules.mk similarity index 100% rename from drivers/freetype/src/truetype/rules.mk rename to thirdparty/freetype/src/truetype/rules.mk diff --git a/drivers/freetype/src/truetype/truetype.c b/thirdparty/freetype/src/truetype/truetype.c similarity index 100% rename from drivers/freetype/src/truetype/truetype.c rename to thirdparty/freetype/src/truetype/truetype.c diff --git a/drivers/freetype/src/truetype/ttdriver.c b/thirdparty/freetype/src/truetype/ttdriver.c similarity index 100% rename from drivers/freetype/src/truetype/ttdriver.c rename to thirdparty/freetype/src/truetype/ttdriver.c diff --git a/drivers/freetype/src/truetype/ttdriver.h b/thirdparty/freetype/src/truetype/ttdriver.h similarity index 100% rename from drivers/freetype/src/truetype/ttdriver.h rename to thirdparty/freetype/src/truetype/ttdriver.h diff --git a/drivers/freetype/src/truetype/tterrors.h b/thirdparty/freetype/src/truetype/tterrors.h similarity index 100% rename from drivers/freetype/src/truetype/tterrors.h rename to thirdparty/freetype/src/truetype/tterrors.h diff --git a/drivers/freetype/src/truetype/ttgload.c b/thirdparty/freetype/src/truetype/ttgload.c similarity index 100% rename from drivers/freetype/src/truetype/ttgload.c rename to thirdparty/freetype/src/truetype/ttgload.c diff --git a/drivers/freetype/src/truetype/ttgload.h b/thirdparty/freetype/src/truetype/ttgload.h similarity index 100% rename from drivers/freetype/src/truetype/ttgload.h rename to thirdparty/freetype/src/truetype/ttgload.h diff --git a/drivers/freetype/src/truetype/ttgxvar.c b/thirdparty/freetype/src/truetype/ttgxvar.c similarity index 100% rename from drivers/freetype/src/truetype/ttgxvar.c rename to thirdparty/freetype/src/truetype/ttgxvar.c diff --git a/drivers/freetype/src/truetype/ttgxvar.h b/thirdparty/freetype/src/truetype/ttgxvar.h similarity index 100% rename from drivers/freetype/src/truetype/ttgxvar.h rename to thirdparty/freetype/src/truetype/ttgxvar.h diff --git a/drivers/freetype/src/truetype/ttinterp.c b/thirdparty/freetype/src/truetype/ttinterp.c similarity index 100% rename from drivers/freetype/src/truetype/ttinterp.c rename to thirdparty/freetype/src/truetype/ttinterp.c diff --git a/drivers/freetype/src/truetype/ttinterp.h b/thirdparty/freetype/src/truetype/ttinterp.h similarity index 100% rename from drivers/freetype/src/truetype/ttinterp.h rename to thirdparty/freetype/src/truetype/ttinterp.h diff --git a/drivers/freetype/src/truetype/ttobjs.c b/thirdparty/freetype/src/truetype/ttobjs.c similarity index 100% rename from drivers/freetype/src/truetype/ttobjs.c rename to thirdparty/freetype/src/truetype/ttobjs.c diff --git a/drivers/freetype/src/truetype/ttobjs.h b/thirdparty/freetype/src/truetype/ttobjs.h similarity index 100% rename from drivers/freetype/src/truetype/ttobjs.h rename to thirdparty/freetype/src/truetype/ttobjs.h diff --git a/drivers/freetype/src/truetype/ttpic.c b/thirdparty/freetype/src/truetype/ttpic.c similarity index 100% rename from drivers/freetype/src/truetype/ttpic.c rename to thirdparty/freetype/src/truetype/ttpic.c diff --git a/drivers/freetype/src/truetype/ttpic.h b/thirdparty/freetype/src/truetype/ttpic.h similarity index 100% rename from drivers/freetype/src/truetype/ttpic.h rename to thirdparty/freetype/src/truetype/ttpic.h diff --git a/drivers/freetype/src/truetype/ttpload.c b/thirdparty/freetype/src/truetype/ttpload.c similarity index 100% rename from drivers/freetype/src/truetype/ttpload.c rename to thirdparty/freetype/src/truetype/ttpload.c diff --git a/drivers/freetype/src/truetype/ttpload.h b/thirdparty/freetype/src/truetype/ttpload.h similarity index 100% rename from drivers/freetype/src/truetype/ttpload.h rename to thirdparty/freetype/src/truetype/ttpload.h diff --git a/drivers/freetype/src/truetype/ttsubpix.c b/thirdparty/freetype/src/truetype/ttsubpix.c similarity index 100% rename from drivers/freetype/src/truetype/ttsubpix.c rename to thirdparty/freetype/src/truetype/ttsubpix.c diff --git a/drivers/freetype/src/truetype/ttsubpix.h b/thirdparty/freetype/src/truetype/ttsubpix.h similarity index 100% rename from drivers/freetype/src/truetype/ttsubpix.h rename to thirdparty/freetype/src/truetype/ttsubpix.h diff --git a/drivers/freetype/src/type1/module.mk b/thirdparty/freetype/src/type1/module.mk similarity index 100% rename from drivers/freetype/src/type1/module.mk rename to thirdparty/freetype/src/type1/module.mk diff --git a/drivers/freetype/src/type1/rules.mk b/thirdparty/freetype/src/type1/rules.mk similarity index 100% rename from drivers/freetype/src/type1/rules.mk rename to thirdparty/freetype/src/type1/rules.mk diff --git a/drivers/freetype/src/type1/t1afm.c b/thirdparty/freetype/src/type1/t1afm.c similarity index 100% rename from drivers/freetype/src/type1/t1afm.c rename to thirdparty/freetype/src/type1/t1afm.c diff --git a/drivers/freetype/src/type1/t1afm.h b/thirdparty/freetype/src/type1/t1afm.h similarity index 100% rename from drivers/freetype/src/type1/t1afm.h rename to thirdparty/freetype/src/type1/t1afm.h diff --git a/drivers/freetype/src/type1/t1driver.c b/thirdparty/freetype/src/type1/t1driver.c similarity index 100% rename from drivers/freetype/src/type1/t1driver.c rename to thirdparty/freetype/src/type1/t1driver.c diff --git a/drivers/freetype/src/type1/t1driver.h b/thirdparty/freetype/src/type1/t1driver.h similarity index 100% rename from drivers/freetype/src/type1/t1driver.h rename to thirdparty/freetype/src/type1/t1driver.h diff --git a/drivers/freetype/src/type1/t1errors.h b/thirdparty/freetype/src/type1/t1errors.h similarity index 100% rename from drivers/freetype/src/type1/t1errors.h rename to thirdparty/freetype/src/type1/t1errors.h diff --git a/drivers/freetype/src/type1/t1gload.c b/thirdparty/freetype/src/type1/t1gload.c similarity index 100% rename from drivers/freetype/src/type1/t1gload.c rename to thirdparty/freetype/src/type1/t1gload.c diff --git a/drivers/freetype/src/type1/t1gload.h b/thirdparty/freetype/src/type1/t1gload.h similarity index 100% rename from drivers/freetype/src/type1/t1gload.h rename to thirdparty/freetype/src/type1/t1gload.h diff --git a/drivers/freetype/src/type1/t1load.c b/thirdparty/freetype/src/type1/t1load.c similarity index 100% rename from drivers/freetype/src/type1/t1load.c rename to thirdparty/freetype/src/type1/t1load.c diff --git a/drivers/freetype/src/type1/t1load.h b/thirdparty/freetype/src/type1/t1load.h similarity index 100% rename from drivers/freetype/src/type1/t1load.h rename to thirdparty/freetype/src/type1/t1load.h diff --git a/drivers/freetype/src/type1/t1objs.c b/thirdparty/freetype/src/type1/t1objs.c similarity index 100% rename from drivers/freetype/src/type1/t1objs.c rename to thirdparty/freetype/src/type1/t1objs.c diff --git a/drivers/freetype/src/type1/t1objs.h b/thirdparty/freetype/src/type1/t1objs.h similarity index 100% rename from drivers/freetype/src/type1/t1objs.h rename to thirdparty/freetype/src/type1/t1objs.h diff --git a/drivers/freetype/src/type1/t1parse.c b/thirdparty/freetype/src/type1/t1parse.c similarity index 100% rename from drivers/freetype/src/type1/t1parse.c rename to thirdparty/freetype/src/type1/t1parse.c diff --git a/drivers/freetype/src/type1/t1parse.h b/thirdparty/freetype/src/type1/t1parse.h similarity index 100% rename from drivers/freetype/src/type1/t1parse.h rename to thirdparty/freetype/src/type1/t1parse.h diff --git a/drivers/freetype/src/type1/t1tokens.h b/thirdparty/freetype/src/type1/t1tokens.h similarity index 100% rename from drivers/freetype/src/type1/t1tokens.h rename to thirdparty/freetype/src/type1/t1tokens.h diff --git a/drivers/freetype/src/type1/type1.c b/thirdparty/freetype/src/type1/type1.c similarity index 100% rename from drivers/freetype/src/type1/type1.c rename to thirdparty/freetype/src/type1/type1.c diff --git a/drivers/freetype/src/type42/module.mk b/thirdparty/freetype/src/type42/module.mk similarity index 100% rename from drivers/freetype/src/type42/module.mk rename to thirdparty/freetype/src/type42/module.mk diff --git a/drivers/freetype/src/type42/rules.mk b/thirdparty/freetype/src/type42/rules.mk similarity index 100% rename from drivers/freetype/src/type42/rules.mk rename to thirdparty/freetype/src/type42/rules.mk diff --git a/drivers/freetype/src/type42/t42drivr.c b/thirdparty/freetype/src/type42/t42drivr.c similarity index 100% rename from drivers/freetype/src/type42/t42drivr.c rename to thirdparty/freetype/src/type42/t42drivr.c diff --git a/drivers/freetype/src/type42/t42drivr.h b/thirdparty/freetype/src/type42/t42drivr.h similarity index 100% rename from drivers/freetype/src/type42/t42drivr.h rename to thirdparty/freetype/src/type42/t42drivr.h diff --git a/drivers/freetype/src/type42/t42error.h b/thirdparty/freetype/src/type42/t42error.h similarity index 100% rename from drivers/freetype/src/type42/t42error.h rename to thirdparty/freetype/src/type42/t42error.h diff --git a/drivers/freetype/src/type42/t42objs.c b/thirdparty/freetype/src/type42/t42objs.c similarity index 100% rename from drivers/freetype/src/type42/t42objs.c rename to thirdparty/freetype/src/type42/t42objs.c diff --git a/drivers/freetype/src/type42/t42objs.h b/thirdparty/freetype/src/type42/t42objs.h similarity index 100% rename from drivers/freetype/src/type42/t42objs.h rename to thirdparty/freetype/src/type42/t42objs.h diff --git a/drivers/freetype/src/type42/t42parse.c b/thirdparty/freetype/src/type42/t42parse.c similarity index 100% rename from drivers/freetype/src/type42/t42parse.c rename to thirdparty/freetype/src/type42/t42parse.c diff --git a/drivers/freetype/src/type42/t42parse.h b/thirdparty/freetype/src/type42/t42parse.h similarity index 100% rename from drivers/freetype/src/type42/t42parse.h rename to thirdparty/freetype/src/type42/t42parse.h diff --git a/drivers/freetype/src/type42/t42types.h b/thirdparty/freetype/src/type42/t42types.h similarity index 100% rename from drivers/freetype/src/type42/t42types.h rename to thirdparty/freetype/src/type42/t42types.h diff --git a/drivers/freetype/src/type42/type42.c b/thirdparty/freetype/src/type42/type42.c similarity index 100% rename from drivers/freetype/src/type42/type42.c rename to thirdparty/freetype/src/type42/type42.c diff --git a/drivers/freetype/src/winfonts/fnterrs.h b/thirdparty/freetype/src/winfonts/fnterrs.h similarity index 100% rename from drivers/freetype/src/winfonts/fnterrs.h rename to thirdparty/freetype/src/winfonts/fnterrs.h diff --git a/drivers/freetype/src/winfonts/module.mk b/thirdparty/freetype/src/winfonts/module.mk similarity index 100% rename from drivers/freetype/src/winfonts/module.mk rename to thirdparty/freetype/src/winfonts/module.mk diff --git a/drivers/freetype/src/winfonts/rules.mk b/thirdparty/freetype/src/winfonts/rules.mk similarity index 100% rename from drivers/freetype/src/winfonts/rules.mk rename to thirdparty/freetype/src/winfonts/rules.mk diff --git a/drivers/freetype/src/winfonts/winfnt.c b/thirdparty/freetype/src/winfonts/winfnt.c similarity index 100% rename from drivers/freetype/src/winfonts/winfnt.c rename to thirdparty/freetype/src/winfonts/winfnt.c diff --git a/drivers/freetype/src/winfonts/winfnt.h b/thirdparty/freetype/src/winfonts/winfnt.h similarity index 100% rename from drivers/freetype/src/winfonts/winfnt.h rename to thirdparty/freetype/src/winfonts/winfnt.h From 248bc9159c0b515e3e276db644744161283881ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sat, 15 Oct 2016 12:39:28 +0200 Subject: [PATCH 18/19] drivers: Refactor SCsub and drop redundant env_drivers clone The reordering of the SConscript includes allows to ensure that stuff like the builtin zlib headers will be available for libpng. Also moved glew back into global env, otherwise windows seems not to find it... Kind of shooting in the dark with this multi-env setup. --- drivers/SCsub | 65 ++++++++++++++++++++----------------- drivers/alsa/SCsub | 2 +- drivers/convex_decomp/SCsub | 5 +-- drivers/gl_context/SCsub | 11 ++----- drivers/gles2/SCsub | 4 ++- drivers/gles2/shaders/SCsub | 2 ++ drivers/nrex/SCsub | 8 ++--- drivers/png/SCsub | 23 ++++++------- drivers/pulseaudio/SCsub | 2 +- drivers/unix/SCsub | 2 +- drivers/windows/SCsub | 2 +- 11 files changed, 63 insertions(+), 63 deletions(-) diff --git a/drivers/SCsub b/drivers/SCsub index 2ad924ad1d8..c496f46a1f2 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -1,42 +1,47 @@ Import('env') -env_drivers = env.Clone() - env.drivers_sources=[] -#env.add_source_files(env.drivers_sources,"*.cpp") -Export('env_drivers') - -SConscript('unix/SCsub'); -SConscript('alsa/SCsub'); -SConscript('pulseaudio/SCsub'); -SConscript('windows/SCsub'); -SConscript('gles2/SCsub'); -SConscript('gl_context/SCsub'); - -SConscript("png/SCsub"); if ("builtin_zlib" in env and env["builtin_zlib"] == "yes"): SConscript("zlib/SCsub"); +# OS drivers +SConscript('unix/SCsub'); +SConscript('windows/SCsub'); + +# Sounds drivers +SConscript('alsa/SCsub'); +SConscript('pulseaudio/SCsub'); if (env["platform"] == "windows"): SConscript("rtaudio/SCsub"); + +# Graphics drivers +SConscript('gles2/SCsub'); +SConscript('gl_context/SCsub'); + +# Core dependencies +SConscript("png/SCsub"); SConscript("nrex/SCsub"); + +# Tools override +# FIXME: Should likely be integrated in the tools/ codebase if (env["tools"]=="yes"): SConscript("convex_decomp/SCsub"); -num = 0 -cur_base = "" -total = len(env.drivers_sources) -max_src = 64 -list = [] -lib_list = [] - -import string - if env['vsproj']=="yes": env.AddToVSProject(env.drivers_sources) -if (env.split_drivers): #split drivers, this used to be needed for windows until separate builders for windows were created + +# Split drivers, this used to be needed for windows until separate builders for windows were created +# FIXME: Check if still needed now that the drivers were made more lightweight +if (env.split_drivers): + import string + + num = 0 + cur_base = "" + max_src = 64 + list = [] + lib_list = [] for f in env.drivers_sources: fname = "" @@ -48,14 +53,14 @@ if (env.split_drivers): #split drivers, this used to be needed for windows until base = string.join(fname.split("/")[:2], "/") if base != cur_base and len(list) > max_src: if num > 0: - lib = env_drivers.Library("drivers"+str(num), list) + lib = env.Library("drivers"+str(num), list) lib_list.append(lib) list = [] num = num+1 cur_base = base list.append(f) - lib = env_drivers.Library("drivers"+str(num), list) + lib = env.Library("drivers"+str(num), list) lib_list.append(lib) if len(lib_list) > 0: @@ -63,15 +68,15 @@ if (env.split_drivers): #split drivers, this used to be needed for windows until if os.name=='posix' and sys.platform=='msys': env.Replace(ARFLAGS=['rcsT']) - lib = env_drivers.Library("drivers_collated", lib_list) + lib = env.Library("drivers_collated", lib_list) lib_list = [lib] drivers_base=[] - env_drivers.add_source_files(drivers_base,"*.cpp") - lib_list.insert(0, env_drivers.Library("drivers", drivers_base)) + env.add_source_files(drivers_base,"*.cpp") + lib_list.insert(0, env.Library("drivers", drivers_base)) env.Prepend(LIBS=lib_list) else: - env_drivers.add_source_files(env.drivers_sources,"*.cpp") - lib = env_drivers.Library("drivers",env.drivers_sources) + env.add_source_files(env.drivers_sources,"*.cpp") + lib = env.Library("drivers",env.drivers_sources) env.Prepend(LIBS=[lib]) diff --git a/drivers/alsa/SCsub b/drivers/alsa/SCsub index 9fbb467baa1..0582e01978f 100644 --- a/drivers/alsa/SCsub +++ b/drivers/alsa/SCsub @@ -1,5 +1,5 @@ Import('env') -env.add_source_files(env.drivers_sources,"*.cpp") +env.add_source_files(env.drivers_sources, "*.cpp") Export('env') diff --git a/drivers/convex_decomp/SCsub b/drivers/convex_decomp/SCsub index 6699efef756..0582e01978f 100644 --- a/drivers/convex_decomp/SCsub +++ b/drivers/convex_decomp/SCsub @@ -1,4 +1,5 @@ Import('env') -Export('env'); -env.add_source_files(env.drivers_sources,"*.cpp") +env.add_source_files(env.drivers_sources, "*.cpp") + +Export('env') diff --git a/drivers/gl_context/SCsub b/drivers/gl_context/SCsub index 9a158f08213..b05a96cb99c 100644 --- a/drivers/gl_context/SCsub +++ b/drivers/gl_context/SCsub @@ -1,7 +1,4 @@ Import('env') -Import('env_drivers') - -env_glew = env_drivers.Clone() if (env["platform"] in ["haiku","osx","windows","x11"]): # Thirdparty source files @@ -12,15 +9,13 @@ if (env["platform"] in ["haiku","osx","windows","x11"]): ] thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] - env_glew.add_source_files(env.drivers_sources, thirdparty_sources) - env_glew.Append(CPPFLAGS = ['-DGLEW_STATIC']) - env_glew.Append(CPPPATH = [thirdparty_dir]) - # Also pass to global env, used by platform code + env.add_source_files(env.drivers_sources, thirdparty_sources) + env.Append(CPPFLAGS = ['-DGLEW_STATIC']) env.Append(CPPPATH = [thirdparty_dir]) env.Append(CPPFLAGS = ['-DGLEW_ENABLED']) # Godot source files -env_glew.add_source_files(env.drivers_sources, "*.cpp") +env.add_source_files(env.drivers_sources, "*.cpp") Export('env') diff --git a/drivers/gles2/SCsub b/drivers/gles2/SCsub index a17335b41b3..89d7d86360e 100644 --- a/drivers/gles2/SCsub +++ b/drivers/gles2/SCsub @@ -1,5 +1,7 @@ Import('env') -env.add_source_files(env.drivers_sources,"*.cpp") +env.add_source_files(env.drivers_sources, "*.cpp") SConscript("shaders/SCsub") + +Export('env') diff --git a/drivers/gles2/shaders/SCsub b/drivers/gles2/shaders/SCsub index 38177d725fb..88445f34c1a 100644 --- a/drivers/gles2/shaders/SCsub +++ b/drivers/gles2/shaders/SCsub @@ -6,3 +6,5 @@ if env['BUILDERS'].has_key('GLSL120GLES'): env.GLSL120GLES('canvas_shadow.glsl'); env.GLSL120GLES('blur.glsl'); env.GLSL120GLES('copy.glsl'); + +Export('env') diff --git a/drivers/nrex/SCsub b/drivers/nrex/SCsub index a00c7b86f4f..0582e01978f 100644 --- a/drivers/nrex/SCsub +++ b/drivers/nrex/SCsub @@ -1,7 +1,5 @@ Import('env') -sources = [ - 'nrex.cpp', - 'regex.cpp', -] -env.add_source_files(env.drivers_sources, sources) +env.add_source_files(env.drivers_sources, "*.cpp") + +Export('env') diff --git a/drivers/png/SCsub b/drivers/png/SCsub index 1ab42a6db98..d1dab15ed4a 100644 --- a/drivers/png/SCsub +++ b/drivers/png/SCsub @@ -1,8 +1,8 @@ Import('env') -Import('env_drivers') + +env_png = env.Clone() # Thirdparty source files - if (env["libpng"] == "builtin"): thirdparty_dir = "#thirdparty/libpng/" thirdparty_sources = [ @@ -26,24 +26,21 @@ if (env["libpng"] == "builtin"): # Currently .ASM filter_neon.S does not compile on NT. import os if ("neon_enabled" in env and env["neon_enabled"]) and os.name!="nt": - env_drivers.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=2"]) - env_neon = env_drivers.Clone(); + env_png.Append(CPPFLAGS = ["-DPNG_ARM_NEON_OPT=2"]) + env_neon = env_png.Clone(); if "S_compiler" in env: env_neon['CC'] = env['S_compiler'] - #env_neon.Append(CPPFLAGS=["-DPNG_ARM_NEON"]) + #env_neon.Append(CPPFLAGS = ["-DPNG_ARM_NEON"]) thirdparty_sources.append(env_neon.Object(thirdparty_dir + "/arm/arm_init.c")) thirdparty_sources.append(env_neon.Object(thirdparty_dir + "/arm/filter_neon.S")) else: - env_drivers.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=0"]) + env_png.Append(CPPFLAGS = ["-DPNG_ARM_NEON_OPT=0"]) - #env_drivers.add_source_files(env.drivers_sources, thirdparty_sources) + #env_png.add_source_files(env.drivers_sources, thirdparty_sources) env.drivers_sources += thirdparty_sources # Concatenation necessary for neon objects it seems? - env_drivers.Append(CPPPATH = [thirdparty_dir]) + env_png.Append(CPPPATH = [thirdparty_dir]) +# Godot source files +env_png.add_source_files(env.drivers_sources, "*.cpp") -# Godot's own source files - -env_drivers.add_source_files(env.drivers_sources, "*.cpp") - -Export('env_drivers') Export('env') diff --git a/drivers/pulseaudio/SCsub b/drivers/pulseaudio/SCsub index 9fbb467baa1..0582e01978f 100644 --- a/drivers/pulseaudio/SCsub +++ b/drivers/pulseaudio/SCsub @@ -1,5 +1,5 @@ Import('env') -env.add_source_files(env.drivers_sources,"*.cpp") +env.add_source_files(env.drivers_sources, "*.cpp") Export('env') diff --git a/drivers/unix/SCsub b/drivers/unix/SCsub index 3d46a85cdf0..36a172025d3 100644 --- a/drivers/unix/SCsub +++ b/drivers/unix/SCsub @@ -10,6 +10,6 @@ f = open("os_unix_global_settings_path.cpp","wb") f.write(g_set_p) f.close() -env.add_source_files(env.drivers_sources,"*.cpp") +env.add_source_files(env.drivers_sources, "*.cpp") Export('env') diff --git a/drivers/windows/SCsub b/drivers/windows/SCsub index 9fbb467baa1..0582e01978f 100644 --- a/drivers/windows/SCsub +++ b/drivers/windows/SCsub @@ -1,5 +1,5 @@ Import('env') -env.add_source_files(env.drivers_sources,"*.cpp") +env.add_source_files(env.drivers_sources, "*.cpp") Export('env') From e57042e8a93e4f3d65cc91633f5af0daedf69a2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sat, 15 Oct 2016 15:36:18 +0200 Subject: [PATCH 19/19] png: Try to fix neon issue on iphone armv7 --- drivers/png/SCsub | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/drivers/png/SCsub b/drivers/png/SCsub index d1dab15ed4a..1e3f54a9ca4 100644 --- a/drivers/png/SCsub +++ b/drivers/png/SCsub @@ -6,22 +6,26 @@ env_png = env.Clone() if (env["libpng"] == "builtin"): thirdparty_dir = "#thirdparty/libpng/" thirdparty_sources = [ - thirdparty_dir + "png.c", - thirdparty_dir + "pngerror.c", - thirdparty_dir + "pngget.c", - thirdparty_dir + "pngmem.c", - thirdparty_dir + "pngpread.c", - thirdparty_dir + "pngread.c", - thirdparty_dir + "pngrio.c", - thirdparty_dir + "pngrtran.c", - thirdparty_dir + "pngrutil.c", - thirdparty_dir + "pngset.c", - thirdparty_dir + "pngtrans.c", - thirdparty_dir + "pngwio.c", - thirdparty_dir + "pngwrite.c", - thirdparty_dir + "pngwtran.c", - thirdparty_dir + "pngwutil.c", + "png.c", + "pngerror.c", + "pngget.c", + "pngmem.c", + "pngpread.c", + "pngread.c", + "pngrio.c", + "pngrtran.c", + "pngrutil.c", + "pngset.c", + "pngtrans.c", + "pngwio.c", + "pngwrite.c", + "pngwtran.c", + "pngwutil.c", ] + thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] + + env_png.add_source_files(env.drivers_sources, thirdparty_sources) + env_png.Append(CPPPATH = [thirdparty_dir]) # Currently .ASM filter_neon.S does not compile on NT. import os @@ -30,16 +34,14 @@ if (env["libpng"] == "builtin"): env_neon = env_png.Clone(); if "S_compiler" in env: env_neon['CC'] = env['S_compiler'] - #env_neon.Append(CPPFLAGS = ["-DPNG_ARM_NEON"]) - thirdparty_sources.append(env_neon.Object(thirdparty_dir + "/arm/arm_init.c")) - thirdparty_sources.append(env_neon.Object(thirdparty_dir + "/arm/filter_neon.S")) + neon_sources = [] + neon_sources.append(env_neon.Object(thirdparty_dir + "/arm/arm_init.c")) + neon_sources.append(env_neon.Object(thirdparty_dir + "/arm/filter_neon_intrinsics.c")) + neon_sources.append(env_neon.Object(thirdparty_dir + "/arm/filter_neon.S")) + env.drivers_sources += neon_sources else: env_png.Append(CPPFLAGS = ["-DPNG_ARM_NEON_OPT=0"]) - #env_png.add_source_files(env.drivers_sources, thirdparty_sources) - env.drivers_sources += thirdparty_sources # Concatenation necessary for neon objects it seems? - env_png.Append(CPPPATH = [thirdparty_dir]) - # Godot source files env_png.add_source_files(env.drivers_sources, "*.cpp")