From 6217c3d550cc8d677793b3bd5c80e2a1b3ce3bac Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Tue, 14 Jun 2022 10:58:23 +0100 Subject: IVGCVSW-7024 Add missing license info for reuse lint Signed-off-by: Jim Flynn Change-Id: I97dee6982e0a7be01c13e9e803c0997547a39ff1 --- third-party/cxxopts/CHANGELOG.md.license | 4 ++ third-party/cxxopts/README.md.license | 4 ++ third-party/cxxopts/cxxopts.hpp | 4 +- third-party/doctest/doctest.h | 40 +++++++++--------- third-party/fmt/README.rst.license | 4 ++ third-party/fmt/core.h | 1 + third-party/fmt/format-inl.h | 1 + third-party/fmt/format.h | 2 + third-party/fmt/src/format.cc | 1 + third-party/ghc/README.md.license | 4 ++ third-party/ghc/filesystem.hpp | 14 ++++--- third-party/half/ChangeLog.txt.license | 4 ++ third-party/half/README.txt.license | 4 ++ third-party/half/half.hpp | 36 +++++++++-------- third-party/mapbox/README.md.license | 4 ++ third-party/mapbox/optional.hpp | 5 +++ third-party/mapbox/recursive_wrapper.hpp | 5 +++ third-party/mapbox/variant.hpp | 5 +++ third-party/mapbox/variant_cast.hpp | 5 +++ third-party/mapbox/variant_io.hpp | 5 +++ third-party/mapbox/variant_visitor.hpp | 9 ++++- third-party/stb/stb_image.h | 5 +++ third-party/stb/stb_image_resize.h | 69 +++++++++++++++++--------------- third-party/stb/stb_image_write.h | 35 +++++++++------- 24 files changed, 178 insertions(+), 92 deletions(-) create mode 100644 third-party/cxxopts/CHANGELOG.md.license create mode 100644 third-party/cxxopts/README.md.license create mode 100644 third-party/fmt/README.rst.license create mode 100644 third-party/ghc/README.md.license create mode 100644 third-party/half/ChangeLog.txt.license create mode 100644 third-party/half/README.txt.license create mode 100644 third-party/mapbox/README.md.license (limited to 'third-party') diff --git a/third-party/cxxopts/CHANGELOG.md.license b/third-party/cxxopts/CHANGELOG.md.license new file mode 100644 index 0000000000..bf1b5b51c7 --- /dev/null +++ b/third-party/cxxopts/CHANGELOG.md.license @@ -0,0 +1,4 @@ +# +# Copyright (c) 2014 Jarryd Beck +# SPDX-License-Identifier: MIT +# diff --git a/third-party/cxxopts/README.md.license b/third-party/cxxopts/README.md.license new file mode 100644 index 0000000000..bf1b5b51c7 --- /dev/null +++ b/third-party/cxxopts/README.md.license @@ -0,0 +1,4 @@ +# +# Copyright (c) 2014 Jarryd Beck +# SPDX-License-Identifier: MIT +# diff --git a/third-party/cxxopts/cxxopts.hpp b/third-party/cxxopts/cxxopts.hpp index 88e8a020df..5cebc4bd17 100644 --- a/third-party/cxxopts/cxxopts.hpp +++ b/third-party/cxxopts/cxxopts.hpp @@ -2,6 +2,8 @@ Copyright (c) 2014, 2015, 2016, 2017 Jarryd Beck +SPDX-License-Identifier: MIT + 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 @@ -1228,7 +1230,7 @@ namespace cxxopts public: ParseResult() {} - + ParseResult(const ParseResult&) = default; ParseResult(NameHashMap&& keys, ParsedHashMap&& values, std::vector sequential, std::vector&& unmatched_args) diff --git a/third-party/doctest/doctest.h b/third-party/doctest/doctest.h index 42eb039979..9719680a03 100644 --- a/third-party/doctest/doctest.h +++ b/third-party/doctest/doctest.h @@ -6,6 +6,8 @@ // // Copyright (c) 2016-2021 Viktor Kirilov // +// SPDX-License-Identifier: MIT +// // Distributed under the MIT Software License // See accompanying file LICENSE.txt or copy at // https://opensource.org/licenses/MIT @@ -607,7 +609,7 @@ namespace assertType { DT_WARN_THROWS_WITH = is_throws_with | is_warn, DT_CHECK_THROWS_WITH = is_throws_with | is_check, DT_REQUIRE_THROWS_WITH = is_throws_with | is_require, - + DT_WARN_THROWS_WITH_AS = is_throws_with | is_throws_as | is_warn, DT_CHECK_THROWS_WITH_AS = is_throws_with | is_throws_as | is_check, DT_REQUIRE_THROWS_WITH_AS = is_throws_with | is_throws_as | is_require, @@ -781,9 +783,9 @@ namespace detail { template struct remove_reference { typedef T type; }; template struct remove_reference { typedef T type; }; - template U declval(int); + template U declval(int); - template T declval(long); + template T declval(long); template auto declval() DOCTEST_NOEXCEPT -> decltype(declval(0)) ; @@ -1568,7 +1570,7 @@ DOCTEST_CLANG_SUPPRESS_WARNING_POP DOCTEST_INTERFACE void toStream(std::ostream* s, int long long in); DOCTEST_INTERFACE void toStream(std::ostream* s, int long long unsigned in); - // ContextScope base class used to allow implementing methods of ContextScope + // ContextScope base class used to allow implementing methods of ContextScope // that don't depend on the template parameter in doctest.cpp. class DOCTEST_INTERFACE ContextScopeBase : public IContextScope { protected: @@ -1620,7 +1622,7 @@ DOCTEST_CLANG_SUPPRESS_WARNING_POP bool log(); void react(); }; - + template ContextScope MakeContextScope(const L &lambda) { return ContextScope(lambda); @@ -2991,7 +2993,7 @@ namespace detail { namespace timer_large_integer { - + #if defined(DOCTEST_PLATFORM_WINDOWS) typedef ULONGLONG type; #else // DOCTEST_PLATFORM_WINDOWS @@ -3747,7 +3749,7 @@ namespace detail { if(matchesAny(m_signature.m_name.c_str(), s->filters[7], false, s->case_sensitive)) return; } - + // if a Subcase on the same level has already been entered if(s->subcasesStack.size() < size_t(s->subcasesCurrentMaxLevel)) { s->should_reenter = true; @@ -3769,8 +3771,8 @@ namespace detail { DOCTEST_ITERATE_THROUGH_REPORTERS(subcase_start, m_signature); } - DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4996) // std::uncaught_exception is deprecated in C++17 - DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") + DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4996) // std::uncaught_exception is deprecated in C++17 + DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") Subcase::~Subcase() { @@ -3797,8 +3799,8 @@ namespace detail { } } - DOCTEST_CLANG_SUPPRESS_WARNING_POP - DOCTEST_GCC_SUPPRESS_WARNING_POP + DOCTEST_CLANG_SUPPRESS_WARNING_POP + DOCTEST_GCC_SUPPRESS_WARNING_POP DOCTEST_MSVC_SUPPRESS_WARNING_POP Subcase::operator bool() const { return m_entered; } @@ -4145,8 +4147,8 @@ namespace detail { g_infoContexts.push_back(this); } - DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4996) // std::uncaught_exception is deprecated in C++17 - DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") + DOCTEST_MSVC_SUPPRESS_WARNING_WITH_PUSH(4996) // std::uncaught_exception is deprecated in C++17 + DOCTEST_GCC_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") DOCTEST_CLANG_SUPPRESS_WARNING_WITH_PUSH("-Wdeprecated-declarations") // destroy cannot be inlined into the destructor because that would mean calling stringify after @@ -4165,8 +4167,8 @@ namespace detail { g_infoContexts.pop_back(); } - DOCTEST_CLANG_SUPPRESS_WARNING_POP - DOCTEST_GCC_SUPPRESS_WARNING_POP + DOCTEST_CLANG_SUPPRESS_WARNING_POP + DOCTEST_GCC_SUPPRESS_WARNING_POP DOCTEST_MSVC_SUPPRESS_WARNING_POP } // namespace detail namespace { @@ -5117,7 +5119,7 @@ namespace { test_case_start_impl(in); xml.ensureTagClosed(); } - + void test_case_reenter(const TestCaseData&) override {} void test_case_end(const CurrentTestCaseStats& st) override { @@ -5837,7 +5839,7 @@ namespace { subcasesStack.clear(); currentSubcaseLevel = 0; } - + void test_case_reenter(const TestCaseData&) override { subcasesStack.clear(); } @@ -6462,7 +6464,7 @@ int Context::run() { DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_start, tc); p->timer.start(); - + bool run_test = true; do { @@ -6502,7 +6504,7 @@ DOCTEST_MSVC_SUPPRESS_WARNING_POP run_test = false; p->failure_flags |= TestCaseFailureReason::TooManyFailedAsserts; } - + if(p->should_reenter && run_test) DOCTEST_ITERATE_THROUGH_REPORTERS(test_case_reenter, tc); if(!p->should_reenter) diff --git a/third-party/fmt/README.rst.license b/third-party/fmt/README.rst.license new file mode 100644 index 0000000000..3755e294c2 --- /dev/null +++ b/third-party/fmt/README.rst.license @@ -0,0 +1,4 @@ +# +# Copyright (c) 2012 - present, Victor Zverovich +# SPDX-License-Identifier: MIT +# diff --git a/third-party/fmt/core.h b/third-party/fmt/core.h index 338e0c708c..a9924188d4 100644 --- a/third-party/fmt/core.h +++ b/third-party/fmt/core.h @@ -2,6 +2,7 @@ // // Copyright (c) 2012 - present, Victor Zverovich // All rights reserved. +// SPDX-License-Identifier: MIT // // For the license information refer to format.h. diff --git a/third-party/fmt/format-inl.h b/third-party/fmt/format-inl.h index d3970d47fa..f4e3392d4a 100644 --- a/third-party/fmt/format-inl.h +++ b/third-party/fmt/format-inl.h @@ -2,6 +2,7 @@ // // Copyright (c) 2012 - 2016, Victor Zverovich // All rights reserved. +// SPDX-License-Identifier: MIT // // For the license information refer to format.h. diff --git a/third-party/fmt/format.h b/third-party/fmt/format.h index 712c6ebe4e..20ed0bb426 100644 --- a/third-party/fmt/format.h +++ b/third-party/fmt/format.h @@ -3,6 +3,8 @@ Copyright (c) 2012 - present, Victor Zverovich + SPDX-License-Identifier: MIT + 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 diff --git a/third-party/fmt/src/format.cc b/third-party/fmt/src/format.cc index a64a1f3893..10af1f543e 100644 --- a/third-party/fmt/src/format.cc +++ b/third-party/fmt/src/format.cc @@ -2,6 +2,7 @@ // // Copyright (c) 2012 - 2016, Victor Zverovich // All rights reserved. +// SPDX-License-Identifier: MIT // // For the license information refer to format.h. diff --git a/third-party/ghc/README.md.license b/third-party/ghc/README.md.license new file mode 100644 index 0000000000..5da816353b --- /dev/null +++ b/third-party/ghc/README.md.license @@ -0,0 +1,4 @@ +# +# Copyright (c) 2018, Steffen Schümann +# SPDX-License-Identifier: MIT +# diff --git a/third-party/ghc/filesystem.hpp b/third-party/ghc/filesystem.hpp index 1f0fe39209..bc00025f8e 100644 --- a/third-party/ghc/filesystem.hpp +++ b/third-party/ghc/filesystem.hpp @@ -6,6 +6,8 @@ // // Copyright (c) 2018, Steffen Schümann // +// SPDX-License-Identifier: MIT +// // 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 @@ -211,7 +213,7 @@ public: template constexpr char_type path_helper_base::preferred_separator; #endif - + // 30.10.8 class path class GHC_FS_API_CLASS path #if defined(GHC_OS_WINDOWS) && defined(GHC_WIN_WSTRING_STRING_TYPE) @@ -228,7 +230,7 @@ public: #endif using string_type = std::basic_string; using path_helper_base::preferred_separator; - + // 30.10.10.1 enumeration format /// The path format in wich the constructor argument is given. enum format { @@ -1154,7 +1156,7 @@ GHC_INLINE std::error_code make_system_error(int err) return std::error_code(err ? err : errno, std::system_category()); } #endif - + #endif // GHC_EXPAND_IMPL template @@ -1277,7 +1279,7 @@ GHC_INLINE unsigned consumeUtf8Fragment(const unsigned state, const uint8_t frag codepoint = (state ? (codepoint << 6) | (fragment & 0x3fu) : (0xffu >> category) & fragment); return state == S_RJCT ? static_cast(S_RJCT) : static_cast((utf8_state_info[category + 16] >> (state << 2)) & 0xf); } - + GHC_INLINE bool validUtf8(const std::string& utf8String) { std::string::const_iterator iter = utf8String.begin(); @@ -1295,9 +1297,9 @@ GHC_INLINE bool validUtf8(const std::string& utf8String) } } // namespace detail - + #endif - + namespace detail { template ::type* = nullptr> diff --git a/third-party/half/ChangeLog.txt.license b/third-party/half/ChangeLog.txt.license new file mode 100644 index 0000000000..771b79e041 --- /dev/null +++ b/third-party/half/ChangeLog.txt.license @@ -0,0 +1,4 @@ +# +# Copyright (c) 2012-2017 Christian Rau +# SPDX-License-Identifier: MIT +# diff --git a/third-party/half/README.txt.license b/third-party/half/README.txt.license new file mode 100644 index 0000000000..771b79e041 --- /dev/null +++ b/third-party/half/README.txt.license @@ -0,0 +1,4 @@ +# +# Copyright (c) 2012-2017 Christian Rau +# SPDX-License-Identifier: MIT +# diff --git a/third-party/half/half.hpp b/third-party/half/half.hpp index 0d7459bb45..4e432b9a50 100644 --- a/third-party/half/half.hpp +++ b/third-party/half/half.hpp @@ -2,16 +2,18 @@ // // Copyright (c) 2012-2017 Christian Rau // -// 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 +// SPDX-License-Identifier: MIT +// +// 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, +// 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. // Version 1.12.0 @@ -195,8 +197,8 @@ /// Default rounding mode. -/// This specifies the rounding mode used for all conversions between [half](\ref half_float::half)s and `float`s as well as -/// for the half_cast() if not specifying a rounding mode explicitly. It can be redefined (before including half.hpp) to one +/// This specifies the rounding mode used for all conversions between [half](\ref half_float::half)s and `float`s as well as +/// for the half_cast() if not specifying a rounding mode explicitly. It can be redefined (before including half.hpp) to one /// of the standard rounding modes using their respective constants or the equivalent values of `std::float_round_style`: /// /// `std::float_round_style` | value | rounding @@ -207,30 +209,30 @@ /// `std::round_toward_infinity` | 2 | toward positive infinity /// `std::round_toward_neg_infinity` | 3 | toward negative infinity /// -/// By default this is set to `-1` (`std::round_indeterminate`), which uses truncation (round toward zero, but with overflows -/// set to infinity) and is the fastest rounding mode possible. It can even be set to `std::numeric_limits::round_style` +/// By default this is set to `-1` (`std::round_indeterminate`), which uses truncation (round toward zero, but with overflows +/// set to infinity) and is the fastest rounding mode possible. It can even be set to `std::numeric_limits::round_style` /// to synchronize the rounding mode with that of the underlying single-precision implementation. #ifndef HALF_ROUND_STYLE #define HALF_ROUND_STYLE -1 // = std::round_indeterminate #endif /// Tie-breaking behaviour for round to nearest. -/// This specifies if ties in round to nearest should be resolved by rounding to the nearest even value. By default this is -/// defined to `0` resulting in the faster but slightly more biased behaviour of rounding away from zero in half-way cases (and -/// thus equal to the round() function), but can be redefined to `1` (before including half.hpp) if more IEEE-conformant +/// This specifies if ties in round to nearest should be resolved by rounding to the nearest even value. By default this is +/// defined to `0` resulting in the faster but slightly more biased behaviour of rounding away from zero in half-way cases (and +/// thus equal to the round() function), but can be redefined to `1` (before including half.hpp) if more IEEE-conformant /// behaviour is needed. #ifndef HALF_ROUND_TIES_TO_EVEN #define HALF_ROUND_TIES_TO_EVEN 0 // ties away from zero #endif /// Value signaling overflow. -/// In correspondence with `HUGE_VAL[F|L]` from `` this symbol expands to a positive value signaling the overflow of an +/// In correspondence with `HUGE_VAL[F|L]` from `` this symbol expands to a positive value signaling the overflow of an /// operation, in particular it just evaluates to positive infinity. #define HUGE_VALH std::numeric_limits::infinity() /// Fast half-precision fma function. -/// This symbol is only defined if the fma() function generally executes as fast as, or faster than, a separate -/// half-precision multiplication followed by an addition. Due to the internal single-precision implementation of all +/// This symbol is only defined if the fma() function generally executes as fast as, or faster than, a separate +/// half-precision multiplication followed by an addition. Due to the internal single-precision implementation of all /// arithmetic operations, this is in fact always the case. #define FP_FAST_FMAH 1 @@ -366,7 +368,7 @@ namespace half_float }; /// SFINAE helper for generic half-precision functions. - /// This class template has to be specialized for each valid combination of argument types to provide a corresponding + /// This class template has to be specialized for each valid combination of argument types to provide a corresponding /// `type` member equivalent to \a T. /// \tparam T type to return template struct enable {}; diff --git a/third-party/mapbox/README.md.license b/third-party/mapbox/README.md.license new file mode 100644 index 0000000000..aba8d376ed --- /dev/null +++ b/third-party/mapbox/README.md.license @@ -0,0 +1,4 @@ +# +# Copyright (c) MapBox 2016. All rights reserved. +# SPDX-License-Identifier: BSD-3-Clause +# \ No newline at end of file diff --git a/third-party/mapbox/optional.hpp b/third-party/mapbox/optional.hpp index d84705c1ac..b9e682ab92 100644 --- a/third-party/mapbox/optional.hpp +++ b/third-party/mapbox/optional.hpp @@ -1,3 +1,8 @@ +// +// Copyright (c) MapBox All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// + #ifndef MAPBOX_UTIL_OPTIONAL_HPP #define MAPBOX_UTIL_OPTIONAL_HPP diff --git a/third-party/mapbox/recursive_wrapper.hpp b/third-party/mapbox/recursive_wrapper.hpp index 4ffcbd7c93..8a85d3035c 100644 --- a/third-party/mapbox/recursive_wrapper.hpp +++ b/third-party/mapbox/recursive_wrapper.hpp @@ -1,3 +1,8 @@ +// +// Copyright (c) MapBox All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// + #ifndef MAPBOX_UTIL_RECURSIVE_WRAPPER_HPP #define MAPBOX_UTIL_RECURSIVE_WRAPPER_HPP diff --git a/third-party/mapbox/variant.hpp b/third-party/mapbox/variant.hpp index 06a46abe5d..71108572e2 100644 --- a/third-party/mapbox/variant.hpp +++ b/third-party/mapbox/variant.hpp @@ -1,3 +1,8 @@ +// +// Copyright (c) MapBox All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// + #ifndef MAPBOX_UTIL_VARIANT_HPP #define MAPBOX_UTIL_VARIANT_HPP diff --git a/third-party/mapbox/variant_cast.hpp b/third-party/mapbox/variant_cast.hpp index fe1ab35432..0795bcf40e 100644 --- a/third-party/mapbox/variant_cast.hpp +++ b/third-party/mapbox/variant_cast.hpp @@ -1,3 +1,8 @@ +// +// Copyright (c) MapBox All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// + #ifndef VARIANT_CAST_HPP #define VARIANT_CAST_HPP diff --git a/third-party/mapbox/variant_io.hpp b/third-party/mapbox/variant_io.hpp index 1456cc5abc..7fdb8183e7 100644 --- a/third-party/mapbox/variant_io.hpp +++ b/third-party/mapbox/variant_io.hpp @@ -1,3 +1,8 @@ +// +// Copyright (c) MapBox All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// + #ifndef MAPBOX_UTIL_VARIANT_IO_HPP #define MAPBOX_UTIL_VARIANT_IO_HPP diff --git a/third-party/mapbox/variant_visitor.hpp b/third-party/mapbox/variant_visitor.hpp index 54ddba0e1c..a5657d3451 100644 --- a/third-party/mapbox/variant_visitor.hpp +++ b/third-party/mapbox/variant_visitor.hpp @@ -1,3 +1,8 @@ +// +// Copyright (c) MapBox All rights reserved. +// SPDX-License-Identifier: BSD-3-Clause +// + #ifndef MAPBOX_UTIL_VARIANT_VISITOR_HPP #define MAPBOX_UTIL_VARIANT_VISITOR_HPP @@ -15,7 +20,7 @@ struct visitor : Fn using Fn::operator(); template - visitor(T&& fn) : Fn(std::forward(fn)) {} + visitor(T&& fn) : Fn(std::forward(fn)) {} }; template @@ -36,7 +41,7 @@ visitor::type...> make_visitor(Fns&&... fns) return visitor::type...> (std::forward(fns)...); } - + } // namespace util } // namespace mapbox diff --git a/third-party/stb/stb_image.h b/third-party/stb/stb_image.h index f0cc5818de..5d4d5cf8bf 100644 --- a/third-party/stb/stb_image.h +++ b/third-party/stb/stb_image.h @@ -1,3 +1,8 @@ +// +// Copyright (c) 2017 Sean Barrett +// SPDX-License-Identifier: MIT +// + /* stb_image - v2.16 - public domain image loader - http://nothings.org/stb_image.h no warranty implied; use at your own risk diff --git a/third-party/stb/stb_image_resize.h b/third-party/stb/stb_image_resize.h index 858cc87fc8..cece8ef9fb 100644 --- a/third-party/stb/stb_image_resize.h +++ b/third-party/stb/stb_image_resize.h @@ -1,3 +1,8 @@ +// +// Copyright (c) 2017 Sean Barrett +// SPDX-License-Identifier: MIT +// + /* stb_image_resize - v0.95 - public domain image resizing by Jorge L Rodriguez (@VinoBS) - 2014 http://github.com/nothings/stb @@ -20,8 +25,8 @@ output_pixels, out_w, out_h, 0, num_channels , alpha_chan , 0) stbir_resize_uint8_srgb_edgemode( - input_pixels , in_w , in_h , 0, - output_pixels, out_w, out_h, 0, + input_pixels , in_w , in_h , 0, + output_pixels, out_w, out_h, 0, num_channels , alpha_chan , 0, STBIR_EDGE_CLAMP) // WRAP/REFLECT/ZERO @@ -231,7 +236,7 @@ STBIRDEF int stbir_resize_float( const float *input_pixels , int input_w , i int num_channels); -// The following functions interpret image data as gamma-corrected sRGB. +// The following functions interpret image data as gamma-corrected sRGB. // Specify STBIR_ALPHA_CHANNEL_NONE if you have no alpha channel, // or otherwise provide the index of the alpha channel. Flags value // of 0 will probably do the right thing if you're not sure what @@ -304,19 +309,19 @@ typedef enum STBIRDEF int stbir_resize_uint8_generic( const unsigned char *input_pixels , int input_w , int input_h , int input_stride_in_bytes, unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags, - stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, + stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, void *alloc_context); STBIRDEF int stbir_resize_uint16_generic(const stbir_uint16 *input_pixels , int input_w , int input_h , int input_stride_in_bytes, stbir_uint16 *output_pixels , int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags, - stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, + stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, void *alloc_context); STBIRDEF int stbir_resize_float_generic( const float *input_pixels , int input_w , int input_h , int input_stride_in_bytes, float *output_pixels , int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags, - stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, + stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, void *alloc_context); @@ -348,7 +353,7 @@ STBIRDEF int stbir_resize( const void *input_pixels , int input_w , int void *output_pixels, int output_w, int output_h, int output_stride_in_bytes, stbir_datatype datatype, int num_channels, int alpha_channel, int flags, - stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, + stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, stbir_filter filter_horizontal, stbir_filter filter_vertical, stbir_colorspace space, void *alloc_context); @@ -356,7 +361,7 @@ STBIRDEF int stbir_resize_subpixel(const void *input_pixels , int input_w , int void *output_pixels, int output_w, int output_h, int output_stride_in_bytes, stbir_datatype datatype, int num_channels, int alpha_channel, int flags, - stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, + stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, stbir_filter filter_horizontal, stbir_filter filter_vertical, stbir_colorspace space, void *alloc_context, float x_scale, float y_scale, @@ -366,7 +371,7 @@ STBIRDEF int stbir_resize_region( const void *input_pixels , int input_w , int void *output_pixels, int output_w, int output_h, int output_stride_in_bytes, stbir_datatype datatype, int num_channels, int alpha_channel, int flags, - stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, + stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, stbir_filter filter_horizontal, stbir_filter filter_vertical, stbir_colorspace space, void *alloc_context, float s0, float t0, float s1, float t1); @@ -668,14 +673,14 @@ static const stbir_uint32 fp32_to_srgb8_tab4[104] = { 0x44c20798, 0x488e071e, 0x4c1c06b6, 0x4f76065d, 0x52a50610, 0x55ac05cc, 0x5892058f, 0x5b590559, 0x5e0c0a23, 0x631c0980, 0x67db08f6, 0x6c55087f, 0x70940818, 0x74a007bd, 0x787d076c, 0x7c330723, }; - + static stbir_uint8 stbir__linear_to_srgb_uchar(float in) { static const stbir__FP32 almostone = { 0x3f7fffff }; // 1-eps static const stbir__FP32 minval = { (127-13) << 23 }; stbir_uint32 tab,bias,scale,t; stbir__FP32 f; - + // Clamp to [2^(-13), 1-eps]; these two values map to 0 and 1, respectively. // The tests are carefully written so that NaNs map to 0, same as in the reference // implementation. @@ -683,13 +688,13 @@ static stbir_uint8 stbir__linear_to_srgb_uchar(float in) in = minval.f; if (in > almostone.f) in = almostone.f; - + // Do the table lookup and unpack bias, scale f.f = in; tab = fp32_to_srgb8_tab4[(f.u - minval.u) >> 20]; bias = (tab >> 16) << 9; scale = tab & 0xffff; - + // Grab next-highest mantissa bits and perform linear interpolation t = (f.u >> 12) & 0xff; return (unsigned char) ((bias + scale*t) >> 16); @@ -2442,7 +2447,7 @@ static int stbir__resize_arbitrary( return 0; result = stbir__resize_allocated(&info, input_data, input_stride_in_bytes, - output_data, output_stride_in_bytes, + output_data, output_stride_in_bytes, alpha_channel, flags, type, edge_horizontal, edge_vertical, colorspace, extra_memory, memory_required); @@ -2496,7 +2501,7 @@ STBIRDEF int stbir_resize_uint8_srgb_edgemode(const unsigned char *input_pixels STBIRDEF int stbir_resize_uint8_generic( const unsigned char *input_pixels , int input_w , int input_h , int input_stride_in_bytes, unsigned char *output_pixels, int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags, - stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, + stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, void *alloc_context) { return stbir__resize_arbitrary(alloc_context, input_pixels, input_w, input_h, input_stride_in_bytes, @@ -2508,7 +2513,7 @@ STBIRDEF int stbir_resize_uint8_generic( const unsigned char *input_pixels , int STBIRDEF int stbir_resize_uint16_generic(const stbir_uint16 *input_pixels , int input_w , int input_h , int input_stride_in_bytes, stbir_uint16 *output_pixels , int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags, - stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, + stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, void *alloc_context) { return stbir__resize_arbitrary(alloc_context, input_pixels, input_w, input_h, input_stride_in_bytes, @@ -2521,7 +2526,7 @@ STBIRDEF int stbir_resize_uint16_generic(const stbir_uint16 *input_pixels , int STBIRDEF int stbir_resize_float_generic( const float *input_pixels , int input_w , int input_h , int input_stride_in_bytes, float *output_pixels , int output_w, int output_h, int output_stride_in_bytes, int num_channels, int alpha_channel, int flags, - stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, + stbir_edge edge_wrap_mode, stbir_filter filter, stbir_colorspace space, void *alloc_context) { return stbir__resize_arbitrary(alloc_context, input_pixels, input_w, input_h, input_stride_in_bytes, @@ -2535,7 +2540,7 @@ STBIRDEF int stbir_resize( const void *input_pixels , int input_w , int void *output_pixels, int output_w, int output_h, int output_stride_in_bytes, stbir_datatype datatype, int num_channels, int alpha_channel, int flags, - stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, + stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, stbir_filter filter_horizontal, stbir_filter filter_vertical, stbir_colorspace space, void *alloc_context) { @@ -2550,7 +2555,7 @@ STBIRDEF int stbir_resize_subpixel(const void *input_pixels , int input_w , int void *output_pixels, int output_w, int output_h, int output_stride_in_bytes, stbir_datatype datatype, int num_channels, int alpha_channel, int flags, - stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, + stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, stbir_filter filter_horizontal, stbir_filter filter_vertical, stbir_colorspace space, void *alloc_context, float x_scale, float y_scale, @@ -2571,7 +2576,7 @@ STBIRDEF int stbir_resize_region( const void *input_pixels , int input_w , int void *output_pixels, int output_w, int output_h, int output_stride_in_bytes, stbir_datatype datatype, int num_channels, int alpha_channel, int flags, - stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, + stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, stbir_filter filter_horizontal, stbir_filter filter_vertical, stbir_colorspace space, void *alloc_context, float s0, float t0, float s1, float t1) @@ -2588,20 +2593,20 @@ STBIRDEF int stbir_resize_region( const void *input_pixels , int input_w , int ------------------------------------------------------------------------------ MIT License Copyright (c) 2017 Sean Barrett -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 +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 +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 +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/third-party/stb/stb_image_write.h b/third-party/stb/stb_image_write.h index bcbb16fff4..bf5bd1dafb 100644 --- a/third-party/stb/stb_image_write.h +++ b/third-party/stb/stb_image_write.h @@ -1,3 +1,8 @@ +// +// Copyright (c) 2017 Sean Barrett +// SPDX-License-Identifier: MIT +// + /* stb_image_write - v1.06 - public domain - http://nothings.org/stb/stb_image_write.h writes out PNG/BMP/TGA/JPEG/HDR images to C stdio - Sean Barrett 2010-2015 no warranty implied; use at your own risk @@ -81,7 +86,7 @@ USAGE: TGA supports RLE or non-RLE compressed data. To use non-RLE-compressed data, set the global variable 'stbi_write_tga_with_rle' to 0. - + JPEG does ignore alpha channels in input data; quality is between 1 and 100. Higher quality looks better but results in a bigger image. JPEG baseline (no JPEG progressive). @@ -114,7 +119,7 @@ CREDITS: Thatcher Ulrich github:poppolopoppo Patrick Boettcher - + LICENSE See end of file for license information. @@ -1250,7 +1255,7 @@ static int stbi_write_jpg_core(stbi__write_context *s, int width, int height, in 37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99}; static const int UVQT[] = {17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99, 99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99}; - static const float aasf[] = { 1.0f * 2.828427125f, 1.387039845f * 2.828427125f, 1.306562965f * 2.828427125f, 1.175875602f * 2.828427125f, + static const float aasf[] = { 1.0f * 2.828427125f, 1.387039845f * 2.828427125f, 1.306562965f * 2.828427125f, 1.175875602f * 2.828427125f, 1.0f * 2.828427125f, 0.785694958f * 2.828427125f, 0.541196100f * 2.828427125f, 0.275899379f * 2.828427125f }; int row, col, i, k; @@ -1417,20 +1422,20 @@ STBIWDEF int stbi_write_jpg(char const *filename, int x, int y, int comp, const ------------------------------------------------------------------------------ MIT License Copyright (c) 2017 Sean Barrett -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 +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 +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 +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. ------------------------------------------------------------------------------ */ -- cgit v1.2.1