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] 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